Running 'testthat.R' [1s/1s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(IGP)
  
  Initialize Python Version 2.7.16 (default, Apr  6 2019, 01:42:57) 
  [GCC 8.3.0]
  
  > 
  > test_check("IGP")
  [1] "laGP"
  [1] "mlegp"
  -- 1. Error: 1D data works (@test_IGP.R#11)  -----------------------------------
  BLAS/LAPACK routine 'DPPTRS' gave error code -1
  1: IGP(package = package, X = X1, Z = Z1) at testthat/test_IGP.R:11
  2: IGP_mlegp$new(X = X, Z = Z, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: self$init(...)
  5: self$.init(...)
  6: capture.output(m <- do.call(mlegp::mlegp, argss))
  7: evalVis(expr)
  8: withVisible(eval(expr, pf))
  9: eval(expr, pf)
  10: eval(expr, pf)
  11: do.call(mlegp::mlegp, argss)
  12: (function (X, Z, constantMean = 1, nugget = NULL, nugget.known = 0, min.nugget = 0, 
         param.names = NULL, gp.names = NULL, PC.UD = NULL, PC.num = NULL, PC.percent = NULL, 
         simplex.ntries = 5, simplex.maxiter = 500, simplex.reltol = 1e-08, BFGS.maxiter = 500, 
         BFGS.tol = 0.01, BFGS.h = 1e-10, seed = 0, verbose = 1, parallel = FALSE) 
     {
         X = as.matrix(X)
         orig.X = X
         Z = as.matrix(Z)
         reps = NULL
         un.sum = NULL
         if (nrow(X) == 1) {
             stop("error: there must be at least two input values")
         }
         if (!is.null(param.names) && length(param.names) != dim(X)[2]) {
             stop("length of param.names must match number of columns of X")
         }
         if (!is.null(PC.percent)) 
             PC.num = numSingularValues(Z, PC.percent)
         if (!is.null(PC.num)) {
             weights = pcweights(Z, weights.num = PC.num)
             Z = t(weights$Vprime)
             if (PC.num == 1) {
                 stop("error: currently not implemented for PC.num = 1 (set PC.num directly)")
             }
             PC.UD = weights$UD
         }
         if (!is.null(dim(Z))) {
             numGPs = dim(Z)[2]
         }
         else {
             numGPs = 1
             Z = matrix(Z)
         }
         if (length(seed) != 1 && length(seed) != ncol(Z)) {
             stop("error: seed length must equal dimensions of Z, or 1")
         }
         if (is.null(gp.names)) {
             gp.names = paste("gp #", 1:numGPs)
         }
         if (length(gp.names) != numGPs) {
             stop("length of gp.names must match number of GPs")
         }
         if (dim(X)[1] != dim(Z)[1]) {
             stop("error: X matrix and output matrix must have same number of rows; \n\tfor PC weights, make sure each column of Z is a computer model run")
         }
         if (min(diag(var(Z))) <= 0) {
             stop("error: Z does not vary for at least one column")
         }
         if (dim(Z)[2] > 1 && !is.null(nugget) && length(nugget) > 1) {
             stop("error: cannot handle nugget matrix with multiple field observations; try fitting 1 gp at a time")
         }
         if (!is.null(nugget) && length(nugget) > dim(Z)[1]) {
             stop("length of nugget matrix must match number of observations")
         }
         if (min(apply(X, 2, max) - apply(X, 2, min)) == 0) {
             stop("error: at least one parameter does not vary in design")
         }
         if (constantMean != 1) {
             ones = rep(1, dim(X)[1])
             dX = cbind(ones, X)
             t = try(solve(t(dX) %*% dX), TRUE)
             if (class(t) == "try-error") {
                 stop("error: design matrix with intercept is not full rank; set constantMean = 1")
             }
         }
         if (nugget.known == 1) {
             if (!is.null(nugget) && length(nugget) > 1 && length(nugget) != nrow(X)) {
                 stop("error: for nugget.known = 1, length of nugget matrix must be nrow(X) or 1")
             }
             un.sum = uniqueSummary(X, Z)
             orig.X = X
             X = un.sum$uniqueX
             Z = un.sum$uniqueMeans
             reps = un.sum$reps
         }
         if (!is.null(nugget) && length(nugget) == 1 && nugget <= 0) {
             if (anyReps(X)) 
                 stop("at least 2 or more inputs are identical...must use nugget!")
         }
         if (is.null(nugget)) {
             if (!anyReps(X)) {
                 if (verbose > 0) 
                     cat("no reps detected - nugget will not be estimated\n")
             }
             else {
                 if (verbose > 0 && nugget.known == 0) 
                     cat("reps detected - nugget will be estimated\n")
             }
         }
         numEstimates = dim(X)[2] + 1
         if (anyReps(X) || !is.null(nugget) || length(nugget) > 1) 
             numEstimates = numEstimates + 1
         if (constantMean == 1) {
             numEstimates = numEstimates + 1
         }
         else {
             numEstimates = numEstimates + dim(X)[2] + 1
         }
         estimates = rep(0, numEstimates)
         if (verbose > 0) 
             cat("\n")
         l = NULL
         Zlist = list()
         if (length(seed) == 1) 
             seed = rep(seed, ncol(Z))
         for (i in 1:ncol(Z)) {
             Zlist[[i]] = list()
             Zlist[[i]]$Z = matrix(Z[, i])
             Zlist[[i]]$i = i
             Zlist[[i]]$seed = seed[i]
         }
         if (!parallel) {
             l = lapply(Zlist, mlegp2, XX = X, orig.XX = orig.X, nugget = nugget, nugget.known = nugget.known, 
                 reps = reps, un.sum = un.sum, numEstimates = numEstimates, constantMean = constantMean, 
                 simplex.ntries = simplex.ntries, simplex.maxiter = simplex.maxiter, simplex.reltol = simplex.reltol, 
                 BFGS.maxiter = BFGS.maxiter, BFGS.tol = BFGS.tol, BFGS.h = BFGS.h, min.nugget = min.nugget, 
                 verbose = verbose, param.names = param.names)
         }
         if (parallel) {
             if (requireNamespace("snowfall", quietly = TRUE)) {
                 cat("fitting ")
                 cat(length(Zlist))
                 cat(" GPs in parallel mode...\n")
                 l = snowfall::sfLapply(Zlist, mlegp2, XX = X, orig.XX = orig.X, nugget = nugget, 
                     nugget.known = nugget.known, reps = reps, un.sum = un.sum, numEstimates = numEstimates, 
                     constantMean = constantMean, simplex.ntries = simplex.ntries, simplex.maxiter = simplex.maxiter, 
                     simplex.reltol = simplex.reltol, BFGS.maxiter = BFGS.maxiter, BFGS.tol = BFGS.tol, 
                     BFGS.h = BFGS.h, min.nugget = min.nugget, verbose = verbose, param.names = param.names)
                 cat("...done\n")
             }
             else {
                 cat("Error: the package \"snowfall\" is required when parallel = TRUE")
             }
         }
         if (numGPs == 1) {
             return(l[[1]])
         }
         return(gp.list(l, UD = PC.UD, param.names = param.names, gp.names = gp.names))
     })(X = structure(c(0.756795963970944, 0.851910523604602, 0.596241152612492, 0.483231098158285, 
     0.146193146705627, 0.301060747820884, 0.496704154415056, 0.614520885283127, 0.932169569423422, 
     0.71158628561534, 0.271709528053179, 0.0781647460535169, 0.349701496073976, 0.994676420232281, 
     0.754228373523802, 0.366301925620064, 0.324030560441315, 0.177487333770841, 0.624238020041957, 
     0.120935367653146, 0.432746119564399, 0.69297692948021, 0.0973661886528134, 0.929447848116979, 
     0.63123500905931, 0.672633095877245, 0.0769625301472843, 0.649798246799037, 0.368995229015127, 
     0.27588585857302, 0.85185077204369, 0.168924218043685, 0.921579213812947, 0.37490891921334, 
     0.763203643262386, 0.909097076160833, 0.297870630165562, 0.380421823356301, 0.413405543891713, 
     0.583990770624951, 0.913848544238135, 0.844577595358714, 0.464183783624321, 0.917356757447124, 
     0.845521434443071, 0.148438855772838, 0.645520324585959, 0.751313545973971, 0.759818343212828, 
     0.455552992876619, 0.968383892439306, 0.84601744543761, 0.922660319833085, 0.728676395723596, 
     0.939275440992787, 0.609015228925273, 0.795776667771861, 0.400799488648772, 0.975885825697333, 
     0.888921530917287, 0.546954232966527, 0.904278334230185, 0.554735904559493, 0.137942561181262, 
     0.234431340591982, 0.596379598369822, 0.0616737094242126, 0.303615504410118, 0.904523386154324, 
     0.189744053408504, 0.308244422310963, 0.794203133555129, 0.724531714105979, 0.00477960403077304, 
     0.64972371305339, 0.621352303307503, 0.879686156986281, 0.058987139724195, 0.151890245499089, 
     0.871074453927577), .Dim = c(40L, 2L)), Z = c(-1.5146414145241, -1.63056489216486, 
     -0.344254452533828, -0.391495346849309, -0.028807655641778, 1.74991550733684, -0.77250716507119, 
     -1.65821171682873, -1.41194686156955, -0.695233197452849, 0.793371552682892, -0.349930187568062, 
     0.344615892063175, -1.02696560558746, -1.37172835294623, 0.112458601208234, -0.0640655625934344, 
     1.48159496669158, -0.854359005522068, 0.0476935068809098, 0.120794027379702, -1.50313296346871, 
     0.235778253996579, 0.332313000454884, 0.262764105389814, -1.45391398510685, 0.842907396175266, 
     0.134377610833038, 0.168722314805605, 1.91763339860342, 0.131454228479175, -0.0896510439375815, 
     -1.45998726537595, 0.73741110661094, -1.80413945888094, -1.23215958795109, 0.269361053175431, 
     1.04434979907413, 1.33429930922797, -1.22620996619566), verbose = 0, nugget = 1e-08, 
         nugget.known = 1e-08)
  13: lapply(Zlist, mlegp2, XX = X, orig.XX = orig.X, nugget = nugget, nugget.known = nugget.known, 
         reps = reps, un.sum = un.sum, numEstimates = numEstimates, constantMean = constantMean, 
         simplex.ntries = simplex.ntries, simplex.maxiter = simplex.maxiter, simplex.reltol = simplex.reltol, 
         BFGS.maxiter = BFGS.maxiter, BFGS.tol = BFGS.tol, BFGS.h = BFGS.h, min.nugget = min.nugget, 
         verbose = verbose, param.names = param.names)
  14: FUN(X[[i]], ...)
  
  == testthat results  ===========================================================
  OK: 11 SKIPPED: 0 WARNINGS: 2 FAILED: 1
  1. Error: 1D data works (@test_IGP.R#11) 
  
  Error: testthat unit tests failed
  Execution halted