Running ‘testthat.R’ [18s/45s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gwsem)
  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)
  > 
  > test_check("gwsem")
  Error: C stack usage  273781876 is too close to the limit
  ── 1. Error: (unknown) (@test-covariate.R#36)  ─────────────────────────────────
  This model has 5 matrices, but the backend has returned 0 values
  Backtrace:
   1. gwsem::GWAS(...)
   2. OpenMx::mxRun(model)
   3. OpenMx:::runHelper(...)
   4. OpenMx:::updateModelMatrices(model, flatModel, output$matrices)
  
  Error: C stack usage  273781876 is too close to the limit
  ── 2. Error: (unknown) (@test-formats.R#24)  ───────────────────────────────────
  This model has 4 matrices, but the backend has returned 0 values
  Backtrace:
   1. gwsem::GWAS(...)
   2. OpenMx::mxRun(model)
   3. OpenMx:::runHelper(...)
   4. OpenMx:::updateModelMatrices(model, flatModel, output$matrices)
  
  Error: C stack usage  273781876 is too close to the limit
  ── 3. Error: gxe data roundtrip (@test-gxe.R#36)  ──────────────────────────────
  This model has 7 matrices, but the backend has returned 0 values
  Backtrace:
   1. gwsem::GWAS(...)
   2. OpenMx::mxRun(model)
   3. OpenMx:::runHelper(...)
   4. OpenMx:::updateModelMatrices(model, flatModel, output$matrices)
  
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: runHelper(model, frontendStart, intervals, silent, suppressWarnings,     unsafe, checkpoint, useSocket, onlyFrontend, useOptimizer,     beginMessage)
   2: mxRun(model)
   3: GWAS(oi, file.path(dir, "example.pgen"), file.path(tdir, "out.log"),     SNP = c(3:5))
   4: eval(code, test_env)
   5: eval(code, test_env)
   6: 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)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: 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) {    })
  14: test_code(NULL, exprs, env)
  15: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  16: force(code)
  17: doWithOneRestart(return(expr), restart)
  18: withOneRestart(expr, restarts[[1L]])
  19: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  20: 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()    })
  21: FUN(X[[i]], ...)
  22: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  23: force(code)
  24: doWithOneRestart(return(expr), restart)
  25: withOneRestart(expr, restarts[[1L]])
  26: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  27: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  28: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  29: 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)
  30: 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)
  31: test_check("gwsem")
  An irrecoverable exception occurred. R is aborting now ...