Last updated on 2024-06-01 01:51:15 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.2.1 | 2.76 | 92.61 | 95.37 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 0.2.1 | 2.28 | 63.76 | 66.04 | OK | |
r-devel-linux-x86_64-fedora-clang | 0.2.1 | 114.52 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 0.2.1 | 109.21 | OK | |||
r-devel-windows-x86_64 | 0.2.1 | 4.00 | 118.00 | 122.00 | OK | |
r-patched-linux-x86_64 | 0.2.1 | 2.55 | 86.29 | 88.84 | OK | |
r-release-linux-x86_64 | 0.2.1 | 2.73 | 84.78 | 87.51 | OK | |
r-release-macos-arm64 | 0.2.1 | 84.00 | OK | |||
r-release-macos-x86_64 | 0.2.1 | 138.00 | OK | |||
r-release-windows-x86_64 | 0.2.1 | 3.00 | 117.00 | 120.00 | ERROR | |
r-oldrel-macos-arm64 | 0.2.1 | 83.00 | OK | |||
r-oldrel-macos-x86_64 | 0.2.1 | 127.00 | OK | |||
r-oldrel-windows-x86_64 | 0.2.1 | 4.00 | 134.00 | 138.00 | OK |
Version: 0.2.1
Check: tests
Result: ERROR
Running ‘demo.R’ [1s/4s]
Running ‘dotdotdot.R’ [1s/4s]
Running ‘future,labels.R’ [1s/4s]
Running ‘future,lazy.R’ [1s/4s]
Running ‘future.tests,mirai_cluster.R’ [8s/24s]
Running ‘future.tests-mirai_multisession.R’ [9s/30s]
Running ‘globals,formulas.R’ [1s/4s]
Running ‘globals,manual.R’ [1s/3s]
Running ‘globals,nested.R’ [1s/2s]
Running ‘globals,subassignment.R’ [1s/4s]
Running ‘globals,tricky.R’ [1s/4s]
Running ‘mirai_cluster,worker-termination.R’ [1s/3s]
Running ‘mirai_cluster.R’ [1s/5s]
Running ‘nbrOfWorkers.R’ [1s/3s]
Running ‘plan.R’ [1s/4s]
Running ‘rng.R’ [1s/4s]
Running ‘stdout.R’ [1s/4s]
Running ‘zzz,future_lapply.R’ [30s/40s]
Running the tests in ‘tests/mirai_cluster,worker-termination.R’ failed.
Complete output:
> source("incl/start.R")
Loading required package: future
[15:35:27.129] plan(): Setting new future strategy stack:
[15:35:27.130] List of future strategies:
[15:35:27.130] 1. mirai_multisession:
[15:35:27.130] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores())
[15:35:27.130] - tweaked: FALSE
[15:35:27.130] - call: future::plan(future.mirai::mirai_multisession)
[15:35:27.167] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ...
[15:35:27.167] < mirai | $data >
[15:35:27.194] getGlobalsAndPackages() ...
[15:35:27.194] Not searching for globals
[15:35:27.195] - globals: [0] <none>
[15:35:27.195] getGlobalsAndPackages() ... DONE
[15:35:27.196] getGlobalsAndPackages() ...
[15:35:27.196]
[15:35:27.197] - globals: [0] <none>
[15:35:27.205] getGlobalsAndPackages() ... DONE
[15:35:28.359] Packages needed by the future expression (n = 0): <none>
[15:35:28.372] Packages needed by future strategies (n = 0): <none>
[15:35:28.383] {
[15:35:28.383] {
[15:35:28.383] {
[15:35:28.383] ...future.startTime <- base::Sys.time()
[15:35:28.383] {
[15:35:28.383] {
[15:35:28.383] {
[15:35:28.383] base::local({
[15:35:28.383] has_future <- base::requireNamespace("future",
[15:35:28.383] quietly = TRUE)
[15:35:28.383] if (has_future) {
[15:35:28.383] ns <- base::getNamespace("future")
[15:35:28.383] version <- ns[[".package"]][["version"]]
[15:35:28.383] if (is.null(version))
[15:35:28.383] version <- utils::packageVersion("future")
[15:35:28.383] }
[15:35:28.383] else {
[15:35:28.383] version <- NULL
[15:35:28.383] }
[15:35:28.383] if (!has_future || version < "1.8.0") {
[15:35:28.383] info <- base::c(r_version = base::gsub("R version ",
[15:35:28.383] "", base::R.version$version.string),
[15:35:28.383] platform = base::sprintf("%s (%s-bit)",
[15:35:28.383] base::R.version$platform, 8 * base::.Machine$sizeof.pointer),
[15:35:28.383] os = base::paste(base::Sys.info()[base::c("sysname",
[15:35:28.383] "release", "version")], collapse = " "),
[15:35:28.383] hostname = base::Sys.info()[["nodename"]])
[15:35:28.383] info <- base::sprintf("%s: %s", base::names(info),
[15:35:28.383] info)
[15:35:28.383] info <- base::paste(info, collapse = "; ")
[15:35:28.383] if (!has_future) {
[15:35:28.383] msg <- base::sprintf("Package 'future' is not installed on worker (%s)",
[15:35:28.383] info)
[15:35:28.383] }
[15:35:28.383] else {
[15:35:28.383] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
[15:35:28.383] info, version)
[15:35:28.383] }
[15:35:28.383] base::stop(msg)
[15:35:28.383] }
[15:35:28.383] })
[15:35:28.383] }
[15:35:28.383] ...future.strategy.old <- future::plan("list")
[15:35:28.383] options(future.plan = NULL)
[15:35:28.383] Sys.unsetenv("R_FUTURE_PLAN")
[15:35:28.383] future::plan("default", .cleanup = FALSE, .init = FALSE)
[15:35:28.383] }
[15:35:28.383] ...future.workdir <- getwd()
[15:35:28.383] }
[15:35:28.383] ...future.oldOptions <- base::as.list(base::.Options)
[15:35:28.383] ...future.oldEnvVars <- base::Sys.getenv()
[15:35:28.383] }
[15:35:28.383] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL,
[15:35:28.383] future.globals.maxSize = NULL, future.globals.method = NULL,
[15:35:28.383] future.globals.onMissing = NULL, future.globals.onReference = NULL,
[15:35:28.383] future.globals.resolve = NULL, future.resolve.recursive = NULL,
[15:35:28.383] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL,
[15:35:28.383] future.stdout.windows.reencode = NULL, width = 80L)
[15:35:28.383] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options),
[15:35:28.383] base::names(...future.oldOptions))
[15:35:28.383] }
[15:35:28.383] if (FALSE) {
[15:35:28.383] }
[15:35:28.383] else {
[15:35:28.383] if (TRUE) {
[15:35:28.383] ...future.stdout <- base::rawConnection(base::raw(0L),
[15:35:28.383] open = "w")
[15:35:28.383] }
[15:35:28.383] else {
[15:35:28.383] ...future.stdout <- base::file(base::switch(.Platform$OS.type,
[15:35:28.383] windows = "NUL", "/dev/null"), open = "w")
[15:35:28.383] }
[15:35:28.383] base::sink(...future.stdout, type = "output", split = FALSE)
[15:35:28.383] base::on.exit(if (!base::is.null(...future.stdout)) {
[15:35:28.383] base::sink(type = "output", split = FALSE)
[15:35:28.383] base::close(...future.stdout)
[15:35:28.383] }, add = TRUE)
[15:35:28.383] }
[15:35:28.383] ...future.frame <- base::sys.nframe()
[15:35:28.383] ...future.conditions <- base::list()
[15:35:28.383] ...future.rng <- base::globalenv()$.Random.seed
[15:35:28.383] if (FALSE) {
[15:35:28.383] ...future.globalenv.names <- c(base::names(base::.GlobalEnv),
[15:35:28.383] "...future.value", "...future.globalenv.names", ".Random.seed")
[15:35:28.383] }
[15:35:28.383] ...future.result <- base::tryCatch({
[15:35:28.383] base::withCallingHandlers({
[15:35:28.383] ...future.value <- base::withVisible(base::local(NA))
[15:35:28.383] future::FutureResult(value = ...future.value$value,
[15:35:28.383] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed,
[15:35:28.383] ...future.rng), globalenv = if (FALSE)
[15:35:28.383] list(added = base::setdiff(base::names(base::.GlobalEnv),
[15:35:28.383] ...future.globalenv.names))
[15:35:28.383] else NULL, started = ...future.startTime, version = "1.8")
[15:35:28.383] }, condition = base::local({
[15:35:28.383] c <- base::c
[15:35:28.383] inherits <- base::inherits
[15:35:28.383] invokeRestart <- base::invokeRestart
[15:35:28.383] length <- base::length
[15:35:28.383] list <- base::list
[15:35:28.383] seq.int <- base::seq.int
[15:35:28.383] signalCondition <- base::signalCondition
[15:35:28.383] sys.calls <- base::sys.calls
[15:35:28.383] `[[` <- base::`[[`
[15:35:28.383] `+` <- base::`+`
[15:35:28.383] `<<-` <- base::`<<-`
[15:35:28.383] sysCalls <- function(calls = sys.calls(), from = 1L) {
[15:35:28.383] calls[seq.int(from = from + 12L, to = length(calls) -
[15:35:28.383] 3L)]
[15:35:28.383] }
[15:35:28.383] function(cond) {
[15:35:28.383] is_error <- inherits(cond, "error")
[15:35:28.383] ignore <- !is_error && !is.null(NULL) && inherits(cond,
[15:35:28.383] NULL)
[15:35:28.383] if (is_error) {
[15:35:28.383] sessionInformation <- function() {
[15:35:28.383] list(r = base::R.Version(), locale = base::Sys.getlocale(),
[15:35:28.383] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(),
[15:35:28.383] search = base::search(), system = base::Sys.info())
[15:35:28.383] }
[15:35:28.383] ...future.conditions[[length(...future.conditions) +
[15:35:28.383] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame),
[15:35:28.383] cond$call), session = sessionInformation(),
[15:35:28.383] timestamp = base::Sys.time(), signaled = 0L)
[15:35:28.383] signalCondition(cond)
[15:35:28.383] }
[15:35:28.383] else if (!ignore && TRUE && inherits(cond, "condition")) {
[15:35:28.383] signal <- FALSE && inherits(cond, character(0))
[15:35:28.383] ...future.conditions[[length(...future.conditions) +
[15:35:28.383] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal))
[15:35:28.383] if (FALSE && !signal) {
[15:35:28.383] muffleCondition <- function (cond, pattern = "^muffle")
[15:35:28.383] {
[15:35:28.383] inherits <- base::inherits
[15:35:28.383] invokeRestart <- base::invokeRestart
[15:35:28.383] is.null <- base::is.null
[15:35:28.383] muffled <- FALSE
[15:35:28.383] if (inherits(cond, "message")) {
[15:35:28.383] muffled <- grepl(pattern, "muffleMessage")
[15:35:28.383] if (muffled)
[15:35:28.383] invokeRestart("muffleMessage")
[15:35:28.383] }
[15:35:28.383] else if (inherits(cond, "warning")) {
[15:35:28.383] muffled <- grepl(pattern, "muffleWarning")
[15:35:28.383] if (muffled)
[15:35:28.383] invokeRestart("muffleWarning")
[15:35:28.383] }
[15:35:28.383] else if (inherits(cond, "condition")) {
[15:35:28.383] if (!is.null(pattern)) {
[15:35:28.383] computeRestarts <- base::computeRestarts
[15:35:28.383] grepl <- base::grepl
[15:35:28.383] restarts <- computeRestarts(cond)
[15:35:28.383] for (restart in restarts) {
[15:35:28.383] name <- restart$name
[15:35:28.383] if (is.null(name))
[15:35:28.383] next
[15:35:28.383] if (!grepl(pattern, name))
[15:35:28.383] next
[15:35:28.383] invokeRestart(restart)
[15:35:28.383] muffled <- TRUE
[15:35:28.383] break
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] invisible(muffled)
[15:35:28.383] }
[15:35:28.383] muffleCondition(cond, pattern = "^muffle")
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] else {
[15:35:28.383] if (TRUE) {
[15:35:28.383] muffleCondition <- function (cond, pattern = "^muffle")
[15:35:28.383] {
[15:35:28.383] inherits <- base::inherits
[15:35:28.383] invokeRestart <- base::invokeRestart
[15:35:28.383] is.null <- base::is.null
[15:35:28.383] muffled <- FALSE
[15:35:28.383] if (inherits(cond, "message")) {
[15:35:28.383] muffled <- grepl(pattern, "muffleMessage")
[15:35:28.383] if (muffled)
[15:35:28.383] invokeRestart("muffleMessage")
[15:35:28.383] }
[15:35:28.383] else if (inherits(cond, "warning")) {
[15:35:28.383] muffled <- grepl(pattern, "muffleWarning")
[15:35:28.383] if (muffled)
[15:35:28.383] invokeRestart("muffleWarning")
[15:35:28.383] }
[15:35:28.383] else if (inherits(cond, "condition")) {
[15:35:28.383] if (!is.null(pattern)) {
[15:35:28.383] computeRestarts <- base::computeRestarts
[15:35:28.383] grepl <- base::grepl
[15:35:28.383] restarts <- computeRestarts(cond)
[15:35:28.383] for (restart in restarts) {
[15:35:28.383] name <- restart$name
[15:35:28.383] if (is.null(name))
[15:35:28.383] next
[15:35:28.383] if (!grepl(pattern, name))
[15:35:28.383] next
[15:35:28.383] invokeRestart(restart)
[15:35:28.383] muffled <- TRUE
[15:35:28.383] break
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] invisible(muffled)
[15:35:28.383] }
[15:35:28.383] muffleCondition(cond, pattern = "^muffle")
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] }))
[15:35:28.383] }, error = function(ex) {
[15:35:28.383] base::structure(base::list(value = NULL, visible = NULL,
[15:35:28.383] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed,
[15:35:28.383] ...future.rng), started = ...future.startTime,
[15:35:28.383] finished = Sys.time(), session_uuid = NA_character_,
[15:35:28.383] version = "1.8"), class = "FutureResult")
[15:35:28.383] }, finally = {
[15:35:28.383] if (!identical(...future.workdir, getwd()))
[15:35:28.383] setwd(...future.workdir)
[15:35:28.383] {
[15:35:28.383] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) {
[15:35:28.383] ...future.oldOptions$nwarnings <- NULL
[15:35:28.383] }
[15:35:28.383] base::options(...future.oldOptions)
[15:35:28.383] if (.Platform$OS.type == "windows") {
[15:35:28.383] old_names <- names(...future.oldEnvVars)
[15:35:28.383] envs <- base::Sys.getenv()
[15:35:28.383] names <- names(envs)
[15:35:28.383] common <- intersect(names, old_names)
[15:35:28.383] added <- setdiff(names, old_names)
[15:35:28.383] removed <- setdiff(old_names, names)
[15:35:28.383] changed <- common[...future.oldEnvVars[common] !=
[15:35:28.383] envs[common]]
[15:35:28.383] NAMES <- toupper(changed)
[15:35:28.383] args <- list()
[15:35:28.383] for (kk in seq_along(NAMES)) {
[15:35:28.383] name <- changed[[kk]]
[15:35:28.383] NAME <- NAMES[[kk]]
[15:35:28.383] if (name != NAME && is.element(NAME, old_names))
[15:35:28.383] next
[15:35:28.383] args[[name]] <- ...future.oldEnvVars[[name]]
[15:35:28.383] }
[15:35:28.383] NAMES <- toupper(added)
[15:35:28.383] for (kk in seq_along(NAMES)) {
[15:35:28.383] name <- added[[kk]]
[15:35:28.383] NAME <- NAMES[[kk]]
[15:35:28.383] if (name != NAME && is.element(NAME, old_names))
[15:35:28.383] next
[15:35:28.383] args[[name]] <- ""
[15:35:28.383] }
[15:35:28.383] NAMES <- toupper(removed)
[15:35:28.383] for (kk in seq_along(NAMES)) {
[15:35:28.383] name <- removed[[kk]]
[15:35:28.383] NAME <- NAMES[[kk]]
[15:35:28.383] if (name != NAME && is.element(NAME, old_names))
[15:35:28.383] next
[15:35:28.383] args[[name]] <- ...future.oldEnvVars[[name]]
[15:35:28.383] }
[15:35:28.383] if (length(args) > 0)
[15:35:28.383] base::do.call(base::Sys.setenv, args = args)
[15:35:28.383] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL
[15:35:28.383] }
[15:35:28.383] else {
[15:35:28.383] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars))
[15:35:28.383] }
[15:35:28.383] {
[15:35:28.383] if (base::length(...future.futureOptionsAdded) >
[15:35:28.383] 0L) {
[15:35:28.383] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded))
[15:35:28.383] base::names(opts) <- ...future.futureOptionsAdded
[15:35:28.383] base::options(opts)
[15:35:28.383] }
[15:35:28.383] {
[15:35:28.383] NULL
[15:35:28.383] options(future.plan = NULL)
[15:35:28.383] if (is.na(NA_character_))
[15:35:28.383] Sys.unsetenv("R_FUTURE_PLAN")
[15:35:28.383] else Sys.setenv(R_FUTURE_PLAN = NA_character_)
[15:35:28.383] future::plan(...future.strategy.old, .cleanup = FALSE,
[15:35:28.383] .init = FALSE)
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] }
[15:35:28.383] })
[15:35:28.383] if (TRUE) {
[15:35:28.383] base::sink(type = "output", split = FALSE)
[15:35:28.383] if (TRUE) {
[15:35:28.383] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout))
[15:35:28.383] }
[15:35:28.383] else {
[15:35:28.383] ...future.result["stdout"] <- base::list(NULL)
[15:35:28.383] }
[15:35:28.383] base::close(...future.stdout)
[15:35:28.383] ...future.stdout <- NULL
[15:35:28.383] }
[15:35:28.383] ...future.result$conditions <- ...future.conditions
[15:35:28.383] ...future.result$finished <- base::Sys.time()
[15:35:28.383] ...future.result
[15:35:28.383] }
[15:35:28.666] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE
[15:35:28.667] plan(): nbrOfWorkers() = 2
>
> message("*** mirai_multisession() - terminating workers ...")
*** mirai_multisession() - terminating workers ...
>
> plan(mirai_multisession, workers = 2L)
[15:35:28.675] plan(): Setting new future strategy stack:
[15:35:28.675] List of future strategies:
[15:35:28.675] 1. mirai_multisession:
[15:35:28.675] - args: function (..., workers = 2L, envir = parent.frame())
[15:35:28.675] - tweaked: TRUE
[15:35:28.675] - call: plan(mirai_multisession, workers = 2L)
[15:35:28.769] plan(): plan_init() of 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ...
[15:35:28.770] < mirai | $data >
[15:35:28.770] getGlobalsAndPackages() ...
[15:35:28.771] Not searching for globals
[15:35:28.771] - globals: [0] <none>
[15:35:28.771] getGlobalsAndPackages() ... DONE
[15:35:28.772] getGlobalsAndPackages() ...
[15:35:28.772]
[15:35:28.772] - globals: [0] <none>
[15:35:28.773] getGlobalsAndPackages() ... DONE
[15:35:28.778] Packages needed by the future expression (n = 0): <none>
[15:35:28.778] Packages needed by future strategies (n = 0): <none>
[15:35:28.780] {
[15:35:28.780] {
[15:35:28.780] {
[15:35:28.780] ...future.startTime <- base::Sys.time()
[15:35:28.780] {
[15:35:28.780] {
[15:35:28.780] {
[15:35:28.780] base::local({
[15:35:28.780] has_future <- base::requireNamespace("future",
[15:35:28.780] quietly = TRUE)
[15:35:28.780] if (has_future) {
[15:35:28.780] ns <- base::getNamespace("future")
[15:35:28.780] version <- ns[[".package"]][["version"]]
[15:35:28.780] if (is.null(version))
[15:35:28.780] version <- utils::packageVersion("future")
[15:35:28.780] }
[15:35:28.780] else {
[15:35:28.780] version <- NULL
[15:35:28.780] }
[15:35:28.780] if (!has_future || version < "1.8.0") {
[15:35:28.780] info <- base::c(r_version = base::gsub("R version ",
[15:35:28.780] "", base::R.version$version.string),
[15:35:28.780] platform = base::sprintf("%s (%s-bit)",
[15:35:28.780] base::R.version$platform, 8 * base::.Machine$sizeof.pointer),
[15:35:28.780] os = base::paste(base::Sys.info()[base::c("sysname",
[15:35:28.780] "release", "version")], collapse = " "),
[15:35:28.780] hostname = base::Sys.info()[["nodename"]])
[15:35:28.780] info <- base::sprintf("%s: %s", base::names(info),
[15:35:28.780] info)
[15:35:28.780] info <- base::paste(info, collapse = "; ")
[15:35:28.780] if (!has_future) {
[15:35:28.780] msg <- base::sprintf("Package 'future' is not installed on worker (%s)",
[15:35:28.780] info)
[15:35:28.780] }
[15:35:28.780] else {
[15:35:28.780] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
[15:35:28.780] info, version)
[15:35:28.780] }
[15:35:28.780] base::stop(msg)
[15:35:28.780] }
[15:35:28.780] })
[15:35:28.780] }
[15:35:28.780] ...future.strategy.old <- future::plan("list")
[15:35:28.780] options(future.plan = NULL)
[15:35:28.780] Sys.unsetenv("R_FUTURE_PLAN")
[15:35:28.780] future::plan("default", .cleanup = FALSE, .init = FALSE)
[15:35:28.780] }
[15:35:28.780] ...future.workdir <- getwd()
[15:35:28.780] }
[15:35:28.780] ...future.oldOptions <- base::as.list(base::.Options)
[15:35:28.780] ...future.oldEnvVars <- base::Sys.getenv()
[15:35:28.780] }
[15:35:28.780] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL,
[15:35:28.780] future.globals.maxSize = NULL, future.globals.method = NULL,
[15:35:28.780] future.globals.onMissing = NULL, future.globals.onReference = NULL,
[15:35:28.780] future.globals.resolve = NULL, future.resolve.recursive = NULL,
[15:35:28.780] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL,
[15:35:28.780] future.stdout.windows.reencode = NULL, width = 80L)
[15:35:28.780] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options),
[15:35:28.780] base::names(...future.oldOptions))
[15:35:28.780] }
[15:35:28.780] if (FALSE) {
[15:35:28.780] }
[15:35:28.780] else {
[15:35:28.780] if (TRUE) {
[15:35:28.780] ...future.stdout <- base::rawConnection(base::raw(0L),
[15:35:28.780] open = "w")
[15:35:28.780] }
[15:35:28.780] else {
[15:35:28.780] ...future.stdout <- base::file(base::switch(.Platform$OS.type,
[15:35:28.780] windows = "NUL", "/dev/null"), open = "w")
[15:35:28.780] }
[15:35:28.780] base::sink(...future.stdout, type = "output", split = FALSE)
[15:35:28.780] base::on.exit(if (!base::is.null(...future.stdout)) {
[15:35:28.780] base::sink(type = "output", split = FALSE)
[15:35:28.780] base::close(...future.stdout)
[15:35:28.780] }, add = TRUE)
[15:35:28.780] }
[15:35:28.780] ...future.frame <- base::sys.nframe()
[15:35:28.780] ...future.conditions <- base::list()
[15:35:28.780] ...future.rng <- base::globalenv()$.Random.seed
[15:35:28.780] if (FALSE) {
[15:35:28.780] ...future.globalenv.names <- c(base::names(base::.GlobalEnv),
[15:35:28.780] "...future.value", "...future.globalenv.names", ".Random.seed")
[15:35:28.780] }
[15:35:28.780] ...future.result <- base::tryCatch({
[15:35:28.780] base::withCallingHandlers({
[15:35:28.780] ...future.value <- base::withVisible(base::local(NA))
[15:35:28.780] future::FutureResult(value = ...future.value$value,
[15:35:28.780] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed,
[15:35:28.780] ...future.rng), globalenv = if (FALSE)
[15:35:28.780] list(added = base::setdiff(base::names(base::.GlobalEnv),
[15:35:28.780] ...future.globalenv.names))
[15:35:28.780] else NULL, started = ...future.startTime, version = "1.8")
[15:35:28.780] }, condition = base::local({
[15:35:28.780] c <- base::c
[15:35:28.780] inherits <- base::inherits
[15:35:28.780] invokeRestart <- base::invokeRestart
[15:35:28.780] length <- base::length
[15:35:28.780] list <- base::list
[15:35:28.780] seq.int <- base::seq.int
[15:35:28.780] signalCondition <- base::signalCondition
[15:35:28.780] sys.calls <- base::sys.calls
[15:35:28.780] `[[` <- base::`[[`
[15:35:28.780] `+` <- base::`+`
[15:35:28.780] `<<-` <- base::`<<-`
[15:35:28.780] sysCalls <- function(calls = sys.calls(), from = 1L) {
[15:35:28.780] calls[seq.int(from = from + 12L, to = length(calls) -
[15:35:28.780] 3L)]
[15:35:28.780] }
[15:35:28.780] function(cond) {
[15:35:28.780] is_error <- inherits(cond, "error")
[15:35:28.780] ignore <- !is_error && !is.null(NULL) && inherits(cond,
[15:35:28.780] NULL)
[15:35:28.780] if (is_error) {
[15:35:28.780] sessionInformation <- function() {
[15:35:28.780] list(r = base::R.Version(), locale = base::Sys.getlocale(),
[15:35:28.780] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(),
[15:35:28.780] search = base::search(), system = base::Sys.info())
[15:35:28.780] }
[15:35:28.780] ...future.conditions[[length(...future.conditions) +
[15:35:28.780] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame),
[15:35:28.780] cond$call), session = sessionInformation(),
[15:35:28.780] timestamp = base::Sys.time(), signaled = 0L)
[15:35:28.780] signalCondition(cond)
[15:35:28.780] }
[15:35:28.780] else if (!ignore && TRUE && inherits(cond, "condition")) {
[15:35:28.780] signal <- FALSE && inherits(cond, character(0))
[15:35:28.780] ...future.conditions[[length(...future.conditions) +
[15:35:28.780] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal))
[15:35:28.780] if (FALSE && !signal) {
[15:35:28.780] muffleCondition <- function (cond, pattern = "^muffle")
[15:35:28.780] {
[15:35:28.780] inherits <- base::inherits
[15:35:28.780] invokeRestart <- base::invokeRestart
[15:35:28.780] is.null <- base::is.null
[15:35:28.780] muffled <- FALSE
[15:35:28.780] if (inherits(cond, "message")) {
[15:35:28.780] muffled <- grepl(pattern, "muffleMessage")
[15:35:28.780] if (muffled)
[15:35:28.780] invokeRestart("muffleMessage")
[15:35:28.780] }
[15:35:28.780] else if (inherits(cond, "warning")) {
[15:35:28.780] muffled <- grepl(pattern, "muffleWarning")
[15:35:28.780] if (muffled)
[15:35:28.780] invokeRestart("muffleWarning")
[15:35:28.780] }
[15:35:28.780] else if (inherits(cond, "condition")) {
[15:35:28.780] if (!is.null(pattern)) {
[15:35:28.780] computeRestarts <- base::computeRestarts
[15:35:28.780] grepl <- base::grepl
[15:35:28.780] restarts <- computeRestarts(cond)
[15:35:28.780] for (restart in restarts) {
[15:35:28.780] name <- restart$name
[15:35:28.780] if (is.null(name))
[15:35:28.780] next
[15:35:28.780] if (!grepl(pattern, name))
[15:35:28.780] next
[15:35:28.780] invokeRestart(restart)
[15:35:28.780] muffled <- TRUE
[15:35:28.780] break
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] invisible(muffled)
[15:35:28.780] }
[15:35:28.780] muffleCondition(cond, pattern = "^muffle")
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] else {
[15:35:28.780] if (TRUE) {
[15:35:28.780] muffleCondition <- function (cond, pattern = "^muffle")
[15:35:28.780] {
[15:35:28.780] inherits <- base::inherits
[15:35:28.780] invokeRestart <- base::invokeRestart
[15:35:28.780] is.null <- base::is.null
[15:35:28.780] muffled <- FALSE
[15:35:28.780] if (inherits(cond, "message")) {
[15:35:28.780] muffled <- grepl(pattern, "muffleMessage")
[15:35:28.780] if (muffled)
[15:35:28.780] invokeRestart("muffleMessage")
[15:35:28.780] }
[15:35:28.780] else if (inherits(cond, "warning")) {
[15:35:28.780] muffled <- grepl(pattern, "muffleWarning")
[15:35:28.780] if (muffled)
[15:35:28.780] invokeRestart("muffleWarning")
[15:35:28.780] }
[15:35:28.780] else if (inherits(cond, "condition")) {
[15:35:28.780] if (!is.null(pattern)) {
[15:35:28.780] computeRestarts <- base::computeRestarts
[15:35:28.780] grepl <- base::grepl
[15:35:28.780] restarts <- computeRestarts(cond)
[15:35:28.780] for (restart in restarts) {
[15:35:28.780] name <- restart$name
[15:35:28.780] if (is.null(name))
[15:35:28.780] next
[15:35:28.780] if (!grepl(pattern, name))
[15:35:28.780] next
[15:35:28.780] invokeRestart(restart)
[15:35:28.780] muffled <- TRUE
[15:35:28.780] break
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] invisible(muffled)
[15:35:28.780] }
[15:35:28.780] muffleCondition(cond, pattern = "^muffle")
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] }))
[15:35:28.780] }, error = function(ex) {
[15:35:28.780] base::structure(base::list(value = NULL, visible = NULL,
[15:35:28.780] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed,
[15:35:28.780] ...future.rng), started = ...future.startTime,
[15:35:28.780] finished = Sys.time(), session_uuid = NA_character_,
[15:35:28.780] version = "1.8"), class = "FutureResult")
[15:35:28.780] }, finally = {
[15:35:28.780] if (!identical(...future.workdir, getwd()))
[15:35:28.780] setwd(...future.workdir)
[15:35:28.780] {
[15:35:28.780] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) {
[15:35:28.780] ...future.oldOptions$nwarnings <- NULL
[15:35:28.780] }
[15:35:28.780] base::options(...future.oldOptions)
[15:35:28.780] if (.Platform$OS.type == "windows") {
[15:35:28.780] old_names <- names(...future.oldEnvVars)
[15:35:28.780] envs <- base::Sys.getenv()
[15:35:28.780] names <- names(envs)
[15:35:28.780] common <- intersect(names, old_names)
[15:35:28.780] added <- setdiff(names, old_names)
[15:35:28.780] removed <- setdiff(old_names, names)
[15:35:28.780] changed <- common[...future.oldEnvVars[common] !=
[15:35:28.780] envs[common]]
[15:35:28.780] NAMES <- toupper(changed)
[15:35:28.780] args <- list()
[15:35:28.780] for (kk in seq_along(NAMES)) {
[15:35:28.780] name <- changed[[kk]]
[15:35:28.780] NAME <- NAMES[[kk]]
[15:35:28.780] if (name != NAME && is.element(NAME, old_names))
[15:35:28.780] next
[15:35:28.780] args[[name]] <- ...future.oldEnvVars[[name]]
[15:35:28.780] }
[15:35:28.780] NAMES <- toupper(added)
[15:35:28.780] for (kk in seq_along(NAMES)) {
[15:35:28.780] name <- added[[kk]]
[15:35:28.780] NAME <- NAMES[[kk]]
[15:35:28.780] if (name != NAME && is.element(NAME, old_names))
[15:35:28.780] next
[15:35:28.780] args[[name]] <- ""
[15:35:28.780] }
[15:35:28.780] NAMES <- toupper(removed)
[15:35:28.780] for (kk in seq_along(NAMES)) {
[15:35:28.780] name <- removed[[kk]]
[15:35:28.780] NAME <- NAMES[[kk]]
[15:35:28.780] if (name != NAME && is.element(NAME, old_names))
[15:35:28.780] next
[15:35:28.780] args[[name]] <- ...future.oldEnvVars[[name]]
[15:35:28.780] }
[15:35:28.780] if (length(args) > 0)
[15:35:28.780] base::do.call(base::Sys.setenv, args = args)
[15:35:28.780] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL
[15:35:28.780] }
[15:35:28.780] else {
[15:35:28.780] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars))
[15:35:28.780] }
[15:35:28.780] {
[15:35:28.780] if (base::length(...future.futureOptionsAdded) >
[15:35:28.780] 0L) {
[15:35:28.780] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded))
[15:35:28.780] base::names(opts) <- ...future.futureOptionsAdded
[15:35:28.780] base::options(opts)
[15:35:28.780] }
[15:35:28.780] {
[15:35:28.780] NULL
[15:35:28.780] options(future.plan = NULL)
[15:35:28.780] if (is.na(NA_character_))
[15:35:28.780] Sys.unsetenv("R_FUTURE_PLAN")
[15:35:28.780] else Sys.setenv(R_FUTURE_PLAN = NA_character_)
[15:35:28.780] future::plan(...future.strategy.old, .cleanup = FALSE,
[15:35:28.780] .init = FALSE)
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] }
[15:35:28.780] })
[15:35:28.780] if (TRUE) {
[15:35:28.780] base::sink(type = "output", split = FALSE)
[15:35:28.780] if (TRUE) {
[15:35:28.780] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout))
[15:35:28.780] }
[15:35:28.780] else {
[15:35:28.780] ...future.result["stdout"] <- base::list(NULL)
[15:35:28.780] }
[15:35:28.780] base::close(...future.stdout)
[15:35:28.780] ...future.stdout <- NULL
[15:35:28.780] }
[15:35:28.780] ...future.result$conditions <- ...future.conditions
[15:35:28.780] ...future.result$finished <- base::Sys.time()
[15:35:28.780] ...future.result
[15:35:28.780] }
[15:35:29.045] plan(): plan_init() of 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE
[15:35:29.046] plan(): nbrOfWorkers() = 2
>
> all <- nbrOfWorkers()
> message("Number of workers: ", all)
Number of workers: 2
> stopifnot(all == 2L)
> free <- nbrOfFreeWorkers()
> message("Number of free workers: ", all)
Number of free workers: 2
> stopifnot(free == 2L)
>
> ## Don't test on MS Windows, because that will leave behind a
> ## stray Rscript<hexcode> file, which 'R CMD check --as-cran'
> ## will complain about. /HB 2024-04-12
> if (.Platform$OS.type != "windows") {
+ ## Force R worker to quit
+ f <- future({ tools::pskill(pid = Sys.getpid()) })
+ res <- tryCatch(value(f), error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+
+ ## FIXME: nbrOfWorkers()/nbrOfFreeWorkers() can throw a FutureError,
+ ## cf. https://github.com/HenrikBengtsson/future.mirai/issues/7
+ nworkers <- tryCatch(nbrOfWorkers(), error = identity)
+ print(nworkers)
+ if (!inherits(nworkers, "error")) {
+ message("Number of workers: ", nworkers)
+ stopifnot(nworkers == all - 1L)
+ }
+
+ nfreeworkers <- tryCatch(nbrOfFreeWorkers(), error = identity)
+ print(nfreeworkers)
+ if (!inherits(nfreeworkers, "error")) {
+ message("Number of free workers: ", nfreeworkers)
+ stopifnot(nfreeworkers == free - 1L)
+ }
+ }
[15:35:29.049] getGlobalsAndPackages() ...
[15:35:29.049] Searching for globals...
[15:35:29.102] - globals found: [3] '{', '::', 'Sys.getpid'
[15:35:29.102] Searching for globals ... DONE
[15:35:29.102] Resolving globals: FALSE
[15:35:29.104]
[15:35:29.104]
[15:35:29.105] getGlobalsAndPackages() ... DONE
[15:35:29.110] run() for 'Future' ...
[15:35:29.110] - state: 'created'
[15:35:29.111] - Future backend: 'FutureStrategy', 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function'
[15:35:29.112] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment'
[15:35:29.112] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ...
[15:35:29.113] - Field: 'label'
[15:35:29.113] - Field: 'local'
[15:35:29.117] - Field: 'owner'
[15:35:29.118] - Field: 'envir'
[15:35:29.118] - Field: 'packages'
[15:35:29.118] - Field: 'gc'
[15:35:29.119] - Field: 'conditions'
[15:35:29.119] - Field: 'expr'
[15:35:29.119] - Field: 'uuid'
[15:35:29.120] - Field: 'seed'
[15:35:29.120] - Field: 'version'
[15:35:29.120] - Field: 'result'
[15:35:29.121] - Field: 'asynchronous'
[15:35:29.121] - Field: 'calls'
[15:35:29.125] - Field: 'globals'
[15:35:29.126] - Field: 'stdout'
[15:35:29.126] - Field: 'earlySignal'
[15:35:29.126] - Field: 'lazy'
[15:35:29.126] - Field: 'state'
[15:35:29.127] - Field: '.cluster'
[15:35:29.127] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done
[15:35:29.127] - Launch lazy future ...
[15:35:29.128] Packages needed by the future expression (n = 0): <none>
[15:35:29.128] Packages needed by future strategies (n = 0): <none>
[15:35:29.134] {
[15:35:29.134] {
[15:35:29.134] {
[15:35:29.134] ...future.startTime <- base::Sys.time()
[15:35:29.134] {
[15:35:29.134] {
[15:35:29.134] {
[15:35:29.134] base::local({
[15:35:29.134] has_future <- base::requireNamespace("future",
[15:35:29.134] quietly = TRUE)
[15:35:29.134] if (has_future) {
[15:35:29.134] ns <- base::getNamespace("future")
[15:35:29.134] version <- ns[[".package"]][["version"]]
[15:35:29.134] if (is.null(version))
[15:35:29.134] version <- utils::packageVersion("future")
[15:35:29.134] }
[15:35:29.134] else {
[15:35:29.134] version <- NULL
[15:35:29.134] }
[15:35:29.134] if (!has_future || version < "1.8.0") {
[15:35:29.134] info <- base::c(r_version = base::gsub("R version ",
[15:35:29.134] "", base::R.version$version.string),
[15:35:29.134] platform = base::sprintf("%s (%s-bit)",
[15:35:29.134] base::R.version$platform, 8 * base::.Machine$sizeof.pointer),
[15:35:29.134] os = base::paste(base::Sys.info()[base::c("sysname",
[15:35:29.134] "release", "version")], collapse = " "),
[15:35:29.134] hostname = base::Sys.info()[["nodename"]])
[15:35:29.134] info <- base::sprintf("%s: %s", base::names(info),
[15:35:29.134] info)
[15:35:29.134] info <- base::paste(info, collapse = "; ")
[15:35:29.134] if (!has_future) {
[15:35:29.134] msg <- base::sprintf("Package 'future' is not installed on worker (%s)",
[15:35:29.134] info)
[15:35:29.134] }
[15:35:29.134] else {
[15:35:29.134] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
[15:35:29.134] info, version)
[15:35:29.134] }
[15:35:29.134] base::stop(msg)
[15:35:29.134] }
[15:35:29.134] })
[15:35:29.134] }
[15:35:29.134] ...future.strategy.old <- future::plan("list")
[15:35:29.134] options(future.plan = NULL)
[15:35:29.134] Sys.unsetenv("R_FUTURE_PLAN")
[15:35:29.134] future::plan("default", .cleanup = FALSE, .init = FALSE)
[15:35:29.134] }
[15:35:29.134] ...future.workdir <- getwd()
[15:35:29.134] }
[15:35:29.134] ...future.oldOptions <- base::as.list(base::.Options)
[15:35:29.134] ...future.oldEnvVars <- base::Sys.getenv()
[15:35:29.134] }
[15:35:29.134] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL,
[15:35:29.134] future.globals.maxSize = NULL, future.globals.method = NULL,
[15:35:29.134] future.globals.onMissing = NULL, future.globals.onReference = NULL,
[15:35:29.134] future.globals.resolve = NULL, future.resolve.recursive = NULL,
[15:35:29.134] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL,
[15:35:29.134] future.stdout.windows.reencode = NULL, width = 80L)
[15:35:29.134] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options),
[15:35:29.134] base::names(...future.oldOptions))
[15:35:29.134] }
[15:35:29.134] if (FALSE) {
[15:35:29.134] }
[15:35:29.134] else {
[15:35:29.134] if (TRUE) {
[15:35:29.134] ...future.stdout <- base::rawConnection(base::raw(0L),
[15:35:29.134] open = "w")
[15:35:29.134] }
[15:35:29.134] else {
[15:35:29.134] ...future.stdout <- base::file(base::switch(.Platform$OS.type,
[15:35:29.134] windows = "NUL", "/dev/null"), open = "w")
[15:35:29.134] }
[15:35:29.134] base::sink(...future.stdout, type = "output", split = FALSE)
[15:35:29.134] base::on.exit(if (!base::is.null(...future.stdout)) {
[15:35:29.134] base::sink(type = "output", split = FALSE)
[15:35:29.134] base::close(...future.stdout)
[15:35:29.134] }, add = TRUE)
[15:35:29.134] }
[15:35:29.134] ...future.frame <- base::sys.nframe()
[15:35:29.134] ...future.conditions <- base::list()
[15:35:29.134] ...future.rng <- base::globalenv()$.Random.seed
[15:35:29.134] if (FALSE) {
[15:35:29.134] ...future.globalenv.names <- c(base::names(base::.GlobalEnv),
[15:35:29.134] "...future.value", "...future.globalenv.names", ".Random.seed")
[15:35:29.134] }
[15:35:29.134] ...future.result <- base::tryCatch({
[15:35:29.134] base::withCallingHandlers({
[15:35:29.134] ...future.value <- base::withVisible(base::local({
[15:35:29.134] tools::pskill(pid = Sys.getpid())
[15:35:29.134] }))
[15:35:29.134] future::FutureResult(value = ...future.value$value,
[15:35:29.134] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed,
[15:35:29.134] ...future.rng), globalenv = if (FALSE)
[15:35:29.134] list(added = base::setdiff(base::names(base::.GlobalEnv),
[15:35:29.134] ...future.globalenv.names))
[15:35:29.134] else NULL, started = ...future.startTime, version = "1.8")
[15:35:29.134] }, condition = base::local({
[15:35:29.134] c <- base::c
[15:35:29.134] inherits <- base::inherits
[15:35:29.134] invokeRestart <- base::invokeRestart
[15:35:29.134] length <- base::length
[15:35:29.134] list <- base::list
[15:35:29.134] seq.int <- base::seq.int
[15:35:29.134] signalCondition <- base::signalCondition
[15:35:29.134] sys.calls <- base::sys.calls
[15:35:29.134] `[[` <- base::`[[`
[15:35:29.134] `+` <- base::`+`
[15:35:29.134] `<<-` <- base::`<<-`
[15:35:29.134] sysCalls <- function(calls = sys.calls(), from = 1L) {
[15:35:29.134] calls[seq.int(from = from + 12L, to = length(calls) -
[15:35:29.134] 3L)]
[15:35:29.134] }
[15:35:29.134] function(cond) {
[15:35:29.134] is_error <- inherits(cond, "error")
[15:35:29.134] ignore <- !is_error && !is.null(NULL) && inherits(cond,
[15:35:29.134] NULL)
[15:35:29.134] if (is_error) {
[15:35:29.134] sessionInformation <- function() {
[15:35:29.134] list(r = base::R.Version(), locale = base::Sys.getlocale(),
[15:35:29.134] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(),
[15:35:29.134] search = base::search(), system = base::Sys.info())
[15:35:29.134] }
[15:35:29.134] ...future.conditions[[length(...future.conditions) +
[15:35:29.134] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame),
[15:35:29.134] cond$call), session = sessionInformation(),
[15:35:29.134] timestamp = base::Sys.time(), signaled = 0L)
[15:35:29.134] signalCondition(cond)
[15:35:29.134] }
[15:35:29.134] else if (!ignore && TRUE && inherits(cond, "condition")) {
[15:35:29.134] signal <- FALSE && inherits(cond, character(0))
[15:35:29.134] ...future.conditions[[length(...future.conditions) +
[15:35:29.134] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal))
[15:35:29.134] if (FALSE && !signal) {
[15:35:29.134] muffleCondition <- function (cond, pattern = "^muffle")
[15:35:29.134] {
[15:35:29.134] inherits <- base::inherits
[15:35:29.134] invokeRestart <- base::invokeRestart
[15:35:29.134] is.null <- base::is.null
[15:35:29.134] muffled <- FALSE
[15:35:29.134] if (inherits(cond, "message")) {
[15:35:29.134] muffled <- grepl(pattern, "muffleMessage")
[15:35:29.134] if (muffled)
[15:35:29.134] invokeRestart("muffleMessage")
[15:35:29.134] }
[15:35:29.134] else if (inherits(cond, "warning")) {
[15:35:29.134] muffled <- grepl(pattern, "muffleWarning")
[15:35:29.134] if (muffled)
[15:35:29.134] invokeRestart("muffleWarning")
[15:35:29.134] }
[15:35:29.134] else if (inherits(cond, "condition")) {
[15:35:29.134] if (!is.null(pattern)) {
[15:35:29.134] computeRestarts <- base::computeRestarts
[15:35:29.134] grepl <- base::grepl
[15:35:29.134] restarts <- computeRestarts(cond)
[15:35:29.134] for (restart in restarts) {
[15:35:29.134] name <- restart$name
[15:35:29.134] if (is.null(name))
[15:35:29.134] next
[15:35:29.134] if (!grepl(pattern, name))
[15:35:29.134] next
[15:35:29.134] invokeRestart(restart)
[15:35:29.134] muffled <- TRUE
[15:35:29.134] break
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] invisible(muffled)
[15:35:29.134] }
[15:35:29.134] muffleCondition(cond, pattern = "^muffle")
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] else {
[15:35:29.134] if (TRUE) {
[15:35:29.134] muffleCondition <- function (cond, pattern = "^muffle")
[15:35:29.134] {
[15:35:29.134] inherits <- base::inherits
[15:35:29.134] invokeRestart <- base::invokeRestart
[15:35:29.134] is.null <- base::is.null
[15:35:29.134] muffled <- FALSE
[15:35:29.134] if (inherits(cond, "message")) {
[15:35:29.134] muffled <- grepl(pattern, "muffleMessage")
[15:35:29.134] if (muffled)
[15:35:29.134] invokeRestart("muffleMessage")
[15:35:29.134] }
[15:35:29.134] else if (inherits(cond, "warning")) {
[15:35:29.134] muffled <- grepl(pattern, "muffleWarning")
[15:35:29.134] if (muffled)
[15:35:29.134] invokeRestart("muffleWarning")
[15:35:29.134] }
[15:35:29.134] else if (inherits(cond, "condition")) {
[15:35:29.134] if (!is.null(pattern)) {
[15:35:29.134] computeRestarts <- base::computeRestarts
[15:35:29.134] grepl <- base::grepl
[15:35:29.134] restarts <- computeRestarts(cond)
[15:35:29.134] for (restart in restarts) {
[15:35:29.134] name <- restart$name
[15:35:29.134] if (is.null(name))
[15:35:29.134] next
[15:35:29.134] if (!grepl(pattern, name))
[15:35:29.134] next
[15:35:29.134] invokeRestart(restart)
[15:35:29.134] muffled <- TRUE
[15:35:29.134] break
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] invisible(muffled)
[15:35:29.134] }
[15:35:29.134] muffleCondition(cond, pattern = "^muffle")
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] }))
[15:35:29.134] }, error = function(ex) {
[15:35:29.134] base::structure(base::list(value = NULL, visible = NULL,
[15:35:29.134] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed,
[15:35:29.134] ...future.rng), started = ...future.startTime,
[15:35:29.134] finished = Sys.time(), session_uuid = NA_character_,
[15:35:29.134] version = "1.8"), class = "FutureResult")
[15:35:29.134] }, finally = {
[15:35:29.134] if (!identical(...future.workdir, getwd()))
[15:35:29.134] setwd(...future.workdir)
[15:35:29.134] {
[15:35:29.134] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) {
[15:35:29.134] ...future.oldOptions$nwarnings <- NULL
[15:35:29.134] }
[15:35:29.134] base::options(...future.oldOptions)
[15:35:29.134] if (.Platform$OS.type == "windows") {
[15:35:29.134] old_names <- names(...future.oldEnvVars)
[15:35:29.134] envs <- base::Sys.getenv()
[15:35:29.134] names <- names(envs)
[15:35:29.134] common <- intersect(names, old_names)
[15:35:29.134] added <- setdiff(names, old_names)
[15:35:29.134] removed <- setdiff(old_names, names)
[15:35:29.134] changed <- common[...future.oldEnvVars[common] !=
[15:35:29.134] envs[common]]
[15:35:29.134] NAMES <- toupper(changed)
[15:35:29.134] args <- list()
[15:35:29.134] for (kk in seq_along(NAMES)) {
[15:35:29.134] name <- changed[[kk]]
[15:35:29.134] NAME <- NAMES[[kk]]
[15:35:29.134] if (name != NAME && is.element(NAME, old_names))
[15:35:29.134] next
[15:35:29.134] args[[name]] <- ...future.oldEnvVars[[name]]
[15:35:29.134] }
[15:35:29.134] NAMES <- toupper(added)
[15:35:29.134] for (kk in seq_along(NAMES)) {
[15:35:29.134] name <- added[[kk]]
[15:35:29.134] NAME <- NAMES[[kk]]
[15:35:29.134] if (name != NAME && is.element(NAME, old_names))
[15:35:29.134] next
[15:35:29.134] args[[name]] <- ""
[15:35:29.134] }
[15:35:29.134] NAMES <- toupper(removed)
[15:35:29.134] for (kk in seq_along(NAMES)) {
[15:35:29.134] name <- removed[[kk]]
[15:35:29.134] NAME <- NAMES[[kk]]
[15:35:29.134] if (name != NAME && is.element(NAME, old_names))
[15:35:29.134] next
[15:35:29.134] args[[name]] <- ...future.oldEnvVars[[name]]
[15:35:29.134] }
[15:35:29.134] if (length(args) > 0)
[15:35:29.134] base::do.call(base::Sys.setenv, args = args)
[15:35:29.134] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL
[15:35:29.134] }
[15:35:29.134] else {
[15:35:29.134] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars))
[15:35:29.134] }
[15:35:29.134] {
[15:35:29.134] if (base::length(...future.futureOptionsAdded) >
[15:35:29.134] 0L) {
[15:35:29.134] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded))
[15:35:29.134] base::names(opts) <- ...future.futureOptionsAdded
[15:35:29.134] base::options(opts)
[15:35:29.134] }
[15:35:29.134] {
[15:35:29.134] NULL
[15:35:29.134] options(future.plan = NULL)
[15:35:29.134] if (is.na(NA_character_))
[15:35:29.134] Sys.unsetenv("R_FUTURE_PLAN")
[15:35:29.134] else Sys.setenv(R_FUTURE_PLAN = NA_character_)
[15:35:29.134] future::plan(...future.strategy.old, .cleanup = FALSE,
[15:35:29.134] .init = FALSE)
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] }
[15:35:29.134] })
[15:35:29.134] if (TRUE) {
[15:35:29.134] base::sink(type = "output", split = FALSE)
[15:35:29.134] if (TRUE) {
[15:35:29.134] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout))
[15:35:29.134] }
[15:35:29.134] else {
[15:35:29.134] ...future.result["stdout"] <- base::list(NULL)
[15:35:29.134] }
[15:35:29.134] base::close(...future.stdout)
[15:35:29.134] ...future.stdout <- NULL
[15:35:29.134] }
[15:35:29.134] ...future.result$conditions <- ...future.conditions
[15:35:29.134] ...future.result$finished <- base::Sys.time()
[15:35:29.134] ...future.result
[15:35:29.134] }
[15:35:29.143] - Launch lazy future ... done
[15:35:29.144] run() for 'MiraiFuture' ... done
<FutureError: Failed to retrieve results from MiraiFuture (<none>). The mirai framework reports on error value 19>
Future UUID: <NA>
[1] 2
Number of workers: 2
Error: nworkers == all - 1L is not TRUE
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 0.2.1
Check: tests
Result: ERROR
Running 'demo.R' [2s]
Running 'dotdotdot.R' [2s]
Running 'future,labels.R' [2s]
Running 'future,lazy.R' [1s]
Running 'future.tests,mirai_cluster.R' [16s]
Running 'future.tests-mirai_multisession.R' [18s]
Running 'globals,formulas.R' [2s]
Running 'globals,manual.R' [2s]
Running 'globals,nested.R' [1s]
Running 'globals,subassignment.R' [2s]
Running 'globals,tricky.R' [2s]
Running 'mirai_cluster,worker-termination.R' [1s]
Running 'mirai_cluster.R' [2s]
Running 'nbrOfWorkers.R' [1s]
Running 'plan.R' [2s]
Running 'rng.R' [1s]
Running 'stdout.R' [2s]
Running 'zzz,future_lapply.R' [13s]
Running the tests in 'tests/globals,nested.R' failed.
Complete output:
> ## This requires mirai (>= 0.13.2)
> if (packageVersion("mirai") >= "0.13.2") {
+ library(future.mirai)
+
+ mirai::daemons(1, dispatcher = FALSE)
+ plan(mirai_cluster)
+
+ g <- function() 42
+ h <- function() g()
+
+ f <- future(h())
+ v <- value(f)
+ print(v)
+ stopifnot(v == h())
+
+ plan(sequential)
+ mirai::daemons(0) ## Reset any daemons running
+ gc()
+
+ }
Loading required package: future
[1] 42
Flavor: r-release-windows-x86_64