R Under development (unstable) (2024-03-25 r86192 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") [17:26:57.559] plan(): Setting new future strategy stack: [17:26:57.560] List of future strategies: [17:26:57.560] 1. sequential: [17:26:57.560] - args: function (..., envir = parent.frame(), workers = "") [17:26:57.560] - tweaked: FALSE [17:26:57.560] - call: future::plan("sequential") [17:26:57.576] plan(): nbrOfWorkers() = 1 > library("listenv") > > oopts <- c(oopts, options(future.globals.resolve = TRUE)) > setTimeLimit(cpu = 10, elapsed = 10, transient = TRUE) > > message("*** Tricky use cases related to globals (part 2) ...") *** Tricky use cases related to globals (part 2) ... > > ## Allow for two background processes > plan(multisession, workers = 2L) [17:26:57.588] plan(): Setting new future strategy stack: [17:26:57.588] List of future strategies: [17:26:57.588] 1. multisession: [17:26:57.588] - args: function (..., workers = 2L, envir = parent.frame()) [17:26:57.588] - tweaked: TRUE [17:26:57.588] - call: plan(multisession, workers = 2L) [17:26:57.603] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... [17:26:57.603] multisession: [17:26:57.603] - args: function (..., workers = 2L, envir = parent.frame()) [17:26:57.603] - tweaked: TRUE [17:26:57.603] - call: plan(multisession, workers = 2L) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:26:57.605] getGlobalsAndPackages() ... [17:26:57.605] Not searching for globals [17:26:57.605] - globals: [0] [17:26:57.605] getGlobalsAndPackages() ... DONE [17:26:57.606] [local output] makeClusterPSOCK() ... [17:26:57.635] [local output] Workers: [n = 2] 'localhost', 'localhost' [17:26:57.641] [local output] Base port: 20636 [17:26:57.641] [local output] Getting setup options for 2 cluster nodes ... [17:26:57.642] [local output] - Node 1 of 2 ... [17:26:57.642] [local output] localMachine=TRUE => revtunnel=FALSE [17:26:57.643] Testing if worker's PID can be inferred: '"D:/RCompile/recent/R/bin/x64/Rscript" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpymTpu3/worker.rank=1.parallelly.parent=27676.6c1c6bce1753.pid\")), silent = TRUE)" -e "file.exists(\"D:/temp/RtmpymTpu3/worker.rank=1.parallelly.parent=27676.6c1c6bce1753.pid\")"' [17:26:58.082] - Possible to infer worker's PID: TRUE [17:26:58.082] [local output] Rscript port: 20636 [17:26:58.083] [local output] - Node 2 of 2 ... [17:26:58.083] [local output] localMachine=TRUE => revtunnel=FALSE [17:26:58.085] [local output] Rscript port: 20636 [17:26:58.085] [local output] Getting setup options for 2 cluster nodes ... done [17:26:58.085] [local output] - Parallel setup requested for some PSOCK nodes [17:26:58.086] [local output] Setting up PSOCK nodes in parallel [17:26:58.086] List of 36 [17:26:58.086] $ worker : chr "localhost" [17:26:58.086] ..- attr(*, "localhost")= logi TRUE [17:26:58.086] $ master : chr "localhost" [17:26:58.086] $ port : int 20636 [17:26:58.086] $ connectTimeout : num 120 [17:26:58.086] $ timeout : num 120 [17:26:58.086] $ rscript : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\"" [17:26:58.086] $ homogeneous : logi TRUE [17:26:58.086] $ rscript_args : chr "--default-packages=datasets,utils,grDevices,graphics,stats,methods -e \"#label=globals,resolve.R:27676:CRANWIN3"| __truncated__ [17:26:58.086] $ rscript_envs : NULL [17:26:58.086] $ rscript_libs : chr [1:2] "D:/temp/RtmpAVtqMV/RLIBS_30708245f64e7" "D:/RCompile/recent/R/library" [17:26:58.086] $ rscript_startup : NULL [17:26:58.086] $ rscript_sh : chr "cmd" [17:26:58.086] $ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [17:26:58.086] $ methods : logi TRUE [17:26:58.086] $ socketOptions : chr "no-delay" [17:26:58.086] $ useXDR : logi FALSE [17:26:58.086] $ outfile : chr "/dev/null" [17:26:58.086] $ renice : int NA [17:26:58.086] $ rshcmd : NULL [17:26:58.086] $ user : chr(0) [17:26:58.086] $ revtunnel : logi FALSE [17:26:58.086] $ rshlogfile : NULL [17:26:58.086] $ rshopts : chr(0) [17:26:58.086] $ rank : int 1 [17:26:58.086] $ manual : logi FALSE [17:26:58.086] $ dryrun : logi FALSE [17:26:58.086] $ quiet : logi FALSE [17:26:58.086] $ setup_strategy : chr "parallel" [17:26:58.086] $ local_cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [17:26:58.086] $ pidfile : chr "D:/temp/RtmpymTpu3/worker.rank=1.parallelly.parent=27676.6c1c6bce1753.pid" [17:26:58.086] $ rshcmd_label : NULL [17:26:58.086] $ rsh_call : NULL [17:26:58.086] $ cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [17:26:58.086] $ localMachine : logi TRUE [17:26:58.086] $ make_fcn :function (worker = getOption2("parallelly.localhost.hostname", "localhost"), [17:26:58.086] master = NULL, port, connectTimeout = getOption2("parallelly.makeNodePSOCK.connectTimeout", [17:26:58.086] 2 * 60), timeout = getOption2("parallelly.makeNodePSOCK.timeout", [17:26:58.086] 30 * 24 * 60 * 60), rscript = NULL, homogeneous = NULL, rscript_args = NULL, [17:26:58.086] rscript_envs = NULL, rscript_libs = NULL, rscript_startup = NULL, rscript_sh = c("auto", [17:26:58.086] "cmd", "sh"), default_packages = c("datasets", "utils", "grDevices", [17:26:58.086] "graphics", "stats", if (methods) "methods"), methods = TRUE, socketOptions = getOption2("parallelly.makeNodePSOCK.socketOptions", [17:26:58.086] "no-delay"), useXDR = getOption2("parallelly.makeNodePSOCK.useXDR", [17:26:58.086] FALSE), outfile = "/dev/null", renice = NA_integer_, rshcmd = getOption2("parallelly.makeNodePSOCK.rshcmd", [17:26:58.086] NULL), user = NULL, revtunnel = NA, rshlogfile = NULL, rshopts = getOption2("parallelly.makeNodePSOCK.rshopts", [17:26:58.086] NULL), rank = 1L, manual = FALSE, dryrun = FALSE, quiet = FALSE, [17:26:58.086] setup_strategy = getOption2("parallelly.makeNodePSOCK.setup_strategy", [17:26:58.086] "parallel"), action = c("launch", "options"), verbose = FALSE) [17:26:58.086] $ arguments :List of 28 [17:26:58.086] ..$ worker : chr "localhost" [17:26:58.086] ..$ master : NULL [17:26:58.086] ..$ port : int 20636 [17:26:58.086] ..$ connectTimeout : num 120 [17:26:58.086] ..$ timeout : num 120 [17:26:58.086] ..$ rscript : NULL [17:26:58.086] ..$ homogeneous : NULL [17:26:58.086] ..$ rscript_args : NULL [17:26:58.086] ..$ rscript_envs : NULL [17:26:58.086] ..$ rscript_libs : chr [1:2] "D:/temp/RtmpAVtqMV/RLIBS_30708245f64e7" "D:/RCompile/recent/R/library" [17:26:58.086] ..$ rscript_startup : NULL [17:26:58.086] ..$ rscript_sh : chr [1:3] "auto" "cmd" "sh" [17:26:58.086] ..$ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [17:26:58.086] ..$ methods : logi TRUE [17:26:58.086] ..$ socketOptions : chr "no-delay" [17:26:58.086] ..$ useXDR : logi FALSE [17:26:58.086] ..$ outfile : chr "/dev/null" [17:26:58.086] ..$ renice : int NA [17:26:58.086] ..$ rshcmd : NULL [17:26:58.086] ..$ user : NULL [17:26:58.086] ..$ revtunnel : logi NA [17:26:58.086] ..$ rshlogfile : NULL [17:26:58.086] ..$ rshopts : NULL [17:26:58.086] ..$ rank : int 1 [17:26:58.086] ..$ manual : logi FALSE [17:26:58.086] ..$ dryrun : logi FALSE [17:26:58.086] ..$ quiet : logi FALSE [17:26:58.086] ..$ setup_strategy : chr "parallel" [17:26:58.086] - attr(*, "class")= chr [1:2] "makeNodePSOCKOptions" "makeNodeOptions" [17:26:58.109] [local output] System call to launch all workers: [17:26:58.110] [local output] "D:/RCompile/recent/R/bin/x64/Rscript" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "#label=globals,resolve.R:27676:CRANWIN3:CRAN" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpymTpu3/worker.rank=1.parallelly.parent=27676.6c1c6bce1753.pid\")), silent = TRUE)" -e "options(socketOptions = \"no-delay\")" -e ".libPaths(c(\"D:/temp/RtmpAVtqMV/RLIBS_30708245f64e7\",\"D:/RCompile/recent/R/library\"))" -e "workRSOCK <- tryCatch(parallel:::.workRSOCK, error=function(e) parallel:::.slaveRSOCK); workRSOCK()" MASTER=localhost PORT=20636 OUT=/dev/null TIMEOUT=120 XDR=FALSE SETUPTIMEOUT=120 SETUPSTRATEGY=parallel [17:26:58.110] [local output] Starting PSOCK main server [17:26:58.115] [local output] Workers launched [17:26:58.115] [local output] Waiting for workers to connect back [17:26:58.115] - [local output] 0 workers out of 2 ready [17:26:58.281] - [local output] 0 workers out of 2 ready [17:26:58.282] - [local output] 1 workers out of 2 ready [17:26:58.282] - [local output] 1 workers out of 2 ready [17:26:58.283] - [local output] 2 workers out of 2 ready [17:26:58.283] [local output] Launching of workers completed [17:26:58.283] [local output] Collecting session information from workers [17:26:58.284] [local output] - Worker #1 of 2 [17:26:58.285] [local output] - Worker #2 of 2 [17:26:58.285] [local output] makeClusterPSOCK() ... done [17:26:58.298] Packages needed by the future expression (n = 0): [17:26:58.298] Packages needed by future strategies (n = 0): [17:26:58.299] { [17:26:58.299] { [17:26:58.299] { [17:26:58.299] ...future.startTime <- base::Sys.time() [17:26:58.299] { [17:26:58.299] { [17:26:58.299] { [17:26:58.299] { [17:26:58.299] base::local({ [17:26:58.299] has_future <- base::requireNamespace("future", [17:26:58.299] quietly = TRUE) [17:26:58.299] if (has_future) { [17:26:58.299] ns <- base::getNamespace("future") [17:26:58.299] version <- ns[[".package"]][["version"]] [17:26:58.299] if (is.null(version)) [17:26:58.299] version <- utils::packageVersion("future") [17:26:58.299] } [17:26:58.299] else { [17:26:58.299] version <- NULL [17:26:58.299] } [17:26:58.299] if (!has_future || version < "1.8.0") { [17:26:58.299] info <- base::c(r_version = base::gsub("R version ", [17:26:58.299] "", base::R.version$version.string), [17:26:58.299] platform = base::sprintf("%s (%s-bit)", [17:26:58.299] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:26:58.299] os = base::paste(base::Sys.info()[base::c("sysname", [17:26:58.299] "release", "version")], collapse = " "), [17:26:58.299] hostname = base::Sys.info()[["nodename"]]) [17:26:58.299] info <- base::sprintf("%s: %s", base::names(info), [17:26:58.299] info) [17:26:58.299] info <- base::paste(info, collapse = "; ") [17:26:58.299] if (!has_future) { [17:26:58.299] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:26:58.299] info) [17:26:58.299] } [17:26:58.299] else { [17:26:58.299] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:26:58.299] info, version) [17:26:58.299] } [17:26:58.299] base::stop(msg) [17:26:58.299] } [17:26:58.299] }) [17:26:58.299] } [17:26:58.299] ...future.mc.cores.old <- base::getOption("mc.cores") [17:26:58.299] base::options(mc.cores = 1L) [17:26:58.299] } [17:26:58.299] ...future.strategy.old <- future::plan("list") [17:26:58.299] options(future.plan = NULL) [17:26:58.299] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.299] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:26:58.299] } [17:26:58.299] ...future.workdir <- getwd() [17:26:58.299] } [17:26:58.299] ...future.oldOptions <- base::as.list(base::.Options) [17:26:58.299] ...future.oldEnvVars <- base::Sys.getenv() [17:26:58.299] } [17:26:58.299] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:26:58.299] future.globals.maxSize = NULL, future.globals.method = NULL, [17:26:58.299] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:26:58.299] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:26:58.299] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:26:58.299] future.stdout.windows.reencode = NULL, width = 80L) [17:26:58.299] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:26:58.299] base::names(...future.oldOptions)) [17:26:58.299] } [17:26:58.299] if (FALSE) { [17:26:58.299] } [17:26:58.299] else { [17:26:58.299] if (TRUE) { [17:26:58.299] ...future.stdout <- base::rawConnection(base::raw(0L), [17:26:58.299] open = "w") [17:26:58.299] } [17:26:58.299] else { [17:26:58.299] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:26:58.299] windows = "NUL", "/dev/null"), open = "w") [17:26:58.299] } [17:26:58.299] base::sink(...future.stdout, type = "output", split = FALSE) [17:26:58.299] base::on.exit(if (!base::is.null(...future.stdout)) { [17:26:58.299] base::sink(type = "output", split = FALSE) [17:26:58.299] base::close(...future.stdout) [17:26:58.299] }, add = TRUE) [17:26:58.299] } [17:26:58.299] ...future.frame <- base::sys.nframe() [17:26:58.299] ...future.conditions <- base::list() [17:26:58.299] ...future.rng <- base::globalenv()$.Random.seed [17:26:58.299] if (FALSE) { [17:26:58.299] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:26:58.299] "...future.value", "...future.globalenv.names", ".Random.seed") [17:26:58.299] } [17:26:58.299] ...future.result <- base::tryCatch({ [17:26:58.299] base::withCallingHandlers({ [17:26:58.299] ...future.value <- base::withVisible(base::local({ [17:26:58.299] ...future.makeSendCondition <- base::local({ [17:26:58.299] sendCondition <- NULL [17:26:58.299] function(frame = 1L) { [17:26:58.299] if (is.function(sendCondition)) [17:26:58.299] return(sendCondition) [17:26:58.299] ns <- getNamespace("parallel") [17:26:58.299] if (exists("sendData", mode = "function", [17:26:58.299] envir = ns)) { [17:26:58.299] parallel_sendData <- get("sendData", mode = "function", [17:26:58.299] envir = ns) [17:26:58.299] envir <- sys.frame(frame) [17:26:58.299] master <- NULL [17:26:58.299] while (!identical(envir, .GlobalEnv) && [17:26:58.299] !identical(envir, emptyenv())) { [17:26:58.299] if (exists("master", mode = "list", envir = envir, [17:26:58.299] inherits = FALSE)) { [17:26:58.299] master <- get("master", mode = "list", [17:26:58.299] envir = envir, inherits = FALSE) [17:26:58.299] if (inherits(master, c("SOCKnode", [17:26:58.299] "SOCK0node"))) { [17:26:58.299] sendCondition <<- function(cond) { [17:26:58.299] data <- list(type = "VALUE", value = cond, [17:26:58.299] success = TRUE) [17:26:58.299] parallel_sendData(master, data) [17:26:58.299] } [17:26:58.299] return(sendCondition) [17:26:58.299] } [17:26:58.299] } [17:26:58.299] frame <- frame + 1L [17:26:58.299] envir <- sys.frame(frame) [17:26:58.299] } [17:26:58.299] } [17:26:58.299] sendCondition <<- function(cond) NULL [17:26:58.299] } [17:26:58.299] }) [17:26:58.299] withCallingHandlers({ [17:26:58.299] NA [17:26:58.299] }, immediateCondition = function(cond) { [17:26:58.299] sendCondition <- ...future.makeSendCondition() [17:26:58.299] sendCondition(cond) [17:26:58.299] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.299] { [17:26:58.299] inherits <- base::inherits [17:26:58.299] invokeRestart <- base::invokeRestart [17:26:58.299] is.null <- base::is.null [17:26:58.299] muffled <- FALSE [17:26:58.299] if (inherits(cond, "message")) { [17:26:58.299] muffled <- grepl(pattern, "muffleMessage") [17:26:58.299] if (muffled) [17:26:58.299] invokeRestart("muffleMessage") [17:26:58.299] } [17:26:58.299] else if (inherits(cond, "warning")) { [17:26:58.299] muffled <- grepl(pattern, "muffleWarning") [17:26:58.299] if (muffled) [17:26:58.299] invokeRestart("muffleWarning") [17:26:58.299] } [17:26:58.299] else if (inherits(cond, "condition")) { [17:26:58.299] if (!is.null(pattern)) { [17:26:58.299] computeRestarts <- base::computeRestarts [17:26:58.299] grepl <- base::grepl [17:26:58.299] restarts <- computeRestarts(cond) [17:26:58.299] for (restart in restarts) { [17:26:58.299] name <- restart$name [17:26:58.299] if (is.null(name)) [17:26:58.299] next [17:26:58.299] if (!grepl(pattern, name)) [17:26:58.299] next [17:26:58.299] invokeRestart(restart) [17:26:58.299] muffled <- TRUE [17:26:58.299] break [17:26:58.299] } [17:26:58.299] } [17:26:58.299] } [17:26:58.299] invisible(muffled) [17:26:58.299] } [17:26:58.299] muffleCondition(cond) [17:26:58.299] }) [17:26:58.299] })) [17:26:58.299] future::FutureResult(value = ...future.value$value, [17:26:58.299] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.299] ...future.rng), globalenv = if (FALSE) [17:26:58.299] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:26:58.299] ...future.globalenv.names)) [17:26:58.299] else NULL, started = ...future.startTime, version = "1.8") [17:26:58.299] }, condition = base::local({ [17:26:58.299] c <- base::c [17:26:58.299] inherits <- base::inherits [17:26:58.299] invokeRestart <- base::invokeRestart [17:26:58.299] length <- base::length [17:26:58.299] list <- base::list [17:26:58.299] seq.int <- base::seq.int [17:26:58.299] signalCondition <- base::signalCondition [17:26:58.299] sys.calls <- base::sys.calls [17:26:58.299] `[[` <- base::`[[` [17:26:58.299] `+` <- base::`+` [17:26:58.299] `<<-` <- base::`<<-` [17:26:58.299] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:26:58.299] calls[seq.int(from = from + 12L, to = length(calls) - [17:26:58.299] 3L)] [17:26:58.299] } [17:26:58.299] function(cond) { [17:26:58.299] is_error <- inherits(cond, "error") [17:26:58.299] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:26:58.299] NULL) [17:26:58.299] if (is_error) { [17:26:58.299] sessionInformation <- function() { [17:26:58.299] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:26:58.299] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:26:58.299] search = base::search(), system = base::Sys.info()) [17:26:58.299] } [17:26:58.299] ...future.conditions[[length(...future.conditions) + [17:26:58.299] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:26:58.299] cond$call), session = sessionInformation(), [17:26:58.299] timestamp = base::Sys.time(), signaled = 0L) [17:26:58.299] signalCondition(cond) [17:26:58.299] } [17:26:58.299] else if (!ignore && TRUE && inherits(cond, c("condition", [17:26:58.299] "immediateCondition"))) { [17:26:58.299] signal <- TRUE && inherits(cond, "immediateCondition") [17:26:58.299] ...future.conditions[[length(...future.conditions) + [17:26:58.299] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:26:58.299] if (TRUE && !signal) { [17:26:58.299] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.299] { [17:26:58.299] inherits <- base::inherits [17:26:58.299] invokeRestart <- base::invokeRestart [17:26:58.299] is.null <- base::is.null [17:26:58.299] muffled <- FALSE [17:26:58.299] if (inherits(cond, "message")) { [17:26:58.299] muffled <- grepl(pattern, "muffleMessage") [17:26:58.299] if (muffled) [17:26:58.299] invokeRestart("muffleMessage") [17:26:58.299] } [17:26:58.299] else if (inherits(cond, "warning")) { [17:26:58.299] muffled <- grepl(pattern, "muffleWarning") [17:26:58.299] if (muffled) [17:26:58.299] invokeRestart("muffleWarning") [17:26:58.299] } [17:26:58.299] else if (inherits(cond, "condition")) { [17:26:58.299] if (!is.null(pattern)) { [17:26:58.299] computeRestarts <- base::computeRestarts [17:26:58.299] grepl <- base::grepl [17:26:58.299] restarts <- computeRestarts(cond) [17:26:58.299] for (restart in restarts) { [17:26:58.299] name <- restart$name [17:26:58.299] if (is.null(name)) [17:26:58.299] next [17:26:58.299] if (!grepl(pattern, name)) [17:26:58.299] next [17:26:58.299] invokeRestart(restart) [17:26:58.299] muffled <- TRUE [17:26:58.299] break [17:26:58.299] } [17:26:58.299] } [17:26:58.299] } [17:26:58.299] invisible(muffled) [17:26:58.299] } [17:26:58.299] muffleCondition(cond, pattern = "^muffle") [17:26:58.299] } [17:26:58.299] } [17:26:58.299] else { [17:26:58.299] if (TRUE) { [17:26:58.299] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.299] { [17:26:58.299] inherits <- base::inherits [17:26:58.299] invokeRestart <- base::invokeRestart [17:26:58.299] is.null <- base::is.null [17:26:58.299] muffled <- FALSE [17:26:58.299] if (inherits(cond, "message")) { [17:26:58.299] muffled <- grepl(pattern, "muffleMessage") [17:26:58.299] if (muffled) [17:26:58.299] invokeRestart("muffleMessage") [17:26:58.299] } [17:26:58.299] else if (inherits(cond, "warning")) { [17:26:58.299] muffled <- grepl(pattern, "muffleWarning") [17:26:58.299] if (muffled) [17:26:58.299] invokeRestart("muffleWarning") [17:26:58.299] } [17:26:58.299] else if (inherits(cond, "condition")) { [17:26:58.299] if (!is.null(pattern)) { [17:26:58.299] computeRestarts <- base::computeRestarts [17:26:58.299] grepl <- base::grepl [17:26:58.299] restarts <- computeRestarts(cond) [17:26:58.299] for (restart in restarts) { [17:26:58.299] name <- restart$name [17:26:58.299] if (is.null(name)) [17:26:58.299] next [17:26:58.299] if (!grepl(pattern, name)) [17:26:58.299] next [17:26:58.299] invokeRestart(restart) [17:26:58.299] muffled <- TRUE [17:26:58.299] break [17:26:58.299] } [17:26:58.299] } [17:26:58.299] } [17:26:58.299] invisible(muffled) [17:26:58.299] } [17:26:58.299] muffleCondition(cond, pattern = "^muffle") [17:26:58.299] } [17:26:58.299] } [17:26:58.299] } [17:26:58.299] })) [17:26:58.299] }, error = function(ex) { [17:26:58.299] base::structure(base::list(value = NULL, visible = NULL, [17:26:58.299] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.299] ...future.rng), started = ...future.startTime, [17:26:58.299] finished = Sys.time(), session_uuid = NA_character_, [17:26:58.299] version = "1.8"), class = "FutureResult") [17:26:58.299] }, finally = { [17:26:58.299] if (!identical(...future.workdir, getwd())) [17:26:58.299] setwd(...future.workdir) [17:26:58.299] { [17:26:58.299] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:26:58.299] ...future.oldOptions$nwarnings <- NULL [17:26:58.299] } [17:26:58.299] base::options(...future.oldOptions) [17:26:58.299] if (.Platform$OS.type == "windows") { [17:26:58.299] old_names <- names(...future.oldEnvVars) [17:26:58.299] envs <- base::Sys.getenv() [17:26:58.299] names <- names(envs) [17:26:58.299] common <- intersect(names, old_names) [17:26:58.299] added <- setdiff(names, old_names) [17:26:58.299] removed <- setdiff(old_names, names) [17:26:58.299] changed <- common[...future.oldEnvVars[common] != [17:26:58.299] envs[common]] [17:26:58.299] NAMES <- toupper(changed) [17:26:58.299] args <- list() [17:26:58.299] for (kk in seq_along(NAMES)) { [17:26:58.299] name <- changed[[kk]] [17:26:58.299] NAME <- NAMES[[kk]] [17:26:58.299] if (name != NAME && is.element(NAME, old_names)) [17:26:58.299] next [17:26:58.299] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.299] } [17:26:58.299] NAMES <- toupper(added) [17:26:58.299] for (kk in seq_along(NAMES)) { [17:26:58.299] name <- added[[kk]] [17:26:58.299] NAME <- NAMES[[kk]] [17:26:58.299] if (name != NAME && is.element(NAME, old_names)) [17:26:58.299] next [17:26:58.299] args[[name]] <- "" [17:26:58.299] } [17:26:58.299] NAMES <- toupper(removed) [17:26:58.299] for (kk in seq_along(NAMES)) { [17:26:58.299] name <- removed[[kk]] [17:26:58.299] NAME <- NAMES[[kk]] [17:26:58.299] if (name != NAME && is.element(NAME, old_names)) [17:26:58.299] next [17:26:58.299] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.299] } [17:26:58.299] if (length(args) > 0) [17:26:58.299] base::do.call(base::Sys.setenv, args = args) [17:26:58.299] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:26:58.299] } [17:26:58.299] else { [17:26:58.299] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:26:58.299] } [17:26:58.299] { [17:26:58.299] if (base::length(...future.futureOptionsAdded) > [17:26:58.299] 0L) { [17:26:58.299] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:26:58.299] base::names(opts) <- ...future.futureOptionsAdded [17:26:58.299] base::options(opts) [17:26:58.299] } [17:26:58.299] { [17:26:58.299] { [17:26:58.299] base::options(mc.cores = ...future.mc.cores.old) [17:26:58.299] NULL [17:26:58.299] } [17:26:58.299] options(future.plan = NULL) [17:26:58.299] if (is.na(NA_character_)) [17:26:58.299] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.299] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:26:58.299] future::plan(...future.strategy.old, .cleanup = FALSE, [17:26:58.299] .init = FALSE) [17:26:58.299] } [17:26:58.299] } [17:26:58.299] } [17:26:58.299] }) [17:26:58.299] if (TRUE) { [17:26:58.299] base::sink(type = "output", split = FALSE) [17:26:58.299] if (TRUE) { [17:26:58.299] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:26:58.299] } [17:26:58.299] else { [17:26:58.299] ...future.result["stdout"] <- base::list(NULL) [17:26:58.299] } [17:26:58.299] base::close(...future.stdout) [17:26:58.299] ...future.stdout <- NULL [17:26:58.299] } [17:26:58.299] ...future.result$conditions <- ...future.conditions [17:26:58.299] ...future.result$finished <- base::Sys.time() [17:26:58.299] ...future.result [17:26:58.299] } [17:26:58.383] MultisessionFuture started [17:26:58.384] result() for ClusterFuture ... [17:26:58.385] receiveMessageFromWorker() for ClusterFuture ... [17:26:58.385] - Validating connection of MultisessionFuture [17:26:58.435] - received message: FutureResult [17:26:58.435] - Received FutureResult [17:26:58.439] - Erased future from FutureRegistry [17:26:58.439] result() for ClusterFuture ... [17:26:58.440] - result already collected: FutureResult [17:26:58.440] result() for ClusterFuture ... done [17:26:58.440] receiveMessageFromWorker() for ClusterFuture ... done [17:26:58.440] result() for ClusterFuture ... done [17:26:58.440] result() for ClusterFuture ... [17:26:58.441] - result already collected: FutureResult [17:26:58.441] result() for ClusterFuture ... done [17:26:58.441] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE [17:26:58.441] plan(): nbrOfWorkers() = 2 > > env <- new.env() > > ## Create future #1 (consumes background process #1) > env$a %<-% { 5 } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:26:58.443] getGlobalsAndPackages() ... [17:26:58.443] Searching for globals... [17:26:58.447] - globals found: [1] '{' [17:26:58.447] Searching for globals ... DONE [17:26:58.448] Resolving globals: TRUE [17:26:58.448] Resolving any globals that are futures ... [17:26:58.448] - globals: [1] '{' [17:26:58.448] Resolving any globals that are futures ... DONE [17:26:58.449] [17:26:58.449] [17:26:58.449] getGlobalsAndPackages() ... DONE [17:26:58.450] run() for 'Future' ... [17:26:58.450] - state: 'created' [17:26:58.450] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:26:58.463] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:26:58.463] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:26:58.463] - Field: 'node' [17:26:58.464] - Field: 'label' [17:26:58.464] - Field: 'local' [17:26:58.464] - Field: 'owner' [17:26:58.464] - Field: 'envir' [17:26:58.464] - Field: 'workers' [17:26:58.464] - Field: 'packages' [17:26:58.465] - Field: 'gc' [17:26:58.465] - Field: 'conditions' [17:26:58.465] - Field: 'persistent' [17:26:58.465] - Field: 'expr' [17:26:58.466] - Field: 'uuid' [17:26:58.466] - Field: 'seed' [17:26:58.466] - Field: 'version' [17:26:58.466] - Field: 'result' [17:26:58.466] - Field: 'asynchronous' [17:26:58.467] - Field: 'calls' [17:26:58.467] - Field: 'globals' [17:26:58.467] - Field: 'stdout' [17:26:58.467] - Field: 'earlySignal' [17:26:58.467] - Field: 'lazy' [17:26:58.467] - Field: 'state' [17:26:58.468] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:26:58.468] - Launch lazy future ... [17:26:58.468] Packages needed by the future expression (n = 0): [17:26:58.469] Packages needed by future strategies (n = 0): [17:26:58.469] { [17:26:58.469] { [17:26:58.469] { [17:26:58.469] ...future.startTime <- base::Sys.time() [17:26:58.469] { [17:26:58.469] { [17:26:58.469] { [17:26:58.469] { [17:26:58.469] base::local({ [17:26:58.469] has_future <- base::requireNamespace("future", [17:26:58.469] quietly = TRUE) [17:26:58.469] if (has_future) { [17:26:58.469] ns <- base::getNamespace("future") [17:26:58.469] version <- ns[[".package"]][["version"]] [17:26:58.469] if (is.null(version)) [17:26:58.469] version <- utils::packageVersion("future") [17:26:58.469] } [17:26:58.469] else { [17:26:58.469] version <- NULL [17:26:58.469] } [17:26:58.469] if (!has_future || version < "1.8.0") { [17:26:58.469] info <- base::c(r_version = base::gsub("R version ", [17:26:58.469] "", base::R.version$version.string), [17:26:58.469] platform = base::sprintf("%s (%s-bit)", [17:26:58.469] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:26:58.469] os = base::paste(base::Sys.info()[base::c("sysname", [17:26:58.469] "release", "version")], collapse = " "), [17:26:58.469] hostname = base::Sys.info()[["nodename"]]) [17:26:58.469] info <- base::sprintf("%s: %s", base::names(info), [17:26:58.469] info) [17:26:58.469] info <- base::paste(info, collapse = "; ") [17:26:58.469] if (!has_future) { [17:26:58.469] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:26:58.469] info) [17:26:58.469] } [17:26:58.469] else { [17:26:58.469] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:26:58.469] info, version) [17:26:58.469] } [17:26:58.469] base::stop(msg) [17:26:58.469] } [17:26:58.469] }) [17:26:58.469] } [17:26:58.469] ...future.mc.cores.old <- base::getOption("mc.cores") [17:26:58.469] base::options(mc.cores = 1L) [17:26:58.469] } [17:26:58.469] ...future.strategy.old <- future::plan("list") [17:26:58.469] options(future.plan = NULL) [17:26:58.469] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.469] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:26:58.469] } [17:26:58.469] ...future.workdir <- getwd() [17:26:58.469] } [17:26:58.469] ...future.oldOptions <- base::as.list(base::.Options) [17:26:58.469] ...future.oldEnvVars <- base::Sys.getenv() [17:26:58.469] } [17:26:58.469] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:26:58.469] future.globals.maxSize = NULL, future.globals.method = NULL, [17:26:58.469] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:26:58.469] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:26:58.469] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:26:58.469] future.stdout.windows.reencode = NULL, width = 80L) [17:26:58.469] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:26:58.469] base::names(...future.oldOptions)) [17:26:58.469] } [17:26:58.469] if (FALSE) { [17:26:58.469] } [17:26:58.469] else { [17:26:58.469] if (TRUE) { [17:26:58.469] ...future.stdout <- base::rawConnection(base::raw(0L), [17:26:58.469] open = "w") [17:26:58.469] } [17:26:58.469] else { [17:26:58.469] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:26:58.469] windows = "NUL", "/dev/null"), open = "w") [17:26:58.469] } [17:26:58.469] base::sink(...future.stdout, type = "output", split = FALSE) [17:26:58.469] base::on.exit(if (!base::is.null(...future.stdout)) { [17:26:58.469] base::sink(type = "output", split = FALSE) [17:26:58.469] base::close(...future.stdout) [17:26:58.469] }, add = TRUE) [17:26:58.469] } [17:26:58.469] ...future.frame <- base::sys.nframe() [17:26:58.469] ...future.conditions <- base::list() [17:26:58.469] ...future.rng <- base::globalenv()$.Random.seed [17:26:58.469] if (FALSE) { [17:26:58.469] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:26:58.469] "...future.value", "...future.globalenv.names", ".Random.seed") [17:26:58.469] } [17:26:58.469] ...future.result <- base::tryCatch({ [17:26:58.469] base::withCallingHandlers({ [17:26:58.469] ...future.value <- base::withVisible(base::local({ [17:26:58.469] ...future.makeSendCondition <- base::local({ [17:26:58.469] sendCondition <- NULL [17:26:58.469] function(frame = 1L) { [17:26:58.469] if (is.function(sendCondition)) [17:26:58.469] return(sendCondition) [17:26:58.469] ns <- getNamespace("parallel") [17:26:58.469] if (exists("sendData", mode = "function", [17:26:58.469] envir = ns)) { [17:26:58.469] parallel_sendData <- get("sendData", mode = "function", [17:26:58.469] envir = ns) [17:26:58.469] envir <- sys.frame(frame) [17:26:58.469] master <- NULL [17:26:58.469] while (!identical(envir, .GlobalEnv) && [17:26:58.469] !identical(envir, emptyenv())) { [17:26:58.469] if (exists("master", mode = "list", envir = envir, [17:26:58.469] inherits = FALSE)) { [17:26:58.469] master <- get("master", mode = "list", [17:26:58.469] envir = envir, inherits = FALSE) [17:26:58.469] if (inherits(master, c("SOCKnode", [17:26:58.469] "SOCK0node"))) { [17:26:58.469] sendCondition <<- function(cond) { [17:26:58.469] data <- list(type = "VALUE", value = cond, [17:26:58.469] success = TRUE) [17:26:58.469] parallel_sendData(master, data) [17:26:58.469] } [17:26:58.469] return(sendCondition) [17:26:58.469] } [17:26:58.469] } [17:26:58.469] frame <- frame + 1L [17:26:58.469] envir <- sys.frame(frame) [17:26:58.469] } [17:26:58.469] } [17:26:58.469] sendCondition <<- function(cond) NULL [17:26:58.469] } [17:26:58.469] }) [17:26:58.469] withCallingHandlers({ [17:26:58.469] { [17:26:58.469] 5 [17:26:58.469] } [17:26:58.469] }, immediateCondition = function(cond) { [17:26:58.469] sendCondition <- ...future.makeSendCondition() [17:26:58.469] sendCondition(cond) [17:26:58.469] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.469] { [17:26:58.469] inherits <- base::inherits [17:26:58.469] invokeRestart <- base::invokeRestart [17:26:58.469] is.null <- base::is.null [17:26:58.469] muffled <- FALSE [17:26:58.469] if (inherits(cond, "message")) { [17:26:58.469] muffled <- grepl(pattern, "muffleMessage") [17:26:58.469] if (muffled) [17:26:58.469] invokeRestart("muffleMessage") [17:26:58.469] } [17:26:58.469] else if (inherits(cond, "warning")) { [17:26:58.469] muffled <- grepl(pattern, "muffleWarning") [17:26:58.469] if (muffled) [17:26:58.469] invokeRestart("muffleWarning") [17:26:58.469] } [17:26:58.469] else if (inherits(cond, "condition")) { [17:26:58.469] if (!is.null(pattern)) { [17:26:58.469] computeRestarts <- base::computeRestarts [17:26:58.469] grepl <- base::grepl [17:26:58.469] restarts <- computeRestarts(cond) [17:26:58.469] for (restart in restarts) { [17:26:58.469] name <- restart$name [17:26:58.469] if (is.null(name)) [17:26:58.469] next [17:26:58.469] if (!grepl(pattern, name)) [17:26:58.469] next [17:26:58.469] invokeRestart(restart) [17:26:58.469] muffled <- TRUE [17:26:58.469] break [17:26:58.469] } [17:26:58.469] } [17:26:58.469] } [17:26:58.469] invisible(muffled) [17:26:58.469] } [17:26:58.469] muffleCondition(cond) [17:26:58.469] }) [17:26:58.469] })) [17:26:58.469] future::FutureResult(value = ...future.value$value, [17:26:58.469] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.469] ...future.rng), globalenv = if (FALSE) [17:26:58.469] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:26:58.469] ...future.globalenv.names)) [17:26:58.469] else NULL, started = ...future.startTime, version = "1.8") [17:26:58.469] }, condition = base::local({ [17:26:58.469] c <- base::c [17:26:58.469] inherits <- base::inherits [17:26:58.469] invokeRestart <- base::invokeRestart [17:26:58.469] length <- base::length [17:26:58.469] list <- base::list [17:26:58.469] seq.int <- base::seq.int [17:26:58.469] signalCondition <- base::signalCondition [17:26:58.469] sys.calls <- base::sys.calls [17:26:58.469] `[[` <- base::`[[` [17:26:58.469] `+` <- base::`+` [17:26:58.469] `<<-` <- base::`<<-` [17:26:58.469] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:26:58.469] calls[seq.int(from = from + 12L, to = length(calls) - [17:26:58.469] 3L)] [17:26:58.469] } [17:26:58.469] function(cond) { [17:26:58.469] is_error <- inherits(cond, "error") [17:26:58.469] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:26:58.469] NULL) [17:26:58.469] if (is_error) { [17:26:58.469] sessionInformation <- function() { [17:26:58.469] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:26:58.469] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:26:58.469] search = base::search(), system = base::Sys.info()) [17:26:58.469] } [17:26:58.469] ...future.conditions[[length(...future.conditions) + [17:26:58.469] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:26:58.469] cond$call), session = sessionInformation(), [17:26:58.469] timestamp = base::Sys.time(), signaled = 0L) [17:26:58.469] signalCondition(cond) [17:26:58.469] } [17:26:58.469] else if (!ignore && TRUE && inherits(cond, c("condition", [17:26:58.469] "immediateCondition"))) { [17:26:58.469] signal <- TRUE && inherits(cond, "immediateCondition") [17:26:58.469] ...future.conditions[[length(...future.conditions) + [17:26:58.469] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:26:58.469] if (TRUE && !signal) { [17:26:58.469] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.469] { [17:26:58.469] inherits <- base::inherits [17:26:58.469] invokeRestart <- base::invokeRestart [17:26:58.469] is.null <- base::is.null [17:26:58.469] muffled <- FALSE [17:26:58.469] if (inherits(cond, "message")) { [17:26:58.469] muffled <- grepl(pattern, "muffleMessage") [17:26:58.469] if (muffled) [17:26:58.469] invokeRestart("muffleMessage") [17:26:58.469] } [17:26:58.469] else if (inherits(cond, "warning")) { [17:26:58.469] muffled <- grepl(pattern, "muffleWarning") [17:26:58.469] if (muffled) [17:26:58.469] invokeRestart("muffleWarning") [17:26:58.469] } [17:26:58.469] else if (inherits(cond, "condition")) { [17:26:58.469] if (!is.null(pattern)) { [17:26:58.469] computeRestarts <- base::computeRestarts [17:26:58.469] grepl <- base::grepl [17:26:58.469] restarts <- computeRestarts(cond) [17:26:58.469] for (restart in restarts) { [17:26:58.469] name <- restart$name [17:26:58.469] if (is.null(name)) [17:26:58.469] next [17:26:58.469] if (!grepl(pattern, name)) [17:26:58.469] next [17:26:58.469] invokeRestart(restart) [17:26:58.469] muffled <- TRUE [17:26:58.469] break [17:26:58.469] } [17:26:58.469] } [17:26:58.469] } [17:26:58.469] invisible(muffled) [17:26:58.469] } [17:26:58.469] muffleCondition(cond, pattern = "^muffle") [17:26:58.469] } [17:26:58.469] } [17:26:58.469] else { [17:26:58.469] if (TRUE) { [17:26:58.469] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.469] { [17:26:58.469] inherits <- base::inherits [17:26:58.469] invokeRestart <- base::invokeRestart [17:26:58.469] is.null <- base::is.null [17:26:58.469] muffled <- FALSE [17:26:58.469] if (inherits(cond, "message")) { [17:26:58.469] muffled <- grepl(pattern, "muffleMessage") [17:26:58.469] if (muffled) [17:26:58.469] invokeRestart("muffleMessage") [17:26:58.469] } [17:26:58.469] else if (inherits(cond, "warning")) { [17:26:58.469] muffled <- grepl(pattern, "muffleWarning") [17:26:58.469] if (muffled) [17:26:58.469] invokeRestart("muffleWarning") [17:26:58.469] } [17:26:58.469] else if (inherits(cond, "condition")) { [17:26:58.469] if (!is.null(pattern)) { [17:26:58.469] computeRestarts <- base::computeRestarts [17:26:58.469] grepl <- base::grepl [17:26:58.469] restarts <- computeRestarts(cond) [17:26:58.469] for (restart in restarts) { [17:26:58.469] name <- restart$name [17:26:58.469] if (is.null(name)) [17:26:58.469] next [17:26:58.469] if (!grepl(pattern, name)) [17:26:58.469] next [17:26:58.469] invokeRestart(restart) [17:26:58.469] muffled <- TRUE [17:26:58.469] break [17:26:58.469] } [17:26:58.469] } [17:26:58.469] } [17:26:58.469] invisible(muffled) [17:26:58.469] } [17:26:58.469] muffleCondition(cond, pattern = "^muffle") [17:26:58.469] } [17:26:58.469] } [17:26:58.469] } [17:26:58.469] })) [17:26:58.469] }, error = function(ex) { [17:26:58.469] base::structure(base::list(value = NULL, visible = NULL, [17:26:58.469] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.469] ...future.rng), started = ...future.startTime, [17:26:58.469] finished = Sys.time(), session_uuid = NA_character_, [17:26:58.469] version = "1.8"), class = "FutureResult") [17:26:58.469] }, finally = { [17:26:58.469] if (!identical(...future.workdir, getwd())) [17:26:58.469] setwd(...future.workdir) [17:26:58.469] { [17:26:58.469] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:26:58.469] ...future.oldOptions$nwarnings <- NULL [17:26:58.469] } [17:26:58.469] base::options(...future.oldOptions) [17:26:58.469] if (.Platform$OS.type == "windows") { [17:26:58.469] old_names <- names(...future.oldEnvVars) [17:26:58.469] envs <- base::Sys.getenv() [17:26:58.469] names <- names(envs) [17:26:58.469] common <- intersect(names, old_names) [17:26:58.469] added <- setdiff(names, old_names) [17:26:58.469] removed <- setdiff(old_names, names) [17:26:58.469] changed <- common[...future.oldEnvVars[common] != [17:26:58.469] envs[common]] [17:26:58.469] NAMES <- toupper(changed) [17:26:58.469] args <- list() [17:26:58.469] for (kk in seq_along(NAMES)) { [17:26:58.469] name <- changed[[kk]] [17:26:58.469] NAME <- NAMES[[kk]] [17:26:58.469] if (name != NAME && is.element(NAME, old_names)) [17:26:58.469] next [17:26:58.469] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.469] } [17:26:58.469] NAMES <- toupper(added) [17:26:58.469] for (kk in seq_along(NAMES)) { [17:26:58.469] name <- added[[kk]] [17:26:58.469] NAME <- NAMES[[kk]] [17:26:58.469] if (name != NAME && is.element(NAME, old_names)) [17:26:58.469] next [17:26:58.469] args[[name]] <- "" [17:26:58.469] } [17:26:58.469] NAMES <- toupper(removed) [17:26:58.469] for (kk in seq_along(NAMES)) { [17:26:58.469] name <- removed[[kk]] [17:26:58.469] NAME <- NAMES[[kk]] [17:26:58.469] if (name != NAME && is.element(NAME, old_names)) [17:26:58.469] next [17:26:58.469] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.469] } [17:26:58.469] if (length(args) > 0) [17:26:58.469] base::do.call(base::Sys.setenv, args = args) [17:26:58.469] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:26:58.469] } [17:26:58.469] else { [17:26:58.469] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:26:58.469] } [17:26:58.469] { [17:26:58.469] if (base::length(...future.futureOptionsAdded) > [17:26:58.469] 0L) { [17:26:58.469] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:26:58.469] base::names(opts) <- ...future.futureOptionsAdded [17:26:58.469] base::options(opts) [17:26:58.469] } [17:26:58.469] { [17:26:58.469] { [17:26:58.469] base::options(mc.cores = ...future.mc.cores.old) [17:26:58.469] NULL [17:26:58.469] } [17:26:58.469] options(future.plan = NULL) [17:26:58.469] if (is.na(NA_character_)) [17:26:58.469] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.469] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:26:58.469] future::plan(...future.strategy.old, .cleanup = FALSE, [17:26:58.469] .init = FALSE) [17:26:58.469] } [17:26:58.469] } [17:26:58.469] } [17:26:58.469] }) [17:26:58.469] if (TRUE) { [17:26:58.469] base::sink(type = "output", split = FALSE) [17:26:58.469] if (TRUE) { [17:26:58.469] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:26:58.469] } [17:26:58.469] else { [17:26:58.469] ...future.result["stdout"] <- base::list(NULL) [17:26:58.469] } [17:26:58.469] base::close(...future.stdout) [17:26:58.469] ...future.stdout <- NULL [17:26:58.469] } [17:26:58.469] ...future.result$conditions <- ...future.conditions [17:26:58.469] ...future.result$finished <- base::Sys.time() [17:26:58.469] ...future.result [17:26:58.469] } [17:26:58.475] MultisessionFuture started [17:26:58.475] - Launch lazy future ... done [17:26:58.475] run() for 'MultisessionFuture' ... done > > ## Create future #2 (consumes background process #2) > b %<-% { "a" } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:26:58.476] getGlobalsAndPackages() ... [17:26:58.476] Searching for globals... [17:26:58.477] - globals found: [1] '{' [17:26:58.477] Searching for globals ... DONE [17:26:58.478] Resolving globals: TRUE [17:26:58.478] Resolving any globals that are futures ... [17:26:58.478] - globals: [1] '{' [17:26:58.478] Resolving any globals that are futures ... DONE [17:26:58.479] [17:26:58.479] [17:26:58.479] getGlobalsAndPackages() ... DONE [17:26:58.479] run() for 'Future' ... [17:26:58.479] - state: 'created' [17:26:58.480] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:26:58.492] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:26:58.492] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:26:58.492] - Field: 'node' [17:26:58.492] - Field: 'label' [17:26:58.492] - Field: 'local' [17:26:58.493] - Field: 'owner' [17:26:58.493] - Field: 'envir' [17:26:58.493] - Field: 'workers' [17:26:58.493] - Field: 'packages' [17:26:58.493] - Field: 'gc' [17:26:58.494] - Field: 'conditions' [17:26:58.494] - Field: 'persistent' [17:26:58.494] - Field: 'expr' [17:26:58.494] - Field: 'uuid' [17:26:58.494] - Field: 'seed' [17:26:58.495] - Field: 'version' [17:26:58.495] - Field: 'result' [17:26:58.495] - Field: 'asynchronous' [17:26:58.495] - Field: 'calls' [17:26:58.495] - Field: 'globals' [17:26:58.495] - Field: 'stdout' [17:26:58.496] - Field: 'earlySignal' [17:26:58.496] - Field: 'lazy' [17:26:58.496] - Field: 'state' [17:26:58.496] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:26:58.496] - Launch lazy future ... [17:26:58.497] Packages needed by the future expression (n = 0): [17:26:58.497] Packages needed by future strategies (n = 0): [17:26:58.498] { [17:26:58.498] { [17:26:58.498] { [17:26:58.498] ...future.startTime <- base::Sys.time() [17:26:58.498] { [17:26:58.498] { [17:26:58.498] { [17:26:58.498] { [17:26:58.498] base::local({ [17:26:58.498] has_future <- base::requireNamespace("future", [17:26:58.498] quietly = TRUE) [17:26:58.498] if (has_future) { [17:26:58.498] ns <- base::getNamespace("future") [17:26:58.498] version <- ns[[".package"]][["version"]] [17:26:58.498] if (is.null(version)) [17:26:58.498] version <- utils::packageVersion("future") [17:26:58.498] } [17:26:58.498] else { [17:26:58.498] version <- NULL [17:26:58.498] } [17:26:58.498] if (!has_future || version < "1.8.0") { [17:26:58.498] info <- base::c(r_version = base::gsub("R version ", [17:26:58.498] "", base::R.version$version.string), [17:26:58.498] platform = base::sprintf("%s (%s-bit)", [17:26:58.498] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:26:58.498] os = base::paste(base::Sys.info()[base::c("sysname", [17:26:58.498] "release", "version")], collapse = " "), [17:26:58.498] hostname = base::Sys.info()[["nodename"]]) [17:26:58.498] info <- base::sprintf("%s: %s", base::names(info), [17:26:58.498] info) [17:26:58.498] info <- base::paste(info, collapse = "; ") [17:26:58.498] if (!has_future) { [17:26:58.498] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:26:58.498] info) [17:26:58.498] } [17:26:58.498] else { [17:26:58.498] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:26:58.498] info, version) [17:26:58.498] } [17:26:58.498] base::stop(msg) [17:26:58.498] } [17:26:58.498] }) [17:26:58.498] } [17:26:58.498] ...future.mc.cores.old <- base::getOption("mc.cores") [17:26:58.498] base::options(mc.cores = 1L) [17:26:58.498] } [17:26:58.498] ...future.strategy.old <- future::plan("list") [17:26:58.498] options(future.plan = NULL) [17:26:58.498] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.498] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:26:58.498] } [17:26:58.498] ...future.workdir <- getwd() [17:26:58.498] } [17:26:58.498] ...future.oldOptions <- base::as.list(base::.Options) [17:26:58.498] ...future.oldEnvVars <- base::Sys.getenv() [17:26:58.498] } [17:26:58.498] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:26:58.498] future.globals.maxSize = NULL, future.globals.method = NULL, [17:26:58.498] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:26:58.498] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:26:58.498] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:26:58.498] future.stdout.windows.reencode = NULL, width = 80L) [17:26:58.498] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:26:58.498] base::names(...future.oldOptions)) [17:26:58.498] } [17:26:58.498] if (FALSE) { [17:26:58.498] } [17:26:58.498] else { [17:26:58.498] if (TRUE) { [17:26:58.498] ...future.stdout <- base::rawConnection(base::raw(0L), [17:26:58.498] open = "w") [17:26:58.498] } [17:26:58.498] else { [17:26:58.498] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:26:58.498] windows = "NUL", "/dev/null"), open = "w") [17:26:58.498] } [17:26:58.498] base::sink(...future.stdout, type = "output", split = FALSE) [17:26:58.498] base::on.exit(if (!base::is.null(...future.stdout)) { [17:26:58.498] base::sink(type = "output", split = FALSE) [17:26:58.498] base::close(...future.stdout) [17:26:58.498] }, add = TRUE) [17:26:58.498] } [17:26:58.498] ...future.frame <- base::sys.nframe() [17:26:58.498] ...future.conditions <- base::list() [17:26:58.498] ...future.rng <- base::globalenv()$.Random.seed [17:26:58.498] if (FALSE) { [17:26:58.498] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:26:58.498] "...future.value", "...future.globalenv.names", ".Random.seed") [17:26:58.498] } [17:26:58.498] ...future.result <- base::tryCatch({ [17:26:58.498] base::withCallingHandlers({ [17:26:58.498] ...future.value <- base::withVisible(base::local({ [17:26:58.498] ...future.makeSendCondition <- base::local({ [17:26:58.498] sendCondition <- NULL [17:26:58.498] function(frame = 1L) { [17:26:58.498] if (is.function(sendCondition)) [17:26:58.498] return(sendCondition) [17:26:58.498] ns <- getNamespace("parallel") [17:26:58.498] if (exists("sendData", mode = "function", [17:26:58.498] envir = ns)) { [17:26:58.498] parallel_sendData <- get("sendData", mode = "function", [17:26:58.498] envir = ns) [17:26:58.498] envir <- sys.frame(frame) [17:26:58.498] master <- NULL [17:26:58.498] while (!identical(envir, .GlobalEnv) && [17:26:58.498] !identical(envir, emptyenv())) { [17:26:58.498] if (exists("master", mode = "list", envir = envir, [17:26:58.498] inherits = FALSE)) { [17:26:58.498] master <- get("master", mode = "list", [17:26:58.498] envir = envir, inherits = FALSE) [17:26:58.498] if (inherits(master, c("SOCKnode", [17:26:58.498] "SOCK0node"))) { [17:26:58.498] sendCondition <<- function(cond) { [17:26:58.498] data <- list(type = "VALUE", value = cond, [17:26:58.498] success = TRUE) [17:26:58.498] parallel_sendData(master, data) [17:26:58.498] } [17:26:58.498] return(sendCondition) [17:26:58.498] } [17:26:58.498] } [17:26:58.498] frame <- frame + 1L [17:26:58.498] envir <- sys.frame(frame) [17:26:58.498] } [17:26:58.498] } [17:26:58.498] sendCondition <<- function(cond) NULL [17:26:58.498] } [17:26:58.498] }) [17:26:58.498] withCallingHandlers({ [17:26:58.498] { [17:26:58.498] "a" [17:26:58.498] } [17:26:58.498] }, immediateCondition = function(cond) { [17:26:58.498] sendCondition <- ...future.makeSendCondition() [17:26:58.498] sendCondition(cond) [17:26:58.498] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.498] { [17:26:58.498] inherits <- base::inherits [17:26:58.498] invokeRestart <- base::invokeRestart [17:26:58.498] is.null <- base::is.null [17:26:58.498] muffled <- FALSE [17:26:58.498] if (inherits(cond, "message")) { [17:26:58.498] muffled <- grepl(pattern, "muffleMessage") [17:26:58.498] if (muffled) [17:26:58.498] invokeRestart("muffleMessage") [17:26:58.498] } [17:26:58.498] else if (inherits(cond, "warning")) { [17:26:58.498] muffled <- grepl(pattern, "muffleWarning") [17:26:58.498] if (muffled) [17:26:58.498] invokeRestart("muffleWarning") [17:26:58.498] } [17:26:58.498] else if (inherits(cond, "condition")) { [17:26:58.498] if (!is.null(pattern)) { [17:26:58.498] computeRestarts <- base::computeRestarts [17:26:58.498] grepl <- base::grepl [17:26:58.498] restarts <- computeRestarts(cond) [17:26:58.498] for (restart in restarts) { [17:26:58.498] name <- restart$name [17:26:58.498] if (is.null(name)) [17:26:58.498] next [17:26:58.498] if (!grepl(pattern, name)) [17:26:58.498] next [17:26:58.498] invokeRestart(restart) [17:26:58.498] muffled <- TRUE [17:26:58.498] break [17:26:58.498] } [17:26:58.498] } [17:26:58.498] } [17:26:58.498] invisible(muffled) [17:26:58.498] } [17:26:58.498] muffleCondition(cond) [17:26:58.498] }) [17:26:58.498] })) [17:26:58.498] future::FutureResult(value = ...future.value$value, [17:26:58.498] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.498] ...future.rng), globalenv = if (FALSE) [17:26:58.498] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:26:58.498] ...future.globalenv.names)) [17:26:58.498] else NULL, started = ...future.startTime, version = "1.8") [17:26:58.498] }, condition = base::local({ [17:26:58.498] c <- base::c [17:26:58.498] inherits <- base::inherits [17:26:58.498] invokeRestart <- base::invokeRestart [17:26:58.498] length <- base::length [17:26:58.498] list <- base::list [17:26:58.498] seq.int <- base::seq.int [17:26:58.498] signalCondition <- base::signalCondition [17:26:58.498] sys.calls <- base::sys.calls [17:26:58.498] `[[` <- base::`[[` [17:26:58.498] `+` <- base::`+` [17:26:58.498] `<<-` <- base::`<<-` [17:26:58.498] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:26:58.498] calls[seq.int(from = from + 12L, to = length(calls) - [17:26:58.498] 3L)] [17:26:58.498] } [17:26:58.498] function(cond) { [17:26:58.498] is_error <- inherits(cond, "error") [17:26:58.498] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:26:58.498] NULL) [17:26:58.498] if (is_error) { [17:26:58.498] sessionInformation <- function() { [17:26:58.498] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:26:58.498] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:26:58.498] search = base::search(), system = base::Sys.info()) [17:26:58.498] } [17:26:58.498] ...future.conditions[[length(...future.conditions) + [17:26:58.498] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:26:58.498] cond$call), session = sessionInformation(), [17:26:58.498] timestamp = base::Sys.time(), signaled = 0L) [17:26:58.498] signalCondition(cond) [17:26:58.498] } [17:26:58.498] else if (!ignore && TRUE && inherits(cond, c("condition", [17:26:58.498] "immediateCondition"))) { [17:26:58.498] signal <- TRUE && inherits(cond, "immediateCondition") [17:26:58.498] ...future.conditions[[length(...future.conditions) + [17:26:58.498] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:26:58.498] if (TRUE && !signal) { [17:26:58.498] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.498] { [17:26:58.498] inherits <- base::inherits [17:26:58.498] invokeRestart <- base::invokeRestart [17:26:58.498] is.null <- base::is.null [17:26:58.498] muffled <- FALSE [17:26:58.498] if (inherits(cond, "message")) { [17:26:58.498] muffled <- grepl(pattern, "muffleMessage") [17:26:58.498] if (muffled) [17:26:58.498] invokeRestart("muffleMessage") [17:26:58.498] } [17:26:58.498] else if (inherits(cond, "warning")) { [17:26:58.498] muffled <- grepl(pattern, "muffleWarning") [17:26:58.498] if (muffled) [17:26:58.498] invokeRestart("muffleWarning") [17:26:58.498] } [17:26:58.498] else if (inherits(cond, "condition")) { [17:26:58.498] if (!is.null(pattern)) { [17:26:58.498] computeRestarts <- base::computeRestarts [17:26:58.498] grepl <- base::grepl [17:26:58.498] restarts <- computeRestarts(cond) [17:26:58.498] for (restart in restarts) { [17:26:58.498] name <- restart$name [17:26:58.498] if (is.null(name)) [17:26:58.498] next [17:26:58.498] if (!grepl(pattern, name)) [17:26:58.498] next [17:26:58.498] invokeRestart(restart) [17:26:58.498] muffled <- TRUE [17:26:58.498] break [17:26:58.498] } [17:26:58.498] } [17:26:58.498] } [17:26:58.498] invisible(muffled) [17:26:58.498] } [17:26:58.498] muffleCondition(cond, pattern = "^muffle") [17:26:58.498] } [17:26:58.498] } [17:26:58.498] else { [17:26:58.498] if (TRUE) { [17:26:58.498] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.498] { [17:26:58.498] inherits <- base::inherits [17:26:58.498] invokeRestart <- base::invokeRestart [17:26:58.498] is.null <- base::is.null [17:26:58.498] muffled <- FALSE [17:26:58.498] if (inherits(cond, "message")) { [17:26:58.498] muffled <- grepl(pattern, "muffleMessage") [17:26:58.498] if (muffled) [17:26:58.498] invokeRestart("muffleMessage") [17:26:58.498] } [17:26:58.498] else if (inherits(cond, "warning")) { [17:26:58.498] muffled <- grepl(pattern, "muffleWarning") [17:26:58.498] if (muffled) [17:26:58.498] invokeRestart("muffleWarning") [17:26:58.498] } [17:26:58.498] else if (inherits(cond, "condition")) { [17:26:58.498] if (!is.null(pattern)) { [17:26:58.498] computeRestarts <- base::computeRestarts [17:26:58.498] grepl <- base::grepl [17:26:58.498] restarts <- computeRestarts(cond) [17:26:58.498] for (restart in restarts) { [17:26:58.498] name <- restart$name [17:26:58.498] if (is.null(name)) [17:26:58.498] next [17:26:58.498] if (!grepl(pattern, name)) [17:26:58.498] next [17:26:58.498] invokeRestart(restart) [17:26:58.498] muffled <- TRUE [17:26:58.498] break [17:26:58.498] } [17:26:58.498] } [17:26:58.498] } [17:26:58.498] invisible(muffled) [17:26:58.498] } [17:26:58.498] muffleCondition(cond, pattern = "^muffle") [17:26:58.498] } [17:26:58.498] } [17:26:58.498] } [17:26:58.498] })) [17:26:58.498] }, error = function(ex) { [17:26:58.498] base::structure(base::list(value = NULL, visible = NULL, [17:26:58.498] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.498] ...future.rng), started = ...future.startTime, [17:26:58.498] finished = Sys.time(), session_uuid = NA_character_, [17:26:58.498] version = "1.8"), class = "FutureResult") [17:26:58.498] }, finally = { [17:26:58.498] if (!identical(...future.workdir, getwd())) [17:26:58.498] setwd(...future.workdir) [17:26:58.498] { [17:26:58.498] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:26:58.498] ...future.oldOptions$nwarnings <- NULL [17:26:58.498] } [17:26:58.498] base::options(...future.oldOptions) [17:26:58.498] if (.Platform$OS.type == "windows") { [17:26:58.498] old_names <- names(...future.oldEnvVars) [17:26:58.498] envs <- base::Sys.getenv() [17:26:58.498] names <- names(envs) [17:26:58.498] common <- intersect(names, old_names) [17:26:58.498] added <- setdiff(names, old_names) [17:26:58.498] removed <- setdiff(old_names, names) [17:26:58.498] changed <- common[...future.oldEnvVars[common] != [17:26:58.498] envs[common]] [17:26:58.498] NAMES <- toupper(changed) [17:26:58.498] args <- list() [17:26:58.498] for (kk in seq_along(NAMES)) { [17:26:58.498] name <- changed[[kk]] [17:26:58.498] NAME <- NAMES[[kk]] [17:26:58.498] if (name != NAME && is.element(NAME, old_names)) [17:26:58.498] next [17:26:58.498] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.498] } [17:26:58.498] NAMES <- toupper(added) [17:26:58.498] for (kk in seq_along(NAMES)) { [17:26:58.498] name <- added[[kk]] [17:26:58.498] NAME <- NAMES[[kk]] [17:26:58.498] if (name != NAME && is.element(NAME, old_names)) [17:26:58.498] next [17:26:58.498] args[[name]] <- "" [17:26:58.498] } [17:26:58.498] NAMES <- toupper(removed) [17:26:58.498] for (kk in seq_along(NAMES)) { [17:26:58.498] name <- removed[[kk]] [17:26:58.498] NAME <- NAMES[[kk]] [17:26:58.498] if (name != NAME && is.element(NAME, old_names)) [17:26:58.498] next [17:26:58.498] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.498] } [17:26:58.498] if (length(args) > 0) [17:26:58.498] base::do.call(base::Sys.setenv, args = args) [17:26:58.498] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:26:58.498] } [17:26:58.498] else { [17:26:58.498] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:26:58.498] } [17:26:58.498] { [17:26:58.498] if (base::length(...future.futureOptionsAdded) > [17:26:58.498] 0L) { [17:26:58.498] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:26:58.498] base::names(opts) <- ...future.futureOptionsAdded [17:26:58.498] base::options(opts) [17:26:58.498] } [17:26:58.498] { [17:26:58.498] { [17:26:58.498] base::options(mc.cores = ...future.mc.cores.old) [17:26:58.498] NULL [17:26:58.498] } [17:26:58.498] options(future.plan = NULL) [17:26:58.498] if (is.na(NA_character_)) [17:26:58.498] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.498] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:26:58.498] future::plan(...future.strategy.old, .cleanup = FALSE, [17:26:58.498] .init = FALSE) [17:26:58.498] } [17:26:58.498] } [17:26:58.498] } [17:26:58.498] }) [17:26:58.498] if (TRUE) { [17:26:58.498] base::sink(type = "output", split = FALSE) [17:26:58.498] if (TRUE) { [17:26:58.498] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:26:58.498] } [17:26:58.498] else { [17:26:58.498] ...future.result["stdout"] <- base::list(NULL) [17:26:58.498] } [17:26:58.498] base::close(...future.stdout) [17:26:58.498] ...future.stdout <- NULL [17:26:58.498] } [17:26:58.498] ...future.result$conditions <- ...future.conditions [17:26:58.498] ...future.result$finished <- base::Sys.time() [17:26:58.498] ...future.result [17:26:58.498] } [17:26:58.581] MultisessionFuture started [17:26:58.582] - Launch lazy future ... done [17:26:58.582] run() for 'MultisessionFuture' ... done > > ## Resolve future #2 (frees up background process #2) > message(sprintf("b = %s\n", sQuote(b))) [17:26:58.582] result() for ClusterFuture ... [17:26:58.582] receiveMessageFromWorker() for ClusterFuture ... [17:26:58.583] - Validating connection of MultisessionFuture [17:26:58.633] - received message: FutureResult [17:26:58.633] - Received FutureResult [17:26:58.634] - Erased future from FutureRegistry [17:26:58.634] result() for ClusterFuture ... [17:26:58.634] - result already collected: FutureResult [17:26:58.634] result() for ClusterFuture ... done [17:26:58.634] receiveMessageFromWorker() for ClusterFuture ... done [17:26:58.635] result() for ClusterFuture ... done [17:26:58.635] result() for ClusterFuture ... [17:26:58.635] - result already collected: FutureResult [17:26:58.635] result() for ClusterFuture ... done b = 'a' > > ## Create future #3 (consumes background process #2) > ## THIS IS THE TRICKY PART: > ## Two globals are identified `env` and `b` and both are resolved. > ## However, object `env[[b]]` (here element `a` of environment `env`) > ## is not touched and therefore not resolved (since it is a future) > ## unless environment `env` is resolved recursively. (Issue #49) > y %<-% { env[[b]] } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:26:58.636] getGlobalsAndPackages() ... [17:26:58.636] Searching for globals... [17:26:58.645] - globals found: [4] '{', '[[', 'env', 'b' [17:26:58.645] Searching for globals ... DONE [17:26:58.645] Resolving globals: TRUE [17:26:58.645] Resolving any globals that are futures ... [17:26:58.646] - globals: [4] '{', '[[', 'env', 'b' [17:26:58.646] Resolving any globals that are futures ... DONE [17:26:58.646] Resolving futures part of globals (recursively) ... [17:26:58.647] resolve() on list ... [17:26:58.647] recursive: 99 [17:26:58.648] length: 2 [17:26:58.648] elements: 'env', 'b' [17:26:58.648] resolve() on environment ... [17:26:58.648] recursive: 98 [17:26:58.649] elements: [1] '.future_a', 'a' [17:26:58.650] receiveMessageFromWorker() for ClusterFuture ... [17:26:58.650] - Validating connection of MultisessionFuture [17:26:58.650] - received message: FutureResult [17:26:58.650] - Received FutureResult [17:26:58.650] - Erased future from FutureRegistry [17:26:58.651] result() for ClusterFuture ... [17:26:58.651] - result already collected: FutureResult [17:26:58.651] result() for ClusterFuture ... done [17:26:58.651] receiveMessageFromWorker() for ClusterFuture ... done [17:26:58.651] Future #1 [17:26:58.651] result() for ClusterFuture ... [17:26:58.652] - result already collected: FutureResult [17:26:58.652] result() for ClusterFuture ... done [17:26:58.652] result() for ClusterFuture ... [17:26:58.652] - result already collected: FutureResult [17:26:58.652] result() for ClusterFuture ... done [17:26:58.653] A MultisessionFuture was resolved [17:26:58.653] length: 0 (resolved future 1) [17:26:58.653] resolve() on environment ... DONE [17:26:58.653] length: 1 (resolved future 1) [17:26:58.653] length: 0 (resolved future 2) [17:26:58.653] resolve() on list ... DONE [17:26:58.654] - globals: [2] 'env', 'b' [17:26:58.654] Resolving futures part of globals (recursively) ... DONE [17:26:58.655] The total size of the 2 globals is 4.17 KiB (4272 bytes) [17:26:58.655] The total size of the 2 globals exported for future expression ('{; env[[b]]; }') is 4.17 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'env' (4.06 KiB of class 'environment') and 'b' (112 bytes of class 'character') [17:26:58.656] - globals: [2] 'env', 'b' [17:26:58.656] [17:26:58.656] getGlobalsAndPackages() ... DONE [17:26:58.656] run() for 'Future' ... [17:26:58.656] - state: 'created' [17:26:58.657] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:26:58.668] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:26:58.668] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:26:58.668] - Field: 'node' [17:26:58.669] - Field: 'label' [17:26:58.669] - Field: 'local' [17:26:58.669] - Field: 'owner' [17:26:58.669] - Field: 'envir' [17:26:58.669] - Field: 'workers' [17:26:58.669] - Field: 'packages' [17:26:58.670] - Field: 'gc' [17:26:58.670] - Field: 'conditions' [17:26:58.670] - Field: 'persistent' [17:26:58.670] - Field: 'expr' [17:26:58.670] - Field: 'uuid' [17:26:58.671] - Field: 'seed' [17:26:58.671] - Field: 'version' [17:26:58.671] - Field: 'result' [17:26:58.671] - Field: 'asynchronous' [17:26:58.671] - Field: 'calls' [17:26:58.671] - Field: 'globals' [17:26:58.672] - Field: 'stdout' [17:26:58.672] - Field: 'earlySignal' [17:26:58.672] - Field: 'lazy' [17:26:58.672] - Field: 'state' [17:26:58.672] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:26:58.672] - Launch lazy future ... [17:26:58.673] Packages needed by the future expression (n = 0): [17:26:58.673] Packages needed by future strategies (n = 0): [17:26:58.674] { [17:26:58.674] { [17:26:58.674] { [17:26:58.674] ...future.startTime <- base::Sys.time() [17:26:58.674] { [17:26:58.674] { [17:26:58.674] { [17:26:58.674] { [17:26:58.674] base::local({ [17:26:58.674] has_future <- base::requireNamespace("future", [17:26:58.674] quietly = TRUE) [17:26:58.674] if (has_future) { [17:26:58.674] ns <- base::getNamespace("future") [17:26:58.674] version <- ns[[".package"]][["version"]] [17:26:58.674] if (is.null(version)) [17:26:58.674] version <- utils::packageVersion("future") [17:26:58.674] } [17:26:58.674] else { [17:26:58.674] version <- NULL [17:26:58.674] } [17:26:58.674] if (!has_future || version < "1.8.0") { [17:26:58.674] info <- base::c(r_version = base::gsub("R version ", [17:26:58.674] "", base::R.version$version.string), [17:26:58.674] platform = base::sprintf("%s (%s-bit)", [17:26:58.674] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:26:58.674] os = base::paste(base::Sys.info()[base::c("sysname", [17:26:58.674] "release", "version")], collapse = " "), [17:26:58.674] hostname = base::Sys.info()[["nodename"]]) [17:26:58.674] info <- base::sprintf("%s: %s", base::names(info), [17:26:58.674] info) [17:26:58.674] info <- base::paste(info, collapse = "; ") [17:26:58.674] if (!has_future) { [17:26:58.674] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:26:58.674] info) [17:26:58.674] } [17:26:58.674] else { [17:26:58.674] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:26:58.674] info, version) [17:26:58.674] } [17:26:58.674] base::stop(msg) [17:26:58.674] } [17:26:58.674] }) [17:26:58.674] } [17:26:58.674] ...future.mc.cores.old <- base::getOption("mc.cores") [17:26:58.674] base::options(mc.cores = 1L) [17:26:58.674] } [17:26:58.674] ...future.strategy.old <- future::plan("list") [17:26:58.674] options(future.plan = NULL) [17:26:58.674] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.674] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:26:58.674] } [17:26:58.674] ...future.workdir <- getwd() [17:26:58.674] } [17:26:58.674] ...future.oldOptions <- base::as.list(base::.Options) [17:26:58.674] ...future.oldEnvVars <- base::Sys.getenv() [17:26:58.674] } [17:26:58.674] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:26:58.674] future.globals.maxSize = NULL, future.globals.method = NULL, [17:26:58.674] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:26:58.674] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:26:58.674] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:26:58.674] future.stdout.windows.reencode = NULL, width = 80L) [17:26:58.674] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:26:58.674] base::names(...future.oldOptions)) [17:26:58.674] } [17:26:58.674] if (FALSE) { [17:26:58.674] } [17:26:58.674] else { [17:26:58.674] if (TRUE) { [17:26:58.674] ...future.stdout <- base::rawConnection(base::raw(0L), [17:26:58.674] open = "w") [17:26:58.674] } [17:26:58.674] else { [17:26:58.674] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:26:58.674] windows = "NUL", "/dev/null"), open = "w") [17:26:58.674] } [17:26:58.674] base::sink(...future.stdout, type = "output", split = FALSE) [17:26:58.674] base::on.exit(if (!base::is.null(...future.stdout)) { [17:26:58.674] base::sink(type = "output", split = FALSE) [17:26:58.674] base::close(...future.stdout) [17:26:58.674] }, add = TRUE) [17:26:58.674] } [17:26:58.674] ...future.frame <- base::sys.nframe() [17:26:58.674] ...future.conditions <- base::list() [17:26:58.674] ...future.rng <- base::globalenv()$.Random.seed [17:26:58.674] if (FALSE) { [17:26:58.674] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:26:58.674] "...future.value", "...future.globalenv.names", ".Random.seed") [17:26:58.674] } [17:26:58.674] ...future.result <- base::tryCatch({ [17:26:58.674] base::withCallingHandlers({ [17:26:58.674] ...future.value <- base::withVisible(base::local({ [17:26:58.674] ...future.makeSendCondition <- base::local({ [17:26:58.674] sendCondition <- NULL [17:26:58.674] function(frame = 1L) { [17:26:58.674] if (is.function(sendCondition)) [17:26:58.674] return(sendCondition) [17:26:58.674] ns <- getNamespace("parallel") [17:26:58.674] if (exists("sendData", mode = "function", [17:26:58.674] envir = ns)) { [17:26:58.674] parallel_sendData <- get("sendData", mode = "function", [17:26:58.674] envir = ns) [17:26:58.674] envir <- sys.frame(frame) [17:26:58.674] master <- NULL [17:26:58.674] while (!identical(envir, .GlobalEnv) && [17:26:58.674] !identical(envir, emptyenv())) { [17:26:58.674] if (exists("master", mode = "list", envir = envir, [17:26:58.674] inherits = FALSE)) { [17:26:58.674] master <- get("master", mode = "list", [17:26:58.674] envir = envir, inherits = FALSE) [17:26:58.674] if (inherits(master, c("SOCKnode", [17:26:58.674] "SOCK0node"))) { [17:26:58.674] sendCondition <<- function(cond) { [17:26:58.674] data <- list(type = "VALUE", value = cond, [17:26:58.674] success = TRUE) [17:26:58.674] parallel_sendData(master, data) [17:26:58.674] } [17:26:58.674] return(sendCondition) [17:26:58.674] } [17:26:58.674] } [17:26:58.674] frame <- frame + 1L [17:26:58.674] envir <- sys.frame(frame) [17:26:58.674] } [17:26:58.674] } [17:26:58.674] sendCondition <<- function(cond) NULL [17:26:58.674] } [17:26:58.674] }) [17:26:58.674] withCallingHandlers({ [17:26:58.674] { [17:26:58.674] env[[b]] [17:26:58.674] } [17:26:58.674] }, immediateCondition = function(cond) { [17:26:58.674] sendCondition <- ...future.makeSendCondition() [17:26:58.674] sendCondition(cond) [17:26:58.674] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.674] { [17:26:58.674] inherits <- base::inherits [17:26:58.674] invokeRestart <- base::invokeRestart [17:26:58.674] is.null <- base::is.null [17:26:58.674] muffled <- FALSE [17:26:58.674] if (inherits(cond, "message")) { [17:26:58.674] muffled <- grepl(pattern, "muffleMessage") [17:26:58.674] if (muffled) [17:26:58.674] invokeRestart("muffleMessage") [17:26:58.674] } [17:26:58.674] else if (inherits(cond, "warning")) { [17:26:58.674] muffled <- grepl(pattern, "muffleWarning") [17:26:58.674] if (muffled) [17:26:58.674] invokeRestart("muffleWarning") [17:26:58.674] } [17:26:58.674] else if (inherits(cond, "condition")) { [17:26:58.674] if (!is.null(pattern)) { [17:26:58.674] computeRestarts <- base::computeRestarts [17:26:58.674] grepl <- base::grepl [17:26:58.674] restarts <- computeRestarts(cond) [17:26:58.674] for (restart in restarts) { [17:26:58.674] name <- restart$name [17:26:58.674] if (is.null(name)) [17:26:58.674] next [17:26:58.674] if (!grepl(pattern, name)) [17:26:58.674] next [17:26:58.674] invokeRestart(restart) [17:26:58.674] muffled <- TRUE [17:26:58.674] break [17:26:58.674] } [17:26:58.674] } [17:26:58.674] } [17:26:58.674] invisible(muffled) [17:26:58.674] } [17:26:58.674] muffleCondition(cond) [17:26:58.674] }) [17:26:58.674] })) [17:26:58.674] future::FutureResult(value = ...future.value$value, [17:26:58.674] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.674] ...future.rng), globalenv = if (FALSE) [17:26:58.674] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:26:58.674] ...future.globalenv.names)) [17:26:58.674] else NULL, started = ...future.startTime, version = "1.8") [17:26:58.674] }, condition = base::local({ [17:26:58.674] c <- base::c [17:26:58.674] inherits <- base::inherits [17:26:58.674] invokeRestart <- base::invokeRestart [17:26:58.674] length <- base::length [17:26:58.674] list <- base::list [17:26:58.674] seq.int <- base::seq.int [17:26:58.674] signalCondition <- base::signalCondition [17:26:58.674] sys.calls <- base::sys.calls [17:26:58.674] `[[` <- base::`[[` [17:26:58.674] `+` <- base::`+` [17:26:58.674] `<<-` <- base::`<<-` [17:26:58.674] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:26:58.674] calls[seq.int(from = from + 12L, to = length(calls) - [17:26:58.674] 3L)] [17:26:58.674] } [17:26:58.674] function(cond) { [17:26:58.674] is_error <- inherits(cond, "error") [17:26:58.674] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:26:58.674] NULL) [17:26:58.674] if (is_error) { [17:26:58.674] sessionInformation <- function() { [17:26:58.674] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:26:58.674] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:26:58.674] search = base::search(), system = base::Sys.info()) [17:26:58.674] } [17:26:58.674] ...future.conditions[[length(...future.conditions) + [17:26:58.674] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:26:58.674] cond$call), session = sessionInformation(), [17:26:58.674] timestamp = base::Sys.time(), signaled = 0L) [17:26:58.674] signalCondition(cond) [17:26:58.674] } [17:26:58.674] else if (!ignore && TRUE && inherits(cond, c("condition", [17:26:58.674] "immediateCondition"))) { [17:26:58.674] signal <- TRUE && inherits(cond, "immediateCondition") [17:26:58.674] ...future.conditions[[length(...future.conditions) + [17:26:58.674] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:26:58.674] if (TRUE && !signal) { [17:26:58.674] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.674] { [17:26:58.674] inherits <- base::inherits [17:26:58.674] invokeRestart <- base::invokeRestart [17:26:58.674] is.null <- base::is.null [17:26:58.674] muffled <- FALSE [17:26:58.674] if (inherits(cond, "message")) { [17:26:58.674] muffled <- grepl(pattern, "muffleMessage") [17:26:58.674] if (muffled) [17:26:58.674] invokeRestart("muffleMessage") [17:26:58.674] } [17:26:58.674] else if (inherits(cond, "warning")) { [17:26:58.674] muffled <- grepl(pattern, "muffleWarning") [17:26:58.674] if (muffled) [17:26:58.674] invokeRestart("muffleWarning") [17:26:58.674] } [17:26:58.674] else if (inherits(cond, "condition")) { [17:26:58.674] if (!is.null(pattern)) { [17:26:58.674] computeRestarts <- base::computeRestarts [17:26:58.674] grepl <- base::grepl [17:26:58.674] restarts <- computeRestarts(cond) [17:26:58.674] for (restart in restarts) { [17:26:58.674] name <- restart$name [17:26:58.674] if (is.null(name)) [17:26:58.674] next [17:26:58.674] if (!grepl(pattern, name)) [17:26:58.674] next [17:26:58.674] invokeRestart(restart) [17:26:58.674] muffled <- TRUE [17:26:58.674] break [17:26:58.674] } [17:26:58.674] } [17:26:58.674] } [17:26:58.674] invisible(muffled) [17:26:58.674] } [17:26:58.674] muffleCondition(cond, pattern = "^muffle") [17:26:58.674] } [17:26:58.674] } [17:26:58.674] else { [17:26:58.674] if (TRUE) { [17:26:58.674] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.674] { [17:26:58.674] inherits <- base::inherits [17:26:58.674] invokeRestart <- base::invokeRestart [17:26:58.674] is.null <- base::is.null [17:26:58.674] muffled <- FALSE [17:26:58.674] if (inherits(cond, "message")) { [17:26:58.674] muffled <- grepl(pattern, "muffleMessage") [17:26:58.674] if (muffled) [17:26:58.674] invokeRestart("muffleMessage") [17:26:58.674] } [17:26:58.674] else if (inherits(cond, "warning")) { [17:26:58.674] muffled <- grepl(pattern, "muffleWarning") [17:26:58.674] if (muffled) [17:26:58.674] invokeRestart("muffleWarning") [17:26:58.674] } [17:26:58.674] else if (inherits(cond, "condition")) { [17:26:58.674] if (!is.null(pattern)) { [17:26:58.674] computeRestarts <- base::computeRestarts [17:26:58.674] grepl <- base::grepl [17:26:58.674] restarts <- computeRestarts(cond) [17:26:58.674] for (restart in restarts) { [17:26:58.674] name <- restart$name [17:26:58.674] if (is.null(name)) [17:26:58.674] next [17:26:58.674] if (!grepl(pattern, name)) [17:26:58.674] next [17:26:58.674] invokeRestart(restart) [17:26:58.674] muffled <- TRUE [17:26:58.674] break [17:26:58.674] } [17:26:58.674] } [17:26:58.674] } [17:26:58.674] invisible(muffled) [17:26:58.674] } [17:26:58.674] muffleCondition(cond, pattern = "^muffle") [17:26:58.674] } [17:26:58.674] } [17:26:58.674] } [17:26:58.674] })) [17:26:58.674] }, error = function(ex) { [17:26:58.674] base::structure(base::list(value = NULL, visible = NULL, [17:26:58.674] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.674] ...future.rng), started = ...future.startTime, [17:26:58.674] finished = Sys.time(), session_uuid = NA_character_, [17:26:58.674] version = "1.8"), class = "FutureResult") [17:26:58.674] }, finally = { [17:26:58.674] if (!identical(...future.workdir, getwd())) [17:26:58.674] setwd(...future.workdir) [17:26:58.674] { [17:26:58.674] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:26:58.674] ...future.oldOptions$nwarnings <- NULL [17:26:58.674] } [17:26:58.674] base::options(...future.oldOptions) [17:26:58.674] if (.Platform$OS.type == "windows") { [17:26:58.674] old_names <- names(...future.oldEnvVars) [17:26:58.674] envs <- base::Sys.getenv() [17:26:58.674] names <- names(envs) [17:26:58.674] common <- intersect(names, old_names) [17:26:58.674] added <- setdiff(names, old_names) [17:26:58.674] removed <- setdiff(old_names, names) [17:26:58.674] changed <- common[...future.oldEnvVars[common] != [17:26:58.674] envs[common]] [17:26:58.674] NAMES <- toupper(changed) [17:26:58.674] args <- list() [17:26:58.674] for (kk in seq_along(NAMES)) { [17:26:58.674] name <- changed[[kk]] [17:26:58.674] NAME <- NAMES[[kk]] [17:26:58.674] if (name != NAME && is.element(NAME, old_names)) [17:26:58.674] next [17:26:58.674] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.674] } [17:26:58.674] NAMES <- toupper(added) [17:26:58.674] for (kk in seq_along(NAMES)) { [17:26:58.674] name <- added[[kk]] [17:26:58.674] NAME <- NAMES[[kk]] [17:26:58.674] if (name != NAME && is.element(NAME, old_names)) [17:26:58.674] next [17:26:58.674] args[[name]] <- "" [17:26:58.674] } [17:26:58.674] NAMES <- toupper(removed) [17:26:58.674] for (kk in seq_along(NAMES)) { [17:26:58.674] name <- removed[[kk]] [17:26:58.674] NAME <- NAMES[[kk]] [17:26:58.674] if (name != NAME && is.element(NAME, old_names)) [17:26:58.674] next [17:26:58.674] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.674] } [17:26:58.674] if (length(args) > 0) [17:26:58.674] base::do.call(base::Sys.setenv, args = args) [17:26:58.674] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:26:58.674] } [17:26:58.674] else { [17:26:58.674] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:26:58.674] } [17:26:58.674] { [17:26:58.674] if (base::length(...future.futureOptionsAdded) > [17:26:58.674] 0L) { [17:26:58.674] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:26:58.674] base::names(opts) <- ...future.futureOptionsAdded [17:26:58.674] base::options(opts) [17:26:58.674] } [17:26:58.674] { [17:26:58.674] { [17:26:58.674] base::options(mc.cores = ...future.mc.cores.old) [17:26:58.674] NULL [17:26:58.674] } [17:26:58.674] options(future.plan = NULL) [17:26:58.674] if (is.na(NA_character_)) [17:26:58.674] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.674] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:26:58.674] future::plan(...future.strategy.old, .cleanup = FALSE, [17:26:58.674] .init = FALSE) [17:26:58.674] } [17:26:58.674] } [17:26:58.674] } [17:26:58.674] }) [17:26:58.674] if (TRUE) { [17:26:58.674] base::sink(type = "output", split = FALSE) [17:26:58.674] if (TRUE) { [17:26:58.674] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:26:58.674] } [17:26:58.674] else { [17:26:58.674] ...future.result["stdout"] <- base::list(NULL) [17:26:58.674] } [17:26:58.674] base::close(...future.stdout) [17:26:58.674] ...future.stdout <- NULL [17:26:58.674] } [17:26:58.674] ...future.result$conditions <- ...future.conditions [17:26:58.674] ...future.result$finished <- base::Sys.time() [17:26:58.674] ...future.result [17:26:58.674] } [17:26:58.679] Exporting 2 global objects (4.17 KiB) to cluster node #1 ... [17:26:58.679] Exporting 'env' (4.06 KiB) to cluster node #1 ... [17:26:58.691] Exporting 'env' (4.06 KiB) to cluster node #1 ... DONE [17:26:58.692] Exporting 'b' (112 bytes) to cluster node #1 ... [17:26:58.692] Exporting 'b' (112 bytes) to cluster node #1 ... DONE [17:26:58.692] Exporting 2 global objects (4.17 KiB) to cluster node #1 ... DONE [17:26:58.693] MultisessionFuture started [17:26:58.693] - Launch lazy future ... done [17:26:58.693] run() for 'MultisessionFuture' ... done > > ## Resolve future #3 > message(sprintf("y = %s\n", y)) [17:26:58.694] result() for ClusterFuture ... [17:26:58.694] receiveMessageFromWorker() for ClusterFuture ... [17:26:58.694] - Validating connection of MultisessionFuture [17:26:58.708] - received message: FutureResult [17:26:58.708] - Received FutureResult [17:26:58.709] - Erased future from FutureRegistry [17:26:58.709] result() for ClusterFuture ... [17:26:58.709] - result already collected: FutureResult [17:26:58.709] result() for ClusterFuture ... done [17:26:58.709] receiveMessageFromWorker() for ClusterFuture ... done [17:26:58.709] result() for ClusterFuture ... done [17:26:58.710] result() for ClusterFuture ... [17:26:58.710] - result already collected: FutureResult [17:26:58.710] result() for ClusterFuture ... done y = 5 > > ## Resolve future #1 if not already done > str(as.list(env)) [17:26:58.710] result() for ClusterFuture ... [17:26:58.710] - result already collected: FutureResult [17:26:58.711] result() for ClusterFuture ... done [17:26:58.711] result() for ClusterFuture ... [17:26:58.711] - result already collected: FutureResult [17:26:58.711] result() for ClusterFuture ... done List of 1 $ a: num 5 > > ## Create future #4 > ## Since future #1 is resolved it will work at this point > y %<-% { env[[b]] } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:26:58.712] getGlobalsAndPackages() ... [17:26:58.712] Searching for globals... [17:26:58.714] - globals found: [4] '{', '[[', 'env', 'b' [17:26:58.714] Searching for globals ... DONE [17:26:58.714] Resolving globals: TRUE [17:26:58.714] Resolving any globals that are futures ... [17:26:58.714] - globals: [4] '{', '[[', 'env', 'b' [17:26:58.714] Resolving any globals that are futures ... DONE [17:26:58.715] Resolving futures part of globals (recursively) ... [17:26:58.715] resolve() on list ... [17:26:58.715] recursive: 99 [17:26:58.716] length: 2 [17:26:58.716] elements: 'env', 'b' [17:26:58.716] resolve() on environment ... [17:26:58.716] recursive: 98 [17:26:58.717] elements: [1] 'a' [17:26:58.717] length: 0 (resolved future 1) [17:26:58.717] resolve() on environment ... DONE [17:26:58.717] length: 1 (resolved future 1) [17:26:58.717] length: 0 (resolved future 2) [17:26:58.717] resolve() on list ... DONE [17:26:58.718] - globals: [2] 'env', 'b' [17:26:58.718] Resolving futures part of globals (recursively) ... DONE [17:26:58.718] The total size of the 2 globals is 168 bytes (168 bytes) [17:26:58.719] The total size of the 2 globals exported for future expression ('{; env[[b]]; }') is 168 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'b' (112 bytes of class 'character') and 'env' (56 bytes of class 'environment') [17:26:58.719] - globals: [2] 'env', 'b' [17:26:58.719] [17:26:58.719] getGlobalsAndPackages() ... DONE [17:26:58.719] run() for 'Future' ... [17:26:58.720] - state: 'created' [17:26:58.720] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:26:58.732] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:26:58.732] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:26:58.732] - Field: 'node' [17:26:58.732] - Field: 'label' [17:26:58.732] - Field: 'local' [17:26:58.733] - Field: 'owner' [17:26:58.733] - Field: 'envir' [17:26:58.733] - Field: 'workers' [17:26:58.733] - Field: 'packages' [17:26:58.733] - Field: 'gc' [17:26:58.734] - Field: 'conditions' [17:26:58.734] - Field: 'persistent' [17:26:58.734] - Field: 'expr' [17:26:58.734] - Field: 'uuid' [17:26:58.734] - Field: 'seed' [17:26:58.734] - Field: 'version' [17:26:58.735] - Field: 'result' [17:26:58.735] - Field: 'asynchronous' [17:26:58.735] - Field: 'calls' [17:26:58.735] - Field: 'globals' [17:26:58.735] - Field: 'stdout' [17:26:58.735] - Field: 'earlySignal' [17:26:58.736] - Field: 'lazy' [17:26:58.736] - Field: 'state' [17:26:58.736] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:26:58.736] - Launch lazy future ... [17:26:58.737] Packages needed by the future expression (n = 0): [17:26:58.737] Packages needed by future strategies (n = 0): [17:26:58.737] { [17:26:58.737] { [17:26:58.737] { [17:26:58.737] ...future.startTime <- base::Sys.time() [17:26:58.737] { [17:26:58.737] { [17:26:58.737] { [17:26:58.737] { [17:26:58.737] base::local({ [17:26:58.737] has_future <- base::requireNamespace("future", [17:26:58.737] quietly = TRUE) [17:26:58.737] if (has_future) { [17:26:58.737] ns <- base::getNamespace("future") [17:26:58.737] version <- ns[[".package"]][["version"]] [17:26:58.737] if (is.null(version)) [17:26:58.737] version <- utils::packageVersion("future") [17:26:58.737] } [17:26:58.737] else { [17:26:58.737] version <- NULL [17:26:58.737] } [17:26:58.737] if (!has_future || version < "1.8.0") { [17:26:58.737] info <- base::c(r_version = base::gsub("R version ", [17:26:58.737] "", base::R.version$version.string), [17:26:58.737] platform = base::sprintf("%s (%s-bit)", [17:26:58.737] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:26:58.737] os = base::paste(base::Sys.info()[base::c("sysname", [17:26:58.737] "release", "version")], collapse = " "), [17:26:58.737] hostname = base::Sys.info()[["nodename"]]) [17:26:58.737] info <- base::sprintf("%s: %s", base::names(info), [17:26:58.737] info) [17:26:58.737] info <- base::paste(info, collapse = "; ") [17:26:58.737] if (!has_future) { [17:26:58.737] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:26:58.737] info) [17:26:58.737] } [17:26:58.737] else { [17:26:58.737] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:26:58.737] info, version) [17:26:58.737] } [17:26:58.737] base::stop(msg) [17:26:58.737] } [17:26:58.737] }) [17:26:58.737] } [17:26:58.737] ...future.mc.cores.old <- base::getOption("mc.cores") [17:26:58.737] base::options(mc.cores = 1L) [17:26:58.737] } [17:26:58.737] ...future.strategy.old <- future::plan("list") [17:26:58.737] options(future.plan = NULL) [17:26:58.737] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.737] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:26:58.737] } [17:26:58.737] ...future.workdir <- getwd() [17:26:58.737] } [17:26:58.737] ...future.oldOptions <- base::as.list(base::.Options) [17:26:58.737] ...future.oldEnvVars <- base::Sys.getenv() [17:26:58.737] } [17:26:58.737] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:26:58.737] future.globals.maxSize = NULL, future.globals.method = NULL, [17:26:58.737] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:26:58.737] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:26:58.737] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:26:58.737] future.stdout.windows.reencode = NULL, width = 80L) [17:26:58.737] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:26:58.737] base::names(...future.oldOptions)) [17:26:58.737] } [17:26:58.737] if (FALSE) { [17:26:58.737] } [17:26:58.737] else { [17:26:58.737] if (TRUE) { [17:26:58.737] ...future.stdout <- base::rawConnection(base::raw(0L), [17:26:58.737] open = "w") [17:26:58.737] } [17:26:58.737] else { [17:26:58.737] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:26:58.737] windows = "NUL", "/dev/null"), open = "w") [17:26:58.737] } [17:26:58.737] base::sink(...future.stdout, type = "output", split = FALSE) [17:26:58.737] base::on.exit(if (!base::is.null(...future.stdout)) { [17:26:58.737] base::sink(type = "output", split = FALSE) [17:26:58.737] base::close(...future.stdout) [17:26:58.737] }, add = TRUE) [17:26:58.737] } [17:26:58.737] ...future.frame <- base::sys.nframe() [17:26:58.737] ...future.conditions <- base::list() [17:26:58.737] ...future.rng <- base::globalenv()$.Random.seed [17:26:58.737] if (FALSE) { [17:26:58.737] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:26:58.737] "...future.value", "...future.globalenv.names", ".Random.seed") [17:26:58.737] } [17:26:58.737] ...future.result <- base::tryCatch({ [17:26:58.737] base::withCallingHandlers({ [17:26:58.737] ...future.value <- base::withVisible(base::local({ [17:26:58.737] ...future.makeSendCondition <- base::local({ [17:26:58.737] sendCondition <- NULL [17:26:58.737] function(frame = 1L) { [17:26:58.737] if (is.function(sendCondition)) [17:26:58.737] return(sendCondition) [17:26:58.737] ns <- getNamespace("parallel") [17:26:58.737] if (exists("sendData", mode = "function", [17:26:58.737] envir = ns)) { [17:26:58.737] parallel_sendData <- get("sendData", mode = "function", [17:26:58.737] envir = ns) [17:26:58.737] envir <- sys.frame(frame) [17:26:58.737] master <- NULL [17:26:58.737] while (!identical(envir, .GlobalEnv) && [17:26:58.737] !identical(envir, emptyenv())) { [17:26:58.737] if (exists("master", mode = "list", envir = envir, [17:26:58.737] inherits = FALSE)) { [17:26:58.737] master <- get("master", mode = "list", [17:26:58.737] envir = envir, inherits = FALSE) [17:26:58.737] if (inherits(master, c("SOCKnode", [17:26:58.737] "SOCK0node"))) { [17:26:58.737] sendCondition <<- function(cond) { [17:26:58.737] data <- list(type = "VALUE", value = cond, [17:26:58.737] success = TRUE) [17:26:58.737] parallel_sendData(master, data) [17:26:58.737] } [17:26:58.737] return(sendCondition) [17:26:58.737] } [17:26:58.737] } [17:26:58.737] frame <- frame + 1L [17:26:58.737] envir <- sys.frame(frame) [17:26:58.737] } [17:26:58.737] } [17:26:58.737] sendCondition <<- function(cond) NULL [17:26:58.737] } [17:26:58.737] }) [17:26:58.737] withCallingHandlers({ [17:26:58.737] { [17:26:58.737] env[[b]] [17:26:58.737] } [17:26:58.737] }, immediateCondition = function(cond) { [17:26:58.737] sendCondition <- ...future.makeSendCondition() [17:26:58.737] sendCondition(cond) [17:26:58.737] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.737] { [17:26:58.737] inherits <- base::inherits [17:26:58.737] invokeRestart <- base::invokeRestart [17:26:58.737] is.null <- base::is.null [17:26:58.737] muffled <- FALSE [17:26:58.737] if (inherits(cond, "message")) { [17:26:58.737] muffled <- grepl(pattern, "muffleMessage") [17:26:58.737] if (muffled) [17:26:58.737] invokeRestart("muffleMessage") [17:26:58.737] } [17:26:58.737] else if (inherits(cond, "warning")) { [17:26:58.737] muffled <- grepl(pattern, "muffleWarning") [17:26:58.737] if (muffled) [17:26:58.737] invokeRestart("muffleWarning") [17:26:58.737] } [17:26:58.737] else if (inherits(cond, "condition")) { [17:26:58.737] if (!is.null(pattern)) { [17:26:58.737] computeRestarts <- base::computeRestarts [17:26:58.737] grepl <- base::grepl [17:26:58.737] restarts <- computeRestarts(cond) [17:26:58.737] for (restart in restarts) { [17:26:58.737] name <- restart$name [17:26:58.737] if (is.null(name)) [17:26:58.737] next [17:26:58.737] if (!grepl(pattern, name)) [17:26:58.737] next [17:26:58.737] invokeRestart(restart) [17:26:58.737] muffled <- TRUE [17:26:58.737] break [17:26:58.737] } [17:26:58.737] } [17:26:58.737] } [17:26:58.737] invisible(muffled) [17:26:58.737] } [17:26:58.737] muffleCondition(cond) [17:26:58.737] }) [17:26:58.737] })) [17:26:58.737] future::FutureResult(value = ...future.value$value, [17:26:58.737] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.737] ...future.rng), globalenv = if (FALSE) [17:26:58.737] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:26:58.737] ...future.globalenv.names)) [17:26:58.737] else NULL, started = ...future.startTime, version = "1.8") [17:26:58.737] }, condition = base::local({ [17:26:58.737] c <- base::c [17:26:58.737] inherits <- base::inherits [17:26:58.737] invokeRestart <- base::invokeRestart [17:26:58.737] length <- base::length [17:26:58.737] list <- base::list [17:26:58.737] seq.int <- base::seq.int [17:26:58.737] signalCondition <- base::signalCondition [17:26:58.737] sys.calls <- base::sys.calls [17:26:58.737] `[[` <- base::`[[` [17:26:58.737] `+` <- base::`+` [17:26:58.737] `<<-` <- base::`<<-` [17:26:58.737] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:26:58.737] calls[seq.int(from = from + 12L, to = length(calls) - [17:26:58.737] 3L)] [17:26:58.737] } [17:26:58.737] function(cond) { [17:26:58.737] is_error <- inherits(cond, "error") [17:26:58.737] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:26:58.737] NULL) [17:26:58.737] if (is_error) { [17:26:58.737] sessionInformation <- function() { [17:26:58.737] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:26:58.737] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:26:58.737] search = base::search(), system = base::Sys.info()) [17:26:58.737] } [17:26:58.737] ...future.conditions[[length(...future.conditions) + [17:26:58.737] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:26:58.737] cond$call), session = sessionInformation(), [17:26:58.737] timestamp = base::Sys.time(), signaled = 0L) [17:26:58.737] signalCondition(cond) [17:26:58.737] } [17:26:58.737] else if (!ignore && TRUE && inherits(cond, c("condition", [17:26:58.737] "immediateCondition"))) { [17:26:58.737] signal <- TRUE && inherits(cond, "immediateCondition") [17:26:58.737] ...future.conditions[[length(...future.conditions) + [17:26:58.737] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:26:58.737] if (TRUE && !signal) { [17:26:58.737] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.737] { [17:26:58.737] inherits <- base::inherits [17:26:58.737] invokeRestart <- base::invokeRestart [17:26:58.737] is.null <- base::is.null [17:26:58.737] muffled <- FALSE [17:26:58.737] if (inherits(cond, "message")) { [17:26:58.737] muffled <- grepl(pattern, "muffleMessage") [17:26:58.737] if (muffled) [17:26:58.737] invokeRestart("muffleMessage") [17:26:58.737] } [17:26:58.737] else if (inherits(cond, "warning")) { [17:26:58.737] muffled <- grepl(pattern, "muffleWarning") [17:26:58.737] if (muffled) [17:26:58.737] invokeRestart("muffleWarning") [17:26:58.737] } [17:26:58.737] else if (inherits(cond, "condition")) { [17:26:58.737] if (!is.null(pattern)) { [17:26:58.737] computeRestarts <- base::computeRestarts [17:26:58.737] grepl <- base::grepl [17:26:58.737] restarts <- computeRestarts(cond) [17:26:58.737] for (restart in restarts) { [17:26:58.737] name <- restart$name [17:26:58.737] if (is.null(name)) [17:26:58.737] next [17:26:58.737] if (!grepl(pattern, name)) [17:26:58.737] next [17:26:58.737] invokeRestart(restart) [17:26:58.737] muffled <- TRUE [17:26:58.737] break [17:26:58.737] } [17:26:58.737] } [17:26:58.737] } [17:26:58.737] invisible(muffled) [17:26:58.737] } [17:26:58.737] muffleCondition(cond, pattern = "^muffle") [17:26:58.737] } [17:26:58.737] } [17:26:58.737] else { [17:26:58.737] if (TRUE) { [17:26:58.737] muffleCondition <- function (cond, pattern = "^muffle") [17:26:58.737] { [17:26:58.737] inherits <- base::inherits [17:26:58.737] invokeRestart <- base::invokeRestart [17:26:58.737] is.null <- base::is.null [17:26:58.737] muffled <- FALSE [17:26:58.737] if (inherits(cond, "message")) { [17:26:58.737] muffled <- grepl(pattern, "muffleMessage") [17:26:58.737] if (muffled) [17:26:58.737] invokeRestart("muffleMessage") [17:26:58.737] } [17:26:58.737] else if (inherits(cond, "warning")) { [17:26:58.737] muffled <- grepl(pattern, "muffleWarning") [17:26:58.737] if (muffled) [17:26:58.737] invokeRestart("muffleWarning") [17:26:58.737] } [17:26:58.737] else if (inherits(cond, "condition")) { [17:26:58.737] if (!is.null(pattern)) { [17:26:58.737] computeRestarts <- base::computeRestarts [17:26:58.737] grepl <- base::grepl [17:26:58.737] restarts <- computeRestarts(cond) [17:26:58.737] for (restart in restarts) { [17:26:58.737] name <- restart$name [17:26:58.737] if (is.null(name)) [17:26:58.737] next [17:26:58.737] if (!grepl(pattern, name)) [17:26:58.737] next [17:26:58.737] invokeRestart(restart) [17:26:58.737] muffled <- TRUE [17:26:58.737] break [17:26:58.737] } [17:26:58.737] } [17:26:58.737] } [17:26:58.737] invisible(muffled) [17:26:58.737] } [17:26:58.737] muffleCondition(cond, pattern = "^muffle") [17:26:58.737] } [17:26:58.737] } [17:26:58.737] } [17:26:58.737] })) [17:26:58.737] }, error = function(ex) { [17:26:58.737] base::structure(base::list(value = NULL, visible = NULL, [17:26:58.737] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:26:58.737] ...future.rng), started = ...future.startTime, [17:26:58.737] finished = Sys.time(), session_uuid = NA_character_, [17:26:58.737] version = "1.8"), class = "FutureResult") [17:26:58.737] }, finally = { [17:26:58.737] if (!identical(...future.workdir, getwd())) [17:26:58.737] setwd(...future.workdir) [17:26:58.737] { [17:26:58.737] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:26:58.737] ...future.oldOptions$nwarnings <- NULL [17:26:58.737] } [17:26:58.737] base::options(...future.oldOptions) [17:26:58.737] if (.Platform$OS.type == "windows") { [17:26:58.737] old_names <- names(...future.oldEnvVars) [17:26:58.737] envs <- base::Sys.getenv() [17:26:58.737] names <- names(envs) [17:26:58.737] common <- intersect(names, old_names) [17:26:58.737] added <- setdiff(names, old_names) [17:26:58.737] removed <- setdiff(old_names, names) [17:26:58.737] changed <- common[...future.oldEnvVars[common] != [17:26:58.737] envs[common]] [17:26:58.737] NAMES <- toupper(changed) [17:26:58.737] args <- list() [17:26:58.737] for (kk in seq_along(NAMES)) { [17:26:58.737] name <- changed[[kk]] [17:26:58.737] NAME <- NAMES[[kk]] [17:26:58.737] if (name != NAME && is.element(NAME, old_names)) [17:26:58.737] next [17:26:58.737] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.737] } [17:26:58.737] NAMES <- toupper(added) [17:26:58.737] for (kk in seq_along(NAMES)) { [17:26:58.737] name <- added[[kk]] [17:26:58.737] NAME <- NAMES[[kk]] [17:26:58.737] if (name != NAME && is.element(NAME, old_names)) [17:26:58.737] next [17:26:58.737] args[[name]] <- "" [17:26:58.737] } [17:26:58.737] NAMES <- toupper(removed) [17:26:58.737] for (kk in seq_along(NAMES)) { [17:26:58.737] name <- removed[[kk]] [17:26:58.737] NAME <- NAMES[[kk]] [17:26:58.737] if (name != NAME && is.element(NAME, old_names)) [17:26:58.737] next [17:26:58.737] args[[name]] <- ...future.oldEnvVars[[name]] [17:26:58.737] } [17:26:58.737] if (length(args) > 0) [17:26:58.737] base::do.call(base::Sys.setenv, args = args) [17:26:58.737] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:26:58.737] } [17:26:58.737] else { [17:26:58.737] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:26:58.737] } [17:26:58.737] { [17:26:58.737] if (base::length(...future.futureOptionsAdded) > [17:26:58.737] 0L) { [17:26:58.737] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:26:58.737] base::names(opts) <- ...future.futureOptionsAdded [17:26:58.737] base::options(opts) [17:26:58.737] } [17:26:58.737] { [17:26:58.737] { [17:26:58.737] base::options(mc.cores = ...future.mc.cores.old) [17:26:58.737] NULL [17:26:58.737] } [17:26:58.737] options(future.plan = NULL) [17:26:58.737] if (is.na(NA_character_)) [17:26:58.737] Sys.unsetenv("R_FUTURE_PLAN") [17:26:58.737] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:26:58.737] future::plan(...future.strategy.old, .cleanup = FALSE, [17:26:58.737] .init = FALSE) [17:26:58.737] } [17:26:58.737] } [17:26:58.737] } [17:26:58.737] }) [17:26:58.737] if (TRUE) { [17:26:58.737] base::sink(type = "output", split = FALSE) [17:26:58.737] if (TRUE) { [17:26:58.737] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:26:58.737] } [17:26:58.737] else { [17:26:58.737] ...future.result["stdout"] <- base::list(NULL) [17:26:58.737] } [17:26:58.737] base::close(...future.stdout) [17:26:58.737] ...future.stdout <- NULL [17:26:58.737] } [17:26:58.737] ...future.result$conditions <- ...future.conditions [17:26:58.737] ...future.result$finished <- base::Sys.time() [17:26:58.737] ...future.result [17:26:58.737] } [17:26:58.742] Exporting 2 global objects (168 bytes) to cluster node #1 ... [17:26:58.743] Exporting 'env' (56 bytes) to cluster node #1 ... [17:26:58.743] Exporting 'env' (56 bytes) to cluster node #1 ... DONE [17:26:58.743] Exporting 'b' (112 bytes) to cluster node #1 ... [17:26:58.744] Exporting 'b' (112 bytes) to cluster node #1 ... DONE [17:26:58.744] Exporting 2 global objects (168 bytes) to cluster node #1 ... DONE [17:26:58.745] MultisessionFuture started [17:26:58.745] - Launch lazy future ... done [17:26:58.745] run() for 'MultisessionFuture' ... done > ## Resolve future #4 > message(sprintf("y = %s\n", y)) [17:26:58.745] result() for ClusterFuture ... [17:26:58.745] receiveMessageFromWorker() for ClusterFuture ... [17:26:58.746] - Validating connection of MultisessionFuture [17:26:58.758] - received message: FutureResult [17:26:58.758] - Received FutureResult [17:26:58.759] - Erased future from FutureRegistry [17:26:58.759] result() for ClusterFuture ... [17:26:58.759] - result already collected: FutureResult [17:26:58.759] result() for ClusterFuture ... done [17:26:58.759] receiveMessageFromWorker() for ClusterFuture ... done [17:26:58.759] result() for ClusterFuture ... done [17:26:58.759] result() for ClusterFuture ... [17:26:58.760] - result already collected: FutureResult [17:26:58.760] result() for ClusterFuture ... done y = 5 > > message("*** Tricky use cases related to globals (part 2) ... DONE") *** Tricky use cases related to globals (part 2) ... DONE > > ## Cleanup > setTimeLimit() > source("incl/end.R") [17:26:58.761] plan(): Setting new future strategy stack: [17:26:58.761] List of future strategies: [17:26:58.761] 1. FutureStrategy: [17:26:58.761] - args: function (..., envir = parent.frame(), workers = "") [17:26:58.761] - tweaked: FALSE [17:26:58.761] - call: future::plan(oplan) [17:26:58.762] plan(): nbrOfWorkers() = 1 Failed to undo environment variables: - Expected environment variables: [n=204] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', 'BIBINPUTS', 'BINDIR', 'BSTINPUTS', 'COMMONPROGRAMFILES', 'COMPUTERNAME', 'COMSPEC', 'CURL_CA_BUNDLE', 'CYGWIN', 'CommonProgramFiles(x86)', 'CommonProgramW6432', 'DriverData', 'HOME', 'HOMEDRIVE', 'HOMEPATH', 'JAGS_ROOT', 'JAVA_HOME', 'LANGUAGE', 'LC_COLLATE', 'LC_MONETARY', 'LC_TIME', 'LOCALAPPDATA', 'LOGONSERVER', 'LS_HOME', 'LS_LICENSE_PATH', 'MAKE', 'MAKEFLAGS', 'MAKELEVEL', 'MFLAGS', 'MSMPI_BENCHMARKS', 'MSMPI_BIN', 'MSYS2_ENV_CONV_EXCL', 'NUMBER_OF_PROCESSORS', 'OCL', 'OMP_THREAD_LIMIT', 'OS', 'PATH', 'PATHEXT', 'PROCESSOR_ARCHITECTURE', 'PROCESSOR_IDENTIFIER', 'PROCESSOR_LEVEL', 'PROCESSOR_REVISION', 'PROGRAMFILES', 'PROMPT', 'PSModulePath', 'PUBLIC', 'PWD', 'ProgramData', 'ProgramFiles(x86)', 'ProgramW6432', 'RTOOLS43_HOME', 'RTOOLS44_HOME', 'R_ARCH', 'R_BROWSER', 'R_BZIPCMD', 'R_CMD', 'R_COMPILED_BY', 'R_CRAN_WEB', 'R_CUSTOM_TOOLS_PATH', 'R_CUSTOM_TOOLS_SOFT', 'R_DOC_DIR', 'R_ENVIRON_USER', 'R_GSCMD', 'R_GZIPCMD', 'R_HOME', 'R_INCLUDE_DIR', 'R_INSTALL_TAR', 'R_LIBS', 'R_LIBS_SITE', 'R_LIBS_USER', 'R_MAX_NUM_DLLS', 'R_OSTYPE', 'R_PAPERSIZE', 'R_PAPERSIZE_USER', 'R_PARALLELLY_MAKENODEPSOCK_AUTOKILL', 'R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT', 'R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL', 'R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS', 'R_PARALLELLY_MAKENODEPSOCK_TIMEOUT', 'R_PARALLELLY_RANDOM_PORTS', 'R_PARALLEL_PORT', 'R_RD4PDF', 'R_RTOOLS44_PATH', 'R_SCRIPT_LEGACY', 'R_SHARE_DIR', 'R_TESTS', 'R_UNZIPCMD', 'R_USER', 'R_VERSION', 'R_ZIPCMD', 'SED', 'SHLVL', 'SYSTEMDRIVE', 'SYSTEMROOT', 'TAR', 'TAR_OPTIONS', 'TEMP', 'TERM', 'TEXINPUTS', 'TMP', 'TMPDIR', 'USERDOMAIN', 'USERDOMAIN_ROAMINGPROFILE', 'USERNAME', 'USERPROFILE', 'WINDIR', '_', '_R_CHECK_AUTOCONF_', '_R_CHECK_BOGUS_RETURN_', '_R_CHECK_BROWSER_NONINTERACTIVE_', '_R_CHECK_BUILD_VIGNETTES_SEPARATELY_', '_R_CHECK_CODETOOLS_PROFILE_', '_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_', '_R_CHECK_CODE_ATTACH_', '_R_CHECK_CODE_CLASS_IS_STRING_', '_R_CHECK_CODE_DATA_INTO_GLOBALENV_', '_R_CHECK_CODE_USAGE_VIA_NAMESPACES_', '_R_CHECK_CODE_USAGE_WITHOUT_LOADING_', '_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_', '_R_CHECK_CODOC_VARIABLES_IN_USAGES_', '_R_CHECK_COMPACT_DATA2_', '_R_CHECK_COMPILATION_FLAGS_', '_R_CHECK_CONNECTIONS_LEFT_OPEN_', '_R_CHECK_CRAN_INCOMING_', '_R_CHECK_CRAN_INCOMING_CHECK_FILE_URIS_', '_R_CHECK_CRAN_INCOMING_CHECK_URLS_IN_PARALLEL_', '_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_', '_R_CHECK_CRAN_INCOMING_REMOTE_', '_R_CHECK_CRAN_INCOMING_USE_ASPELL_', '_R_CHECK_DATALIST_', '_R_CHECK_DEPRECATED_DEFUNCT_', '_R_CHECK_DOC_SIZES2_', '_R_CHECK_DOT_FIRSTLIB_', '_R_CHECK_DOT_INTERNAL_', '_R_CHECK_EXAMPLE_TIMING_THRESHOLD_', '_R_CHECK_EXECUTABLES_', '_R_CHECK_EXECUTABLES_EXCLUSIONS_', '_R_CHECK_FF_CALLS_', '_R_CHECK_FF_DUP_', '_R_CHECK_FORCE_SUGGESTS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_LEEWAY_', '_R_CHECK_HAVE_MYSQL_', '_R_CHECK_HAVE_ODBC_', '_R_CHECK_HAVE_PERL_', '_R_CHECK_HAVE_POSTGRES_', '_R_CHECK_INSTALL_DEPENDS_', '_R_CHECK_INTERNALS2_', '_R_CHECK_LENGTH_1_CONDITION_', '_R_CHECK_LICENSE_', '_R_CHECK_LIMIT_CORES_', '_R_CHECK_MATRIX_DATA_', '_R_CHECK_MBCS_CONVERSION_FAILURE_', '_R_CHECK_NATIVE_ROUTINE_REGISTRATION_', '_R_CHECK_NEWS_IN_PLAIN_TEXT_', '_R_CHECK_NO_RECOMMENDED_', '_R_CHECK_NO_STOP_ON_TEST_ERROR_', '_R_CHECK_ORPHANED_', '_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_', '_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_', '_R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_', '_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_', '_R_CHECK_PACKAGE_NAME_', '_R_CHECK_PKG_SIZES_', '_R_CHECK_PKG_SIZES_THRESHOLD_', '_R_CHECK_PRAGMAS_', '_R_CHECK_RD_EXAMPLES_T_AND_F_', '_R_CHECK_RD_LINE_WIDTHS_', '_R_CHECK_RD_MATH_RENDERING_', '_R_CHECK_RD_NOTE_LOST_BRACES_', '_R_CHECK_RD_VALIDATE_RD2HTML_', '_R_CHECK_REPLACING_IMPORTS_', '_R_CHECK_R_DEPENDS_', '_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_', '_R_CHECK_SCREEN_DEVICE_', '_R_CHECK_SERIALIZATION_', '_R_CHECK_SHLIB_OPENMP_FLAGS_', '_R_CHECK_SRC_MINUS_W_IMPLICIT_', '_R_CHECK_SUBDIRS_NOCASE_', '_R_CHECK_SUGGESTS_ONLY_', '_R_CHECK_SYSTEM_CLOCK_', '_R_CHECK_TESTS_NLINES_', '_R_CHECK_TEST_TIMING_', '_R_CHECK_TIMINGS_', '_R_CHECK_TOPLEVEL_FILES_', '_R_CHECK_UNDOC_USE_ALL_NAMES_', '_R_CHECK_UNSAFE_CALLS_', '_R_CHECK_URLS_SHOW_301_STATUS_', '_R_CHECK_VC_DIRS_', '_R_CHECK_VIGNETTES_NLINES_', '_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_', '_R_CHECK_VIGNETTE_TIMING_', '_R_CHECK_VIGNETTE_TITLES_', '_R_CHECK_WINDOWS_DEVICE_', '_R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_', '_R_CLASS_MATRIX_ARRAY_', '_R_DEPRECATED_IS_R_', '_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_', '_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_', '__R_CHECK_DOC_FILES_NOTE_IF_ALL_SPECIAL__', 'maj.version', 'nextArg--timingsnextArg--install' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: List of 3 $ name : chr "MAKEFLAGS" $ expected: 'Dlist' chr "" $ actual : 'Dlist' chr NA > > proc.time() user system elapsed 0.48 0.10 1.46