Running 'testthat.R' [1s/2s]
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.713291681837291, 0.164084434974939, 0.674544740235433, 0.0530277984216809, 
     0.295682304073125, 0.380416803527623, 0.638987572398037, 0.163114986848086, 0.465465676505119, 
     0.760936303297058, 0.195669868262485, 0.515887658810243, 0.298610461410135, 0.366900592576712, 
     0.63802558160387, 0.0505666879471391, 0.494587143650278, 0.944005950121209, 0.995038385735825, 
     0.956066668732092, 0.892329865368083, 0.297585556516424, 0.453317523235455, 0.681698492262512, 
     0.907948952168226, 0.788901896681637, 0.61813454865478, 0.412280954187736, 0.934248104691505, 
     0.390254981350154, 0.428780265152454, 0.278732050675899, 0.956326713552698, 0.633961246116087, 
     0.447996536735445, 0.497439256170765, 0.0349660322535783, 0.571330731036142, 0.461119106737897, 
     0.729639731813222, 0.120951566146687, 0.779487075749785, 0.694845776073635, 0.514207194326445, 
     0.922640169737861, 0.375987285049632, 0.479771763086319, 0.973942704964429, 0.660014971392229, 
     0.774256275035441, 0.610533916158602, 0.917405391344801, 0.00161514966748655, 0.155494650127366, 
     0.815700778039172, 0.0319299339316785, 0.544234726345167, 0.489892096025869, 0.903401324758306, 
     0.513563212240115, 0.974864078452811, 0.644107200205326, 0.297698939684778, 0.832305650692433, 
     0.178483600495383, 0.699858842184767, 0.994308366207406, 0.921940724831074, 0.157475593499839, 
     0.0211826136801392, 0.700259777717292, 0.17618904192932, 0.392476904205978, 0.474304066970944, 
     0.0748454257845879, 0.550885412376374, 0.320889343973249, 0.151204410707578, 0.0565376901067793, 
     0.302181951003149), .Dim = c(40L, 2L)), Z = c(-0.283779167203391, -0.124314461025496, 
     -1.83224823385674, 0.238254597480026, 0.492184135283566, 1.38433398820934, -0.6409970056264, 
     0.691800380744049, -0.628967537442611, -1.986824697983, 0.301692679132802, -0.59745806364799, 
     0.964747048392828, 1.57151770799386, -1.67990972865183, 0.512087675607122, -0.23988212269856, 
     -0.28227809863089, -0.60075908179173, -0.35761711486363, -0.783726077819081, 0.168726172137183, 
     1.2435625548594, -1.77736383341657, 0.35615162841955, -1.9216777128073, -0.711164933381262, 
     0.0535765336499176, 0.433828254869813, 0.770099376112877, -0.519245364096384, 1.8754331311514, 
     0.354429881091599, -0.586611455575014, 0.775188122601738, -0.299329635779211, 1.12077290691164, 
     0.379612179098631, 0.590355672126296, -0.0445018266209798), 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: 0 FAILED: 1
  1. Error: 1D data works (@test_IGP.R#11) 
  
  Error: testthat unit tests failed
  Execution halted