Running ‘testthat.R’ [12s/42s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ctsem)
  Loading required package: Rcpp
  Loading required package: OpenMx
  To take full advantage of multiple cores, use:
    mxOption(NULL, 'Number of Threads', parallel::detectCores()) #now
    Sys.setenv(OMP_NUM_THREADS=parallel::detectCores()) #before library(OpenMx)
  > 
  > test_check("ctsem")
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: runHelper(model, frontendStart, intervals, silent, suppressWarnings,     unsafe, checkpoint, useSocket, onlyFrontend, useOptimizer)
   2: OpenMx::mxRun(model)
   3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
   4: suppressWarnings(OpenMx::mxRun(model))
   5: doTryCatch(return(expr), name, parentenv, handler)
   6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   7: tryCatchList(expr, classes, parentenv, handlers)
   8: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
   9: try(suppressWarnings(OpenMx::mxRun(model)))
  10: carefulFit(model, traitExtension = traitExtension, manifestTraitvarExtension = manifestTraitvarExtension,     weighting = carefulFitWeight)
  11: ctFit(AnomAuth, AnomAuthmodel)
  12: eval(code, test_env)
  13: eval(code, test_env)
  14: 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)
  15: doTryCatch(return(expr), name, parentenv, handler)
  16: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  17: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  18: doTryCatch(return(expr), name, parentenv, handler)
  19: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  20: tryCatchList(expr, classes, parentenv, handlers)
  21: 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) {    })
  22: test_code(desc, code, env = parent.frame())
  23: test_that("anomauth", {    data(AnomAuth)    AnomAuthmodel <- ctModel(LAMBDA = matrix(c(1, 0, 0, 1), nrow = 2,         ncol = 2), n.latent = 2, n.manifest = 2, MANIFESTVAR = diag(0,         2), Tpoints = 5)    AnomAuthfit <- ctFit(AnomAuth, AnomAuthmodel)    expect_equal(23415.929, AnomAuthfit$mxobj$output$Minus2LogLikelihood)})
  24: eval(code, test_env)
  25: eval(code, test_env)
  26: 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)
  27: doTryCatch(return(expr), name, parentenv, handler)
  28: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  29: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  30: doTryCatch(return(expr), name, parentenv, handler)
  31: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  32: tryCatchList(expr, classes, parentenv, handlers)
  33: 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) {    })
  34: test_code(NULL, exprs, env)
  35: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  36: force(code)
  37: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  38: FUN(X[[i]], ...)
  39: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  40: force(code)
  41: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  43: 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)
  44: 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)
  45: test_check("ctsem")
  An irrecoverable exception occurred. R is aborting now ...