Running ‘testthat.R’ [16s/40s]
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)
  
  Attaching package: 'gwsem'
  
  The following object is masked from 'package:base':
  
      signif
  
  > 
  > test_check("gwsem")
  Error: C stack usage  274437236 is too close to the limit
  ── ERROR (test-covariate.R:36:1): (code run outside of `test_that()`) ──────────
  Error: This model has 5 matrices, but the backend has returned 0 values
  Backtrace:
      █
   1. └─gwsem::GWAS(...) test-covariate.R:36:0
   2.   └─OpenMx::mxRun(model)
   3.     └─OpenMx:::runHelper(...)
   4.       └─OpenMx:::updateModelMatrices(model, flatModel, output$matrices)
  
  ── Warning (test-formats.R:24:1): (code run outside of `test_that()`) ──────────
  Cumulants method prevented by integer observed columns: 'FID', 'IID', and 'SEX' ; Remove these columns from your observed data for improved estimation accuracy
  
  Error: C stack usage  274437236 is too close to the limit
  ── ERROR (test-formats.R:24:1): (code run outside of `test_that()`) ────────────
  Error: This model has 4 matrices, but the backend has returned 0 values
  Backtrace:
      █
   1. └─gwsem::GWAS(...) test-formats.R:24:0
   2.   └─OpenMx::mxRun(model)
   3.     └─OpenMx:::runHelper(...)
   4.       └─OpenMx:::updateModelMatrices(model, flatModel, output$matrices)
  
  ── Warning (test-gxe.R:31:3): gxe data roundtrip ───────────────────────────────
  Cumulants method prevented by integer observed columns: 'sex' ; Remove these columns from your observed data for improved estimation accuracy
  
  Error: C stack usage  274437236 is too close to the limit
  ── ERROR (test-gxe.R:36:3): gxe data roundtrip ─────────────────────────────────
  Error: This model has 7 matrices, but the backend has returned 0 values
  Backtrace:
      █
   1. └─gwsem::GWAS(...) test-gxe.R:36:2
   2.   └─OpenMx::mxRun(model)
   3.     └─OpenMx:::runHelper(...)
   4.       └─OpenMx:::updateModelMatrices(model, flatModel, output$matrices)
  
  ── FAILURE (test-gxe.R:59:3): moderator level ──────────────────────────────────
  fivenum(m1.5$Z - m1.7$Z) not equal to c(-0.55, -0.34, -0.27, -0.19, 0.04).
  4/5 mismatches (average diff: 2.88)
  [1] -10.6631 - -0.55 == -10.1131
  [3]  -0.2312 - -0.27 ==   0.0388
  [4]  -0.0634 - -0.19 ==   0.1266
  [5]   1.2845 -  0.04 ==   1.2445
  
  ── FAILURE (test-gxe.R:61:3): moderator level ──────────────────────────────────
  c(table(isSuspicious(m1, c("snp_to_i3", "snp_i4_to_i3")))) not equivalent to c(197, 2).
  2/2 mismatches (average diff: 8)
  [1] 189 - 197 == -8
  [2]  10 -   2 ==  8
  
  
   *** 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, child_env(env), wrap = wrap)
  16: FUN(X[[i]], ...)
  17: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  18: force(code)
  19: doWithOneRestart(return(expr), restart)
  20: withOneRestart(expr, restarts[[1L]])
  21: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  22: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  23: test_files(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package)
  24: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package, parallel = parallel)
  25: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  26: test_check("gwsem")
  An irrecoverable exception occurred. R is aborting now ...