Running ‘testthat.R’ [20s/23s]
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  274371700 is too close to the limit
  Error: C stack usage  274371700 is too close to the limit
  Error: C stack usage  274371700 is too close to the limit
  Error: C stack usage  274371700 is too close to the limit
  ══ Warnings ════════════════════════════════════════════════════════════════════
  ── 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
  Backtrace:
   1. gwsem::GWAS(...) test-formats.R:24:0
   3. gwsem::buildOneFac(pheno, paste0("i", 1:numIndicators))
   4. gwsem:::postprocessModel(oneFacPre, itemNames, exoPred)
  ── 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
  Backtrace:
   1. gwsem::buildItem(pheno, paste0("i", 3), gxe = c("sex", "i4")) test-gxe.R:31:2
   2. gwsem:::postprocessModel(model, depVar, latents)
  ── Warning (test-model.R:71:1): (code run outside of `test_that()`) ────────────
  In model 'OneItem' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
  Backtrace:
   1. gwsem::GWAS(...) test-model.R:71:0
   2. OpenMx::mxRun(model)
   3. OpenMx:::runHelper(...)
   4. OpenMx:::processErrorConditions(model, unsafe, suppressWarnings)
   5. OpenMx:::npsolWarnings(...)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── 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)
  ── 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)
  ── 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: 1.55)
  [1] -3.6263 - -0.55 == -3.0763
  [3] -0.2389 - -0.27 ==  0.0311
  [4] -0.0129 - -0.19 ==  0.1771
  [5]  2.9567 -  0.04 ==  2.9167
  ── 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: 16)
  [1] 181 - 197 == -16
  [2]  18 -   2 ==  16
  ── Failure (test-model.R:77:1): (code run outside of `test_that()`) ────────────
  cor(ml$P, pgen$P) not equal to 1.
  1/1 mismatches
  [1] NA - 1 == NA
  ── Error (test-model.R:87: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-model.R:87:0
   2.   └─OpenMx::mxRun(model)
   3.     └─OpenMx:::runHelper(...)
   4.       └─OpenMx:::updateModelMatrices(model, flatModel, output$matrices)
  
  [ FAIL 7 | WARN 3 | SKIP 0 | PASS 97 ]
  Error: Test failures
  Execution halted