Running ‘testthat.R’ [19s/47s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(metaSEM)
  Loading required package: OpenMx
  To take full advantage of multiple cores, use:
    mxOption(key='Number of Threads', value=parallel::detectCores()) #now
    Sys.setenv(OMP_NUM_THREADS=parallel::detectCores()) #before library(OpenMx)
  "SLSQP" is set as the default optimizer in OpenMx.
  mxOption(NULL, "Gradient algorithm") is set at "central".
  mxOption(NULL, "Optimality tolerance") is set at "6.3e-14".
  mxOption(NULL, "Gradient iterations") is set at "2".
  > 
  > test_check("metaSEM")
  ── 1. Failure: metaFIML() works correctly (@test_utilities.R#478)  ─────────────
  `coef1a` not equal to `coef1b`.
  5/5 mismatches (average diff: 0.142)
  [1] 0.100 -  0.01560 == 0.08440
  [2] 0.100 -  0.00391 == 0.09609
  [3] 0.692 -  0.59805 == 0.09415
  [4] 0.100 - -0.32955 == 0.42955
  [5] 0.870 -  0.86395 == 0.00605
  
  ── 2. Failure: metaFIML() works correctly (@test_utilities.R#480)  ─────────────
  fit1a$mx.fit$output$Minus2LogLikelihood not equal to fit1b$output$Minus2LogLikelihood.
  1/1 mismatches
  [1] 111 - -155 == 266
  
  Error in running mxModel:
  <simpleError: The job for model 'No predictor' exited abnormally with the error message: Non-conformable matrices in horizontal concatenation (cbind). First argument has 0 rows, and argument #2 has 4 rows.>
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: runHelper(model, frontendStart, intervals, silent, suppressWarnings,     unsafe, checkpoint, useSocket, onlyFrontend, useOptimizer,     beginMessage)
   2: mxRun(mx.model, intervals = FALSE, suppressWarnings = suppressWarnings,     silent = silent, ...)
   3: doTryCatch(return(expr), name, parentenv, handler)
   4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   5: tryCatchList(expr, classes, parentenv, handlers)
   6: tryCatch(mxRun(mx.model, intervals = FALSE, suppressWarnings = suppressWarnings,     silent = silent, ...), error = function(e) e)
   7: metaFIML(y = r, v = r_v, x = JP_alpha, av = IDV, data = Jaramillo05)
   8: eval(code, test_env)
   9: eval(code, test_env)
  10: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  11: doTryCatch(return(expr), name, parentenv, handler)
  12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  13: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  14: doTryCatch(return(expr), name, parentenv, handler)
  15: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  18: test_code(desc, code, env = parent.frame())
  19: test_that("metaFIML() works correctly", {    fit1a <- metaFIML(y = r, v = r_v, x = JP_alpha, data = Jaramillo05)    m1 <- "fy =~ 1*r\n           r ~~ data.r_v*r\n           fx =~ 1*JP_alpha\n           JP_alpha ~~ 0*JP_alpha\n           fy ~ Slope1_1*fx\n           fy ~~ Tau2_1_1*fy\n           fx ~~ CovX1_X1*fx\n           fx ~ MeanX1*1\n           fy ~ Intercept1*1"    RAM1 <- lavaan2RAM(m1, obs.variables = c("r", "JP_alpha"),         std.lv = FALSE)    fit1b <- create.mxModel(RAM = RAM1, data = Jaramillo05)    coef1a <- coef(fit1a)    names1 <- names(coef1a)    coef1b <- coef(fit1b)[names1]    tolerance <- 0.001    expect_equal(coef1a, coef1b, tolerance = tolerance)    expect_equal(vcov(fit1a), vcov(fit1b)[names1, names1], tolerance = tolerance)    expect_equal(fit1a$mx.fit$output$Minus2LogLikelihood, fit1b$output$Minus2LogLikelihood)    fit2a <- metaFIML(y = r, v = r_v, x = JP_alpha, av = IDV,         data = Jaramillo05)    m2 <- "fy =~ 1*r\n           r ~~ data.r_v*r\n           fx =~ 1*JP_alpha\n           JP_alpha ~~ 0*JP_alpha\n           fy ~ Slope1_1*fx\n           fy ~~ Tau2_1_1*fy\n           fx ~~ CovX1_X1*fx\n           fx ~ MeanX1*1\n           fy ~ Intercept1*1\n\n           fz =~ 1*IDV\n           IDV ~~ 0*IDV\n           fz ~ MeanX2*1\n           fz ~~ CovX2_X2*fz + start(818)*fz\n           fx ~~ CovX2_X1*fz\n           fy ~~ CovX2_Y1*fz"    RAM2 <- lavaan2RAM(m2, obs.variables = c("r", "JP_alpha",         "IDV"), std.lv = FALSE)    fit2b <- create.mxModel(RAM = RAM2, data = Jaramillo05)    coef2a <- coef(fit2a)    names2 <- names(coef2a)    coef2b <- coef(fit2b)[names2]    expect_equal(coef2a, coef2b, tolerance = tolerance)    v_fit2a <- vcov(fit2a)[-4, -4]    v_fit2b <- vcov(fit2b)[names2, names2][-4, -4]    expect_equal(v_fit2a, v_fit2b, tolerance = tolerance)    expect_equal(fit2a$mx.fit$output$Minus2LogLikelihood, fit2b$output$Minus2LogLikelihood)    wvs94a$gnp <- scale(wvs94a$gnp)    fit3a <- metaFIML(y = cbind(lifesat, lifecon), v = cbind(lifesat_var,         inter_cov, lifecon_var), x = gnp, data = wvs94a)    m3 <- "fy1 =~ 1*lifesat\n           lifesat ~~ data.lifesat_var*lifesat\n           fy2 =~ 1*lifecon\n           lifecon ~~ data.lifecon_var*lifecon\n           lifesat ~~ data.inter_cov*lifecon\n\n           fx =~ 1*gnp\n           gnp ~~ 0*gnp\n           fy1 ~ Slope1_1*fx\n           fy2 ~ Slope2_1*fx\n\n           fy1 ~~ Tau2_1_1*fy1\n           fy2 ~~ Tau2_2_2*fy2\n           fy1 ~~ Tau2_2_1*fy2\n           fx ~~ CovX1_X1*fx\n           fx ~ MeanX1*1\n           fy1 ~ Intercept1*1\n           fy2 ~ Intercept2*1"    RAM3 <- lavaan2RAM(m3, obs.variables = c("lifesat", "lifecon",         "gnp"), std.lv = FALSE)    fit3b <- create.mxModel(RAM = RAM3, data = wvs94a)    coef3a <- coef(fit3a)    names3 <- names(coef3a)    coef3b <- coef(fit3b)[names3]    expect_equal(coef3a, coef3b, tolerance = tolerance)    expect_equal(vcov(fit3a), vcov(fit3b)[names3, names3], tolerance = tolerance)    expect_equal(fit3a$mx.fit$output$Minus2LogLikelihood, fit3b$output$Minus2LogLikelihood)})
  20: eval(code, test_env)
  21: eval(code, test_env)
  22: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  23: doTryCatch(return(expr), name, parentenv, handler)
  24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  26: doTryCatch(return(expr), name, parentenv, handler)
  27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  28: tryCatchList(expr, classes, parentenv, handlers)
  29: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  30: test_code(NULL, exprs, env)
  31: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  32: force(code)
  33: doWithOneRestart(return(expr), restart)
  34: withOneRestart(expr, restarts[[1L]])
  35: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  36: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        reporter$start_file(basename(path))        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        reporter$.end_context()        reporter$end_file()    })
  37: FUN(X[[i]], ...)
  38: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  39: force(code)
  40: doWithOneRestart(return(expr), restart)
  41: withOneRestart(expr, restarts[[1L]])
  42: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  43: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  44: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  45: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  46: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  47: test_check("metaSEM")
  An irrecoverable exception occurred. R is aborting now ...