Running ‘testthat.R’ [20s/25s]
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  273716340 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  273716340 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  273716340 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)
  
  ── 4. Failure: moderator level (@test-gxe.R#59)  ───────────────────────────────
  fivenum(m1.5$Z - m1.7$Z) not equal to c(-0.55, -0.34, -0.27, -0.19, 0.04).
  5/5 mismatches (average diff: 0.991)
  [1] -2.2720 - -0.55 == -1.7220
  [2] -0.3108 - -0.34 ==  0.0292
  [3] -0.0246 - -0.27 ==  0.2454
  [4]  0.2568 - -0.19 ==  0.4468
  [5]  2.5536 -  0.04 ==  2.5136
  
  ── 5. Failure: moderator level (@test-gxe.R#61)  ───────────────────────────────
  c(table(isSuspicious(m1, c("snp_to_i3", "snp_i4_to_i3")))) not equivalent to c(197, 2).
  2/2 mismatches (average diff: 28)
  [1] 169 - 197 == -28
  [2]  30 -   2 ==  28
  
  ── 6. Failure: (unknown) (@test-model.R#77)  ───────────────────────────────────
  cor(ml$P, pgen$P) not equal to 1.
  1/1 mismatches
  [1] NA - 1 == NA
  
  Error: C stack usage  273716340 is too close to the limit
  ── 7. Error: (unknown) (@test-model.R#87)  ─────────────────────────────────────
  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)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 97 | SKIPPED: 0 | WARNINGS: 6 | FAILED: 7 ]
  1. Error: (unknown) (@test-covariate.R#36) 
  2. Error: (unknown) (@test-formats.R#24) 
  3. Error: gxe data roundtrip (@test-gxe.R#36) 
  4. Failure: moderator level (@test-gxe.R#59) 
  5. Failure: moderator level (@test-gxe.R#61) 
  6. Failure: (unknown) (@test-model.R#77) 
  7. Error: (unknown) (@test-model.R#87) 
  
  Error: testthat unit tests failed
  Execution halted