Running ‘testthat.R’ [7s/30s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(parglm)
  > 
  > test_check("parglm")
  
   *** caught segfault ***
  address 3e, cause 'memory not mapped'
  
  Traceback:
   1: as.list(X)
   2: lapply(findLocals1(e, shadowed, cntxt, vars), function(x) if (typeof(x) ==     "language") newtodo <<- append(newtodo, x))
   3: FUN(X[[i]], ...)
   4: lapply(todo, function(e) lapply(findLocals1(e, shadowed, cntxt,     vars), function(x) if (typeof(x) == "language") newtodo <<- append(newtodo,     x)))
   5: findLocalsList1(elist, sf, cntxt)
   6: findLocalsList(c(forms, body), cntxt)
   7: funEnv(forms, body, cntxt)
   8: make.functionContext(cntxt, formals(f), body(f))
   9: cmpfun(f)
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatch(cmpfun(f), error = function(e) {    notifyCompilerError(paste(e$message, "at", deparse(e$call)))    f})
  14: compiler:::tryCmpfun(function (family, n, p) {    nam <- paste0(family$family, family$link)    x_vals <- seq(-pi, pi, length.out = n)    X <- outer(x_vals, 1:p, function(x, y) sin(x * y))    rg <- range(rowSums(X))    X <- X * 2/diff(rg)    set.seed(77311413)    if (nam %in% c("binomiallogit", "binomialprobit", "binomialcauchit",         "binomialcloglog")) {        inter <- 1        y <- family$linkinv(rowSums(X) + inter) > runif(n)    }    else if (nam %in% "binomiallog") {        inter <- -0.5        X <- -abs(X)        X <- X * 0.25/diff(range(rowSums(X)))        y <- family$linkinv(rowSums(X) + inter) > runif(n)    }    else if (nam %in% c("gaussianidentity", "gaussianlog")) {        inter <- 0        y <- rnorm(n, family$linkinv(rowSums(X)), sd = 0.1)    }    else if (nam %in% c("gaussianinverse")) {        inter <- 1        X <- abs(X)        y <- rnorm(n, family$linkinv(rowSums(X) + inter), sd = 0.1)    }    else if (nam %in% c("Gammainverse", "Gammaidentity", "Gammalog")) {        inter <- 0.5        X <- abs(X)        y <- rgamma(n, shape = 1, rate = 1/family$linkinv(rowSums(X) +             inter))    }    else if (nam %in% c("poissonlog", "poissonidentity", "poissonsqrt")) {        inter <- 1.5        X <- abs(X)        y <- rpois(n, family$linkinv(rowSums(X) + inter))    }    else if (nam %in% c("inverse.gaussian1/mu^2", "inverse.gaussianinverse",         "inverse.gaussianidentity", "inverse.gaussianlog")) {        inter <- 1.5        X <- abs(X)        y <- SuppDists::rinvGauss(n, family$linkinv(rowSums(X) +             inter), 1)    }    else stop("family not implemented")    list(X = X, y = y, inter = inter)})
  15: sim_func(fa, n, p)
  16: eval(code, test_env)
  17: eval(code, test_env)
  18: 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)
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  24: tryCatchList(expr, classes, parentenv, handlers)
  25: 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) {    })
  26: test_code(desc, code, env = parent.frame(), reporter = reporter)
  27: test_that("works with different families w/ starting values",     {        skip_if_not_installed("SuppDists")        n <- 500L        p <- 2L        set.seed(77311413)        for (method in c("LAPACK", "LINPACK", "FAST")) for (fa in list(binomial("logit"),             binomial("probit"), binomial("cauchit"), binomial("cloglog"),             gaussian("identity"), gaussian("inverse"), gaussian("log"),             Gamma("log"), poisson("log"), poisson("sqrt"), poisson("identity"),             inverse.gaussian("1/mu^2"), inverse.gaussian("inverse"),             inverse.gaussian("identity"))) {            tmp <- sim_func(fa, n, p)            df <- data.frame(y = tmp$y, tmp$X)            df$INTER <- 1            lab <- paste0(fa$family, "_", fa$link, "_", method)            sta <- rep(1, p + 1L)            sta[1] <- tmp$inter            frm <- y ~ X1 + X2 + INTER - 1            glm_control <- list(maxit = 25L, epsilon = .Machine$double.xmin)            parglm_control <- parglm.control(nthreads = 2, method = method,                 maxit = 25L, epsilon = .Machine$double.xmin)            suppressWarnings({                f2 <- glm(frm, family = fa, start = sta, data = df,                   control = glm_control)                f1 <- parglm(frm, family = fa, data = df, control = parglm_control,                   start = sta)            })            eval(test_expr)            lab <- paste0(fa$family, "_", fa$link, "_", method,                 " w/ offset")            sta <- rep(1, p)            sta[1] <- tmp$inter            frm_off <- update(frm, . ~ . - X1)            suppressWarnings({                f2 <- glm(frm_off, family = fa, offset = X1,                   start = sta, data = df, control = glm_control)                f1 <- parglm(frm_off, family = fa, offset = X1,                   data = df, control = parglm_control, start = sta)            })            eval(test_expr)            lab <- paste0(fa$family, "_", fa$link, "_", method,                 " w/ weigths")            w <- runif(n)            df$w <- n * w/sum(w)            sta <- rep(1, p + 1L)            sta[1] <- tmp$inter            suppressWarnings({                f2 <- glm(frm, family = fa, weights = w, start = sta,                   data = df, control = glm_control)                f1 <- parglm(frm, family = fa, weights = w, start = sta,                   data = df, control = parglm_control)            })            eval(test_expr)        }    })
  28: eval(code, test_env)
  29: eval(code, test_env)
  30: 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)
  31: doTryCatch(return(expr), name, parentenv, handler)
  32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  33: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  34: doTryCatch(return(expr), name, parentenv, handler)
  35: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  36: tryCatchList(expr, classes, parentenv, handlers)
  37: 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) {    })
  38: test_code(NULL, exprs, env)
  39: source_file(path, child_env(env), wrap = wrap)
  40: FUN(X[[i]], ...)
  41: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  42: doTryCatch(return(expr), name, parentenv, handler)
  43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  44: tryCatchList(expr, classes, parentenv, handlers)
  45: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  46: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  47: 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)
  48: 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)
  49: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  50: test_check("parglm")
  51: NULL
  52: NULL
  53: NULL
  54: NULL
  55: NULL
  56: NULL
  57: NULL
  An irrecoverable exception occurred. R is aborting now ...