Running ‘spelling.R’
  Running ‘testthat.R’ [30s/47s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bigsnpr)
  Loading required package: bigstatsr
  > 
  > test_check("bigsnpr", filter = "7-")
  ── 1. Failure: parallel bed_prodVec() works (@test-7-OpenMP.R#39)  ─────────────
  all(sapply(test, all.equal, current = true)) isn't true.
  
  
   *** caught segfault ***
  address f82d0b54, cause 'invalid permissions'
  
  Traceback:
   1: clumping_chr(G, keep, rowInd = ind.row, colInd = ind.chr, ordInd = ord,     rankInd = match(seq_along(ord), ord), pos = pos.chr, sumX = stats$sumX,     denoX = stats$denoX, size = size, thr = thr.r2, ncores = ncores)
   2: clumpingChr(G, S, ind.chr, ind.row, size, infos.pos, thr.r2,     ncores)
   3: FUN(X[[i]], ...)
   4: lapply(split(ind.noexcl, infos.chr[ind.noexcl]), function(ind.chr) {    clumpingChr(G, S, ind.chr, ind.row, size, infos.pos, thr.r2,         ncores)})
   5: unlist(lapply(split(ind.noexcl, infos.chr[ind.noexcl]), function(ind.chr) {    clumpingChr(G, S, ind.chr, ind.row, size, infos.pos, thr.r2,         ncores)}), use.names = FALSE)
   6: sort(unlist(lapply(split(ind.noexcl, infos.chr[ind.noexcl]),     function(ind.chr) {        clumpingChr(G, S, ind.chr, ind.row, size, infos.pos,             thr.r2, ncores)    }), use.names = FALSE))
   7: snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,     ncores = 2)
   8: FUN(X[[i]], ...)
   9: lapply(X = X, FUN = FUN, ...)
  10: sapply(integer(n), eval.parent(substitute(function(...) expr)),     simplify = simplify)
  11: replicate(10, simplify = FALSE, {    snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,         ncores = 2)})
  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("parallel snp_clumping() works", {    G <- snp_attachExtdata()$genotypes    rows <- sample(nrow(G), replace = TRUE)    test <- replicate(10, simplify = FALSE, {        snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,             ncores = 2)    })    true <- snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,         ncores = 1)    expect_true(all(sapply(test, identical, y = true)))})
  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: doWithOneRestart(return(expr), restart)
  38: withOneRestart(expr, restarts[[1L]])
  39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  40: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        reporter$start_file(basename(path))        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        reporter$.end_context()        reporter$end_file()    })
  41: FUN(X[[i]], ...)
  42: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  43: force(code)
  44: doWithOneRestart(return(expr), restart)
  45: withOneRestart(expr, restarts[[1L]])
  46: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  47: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  48: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  49: 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)
  50: 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)
  51: test_check("bigsnpr", filter = "7-")
  An irrecoverable exception occurred. R is aborting now ...
  
   *** caught segfault ***
  address f82d0f64, cause 'invalid permissions'
  
  Traceback:
   1: clumping_chr(G, keep, rowInd = ind.row, colInd = ind.chr, ordInd = ord,     rankInd = match(seq_along(ord), ord), pos = pos.chr, sumX = stats$sumX,     denoX = stats$denoX, size = size, thr = thr.r2, ncores = ncores)
   2: clumpingChr(G, S, ind.chr, ind.row, size, infos.pos, thr.r2,     ncores)
   3: FUN(X[[i]], ...)
   4: lapply(split(ind.noexcl, infos.chr[ind.noexcl]), function(ind.chr) {    clumpingChr(G, S, ind.chr, ind.row, size, infos.pos, thr.r2,         ncores)})
   5: unlist(lapply(split(ind.noexcl, infos.chr[ind.noexcl]), function(ind.chr) {    clumpingChr(G, S, ind.chr, ind.row, size, infos.pos, thr.r2,         ncores)}), use.names = FALSE)
   6: sort(unlist(lapply(split(ind.noexcl, infos.chr[ind.noexcl]),     function(ind.chr) {        clumpingChr(G, S, ind.chr, ind.row, size, infos.pos,             thr.r2, ncores)    }), use.names = FALSE))
   7: snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,     ncores = 2)
   8: FUN(X[[i]], ...)
   9: lapply(X = X, FUN = FUN, ...)
  10: sapply(integer(n), eval.parent(substitute(function(...) expr)),     simplify = simplify)
  11: replicate(10, simplify = FALSE, {    snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,         ncores = 2)})
  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("parallel snp_clumping() works", {    G <- snp_attachExtdata()$genotypes    rows <- sample(nrow(G), replace = TRUE)    test <- replicate(10, simplify = FALSE, {        snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,             ncores = 2)    })    true <- snp_clumping(G, infos.chr = rep(1, ncol(G)), ind.row = rows,         ncores = 1)    expect_true(all(sapply(test, identical, y = true)))})
  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: doWithOneRestart(return(expr), restart)
  38: withOneRestart(expr, restarts[[1L]])
  39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  40: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        reporter$start_file(basename(path))        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        reporter$.end_context()        reporter$end_file()    })
  41: FUN(X[[i]], ...)
  42: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  43: force(code)
  44: doWithOneRestart(return(expr), restart)
  45: withOneRestart(expr, restarts[[1L]])
  46: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  47: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  48: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  49: 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)
  50: 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)
  51: test_check("bigsnpr", filter = "7-")
  An irrecoverable exception occurred. R is aborting now ...