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.710092910565436, 0.978071785764769, 0.341021195519716, 0.551754505606368, 
     0.975636033108458, 0.697734483052045, 0.0876256956253201, 0.473576687276363, 0.704597263829783, 
     0.634166297269985, 0.234645292162895, 0.676101002143696, 0.266120612155646, 0.384917909279466, 
     0.52858952130191, 0.483593396143988, 0.981079797726125, 0.860077510587871, 0.289278541691601, 
     0.00382571830414236, 0.883335224119946, 0.193263817578554, 0.117783303838223, 0.376659007044509, 
     0.162776531651616, 0.966426466591656, 0.389157433761284, 0.616897756932303, 0.636144415009767, 
     0.377499962924048, 0.135986083187163, 0.704194933408871, 0.0422479687258601, 0.0331718921661377, 
     0.739855831256136, 0.653453108388931, 0.690275161759928, 0.129644037690014, 0.386657914612442, 
     0.27840012148954, 0.843722421908751, 0.79735020827502, 0.151471437420696, 0.763312975876033, 
     0.389661882538348, 0.925205391133204, 0.841843618312851, 0.21104823704809, 0.819075420033187, 
     0.223421407165006, 0.558781433850527, 0.134595452807844, 0.953432159498334, 0.367813773918897, 
     0.15686112921685, 0.12856537499465, 0.627672010101378, 0.0106580550782382, 0.440734050236642, 
     0.431329899467528, 0.101778469514102, 0.0738022057339549, 0.136365880025551, 0.12799514317885, 
     0.81678130524233, 0.256195897003636, 0.238821482285857, 0.166929422179237, 0.741669198963791, 
     0.556886801728979, 0.359973289538175, 0.804983807727695, 0.793824316235259, 0.404704762855545, 
     0.541697056498379, 0.216082918923348, 0.28846895438619, 0.34093802375719, 0.532932872418314, 
     0.669700305210426), .Dim = c(40L, 2L)), Z = c(-1.80273807277814, -1.09223330268453, 
     1.65542139653845, -1.31693681720326, 0.4847486342819, -1.39983661126398, -0.317485356209217, 
     1.13535289632874, -1.86693687834669, 0.239347065079086, 0.633017919681799, -0.145207105649615, 
     0.706108969109271, 1.39966491399339, 0.656101477243746, 0.828250498319193, -0.837574276675266, 
     -0.703494660883121, 1.332867486379, 0.441143646299472, -0.0728003667641823, 1.38400133627205, 
     1.43135335443537, 1.41782776297553, -0.0583734970988762, 0.791100446731489, 1.63941848433925, 
     0.195226763781132, -1.75418354821655, 0.345137843716741, 1.52441418242606, -1.8987948334764, 
     -0.699539051806383, 0.770140225795676, -1.2565847945694, 0.155654769800495, 0.041418062142089, 
     1.56874468113959, 0.447238242186481, 0.107347357555116), 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