R Under development (unstable) (2023-06-30 r84625 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 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") [18:01:54.199] plan(): Setting new future strategy stack: [18:01:54.200] List of future strategies: [18:01:54.200] 1. sequential: [18:01:54.200] - args: function (..., envir = parent.frame()) [18:01:54.200] - tweaked: FALSE [18:01:54.200] - call: future::plan("sequential") [18:01:54.216] 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) [18:01:54.229] plan(): Setting new future strategy stack: [18:01:54.229] List of future strategies: [18:01:54.229] 1. multisession: [18:01:54.229] - args: function (..., workers = 2L, envir = parent.frame()) [18:01:54.229] - tweaked: TRUE [18:01:54.229] - call: plan(multisession, workers = 2L) [18:01:54.242] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... [18:01:54.242] multisession: [18:01:54.242] - args: function (..., workers = 2L, envir = parent.frame()) [18:01:54.242] - tweaked: TRUE [18:01:54.242] - call: plan(multisession, workers = 2L) Warning: 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' [18:01:54.244] getGlobalsAndPackages() ... [18:01:54.245] Not searching for globals [18:01:54.245] - globals: [0] [18:01:54.245] getGlobalsAndPackages() ... DONE [18:01:54.246] [local output] makeClusterPSOCK() ... [18:01:54.272] [local output] Workers: [n = 2] 'localhost', 'localhost' [18:01:54.279] [local output] Base port: 24117 [18:01:54.279] [local output] Getting setup options for 2 cluster nodes ... [18:01:54.279] [local output] - Node 1 of 2 ... [18:01:54.280] [local output] localMachine=TRUE => revtunnel=FALSE [18:01:54.281] Testing if worker's PID can be inferred: '"D:/RCompile/recent/R/bin/x64/Rscript" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpqASyHg/worker.rank=1.parallelly.parent=38876.97dc2f1f17c.pid\")), silent = TRUE)" -e "file.exists(\"D:/temp/RtmpqASyHg/worker.rank=1.parallelly.parent=38876.97dc2f1f17c.pid\")"' [18:01:54.617] - Possible to infer worker's PID: TRUE [18:01:54.617] [local output] Rscript port: 24117 [18:01:54.618] [local output] - Node 2 of 2 ... [18:01:54.618] [local output] localMachine=TRUE => revtunnel=FALSE [18:01:54.620] [local output] Rscript port: 24117 [18:01:54.620] [local output] Getting setup options for 2 cluster nodes ... done [18:01:54.620] [local output] - Parallel setup requested for some PSOCK nodes [18:01:54.621] [local output] Setting up PSOCK nodes in parallel [18:01:54.621] List of 36 [18:01:54.621] $ worker : chr "localhost" [18:01:54.621] ..- attr(*, "localhost")= logi TRUE [18:01:54.621] $ master : chr "localhost" [18:01:54.621] $ port : int 24117 [18:01:54.621] $ connectTimeout : num 120 [18:01:54.621] $ timeout : num 120 [18:01:54.621] $ rscript : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\"" [18:01:54.621] $ homogeneous : logi TRUE [18:01:54.621] $ rscript_args : chr "--default-packages=datasets,utils,grDevices,graphics,stats,methods -e \"#label=globals,resolve.R:38876:CRANWIN3"| __truncated__ [18:01:54.621] $ rscript_envs : NULL [18:01:54.621] $ rscript_libs : chr [1:2] "D:/temp/Rtmp67Lu9b/RLIBS_19fe819742e2c" "D:/RCompile/recent/R/library" [18:01:54.621] $ rscript_startup : NULL [18:01:54.621] $ rscript_sh : chr "cmd" [18:01:54.621] $ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [18:01:54.621] $ methods : logi TRUE [18:01:54.621] $ socketOptions : chr "no-delay" [18:01:54.621] $ useXDR : logi FALSE [18:01:54.621] $ outfile : chr "/dev/null" [18:01:54.621] $ renice : int NA [18:01:54.621] $ rshcmd : NULL [18:01:54.621] $ user : chr(0) [18:01:54.621] $ revtunnel : logi FALSE [18:01:54.621] $ rshlogfile : NULL [18:01:54.621] $ rshopts : chr(0) [18:01:54.621] $ rank : int 1 [18:01:54.621] $ manual : logi FALSE [18:01:54.621] $ dryrun : logi FALSE [18:01:54.621] $ quiet : logi FALSE [18:01:54.621] $ setup_strategy : chr "parallel" [18:01:54.621] $ local_cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [18:01:54.621] $ pidfile : chr "D:/temp/RtmpqASyHg/worker.rank=1.parallelly.parent=38876.97dc2f1f17c.pid" [18:01:54.621] $ rshcmd_label : NULL [18:01:54.621] $ rsh_call : NULL [18:01:54.621] $ cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [18:01:54.621] $ localMachine : logi TRUE [18:01:54.621] $ make_fcn :function (worker = getOption2("parallelly.localhost.hostname", "localhost"), [18:01:54.621] master = NULL, port, connectTimeout = getOption2("parallelly.makeNodePSOCK.connectTimeout", [18:01:54.621] 2 * 60), timeout = getOption2("parallelly.makeNodePSOCK.timeout", [18:01:54.621] 30 * 24 * 60 * 60), rscript = NULL, homogeneous = NULL, rscript_args = NULL, [18:01:54.621] rscript_envs = NULL, rscript_libs = NULL, rscript_startup = NULL, rscript_sh = c("auto", [18:01:54.621] "cmd", "sh"), default_packages = c("datasets", "utils", "grDevices", [18:01:54.621] "graphics", "stats", if (methods) "methods"), methods = TRUE, socketOptions = getOption2("parallelly.makeNodePSOCK.socketOptions", [18:01:54.621] "no-delay"), useXDR = getOption2("parallelly.makeNodePSOCK.useXDR", [18:01:54.621] FALSE), outfile = "/dev/null", renice = NA_integer_, rshcmd = getOption2("parallelly.makeNodePSOCK.rshcmd", [18:01:54.621] NULL), user = NULL, revtunnel = NA, rshlogfile = NULL, rshopts = getOption2("parallelly.makeNodePSOCK.rshopts", [18:01:54.621] NULL), rank = 1L, manual = FALSE, dryrun = FALSE, quiet = FALSE, [18:01:54.621] setup_strategy = getOption2("parallelly.makeNodePSOCK.setup_strategy", [18:01:54.621] "parallel"), action = c("launch", "options"), verbose = FALSE) [18:01:54.621] $ arguments :List of 28 [18:01:54.621] ..$ worker : chr "localhost" [18:01:54.621] ..$ master : NULL [18:01:54.621] ..$ port : int 24117 [18:01:54.621] ..$ connectTimeout : num 120 [18:01:54.621] ..$ timeout : num 120 [18:01:54.621] ..$ rscript : NULL [18:01:54.621] ..$ homogeneous : NULL [18:01:54.621] ..$ rscript_args : NULL [18:01:54.621] ..$ rscript_envs : NULL [18:01:54.621] ..$ rscript_libs : chr [1:2] "D:/temp/Rtmp67Lu9b/RLIBS_19fe819742e2c" "D:/RCompile/recent/R/library" [18:01:54.621] ..$ rscript_startup : NULL [18:01:54.621] ..$ rscript_sh : chr [1:3] "auto" "cmd" "sh" [18:01:54.621] ..$ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [18:01:54.621] ..$ methods : logi TRUE [18:01:54.621] ..$ socketOptions : chr "no-delay" [18:01:54.621] ..$ useXDR : logi FALSE [18:01:54.621] ..$ outfile : chr "/dev/null" [18:01:54.621] ..$ renice : int NA [18:01:54.621] ..$ rshcmd : NULL [18:01:54.621] ..$ user : NULL [18:01:54.621] ..$ revtunnel : logi NA [18:01:54.621] ..$ rshlogfile : NULL [18:01:54.621] ..$ rshopts : NULL [18:01:54.621] ..$ rank : int 1 [18:01:54.621] ..$ manual : logi FALSE [18:01:54.621] ..$ dryrun : logi FALSE [18:01:54.621] ..$ quiet : logi FALSE [18:01:54.621] ..$ setup_strategy : chr "parallel" [18:01:54.621] - attr(*, "class")= chr [1:2] "makeNodePSOCKOptions" "makeNodeOptions" [18:01:54.645] [local output] System call to launch all workers: [18:01:54.646] [local output] "D:/RCompile/recent/R/bin/x64/Rscript" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "#label=globals,resolve.R:38876:CRANWIN3:CRAN" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpqASyHg/worker.rank=1.parallelly.parent=38876.97dc2f1f17c.pid\")), silent = TRUE)" -e "options(socketOptions = \"no-delay\")" -e ".libPaths(c(\"D:/temp/Rtmp67Lu9b/RLIBS_19fe819742e2c\",\"D:/RCompile/recent/R/library\"))" -e "workRSOCK <- tryCatch(parallel:::.workRSOCK, error=function(e) parallel:::.slaveRSOCK); workRSOCK()" MASTER=localhost PORT=24117 OUT=/dev/null TIMEOUT=120 XDR=FALSE SETUPTIMEOUT=120 SETUPSTRATEGY=parallel [18:01:54.646] [local output] Starting PSOCK main server [18:01:54.654] [local output] Workers launched [18:01:54.654] [local output] Waiting for workers to connect back [18:01:54.655] - [local output] 0 workers out of 2 ready [18:01:54.833] - [local output] 0 workers out of 2 ready [18:01:54.834] - [local output] 1 workers out of 2 ready [18:01:54.834] - [local output] 2 workers out of 2 ready [18:01:54.834] [local output] Launching of workers completed [18:01:54.835] [local output] Collecting session information from workers [18:01:54.835] [local output] - Worker #1 of 2 [18:01:54.836] [local output] - Worker #2 of 2 [18:01:54.836] [local output] makeClusterPSOCK() ... done [18:01:54.851] Packages needed by the future expression (n = 0): [18:01:54.851] Packages needed by future strategies (n = 0): [18:01:54.852] { [18:01:54.852] { [18:01:54.852] { [18:01:54.852] ...future.startTime <- base::Sys.time() [18:01:54.852] { [18:01:54.852] { [18:01:54.852] { [18:01:54.852] { [18:01:54.852] base::local({ [18:01:54.852] has_future <- base::requireNamespace("future", [18:01:54.852] quietly = TRUE) [18:01:54.852] if (has_future) { [18:01:54.852] ns <- base::getNamespace("future") [18:01:54.852] version <- ns[[".package"]][["version"]] [18:01:54.852] if (is.null(version)) [18:01:54.852] version <- utils::packageVersion("future") [18:01:54.852] } [18:01:54.852] else { [18:01:54.852] version <- NULL [18:01:54.852] } [18:01:54.852] if (!has_future || version < "1.8.0") { [18:01:54.852] info <- base::c(r_version = base::gsub("R version ", [18:01:54.852] "", base::R.version$version.string), [18:01:54.852] platform = base::sprintf("%s (%s-bit)", [18:01:54.852] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [18:01:54.852] os = base::paste(base::Sys.info()[base::c("sysname", [18:01:54.852] "release", "version")], collapse = " "), [18:01:54.852] hostname = base::Sys.info()[["nodename"]]) [18:01:54.852] info <- base::sprintf("%s: %s", base::names(info), [18:01:54.852] info) [18:01:54.852] info <- base::paste(info, collapse = "; ") [18:01:54.852] if (!has_future) { [18:01:54.852] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [18:01:54.852] info) [18:01:54.852] } [18:01:54.852] else { [18:01:54.852] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [18:01:54.852] info, version) [18:01:54.852] } [18:01:54.852] base::stop(msg) [18:01:54.852] } [18:01:54.852] }) [18:01:54.852] } [18:01:54.852] ...future.mc.cores.old <- base::getOption("mc.cores") [18:01:54.852] base::options(mc.cores = 1L) [18:01:54.852] } [18:01:54.852] options(future.plan = NULL) [18:01:54.852] Sys.unsetenv("R_FUTURE_PLAN") [18:01:54.852] future::plan("default", .cleanup = FALSE, .init = FALSE) [18:01:54.852] } [18:01:54.852] ...future.workdir <- getwd() [18:01:54.852] } [18:01:54.852] ...future.oldOptions <- base::as.list(base::.Options) [18:01:54.852] ...future.oldEnvVars <- base::Sys.getenv() [18:01:54.852] } [18:01:54.852] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [18:01:54.852] future.globals.maxSize = NULL, future.globals.method = NULL, [18:01:54.852] future.globals.onMissing = NULL, future.globals.onReference = NULL, [18:01:54.852] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [18:01:54.852] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [18:01:54.852] future.stdout.windows.reencode = NULL, width = 80L) [18:01:54.852] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [18:01:54.852] base::names(...future.oldOptions)) [18:01:54.852] } [18:01:54.852] if (FALSE) { [18:01:54.852] } [18:01:54.852] else { [18:01:54.852] if (TRUE) { [18:01:54.852] ...future.stdout <- base::rawConnection(base::raw(0L), [18:01:54.852] open = "w") [18:01:54.852] } [18:01:54.852] else { [18:01:54.852] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [18:01:54.852] windows = "NUL", "/dev/null"), open = "w") [18:01:54.852] } [18:01:54.852] base::sink(...future.stdout, type = "output", split = FALSE) [18:01:54.852] base::on.exit(if (!base::is.null(...future.stdout)) { [18:01:54.852] base::sink(type = "output", split = FALSE) [18:01:54.852] base::close(...future.stdout) [18:01:54.852] }, add = TRUE) [18:01:54.852] } [18:01:54.852] ...future.frame <- base::sys.nframe() [18:01:54.852] ...future.conditions <- base::list() [18:01:54.852] ...future.rng <- base::globalenv()$.Random.seed [18:01:54.852] if (FALSE) { [18:01:54.852] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [18:01:54.852] "...future.value", "...future.globalenv.names", ".Random.seed") [18:01:54.852] } [18:01:54.852] ...future.result <- base::tryCatch({ [18:01:54.852] base::withCallingHandlers({ [18:01:54.852] ...future.value <- base::withVisible(base::local({ [18:01:54.852] ...future.makeSendCondition <- local({ [18:01:54.852] sendCondition <- NULL [18:01:54.852] function(frame = 1L) { [18:01:54.852] if (is.function(sendCondition)) [18:01:54.852] return(sendCondition) [18:01:54.852] ns <- getNamespace("parallel") [18:01:54.852] if (exists("sendData", mode = "function", [18:01:54.852] envir = ns)) { [18:01:54.852] parallel_sendData <- get("sendData", mode = "function", [18:01:54.852] envir = ns) [18:01:54.852] envir <- sys.frame(frame) [18:01:54.852] master <- NULL [18:01:54.852] while (!identical(envir, .GlobalEnv) && [18:01:54.852] !identical(envir, emptyenv())) { [18:01:54.852] if (exists("master", mode = "list", envir = envir, [18:01:54.852] inherits = FALSE)) { [18:01:54.852] master <- get("master", mode = "list", [18:01:54.852] envir = envir, inherits = FALSE) [18:01:54.852] if (inherits(master, c("SOCKnode", [18:01:54.852] "SOCK0node"))) { [18:01:54.852] sendCondition <<- function(cond) { [18:01:54.852] data <- list(type = "VALUE", value = cond, [18:01:54.852] success = TRUE) [18:01:54.852] parallel_sendData(master, data) [18:01:54.852] } [18:01:54.852] return(sendCondition) [18:01:54.852] } [18:01:54.852] } [18:01:54.852] frame <- frame + 1L [18:01:54.852] envir <- sys.frame(frame) [18:01:54.852] } [18:01:54.852] } [18:01:54.852] sendCondition <<- function(cond) NULL [18:01:54.852] } [18:01:54.852] }) [18:01:54.852] withCallingHandlers({ [18:01:54.852] NA [18:01:54.852] }, immediateCondition = function(cond) { [18:01:54.852] sendCondition <- ...future.makeSendCondition() [18:01:54.852] sendCondition(cond) [18:01:54.852] muffleCondition <- function (cond, pattern = "^muffle") [18:01:54.852] { [18:01:54.852] inherits <- base::inherits [18:01:54.852] invokeRestart <- base::invokeRestart [18:01:54.852] is.null <- base::is.null [18:01:54.852] muffled <- FALSE [18:01:54.852] if (inherits(cond, "message")) { [18:01:54.852] muffled <- grepl(pattern, "muffleMessage") [18:01:54.852] if (muffled) [18:01:54.852] invokeRestart("muffleMessage") [18:01:54.852] } [18:01:54.852] else if (inherits(cond, "warning")) { [18:01:54.852] muffled <- grepl(pattern, "muffleWarning") [18:01:54.852] if (muffled) [18:01:54.852] invokeRestart("muffleWarning") [18:01:54.852] } [18:01:54.852] else if (inherits(cond, "condition")) { [18:01:54.852] if (!is.null(pattern)) { [18:01:54.852] computeRestarts <- base::computeRestarts [18:01:54.852] grepl <- base::grepl [18:01:54.852] restarts <- computeRestarts(cond) [18:01:54.852] for (restart in restarts) { [18:01:54.852] name <- restart$name [18:01:54.852] if (is.null(name)) [18:01:54.852] next [18:01:54.852] if (!grepl(pattern, name)) [18:01:54.852] next [18:01:54.852] invokeRestart(restart) [18:01:54.852] muffled <- TRUE [18:01:54.852] break [18:01:54.852] } [18:01:54.852] } [18:01:54.852] } [18:01:54.852] invisible(muffled) [18:01:54.852] } [18:01:54.852] muffleCondition(cond) [18:01:54.852] }) [18:01:54.852] })) [18:01:54.852] future::FutureResult(value = ...future.value$value, [18:01:54.852] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [18:01:54.852] ...future.rng), globalenv = if (FALSE) [18:01:54.852] list(added = base::setdiff(base::names(base::.GlobalEnv), [18:01:54.852] ...future.globalenv.names)) [18:01:54.852] else NULL, started = ...future.startTime, version = "1.8") [18:01:54.852] }, condition = base::local({ [18:01:54.852] c <- base::c [18:01:54.852] inherits <- base::inherits [18:01:54.852] invokeRestart <- base::invokeRestart [18:01:54.852] length <- base::length [18:01:54.852] list <- base::list [18:01:54.852] seq.int <- base::seq.int [18:01:54.852] signalCondition <- base::signalCondition [18:01:54.852] sys.calls <- base::sys.calls [18:01:54.852] `[[` <- base::`[[` [18:01:54.852] `+` <- base::`+` [18:01:54.852] `<<-` <- base::`<<-` [18:01:54.852] sysCalls <- function(calls = sys.calls(), from = 1L) { [18:01:54.852] calls[seq.int(from = from + 12L, to = length(calls) - [18:01:54.852] 3L)] [18:01:54.852] } [18:01:54.852] function(cond) { [18:01:54.852] is_error <- inherits(cond, "error") [18:01:54.852] ignore <- !is_error && !is.null(NULL) && inherits(cond, [18:01:54.852] NULL) [18:01:54.852] if (is_error) { [18:01:54.852] sessionInformation <- function() { [18:01:54.852] list(r = base::R.Version(), locale = base::Sys.getlocale(), [18:01:54.852] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [18:01:54.852] search = base::search(), system = base::Sys.info()) [18:01:54.852] } [18:01:54.852] ...future.conditions[[length(...future.conditions) + [18:01:54.852] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [18:01:54.852] cond$call), session = sessionInformation(), [18:01:54.852] timestamp = base::Sys.time(), signaled = 0L) [18:01:54.852] signalCondition(cond) [18:01:54.852] } [18:01:54.852] else if (!ignore && TRUE && inherits(cond, c("condition", [18:01:54.852] "immediateCondition"))) { [18:01:54.852] signal <- TRUE && inherits(cond, "immediateCondition") [18:01:54.852] ...future.conditions[[length(...future.conditions) + [18:01:54.852] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [18:01:54.852] if (TRUE && !signal) { [18:01:54.852] muffleCondition <- function (cond, pattern = "^muffle") [18:01:54.852] { [18:01:54.852] inherits <- base::inherits [18:01:54.852] invokeRestart <- base::invokeRestart [18:01:54.852] is.null <- base::is.null [18:01:54.852] muffled <- FALSE [18:01:54.852] if (inherits(cond, "message")) { [18:01:54.852] muffled <- grepl(pattern, "muffleMessage") [18:01:54.852] if (muffled) [18:01:54.852] invokeRestart("muffleMessage") [18:01:54.852] } [18:01:54.852] else if (inherits(cond, "warning")) { [18:01:54.852] muffled <- grepl(pattern, "muffleWarning") [18:01:54.852] if (muffled) [18:01:54.852] invokeRestart("muffleWarning") [18:01:54.852] } [18:01:54.852] else if (inherits(cond, "condition")) { [18:01:54.852] if (!is.null(pattern)) { [18:01:54.852] computeRestarts <- base::computeRestarts [18:01:54.852] grepl <- base::grepl [18:01:54.852] restarts <- computeRestarts(cond) [18:01:54.852] for (restart in restarts) { [18:01:54.852] name <- restart$name [18:01:54.852] if (is.null(name)) [18:01:54.852] next [18:01:54.852] if (!grepl(pattern, name)) [18:01:54.852] next [18:01:54.852] invokeRestart(restart) [18:01:54.852] muffled <- TRUE [18:01:54.852] break [18:01:54.852] } [18:01:54.852] } [18:01:54.852] } [18:01:54.852] invisible(muffled) [18:01:54.852] } [18:01:54.852] muffleCondition(cond, pattern = "^muffle") [18:01:54.852] } [18:01:54.852] } [18:01:54.852] else { [18:01:54.852] if (TRUE) { [18:01:54.852] muffleCondition <- function (cond, pattern = "^muffle") [18:01:54.852] { [18:01:54.852] inherits <- base::inherits [18:01:54.852] invokeRestart <- base::invokeRestart [18:01:54.852] is.null <- base::is.null [18:01:54.852] muffled <- FALSE [18:01:54.852] if (inherits(cond, "message")) { [18:01:54.852] muffled <- grepl(pattern, "muffleMessage") [18:01:54.852] if (muffled) [18:01:54.852] invokeRestart("muffleMessage") [18:01:54.852] } [18:01:54.852] else if (inherits(cond, "warning")) { [18:01:54.852] muffled <- grepl(pattern, "muffleWarning") [18:01:54.852] if (muffled) [18:01:54.852] invokeRestart("muffleWarning") [18:01:54.852] } [18:01:54.852] else if (inherits(cond, "condition")) { [18:01:54.852] if (!is.null(pattern)) { [18:01:54.852] computeRestarts <- base::computeRestarts [18:01:54.852] grepl <- base::grepl [18:01:54.852] restarts <- computeRestarts(cond) [18:01:54.852] for (restart in restarts) { [18:01:54.852] name <- restart$name [18:01:54.852] if (is.null(name)) [18:01:54.852] next [18:01:54.852] if (!grepl(pattern, name)) [18:01:54.852] next [18:01:54.852] invokeRestart(restart) [18:01:54.852] muffled <- TRUE [18:01:54.852] break [18:01:54.852] } [18:01:54.852] } [18:01:54.852] } [18:01:54.852] invisible(muffled) [18:01:54.852] } [18:01:54.852] muffleCondition(cond, pattern = "^muffle") [18:01:54.852] } [18:01:54.852] } [18:01:54.852] } [18:01:54.852] })) [18:01:54.852] }, error = function(ex) { [18:01:54.852] base::structure(base::list(value = NULL, visible = NULL, [18:01:54.852] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [18:01:54.852] ...future.rng), started = ...future.startTime, [18:01:54.852] finished = Sys.time(), session_uuid = NA_character_, [18:01:54.852] version = "1.8"), class = "FutureResult") [18:01:54.852] }, finally = { [18:01:54.852] if (!identical(...future.workdir, getwd())) [18:01:54.852] setwd(...future.workdir) [18:01:54.852] { [18:01:54.852] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [18:01:54.852] ...future.oldOptions$nwarnings <- NULL [18:01:54.852] } [18:01:54.852] base::options(...future.oldOptions) [18:01:54.852] if (.Platform$OS.type == "windows") { [18:01:54.852] old_names <- names(...future.oldEnvVars) [18:01:54.852] envs <- base::Sys.getenv() [18:01:54.852] names <- names(envs) [18:01:54.852] common <- intersect(names, old_names) [18:01:54.852] added <- setdiff(names, old_names) [18:01:54.852] removed <- setdiff(old_names, names) [18:01:54.852] changed <- common[...future.oldEnvVars[common] != [18:01:54.852] envs[common]] [18:01:54.852] NAMES <- toupper(changed) [18:01:54.852] args <- list() [18:01:54.852] for (kk in seq_along(NAMES)) { [18:01:54.852] name <- changed[[kk]] [18:01:54.852] NAME <- NAMES[[kk]] [18:01:54.852] if (name != NAME && is.element(NAME, old_names)) [18:01:54.852] next [18:01:54.852] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:54.852] } [18:01:54.852] NAMES <- toupper(added) [18:01:54.852] for (kk in seq_along(NAMES)) { [18:01:54.852] name <- added[[kk]] [18:01:54.852] NAME <- NAMES[[kk]] [18:01:54.852] if (name != NAME && is.element(NAME, old_names)) [18:01:54.852] next [18:01:54.852] args[[name]] <- "" [18:01:54.852] } [18:01:54.852] NAMES <- toupper(removed) [18:01:54.852] for (kk in seq_along(NAMES)) { [18:01:54.852] name <- removed[[kk]] [18:01:54.852] NAME <- NAMES[[kk]] [18:01:54.852] if (name != NAME && is.element(NAME, old_names)) [18:01:54.852] next [18:01:54.852] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:54.852] } [18:01:54.852] if (length(args) > 0) [18:01:54.852] base::do.call(base::Sys.setenv, args = args) [18:01:54.852] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [18:01:54.852] } [18:01:54.852] else { [18:01:54.852] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [18:01:54.852] } [18:01:54.852] { [18:01:54.852] if (base::length(...future.futureOptionsAdded) > [18:01:54.852] 0L) { [18:01:54.852] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [18:01:54.852] base::names(opts) <- ...future.futureOptionsAdded [18:01:54.852] base::options(opts) [18:01:54.852] } [18:01:54.852] { [18:01:54.852] { [18:01:54.852] base::options(mc.cores = ...future.mc.cores.old) [18:01:54.852] NULL [18:01:54.852] } [18:01:54.852] options(future.plan = NULL) [18:01:54.852] if (is.na(NA_character_)) [18:01:54.852] Sys.unsetenv("R_FUTURE_PLAN") [18:01:54.852] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [18:01:54.852] future::plan(list(function (..., workers = 2L, [18:01:54.852] envir = parent.frame()) [18:01:54.852] strategy(..., workers = workers, envir = envir)), [18:01:54.852] .cleanup = FALSE, .init = FALSE) [18:01:54.852] } [18:01:54.852] } [18:01:54.852] } [18:01:54.852] }) [18:01:54.852] if (TRUE) { [18:01:54.852] base::sink(type = "output", split = FALSE) [18:01:54.852] if (TRUE) { [18:01:54.852] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [18:01:54.852] } [18:01:54.852] else { [18:01:54.852] ...future.result["stdout"] <- base::list(NULL) [18:01:54.852] } [18:01:54.852] base::close(...future.stdout) [18:01:54.852] ...future.stdout <- NULL [18:01:54.852] } [18:01:54.852] ...future.result$conditions <- ...future.conditions [18:01:54.852] ...future.result$finished <- base::Sys.time() [18:01:54.852] ...future.result [18:01:54.852] } [18:01:54.940] MultisessionFuture started [18:01:54.941] result() for ClusterFuture ... [18:01:54.941] receiveMessageFromWorker() for ClusterFuture ... [18:01:54.942] - Validating connection of MultisessionFuture [18:01:54.994] - received message: FutureResult [18:01:54.995] - Received FutureResult [18:01:54.998] - Erased future from FutureRegistry [18:01:54.999] result() for ClusterFuture ... [18:01:54.999] - result already collected: FutureResult [18:01:54.999] result() for ClusterFuture ... done [18:01:54.999] receiveMessageFromWorker() for ClusterFuture ... done [18:01:55.000] result() for ClusterFuture ... done [18:01:55.000] result() for ClusterFuture ... [18:01:55.000] - result already collected: FutureResult [18:01:55.000] result() for ClusterFuture ... done [18:01:55.000] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE [18:01:55.001] plan(): nbrOfWorkers() = 2 > > env <- new.env() > > ## Create future #1 (consumes background process #1) > env$a %<-% { 5 } Warning: 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' [18:01:55.003] getGlobalsAndPackages() ... [18:01:55.003] Searching for globals... [18:01:55.008] - globals found: [1] '{' [18:01:55.008] Searching for globals ... DONE [18:01:55.008] Resolving globals: TRUE [18:01:55.008] Resolving any globals that are futures ... [18:01:55.008] - globals: [1] '{' [18:01:55.009] Resolving any globals that are futures ... DONE [18:01:55.009] [18:01:55.010] [18:01:55.010] getGlobalsAndPackages() ... DONE [18:01:55.010] run() for 'Future' ... [18:01:55.011] - state: 'created' [18:01:55.011] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [18:01:55.023] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [18:01:55.023] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [18:01:55.023] - Field: 'node' [18:01:55.024] - Field: 'label' [18:01:55.024] - Field: 'local' [18:01:55.024] - Field: 'owner' [18:01:55.024] - Field: 'envir' [18:01:55.024] - Field: 'workers' [18:01:55.025] - Field: 'packages' [18:01:55.025] - Field: 'gc' [18:01:55.025] - Field: 'conditions' [18:01:55.025] - Field: 'persistent' [18:01:55.025] - Field: 'expr' [18:01:55.025] - Field: 'uuid' [18:01:55.026] - Field: 'seed' [18:01:55.026] - Field: 'version' [18:01:55.026] - Field: 'result' [18:01:55.026] - Field: 'asynchronous' [18:01:55.026] - Field: 'calls' [18:01:55.027] - Field: 'globals' [18:01:55.027] - Field: 'stdout' [18:01:55.027] - Field: 'earlySignal' [18:01:55.027] - Field: 'lazy' [18:01:55.027] - Field: 'state' [18:01:55.028] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [18:01:55.028] - Launch lazy future ... [18:01:55.028] Packages needed by the future expression (n = 0): [18:01:55.028] Packages needed by future strategies (n = 0): [18:01:55.029] { [18:01:55.029] { [18:01:55.029] { [18:01:55.029] ...future.startTime <- base::Sys.time() [18:01:55.029] { [18:01:55.029] { [18:01:55.029] { [18:01:55.029] { [18:01:55.029] base::local({ [18:01:55.029] has_future <- base::requireNamespace("future", [18:01:55.029] quietly = TRUE) [18:01:55.029] if (has_future) { [18:01:55.029] ns <- base::getNamespace("future") [18:01:55.029] version <- ns[[".package"]][["version"]] [18:01:55.029] if (is.null(version)) [18:01:55.029] version <- utils::packageVersion("future") [18:01:55.029] } [18:01:55.029] else { [18:01:55.029] version <- NULL [18:01:55.029] } [18:01:55.029] if (!has_future || version < "1.8.0") { [18:01:55.029] info <- base::c(r_version = base::gsub("R version ", [18:01:55.029] "", base::R.version$version.string), [18:01:55.029] platform = base::sprintf("%s (%s-bit)", [18:01:55.029] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [18:01:55.029] os = base::paste(base::Sys.info()[base::c("sysname", [18:01:55.029] "release", "version")], collapse = " "), [18:01:55.029] hostname = base::Sys.info()[["nodename"]]) [18:01:55.029] info <- base::sprintf("%s: %s", base::names(info), [18:01:55.029] info) [18:01:55.029] info <- base::paste(info, collapse = "; ") [18:01:55.029] if (!has_future) { [18:01:55.029] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [18:01:55.029] info) [18:01:55.029] } [18:01:55.029] else { [18:01:55.029] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [18:01:55.029] info, version) [18:01:55.029] } [18:01:55.029] base::stop(msg) [18:01:55.029] } [18:01:55.029] }) [18:01:55.029] } [18:01:55.029] ...future.mc.cores.old <- base::getOption("mc.cores") [18:01:55.029] base::options(mc.cores = 1L) [18:01:55.029] } [18:01:55.029] options(future.plan = NULL) [18:01:55.029] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.029] future::plan("default", .cleanup = FALSE, .init = FALSE) [18:01:55.029] } [18:01:55.029] ...future.workdir <- getwd() [18:01:55.029] } [18:01:55.029] ...future.oldOptions <- base::as.list(base::.Options) [18:01:55.029] ...future.oldEnvVars <- base::Sys.getenv() [18:01:55.029] } [18:01:55.029] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [18:01:55.029] future.globals.maxSize = NULL, future.globals.method = NULL, [18:01:55.029] future.globals.onMissing = NULL, future.globals.onReference = NULL, [18:01:55.029] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [18:01:55.029] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [18:01:55.029] future.stdout.windows.reencode = NULL, width = 80L) [18:01:55.029] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [18:01:55.029] base::names(...future.oldOptions)) [18:01:55.029] } [18:01:55.029] if (FALSE) { [18:01:55.029] } [18:01:55.029] else { [18:01:55.029] if (TRUE) { [18:01:55.029] ...future.stdout <- base::rawConnection(base::raw(0L), [18:01:55.029] open = "w") [18:01:55.029] } [18:01:55.029] else { [18:01:55.029] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [18:01:55.029] windows = "NUL", "/dev/null"), open = "w") [18:01:55.029] } [18:01:55.029] base::sink(...future.stdout, type = "output", split = FALSE) [18:01:55.029] base::on.exit(if (!base::is.null(...future.stdout)) { [18:01:55.029] base::sink(type = "output", split = FALSE) [18:01:55.029] base::close(...future.stdout) [18:01:55.029] }, add = TRUE) [18:01:55.029] } [18:01:55.029] ...future.frame <- base::sys.nframe() [18:01:55.029] ...future.conditions <- base::list() [18:01:55.029] ...future.rng <- base::globalenv()$.Random.seed [18:01:55.029] if (FALSE) { [18:01:55.029] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [18:01:55.029] "...future.value", "...future.globalenv.names", ".Random.seed") [18:01:55.029] } [18:01:55.029] ...future.result <- base::tryCatch({ [18:01:55.029] base::withCallingHandlers({ [18:01:55.029] ...future.value <- base::withVisible(base::local({ [18:01:55.029] ...future.makeSendCondition <- local({ [18:01:55.029] sendCondition <- NULL [18:01:55.029] function(frame = 1L) { [18:01:55.029] if (is.function(sendCondition)) [18:01:55.029] return(sendCondition) [18:01:55.029] ns <- getNamespace("parallel") [18:01:55.029] if (exists("sendData", mode = "function", [18:01:55.029] envir = ns)) { [18:01:55.029] parallel_sendData <- get("sendData", mode = "function", [18:01:55.029] envir = ns) [18:01:55.029] envir <- sys.frame(frame) [18:01:55.029] master <- NULL [18:01:55.029] while (!identical(envir, .GlobalEnv) && [18:01:55.029] !identical(envir, emptyenv())) { [18:01:55.029] if (exists("master", mode = "list", envir = envir, [18:01:55.029] inherits = FALSE)) { [18:01:55.029] master <- get("master", mode = "list", [18:01:55.029] envir = envir, inherits = FALSE) [18:01:55.029] if (inherits(master, c("SOCKnode", [18:01:55.029] "SOCK0node"))) { [18:01:55.029] sendCondition <<- function(cond) { [18:01:55.029] data <- list(type = "VALUE", value = cond, [18:01:55.029] success = TRUE) [18:01:55.029] parallel_sendData(master, data) [18:01:55.029] } [18:01:55.029] return(sendCondition) [18:01:55.029] } [18:01:55.029] } [18:01:55.029] frame <- frame + 1L [18:01:55.029] envir <- sys.frame(frame) [18:01:55.029] } [18:01:55.029] } [18:01:55.029] sendCondition <<- function(cond) NULL [18:01:55.029] } [18:01:55.029] }) [18:01:55.029] withCallingHandlers({ [18:01:55.029] { [18:01:55.029] 5 [18:01:55.029] } [18:01:55.029] }, immediateCondition = function(cond) { [18:01:55.029] sendCondition <- ...future.makeSendCondition() [18:01:55.029] sendCondition(cond) [18:01:55.029] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.029] { [18:01:55.029] inherits <- base::inherits [18:01:55.029] invokeRestart <- base::invokeRestart [18:01:55.029] is.null <- base::is.null [18:01:55.029] muffled <- FALSE [18:01:55.029] if (inherits(cond, "message")) { [18:01:55.029] muffled <- grepl(pattern, "muffleMessage") [18:01:55.029] if (muffled) [18:01:55.029] invokeRestart("muffleMessage") [18:01:55.029] } [18:01:55.029] else if (inherits(cond, "warning")) { [18:01:55.029] muffled <- grepl(pattern, "muffleWarning") [18:01:55.029] if (muffled) [18:01:55.029] invokeRestart("muffleWarning") [18:01:55.029] } [18:01:55.029] else if (inherits(cond, "condition")) { [18:01:55.029] if (!is.null(pattern)) { [18:01:55.029] computeRestarts <- base::computeRestarts [18:01:55.029] grepl <- base::grepl [18:01:55.029] restarts <- computeRestarts(cond) [18:01:55.029] for (restart in restarts) { [18:01:55.029] name <- restart$name [18:01:55.029] if (is.null(name)) [18:01:55.029] next [18:01:55.029] if (!grepl(pattern, name)) [18:01:55.029] next [18:01:55.029] invokeRestart(restart) [18:01:55.029] muffled <- TRUE [18:01:55.029] break [18:01:55.029] } [18:01:55.029] } [18:01:55.029] } [18:01:55.029] invisible(muffled) [18:01:55.029] } [18:01:55.029] muffleCondition(cond) [18:01:55.029] }) [18:01:55.029] })) [18:01:55.029] future::FutureResult(value = ...future.value$value, [18:01:55.029] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.029] ...future.rng), globalenv = if (FALSE) [18:01:55.029] list(added = base::setdiff(base::names(base::.GlobalEnv), [18:01:55.029] ...future.globalenv.names)) [18:01:55.029] else NULL, started = ...future.startTime, version = "1.8") [18:01:55.029] }, condition = base::local({ [18:01:55.029] c <- base::c [18:01:55.029] inherits <- base::inherits [18:01:55.029] invokeRestart <- base::invokeRestart [18:01:55.029] length <- base::length [18:01:55.029] list <- base::list [18:01:55.029] seq.int <- base::seq.int [18:01:55.029] signalCondition <- base::signalCondition [18:01:55.029] sys.calls <- base::sys.calls [18:01:55.029] `[[` <- base::`[[` [18:01:55.029] `+` <- base::`+` [18:01:55.029] `<<-` <- base::`<<-` [18:01:55.029] sysCalls <- function(calls = sys.calls(), from = 1L) { [18:01:55.029] calls[seq.int(from = from + 12L, to = length(calls) - [18:01:55.029] 3L)] [18:01:55.029] } [18:01:55.029] function(cond) { [18:01:55.029] is_error <- inherits(cond, "error") [18:01:55.029] ignore <- !is_error && !is.null(NULL) && inherits(cond, [18:01:55.029] NULL) [18:01:55.029] if (is_error) { [18:01:55.029] sessionInformation <- function() { [18:01:55.029] list(r = base::R.Version(), locale = base::Sys.getlocale(), [18:01:55.029] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [18:01:55.029] search = base::search(), system = base::Sys.info()) [18:01:55.029] } [18:01:55.029] ...future.conditions[[length(...future.conditions) + [18:01:55.029] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [18:01:55.029] cond$call), session = sessionInformation(), [18:01:55.029] timestamp = base::Sys.time(), signaled = 0L) [18:01:55.029] signalCondition(cond) [18:01:55.029] } [18:01:55.029] else if (!ignore && TRUE && inherits(cond, c("condition", [18:01:55.029] "immediateCondition"))) { [18:01:55.029] signal <- TRUE && inherits(cond, "immediateCondition") [18:01:55.029] ...future.conditions[[length(...future.conditions) + [18:01:55.029] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [18:01:55.029] if (TRUE && !signal) { [18:01:55.029] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.029] { [18:01:55.029] inherits <- base::inherits [18:01:55.029] invokeRestart <- base::invokeRestart [18:01:55.029] is.null <- base::is.null [18:01:55.029] muffled <- FALSE [18:01:55.029] if (inherits(cond, "message")) { [18:01:55.029] muffled <- grepl(pattern, "muffleMessage") [18:01:55.029] if (muffled) [18:01:55.029] invokeRestart("muffleMessage") [18:01:55.029] } [18:01:55.029] else if (inherits(cond, "warning")) { [18:01:55.029] muffled <- grepl(pattern, "muffleWarning") [18:01:55.029] if (muffled) [18:01:55.029] invokeRestart("muffleWarning") [18:01:55.029] } [18:01:55.029] else if (inherits(cond, "condition")) { [18:01:55.029] if (!is.null(pattern)) { [18:01:55.029] computeRestarts <- base::computeRestarts [18:01:55.029] grepl <- base::grepl [18:01:55.029] restarts <- computeRestarts(cond) [18:01:55.029] for (restart in restarts) { [18:01:55.029] name <- restart$name [18:01:55.029] if (is.null(name)) [18:01:55.029] next [18:01:55.029] if (!grepl(pattern, name)) [18:01:55.029] next [18:01:55.029] invokeRestart(restart) [18:01:55.029] muffled <- TRUE [18:01:55.029] break [18:01:55.029] } [18:01:55.029] } [18:01:55.029] } [18:01:55.029] invisible(muffled) [18:01:55.029] } [18:01:55.029] muffleCondition(cond, pattern = "^muffle") [18:01:55.029] } [18:01:55.029] } [18:01:55.029] else { [18:01:55.029] if (TRUE) { [18:01:55.029] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.029] { [18:01:55.029] inherits <- base::inherits [18:01:55.029] invokeRestart <- base::invokeRestart [18:01:55.029] is.null <- base::is.null [18:01:55.029] muffled <- FALSE [18:01:55.029] if (inherits(cond, "message")) { [18:01:55.029] muffled <- grepl(pattern, "muffleMessage") [18:01:55.029] if (muffled) [18:01:55.029] invokeRestart("muffleMessage") [18:01:55.029] } [18:01:55.029] else if (inherits(cond, "warning")) { [18:01:55.029] muffled <- grepl(pattern, "muffleWarning") [18:01:55.029] if (muffled) [18:01:55.029] invokeRestart("muffleWarning") [18:01:55.029] } [18:01:55.029] else if (inherits(cond, "condition")) { [18:01:55.029] if (!is.null(pattern)) { [18:01:55.029] computeRestarts <- base::computeRestarts [18:01:55.029] grepl <- base::grepl [18:01:55.029] restarts <- computeRestarts(cond) [18:01:55.029] for (restart in restarts) { [18:01:55.029] name <- restart$name [18:01:55.029] if (is.null(name)) [18:01:55.029] next [18:01:55.029] if (!grepl(pattern, name)) [18:01:55.029] next [18:01:55.029] invokeRestart(restart) [18:01:55.029] muffled <- TRUE [18:01:55.029] break [18:01:55.029] } [18:01:55.029] } [18:01:55.029] } [18:01:55.029] invisible(muffled) [18:01:55.029] } [18:01:55.029] muffleCondition(cond, pattern = "^muffle") [18:01:55.029] } [18:01:55.029] } [18:01:55.029] } [18:01:55.029] })) [18:01:55.029] }, error = function(ex) { [18:01:55.029] base::structure(base::list(value = NULL, visible = NULL, [18:01:55.029] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.029] ...future.rng), started = ...future.startTime, [18:01:55.029] finished = Sys.time(), session_uuid = NA_character_, [18:01:55.029] version = "1.8"), class = "FutureResult") [18:01:55.029] }, finally = { [18:01:55.029] if (!identical(...future.workdir, getwd())) [18:01:55.029] setwd(...future.workdir) [18:01:55.029] { [18:01:55.029] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [18:01:55.029] ...future.oldOptions$nwarnings <- NULL [18:01:55.029] } [18:01:55.029] base::options(...future.oldOptions) [18:01:55.029] if (.Platform$OS.type == "windows") { [18:01:55.029] old_names <- names(...future.oldEnvVars) [18:01:55.029] envs <- base::Sys.getenv() [18:01:55.029] names <- names(envs) [18:01:55.029] common <- intersect(names, old_names) [18:01:55.029] added <- setdiff(names, old_names) [18:01:55.029] removed <- setdiff(old_names, names) [18:01:55.029] changed <- common[...future.oldEnvVars[common] != [18:01:55.029] envs[common]] [18:01:55.029] NAMES <- toupper(changed) [18:01:55.029] args <- list() [18:01:55.029] for (kk in seq_along(NAMES)) { [18:01:55.029] name <- changed[[kk]] [18:01:55.029] NAME <- NAMES[[kk]] [18:01:55.029] if (name != NAME && is.element(NAME, old_names)) [18:01:55.029] next [18:01:55.029] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.029] } [18:01:55.029] NAMES <- toupper(added) [18:01:55.029] for (kk in seq_along(NAMES)) { [18:01:55.029] name <- added[[kk]] [18:01:55.029] NAME <- NAMES[[kk]] [18:01:55.029] if (name != NAME && is.element(NAME, old_names)) [18:01:55.029] next [18:01:55.029] args[[name]] <- "" [18:01:55.029] } [18:01:55.029] NAMES <- toupper(removed) [18:01:55.029] for (kk in seq_along(NAMES)) { [18:01:55.029] name <- removed[[kk]] [18:01:55.029] NAME <- NAMES[[kk]] [18:01:55.029] if (name != NAME && is.element(NAME, old_names)) [18:01:55.029] next [18:01:55.029] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.029] } [18:01:55.029] if (length(args) > 0) [18:01:55.029] base::do.call(base::Sys.setenv, args = args) [18:01:55.029] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [18:01:55.029] } [18:01:55.029] else { [18:01:55.029] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [18:01:55.029] } [18:01:55.029] { [18:01:55.029] if (base::length(...future.futureOptionsAdded) > [18:01:55.029] 0L) { [18:01:55.029] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [18:01:55.029] base::names(opts) <- ...future.futureOptionsAdded [18:01:55.029] base::options(opts) [18:01:55.029] } [18:01:55.029] { [18:01:55.029] { [18:01:55.029] base::options(mc.cores = ...future.mc.cores.old) [18:01:55.029] NULL [18:01:55.029] } [18:01:55.029] options(future.plan = NULL) [18:01:55.029] if (is.na(NA_character_)) [18:01:55.029] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.029] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [18:01:55.029] future::plan(list(function (..., workers = 2L, [18:01:55.029] envir = parent.frame()) [18:01:55.029] strategy(..., workers = workers, envir = envir)), [18:01:55.029] .cleanup = FALSE, .init = FALSE) [18:01:55.029] } [18:01:55.029] } [18:01:55.029] } [18:01:55.029] }) [18:01:55.029] if (TRUE) { [18:01:55.029] base::sink(type = "output", split = FALSE) [18:01:55.029] if (TRUE) { [18:01:55.029] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [18:01:55.029] } [18:01:55.029] else { [18:01:55.029] ...future.result["stdout"] <- base::list(NULL) [18:01:55.029] } [18:01:55.029] base::close(...future.stdout) [18:01:55.029] ...future.stdout <- NULL [18:01:55.029] } [18:01:55.029] ...future.result$conditions <- ...future.conditions [18:01:55.029] ...future.result$finished <- base::Sys.time() [18:01:55.029] ...future.result [18:01:55.029] } [18:01:55.035] MultisessionFuture started [18:01:55.035] - Launch lazy future ... done [18:01:55.035] run() for 'MultisessionFuture' ... done > > ## Create future #2 (consumes background process #2) > b %<-% { "a" } Warning: 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' [18:01:55.036] getGlobalsAndPackages() ... [18:01:55.036] Searching for globals... [18:01:55.037] - globals found: [1] '{' [18:01:55.038] Searching for globals ... DONE [18:01:55.038] Resolving globals: TRUE [18:01:55.038] Resolving any globals that are futures ... [18:01:55.038] - globals: [1] '{' [18:01:55.038] Resolving any globals that are futures ... DONE [18:01:55.039] [18:01:55.039] [18:01:55.039] getGlobalsAndPackages() ... DONE [18:01:55.039] run() for 'Future' ... [18:01:55.040] - state: 'created' [18:01:55.040] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [18:01:55.052] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [18:01:55.052] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [18:01:55.052] - Field: 'node' [18:01:55.053] - Field: 'label' [18:01:55.053] - Field: 'local' [18:01:55.053] - Field: 'owner' [18:01:55.053] - Field: 'envir' [18:01:55.053] - Field: 'workers' [18:01:55.053] - Field: 'packages' [18:01:55.054] - Field: 'gc' [18:01:55.054] - Field: 'conditions' [18:01:55.054] - Field: 'persistent' [18:01:55.055] - Field: 'expr' [18:01:55.055] - Field: 'uuid' [18:01:55.055] - Field: 'seed' [18:01:55.055] - Field: 'version' [18:01:55.055] - Field: 'result' [18:01:55.056] - Field: 'asynchronous' [18:01:55.056] - Field: 'calls' [18:01:55.056] - Field: 'globals' [18:01:55.056] - Field: 'stdout' [18:01:55.056] - Field: 'earlySignal' [18:01:55.056] - Field: 'lazy' [18:01:55.057] - Field: 'state' [18:01:55.057] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [18:01:55.057] - Launch lazy future ... [18:01:55.057] Packages needed by the future expression (n = 0): [18:01:55.058] Packages needed by future strategies (n = 0): [18:01:55.058] { [18:01:55.058] { [18:01:55.058] { [18:01:55.058] ...future.startTime <- base::Sys.time() [18:01:55.058] { [18:01:55.058] { [18:01:55.058] { [18:01:55.058] { [18:01:55.058] base::local({ [18:01:55.058] has_future <- base::requireNamespace("future", [18:01:55.058] quietly = TRUE) [18:01:55.058] if (has_future) { [18:01:55.058] ns <- base::getNamespace("future") [18:01:55.058] version <- ns[[".package"]][["version"]] [18:01:55.058] if (is.null(version)) [18:01:55.058] version <- utils::packageVersion("future") [18:01:55.058] } [18:01:55.058] else { [18:01:55.058] version <- NULL [18:01:55.058] } [18:01:55.058] if (!has_future || version < "1.8.0") { [18:01:55.058] info <- base::c(r_version = base::gsub("R version ", [18:01:55.058] "", base::R.version$version.string), [18:01:55.058] platform = base::sprintf("%s (%s-bit)", [18:01:55.058] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [18:01:55.058] os = base::paste(base::Sys.info()[base::c("sysname", [18:01:55.058] "release", "version")], collapse = " "), [18:01:55.058] hostname = base::Sys.info()[["nodename"]]) [18:01:55.058] info <- base::sprintf("%s: %s", base::names(info), [18:01:55.058] info) [18:01:55.058] info <- base::paste(info, collapse = "; ") [18:01:55.058] if (!has_future) { [18:01:55.058] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [18:01:55.058] info) [18:01:55.058] } [18:01:55.058] else { [18:01:55.058] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [18:01:55.058] info, version) [18:01:55.058] } [18:01:55.058] base::stop(msg) [18:01:55.058] } [18:01:55.058] }) [18:01:55.058] } [18:01:55.058] ...future.mc.cores.old <- base::getOption("mc.cores") [18:01:55.058] base::options(mc.cores = 1L) [18:01:55.058] } [18:01:55.058] options(future.plan = NULL) [18:01:55.058] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.058] future::plan("default", .cleanup = FALSE, .init = FALSE) [18:01:55.058] } [18:01:55.058] ...future.workdir <- getwd() [18:01:55.058] } [18:01:55.058] ...future.oldOptions <- base::as.list(base::.Options) [18:01:55.058] ...future.oldEnvVars <- base::Sys.getenv() [18:01:55.058] } [18:01:55.058] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [18:01:55.058] future.globals.maxSize = NULL, future.globals.method = NULL, [18:01:55.058] future.globals.onMissing = NULL, future.globals.onReference = NULL, [18:01:55.058] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [18:01:55.058] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [18:01:55.058] future.stdout.windows.reencode = NULL, width = 80L) [18:01:55.058] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [18:01:55.058] base::names(...future.oldOptions)) [18:01:55.058] } [18:01:55.058] if (FALSE) { [18:01:55.058] } [18:01:55.058] else { [18:01:55.058] if (TRUE) { [18:01:55.058] ...future.stdout <- base::rawConnection(base::raw(0L), [18:01:55.058] open = "w") [18:01:55.058] } [18:01:55.058] else { [18:01:55.058] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [18:01:55.058] windows = "NUL", "/dev/null"), open = "w") [18:01:55.058] } [18:01:55.058] base::sink(...future.stdout, type = "output", split = FALSE) [18:01:55.058] base::on.exit(if (!base::is.null(...future.stdout)) { [18:01:55.058] base::sink(type = "output", split = FALSE) [18:01:55.058] base::close(...future.stdout) [18:01:55.058] }, add = TRUE) [18:01:55.058] } [18:01:55.058] ...future.frame <- base::sys.nframe() [18:01:55.058] ...future.conditions <- base::list() [18:01:55.058] ...future.rng <- base::globalenv()$.Random.seed [18:01:55.058] if (FALSE) { [18:01:55.058] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [18:01:55.058] "...future.value", "...future.globalenv.names", ".Random.seed") [18:01:55.058] } [18:01:55.058] ...future.result <- base::tryCatch({ [18:01:55.058] base::withCallingHandlers({ [18:01:55.058] ...future.value <- base::withVisible(base::local({ [18:01:55.058] ...future.makeSendCondition <- local({ [18:01:55.058] sendCondition <- NULL [18:01:55.058] function(frame = 1L) { [18:01:55.058] if (is.function(sendCondition)) [18:01:55.058] return(sendCondition) [18:01:55.058] ns <- getNamespace("parallel") [18:01:55.058] if (exists("sendData", mode = "function", [18:01:55.058] envir = ns)) { [18:01:55.058] parallel_sendData <- get("sendData", mode = "function", [18:01:55.058] envir = ns) [18:01:55.058] envir <- sys.frame(frame) [18:01:55.058] master <- NULL [18:01:55.058] while (!identical(envir, .GlobalEnv) && [18:01:55.058] !identical(envir, emptyenv())) { [18:01:55.058] if (exists("master", mode = "list", envir = envir, [18:01:55.058] inherits = FALSE)) { [18:01:55.058] master <- get("master", mode = "list", [18:01:55.058] envir = envir, inherits = FALSE) [18:01:55.058] if (inherits(master, c("SOCKnode", [18:01:55.058] "SOCK0node"))) { [18:01:55.058] sendCondition <<- function(cond) { [18:01:55.058] data <- list(type = "VALUE", value = cond, [18:01:55.058] success = TRUE) [18:01:55.058] parallel_sendData(master, data) [18:01:55.058] } [18:01:55.058] return(sendCondition) [18:01:55.058] } [18:01:55.058] } [18:01:55.058] frame <- frame + 1L [18:01:55.058] envir <- sys.frame(frame) [18:01:55.058] } [18:01:55.058] } [18:01:55.058] sendCondition <<- function(cond) NULL [18:01:55.058] } [18:01:55.058] }) [18:01:55.058] withCallingHandlers({ [18:01:55.058] { [18:01:55.058] "a" [18:01:55.058] } [18:01:55.058] }, immediateCondition = function(cond) { [18:01:55.058] sendCondition <- ...future.makeSendCondition() [18:01:55.058] sendCondition(cond) [18:01:55.058] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.058] { [18:01:55.058] inherits <- base::inherits [18:01:55.058] invokeRestart <- base::invokeRestart [18:01:55.058] is.null <- base::is.null [18:01:55.058] muffled <- FALSE [18:01:55.058] if (inherits(cond, "message")) { [18:01:55.058] muffled <- grepl(pattern, "muffleMessage") [18:01:55.058] if (muffled) [18:01:55.058] invokeRestart("muffleMessage") [18:01:55.058] } [18:01:55.058] else if (inherits(cond, "warning")) { [18:01:55.058] muffled <- grepl(pattern, "muffleWarning") [18:01:55.058] if (muffled) [18:01:55.058] invokeRestart("muffleWarning") [18:01:55.058] } [18:01:55.058] else if (inherits(cond, "condition")) { [18:01:55.058] if (!is.null(pattern)) { [18:01:55.058] computeRestarts <- base::computeRestarts [18:01:55.058] grepl <- base::grepl [18:01:55.058] restarts <- computeRestarts(cond) [18:01:55.058] for (restart in restarts) { [18:01:55.058] name <- restart$name [18:01:55.058] if (is.null(name)) [18:01:55.058] next [18:01:55.058] if (!grepl(pattern, name)) [18:01:55.058] next [18:01:55.058] invokeRestart(restart) [18:01:55.058] muffled <- TRUE [18:01:55.058] break [18:01:55.058] } [18:01:55.058] } [18:01:55.058] } [18:01:55.058] invisible(muffled) [18:01:55.058] } [18:01:55.058] muffleCondition(cond) [18:01:55.058] }) [18:01:55.058] })) [18:01:55.058] future::FutureResult(value = ...future.value$value, [18:01:55.058] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.058] ...future.rng), globalenv = if (FALSE) [18:01:55.058] list(added = base::setdiff(base::names(base::.GlobalEnv), [18:01:55.058] ...future.globalenv.names)) [18:01:55.058] else NULL, started = ...future.startTime, version = "1.8") [18:01:55.058] }, condition = base::local({ [18:01:55.058] c <- base::c [18:01:55.058] inherits <- base::inherits [18:01:55.058] invokeRestart <- base::invokeRestart [18:01:55.058] length <- base::length [18:01:55.058] list <- base::list [18:01:55.058] seq.int <- base::seq.int [18:01:55.058] signalCondition <- base::signalCondition [18:01:55.058] sys.calls <- base::sys.calls [18:01:55.058] `[[` <- base::`[[` [18:01:55.058] `+` <- base::`+` [18:01:55.058] `<<-` <- base::`<<-` [18:01:55.058] sysCalls <- function(calls = sys.calls(), from = 1L) { [18:01:55.058] calls[seq.int(from = from + 12L, to = length(calls) - [18:01:55.058] 3L)] [18:01:55.058] } [18:01:55.058] function(cond) { [18:01:55.058] is_error <- inherits(cond, "error") [18:01:55.058] ignore <- !is_error && !is.null(NULL) && inherits(cond, [18:01:55.058] NULL) [18:01:55.058] if (is_error) { [18:01:55.058] sessionInformation <- function() { [18:01:55.058] list(r = base::R.Version(), locale = base::Sys.getlocale(), [18:01:55.058] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [18:01:55.058] search = base::search(), system = base::Sys.info()) [18:01:55.058] } [18:01:55.058] ...future.conditions[[length(...future.conditions) + [18:01:55.058] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [18:01:55.058] cond$call), session = sessionInformation(), [18:01:55.058] timestamp = base::Sys.time(), signaled = 0L) [18:01:55.058] signalCondition(cond) [18:01:55.058] } [18:01:55.058] else if (!ignore && TRUE && inherits(cond, c("condition", [18:01:55.058] "immediateCondition"))) { [18:01:55.058] signal <- TRUE && inherits(cond, "immediateCondition") [18:01:55.058] ...future.conditions[[length(...future.conditions) + [18:01:55.058] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [18:01:55.058] if (TRUE && !signal) { [18:01:55.058] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.058] { [18:01:55.058] inherits <- base::inherits [18:01:55.058] invokeRestart <- base::invokeRestart [18:01:55.058] is.null <- base::is.null [18:01:55.058] muffled <- FALSE [18:01:55.058] if (inherits(cond, "message")) { [18:01:55.058] muffled <- grepl(pattern, "muffleMessage") [18:01:55.058] if (muffled) [18:01:55.058] invokeRestart("muffleMessage") [18:01:55.058] } [18:01:55.058] else if (inherits(cond, "warning")) { [18:01:55.058] muffled <- grepl(pattern, "muffleWarning") [18:01:55.058] if (muffled) [18:01:55.058] invokeRestart("muffleWarning") [18:01:55.058] } [18:01:55.058] else if (inherits(cond, "condition")) { [18:01:55.058] if (!is.null(pattern)) { [18:01:55.058] computeRestarts <- base::computeRestarts [18:01:55.058] grepl <- base::grepl [18:01:55.058] restarts <- computeRestarts(cond) [18:01:55.058] for (restart in restarts) { [18:01:55.058] name <- restart$name [18:01:55.058] if (is.null(name)) [18:01:55.058] next [18:01:55.058] if (!grepl(pattern, name)) [18:01:55.058] next [18:01:55.058] invokeRestart(restart) [18:01:55.058] muffled <- TRUE [18:01:55.058] break [18:01:55.058] } [18:01:55.058] } [18:01:55.058] } [18:01:55.058] invisible(muffled) [18:01:55.058] } [18:01:55.058] muffleCondition(cond, pattern = "^muffle") [18:01:55.058] } [18:01:55.058] } [18:01:55.058] else { [18:01:55.058] if (TRUE) { [18:01:55.058] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.058] { [18:01:55.058] inherits <- base::inherits [18:01:55.058] invokeRestart <- base::invokeRestart [18:01:55.058] is.null <- base::is.null [18:01:55.058] muffled <- FALSE [18:01:55.058] if (inherits(cond, "message")) { [18:01:55.058] muffled <- grepl(pattern, "muffleMessage") [18:01:55.058] if (muffled) [18:01:55.058] invokeRestart("muffleMessage") [18:01:55.058] } [18:01:55.058] else if (inherits(cond, "warning")) { [18:01:55.058] muffled <- grepl(pattern, "muffleWarning") [18:01:55.058] if (muffled) [18:01:55.058] invokeRestart("muffleWarning") [18:01:55.058] } [18:01:55.058] else if (inherits(cond, "condition")) { [18:01:55.058] if (!is.null(pattern)) { [18:01:55.058] computeRestarts <- base::computeRestarts [18:01:55.058] grepl <- base::grepl [18:01:55.058] restarts <- computeRestarts(cond) [18:01:55.058] for (restart in restarts) { [18:01:55.058] name <- restart$name [18:01:55.058] if (is.null(name)) [18:01:55.058] next [18:01:55.058] if (!grepl(pattern, name)) [18:01:55.058] next [18:01:55.058] invokeRestart(restart) [18:01:55.058] muffled <- TRUE [18:01:55.058] break [18:01:55.058] } [18:01:55.058] } [18:01:55.058] } [18:01:55.058] invisible(muffled) [18:01:55.058] } [18:01:55.058] muffleCondition(cond, pattern = "^muffle") [18:01:55.058] } [18:01:55.058] } [18:01:55.058] } [18:01:55.058] })) [18:01:55.058] }, error = function(ex) { [18:01:55.058] base::structure(base::list(value = NULL, visible = NULL, [18:01:55.058] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.058] ...future.rng), started = ...future.startTime, [18:01:55.058] finished = Sys.time(), session_uuid = NA_character_, [18:01:55.058] version = "1.8"), class = "FutureResult") [18:01:55.058] }, finally = { [18:01:55.058] if (!identical(...future.workdir, getwd())) [18:01:55.058] setwd(...future.workdir) [18:01:55.058] { [18:01:55.058] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [18:01:55.058] ...future.oldOptions$nwarnings <- NULL [18:01:55.058] } [18:01:55.058] base::options(...future.oldOptions) [18:01:55.058] if (.Platform$OS.type == "windows") { [18:01:55.058] old_names <- names(...future.oldEnvVars) [18:01:55.058] envs <- base::Sys.getenv() [18:01:55.058] names <- names(envs) [18:01:55.058] common <- intersect(names, old_names) [18:01:55.058] added <- setdiff(names, old_names) [18:01:55.058] removed <- setdiff(old_names, names) [18:01:55.058] changed <- common[...future.oldEnvVars[common] != [18:01:55.058] envs[common]] [18:01:55.058] NAMES <- toupper(changed) [18:01:55.058] args <- list() [18:01:55.058] for (kk in seq_along(NAMES)) { [18:01:55.058] name <- changed[[kk]] [18:01:55.058] NAME <- NAMES[[kk]] [18:01:55.058] if (name != NAME && is.element(NAME, old_names)) [18:01:55.058] next [18:01:55.058] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.058] } [18:01:55.058] NAMES <- toupper(added) [18:01:55.058] for (kk in seq_along(NAMES)) { [18:01:55.058] name <- added[[kk]] [18:01:55.058] NAME <- NAMES[[kk]] [18:01:55.058] if (name != NAME && is.element(NAME, old_names)) [18:01:55.058] next [18:01:55.058] args[[name]] <- "" [18:01:55.058] } [18:01:55.058] NAMES <- toupper(removed) [18:01:55.058] for (kk in seq_along(NAMES)) { [18:01:55.058] name <- removed[[kk]] [18:01:55.058] NAME <- NAMES[[kk]] [18:01:55.058] if (name != NAME && is.element(NAME, old_names)) [18:01:55.058] next [18:01:55.058] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.058] } [18:01:55.058] if (length(args) > 0) [18:01:55.058] base::do.call(base::Sys.setenv, args = args) [18:01:55.058] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [18:01:55.058] } [18:01:55.058] else { [18:01:55.058] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [18:01:55.058] } [18:01:55.058] { [18:01:55.058] if (base::length(...future.futureOptionsAdded) > [18:01:55.058] 0L) { [18:01:55.058] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [18:01:55.058] base::names(opts) <- ...future.futureOptionsAdded [18:01:55.058] base::options(opts) [18:01:55.058] } [18:01:55.058] { [18:01:55.058] { [18:01:55.058] base::options(mc.cores = ...future.mc.cores.old) [18:01:55.058] NULL [18:01:55.058] } [18:01:55.058] options(future.plan = NULL) [18:01:55.058] if (is.na(NA_character_)) [18:01:55.058] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.058] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [18:01:55.058] future::plan(list(function (..., workers = 2L, [18:01:55.058] envir = parent.frame()) [18:01:55.058] strategy(..., workers = workers, envir = envir)), [18:01:55.058] .cleanup = FALSE, .init = FALSE) [18:01:55.058] } [18:01:55.058] } [18:01:55.058] } [18:01:55.058] }) [18:01:55.058] if (TRUE) { [18:01:55.058] base::sink(type = "output", split = FALSE) [18:01:55.058] if (TRUE) { [18:01:55.058] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [18:01:55.058] } [18:01:55.058] else { [18:01:55.058] ...future.result["stdout"] <- base::list(NULL) [18:01:55.058] } [18:01:55.058] base::close(...future.stdout) [18:01:55.058] ...future.stdout <- NULL [18:01:55.058] } [18:01:55.058] ...future.result$conditions <- ...future.conditions [18:01:55.058] ...future.result$finished <- base::Sys.time() [18:01:55.058] ...future.result [18:01:55.058] } [18:01:55.145] MultisessionFuture started [18:01:55.146] - Launch lazy future ... done [18:01:55.146] run() for 'MultisessionFuture' ... done > > ## Resolve future #2 (frees up background process #2) > message(sprintf("b = %s\n", sQuote(b))) [18:01:55.146] result() for ClusterFuture ... [18:01:55.146] receiveMessageFromWorker() for ClusterFuture ... [18:01:55.147] - Validating connection of MultisessionFuture [18:01:55.200] - received message: FutureResult [18:01:55.200] - Received FutureResult [18:01:55.200] - Erased future from FutureRegistry [18:01:55.200] result() for ClusterFuture ... [18:01:55.201] - result already collected: FutureResult [18:01:55.201] result() for ClusterFuture ... done [18:01:55.201] receiveMessageFromWorker() for ClusterFuture ... done [18:01:55.204] result() for ClusterFuture ... done [18:01:55.204] result() for ClusterFuture ... [18:01:55.204] - result already collected: FutureResult [18:01:55.205] 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: 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' [18:01:55.205] getGlobalsAndPackages() ... [18:01:55.205] Searching for globals... [18:01:55.210] - globals found: [4] '{', '[[', 'env', 'b' [18:01:55.210] Searching for globals ... DONE [18:01:55.211] Resolving globals: TRUE [18:01:55.211] Resolving any globals that are futures ... [18:01:55.211] - globals: [4] '{', '[[', 'env', 'b' [18:01:55.211] Resolving any globals that are futures ... DONE [18:01:55.212] Resolving futures part of globals (recursively) ... [18:01:55.213] resolve() on list ... [18:01:55.213] recursive: 99 [18:01:55.213] length: 2 [18:01:55.213] elements: 'env', 'b' [18:01:55.214] resolve() on environment ... [18:01:55.214] recursive: 98 [18:01:55.214] elements: [1] '.future_a', 'a' [18:01:55.215] receiveMessageFromWorker() for ClusterFuture ... [18:01:55.215] - Validating connection of MultisessionFuture [18:01:55.216] - received message: FutureResult [18:01:55.216] - Received FutureResult [18:01:55.216] - Erased future from FutureRegistry [18:01:55.216] result() for ClusterFuture ... [18:01:55.216] - result already collected: FutureResult [18:01:55.217] result() for ClusterFuture ... done [18:01:55.217] receiveMessageFromWorker() for ClusterFuture ... done [18:01:55.217] Future #1 [18:01:55.217] result() for ClusterFuture ... [18:01:55.217] - result already collected: FutureResult [18:01:55.217] result() for ClusterFuture ... done [18:01:55.218] result() for ClusterFuture ... [18:01:55.218] - result already collected: FutureResult [18:01:55.218] result() for ClusterFuture ... done [18:01:55.218] A MultisessionFuture was resolved [18:01:55.218] length: 0 (resolved future 1) [18:01:55.219] resolve() on environment ... DONE [18:01:55.219] length: 1 (resolved future 1) [18:01:55.219] length: 0 (resolved future 2) [18:01:55.219] resolve() on list ... DONE [18:01:55.219] - globals: [2] 'env', 'b' [18:01:55.219] Resolving futures part of globals (recursively) ... DONE [18:01:55.221] The total size of the 2 globals is 4.17 KiB (4272 bytes) [18:01:55.221] 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') [18:01:55.221] - globals: [2] 'env', 'b' [18:01:55.222] [18:01:55.222] getGlobalsAndPackages() ... DONE [18:01:55.222] run() for 'Future' ... [18:01:55.222] - state: 'created' [18:01:55.223] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [18:01:55.234] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [18:01:55.234] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [18:01:55.234] - Field: 'node' [18:01:55.234] - Field: 'label' [18:01:55.235] - Field: 'local' [18:01:55.235] - Field: 'owner' [18:01:55.235] - Field: 'envir' [18:01:55.235] - Field: 'workers' [18:01:55.235] - Field: 'packages' [18:01:55.236] - Field: 'gc' [18:01:55.236] - Field: 'conditions' [18:01:55.236] - Field: 'persistent' [18:01:55.236] - Field: 'expr' [18:01:55.236] - Field: 'uuid' [18:01:55.236] - Field: 'seed' [18:01:55.237] - Field: 'version' [18:01:55.237] - Field: 'result' [18:01:55.237] - Field: 'asynchronous' [18:01:55.237] - Field: 'calls' [18:01:55.237] - Field: 'globals' [18:01:55.237] - Field: 'stdout' [18:01:55.238] - Field: 'earlySignal' [18:01:55.238] - Field: 'lazy' [18:01:55.238] - Field: 'state' [18:01:55.238] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [18:01:55.238] - Launch lazy future ... [18:01:55.239] Packages needed by the future expression (n = 0): [18:01:55.239] Packages needed by future strategies (n = 0): [18:01:55.239] { [18:01:55.239] { [18:01:55.239] { [18:01:55.239] ...future.startTime <- base::Sys.time() [18:01:55.239] { [18:01:55.239] { [18:01:55.239] { [18:01:55.239] { [18:01:55.239] base::local({ [18:01:55.239] has_future <- base::requireNamespace("future", [18:01:55.239] quietly = TRUE) [18:01:55.239] if (has_future) { [18:01:55.239] ns <- base::getNamespace("future") [18:01:55.239] version <- ns[[".package"]][["version"]] [18:01:55.239] if (is.null(version)) [18:01:55.239] version <- utils::packageVersion("future") [18:01:55.239] } [18:01:55.239] else { [18:01:55.239] version <- NULL [18:01:55.239] } [18:01:55.239] if (!has_future || version < "1.8.0") { [18:01:55.239] info <- base::c(r_version = base::gsub("R version ", [18:01:55.239] "", base::R.version$version.string), [18:01:55.239] platform = base::sprintf("%s (%s-bit)", [18:01:55.239] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [18:01:55.239] os = base::paste(base::Sys.info()[base::c("sysname", [18:01:55.239] "release", "version")], collapse = " "), [18:01:55.239] hostname = base::Sys.info()[["nodename"]]) [18:01:55.239] info <- base::sprintf("%s: %s", base::names(info), [18:01:55.239] info) [18:01:55.239] info <- base::paste(info, collapse = "; ") [18:01:55.239] if (!has_future) { [18:01:55.239] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [18:01:55.239] info) [18:01:55.239] } [18:01:55.239] else { [18:01:55.239] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [18:01:55.239] info, version) [18:01:55.239] } [18:01:55.239] base::stop(msg) [18:01:55.239] } [18:01:55.239] }) [18:01:55.239] } [18:01:55.239] ...future.mc.cores.old <- base::getOption("mc.cores") [18:01:55.239] base::options(mc.cores = 1L) [18:01:55.239] } [18:01:55.239] options(future.plan = NULL) [18:01:55.239] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.239] future::plan("default", .cleanup = FALSE, .init = FALSE) [18:01:55.239] } [18:01:55.239] ...future.workdir <- getwd() [18:01:55.239] } [18:01:55.239] ...future.oldOptions <- base::as.list(base::.Options) [18:01:55.239] ...future.oldEnvVars <- base::Sys.getenv() [18:01:55.239] } [18:01:55.239] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [18:01:55.239] future.globals.maxSize = NULL, future.globals.method = NULL, [18:01:55.239] future.globals.onMissing = NULL, future.globals.onReference = NULL, [18:01:55.239] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [18:01:55.239] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [18:01:55.239] future.stdout.windows.reencode = NULL, width = 80L) [18:01:55.239] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [18:01:55.239] base::names(...future.oldOptions)) [18:01:55.239] } [18:01:55.239] if (FALSE) { [18:01:55.239] } [18:01:55.239] else { [18:01:55.239] if (TRUE) { [18:01:55.239] ...future.stdout <- base::rawConnection(base::raw(0L), [18:01:55.239] open = "w") [18:01:55.239] } [18:01:55.239] else { [18:01:55.239] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [18:01:55.239] windows = "NUL", "/dev/null"), open = "w") [18:01:55.239] } [18:01:55.239] base::sink(...future.stdout, type = "output", split = FALSE) [18:01:55.239] base::on.exit(if (!base::is.null(...future.stdout)) { [18:01:55.239] base::sink(type = "output", split = FALSE) [18:01:55.239] base::close(...future.stdout) [18:01:55.239] }, add = TRUE) [18:01:55.239] } [18:01:55.239] ...future.frame <- base::sys.nframe() [18:01:55.239] ...future.conditions <- base::list() [18:01:55.239] ...future.rng <- base::globalenv()$.Random.seed [18:01:55.239] if (FALSE) { [18:01:55.239] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [18:01:55.239] "...future.value", "...future.globalenv.names", ".Random.seed") [18:01:55.239] } [18:01:55.239] ...future.result <- base::tryCatch({ [18:01:55.239] base::withCallingHandlers({ [18:01:55.239] ...future.value <- base::withVisible(base::local({ [18:01:55.239] ...future.makeSendCondition <- local({ [18:01:55.239] sendCondition <- NULL [18:01:55.239] function(frame = 1L) { [18:01:55.239] if (is.function(sendCondition)) [18:01:55.239] return(sendCondition) [18:01:55.239] ns <- getNamespace("parallel") [18:01:55.239] if (exists("sendData", mode = "function", [18:01:55.239] envir = ns)) { [18:01:55.239] parallel_sendData <- get("sendData", mode = "function", [18:01:55.239] envir = ns) [18:01:55.239] envir <- sys.frame(frame) [18:01:55.239] master <- NULL [18:01:55.239] while (!identical(envir, .GlobalEnv) && [18:01:55.239] !identical(envir, emptyenv())) { [18:01:55.239] if (exists("master", mode = "list", envir = envir, [18:01:55.239] inherits = FALSE)) { [18:01:55.239] master <- get("master", mode = "list", [18:01:55.239] envir = envir, inherits = FALSE) [18:01:55.239] if (inherits(master, c("SOCKnode", [18:01:55.239] "SOCK0node"))) { [18:01:55.239] sendCondition <<- function(cond) { [18:01:55.239] data <- list(type = "VALUE", value = cond, [18:01:55.239] success = TRUE) [18:01:55.239] parallel_sendData(master, data) [18:01:55.239] } [18:01:55.239] return(sendCondition) [18:01:55.239] } [18:01:55.239] } [18:01:55.239] frame <- frame + 1L [18:01:55.239] envir <- sys.frame(frame) [18:01:55.239] } [18:01:55.239] } [18:01:55.239] sendCondition <<- function(cond) NULL [18:01:55.239] } [18:01:55.239] }) [18:01:55.239] withCallingHandlers({ [18:01:55.239] { [18:01:55.239] env[[b]] [18:01:55.239] } [18:01:55.239] }, immediateCondition = function(cond) { [18:01:55.239] sendCondition <- ...future.makeSendCondition() [18:01:55.239] sendCondition(cond) [18:01:55.239] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.239] { [18:01:55.239] inherits <- base::inherits [18:01:55.239] invokeRestart <- base::invokeRestart [18:01:55.239] is.null <- base::is.null [18:01:55.239] muffled <- FALSE [18:01:55.239] if (inherits(cond, "message")) { [18:01:55.239] muffled <- grepl(pattern, "muffleMessage") [18:01:55.239] if (muffled) [18:01:55.239] invokeRestart("muffleMessage") [18:01:55.239] } [18:01:55.239] else if (inherits(cond, "warning")) { [18:01:55.239] muffled <- grepl(pattern, "muffleWarning") [18:01:55.239] if (muffled) [18:01:55.239] invokeRestart("muffleWarning") [18:01:55.239] } [18:01:55.239] else if (inherits(cond, "condition")) { [18:01:55.239] if (!is.null(pattern)) { [18:01:55.239] computeRestarts <- base::computeRestarts [18:01:55.239] grepl <- base::grepl [18:01:55.239] restarts <- computeRestarts(cond) [18:01:55.239] for (restart in restarts) { [18:01:55.239] name <- restart$name [18:01:55.239] if (is.null(name)) [18:01:55.239] next [18:01:55.239] if (!grepl(pattern, name)) [18:01:55.239] next [18:01:55.239] invokeRestart(restart) [18:01:55.239] muffled <- TRUE [18:01:55.239] break [18:01:55.239] } [18:01:55.239] } [18:01:55.239] } [18:01:55.239] invisible(muffled) [18:01:55.239] } [18:01:55.239] muffleCondition(cond) [18:01:55.239] }) [18:01:55.239] })) [18:01:55.239] future::FutureResult(value = ...future.value$value, [18:01:55.239] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.239] ...future.rng), globalenv = if (FALSE) [18:01:55.239] list(added = base::setdiff(base::names(base::.GlobalEnv), [18:01:55.239] ...future.globalenv.names)) [18:01:55.239] else NULL, started = ...future.startTime, version = "1.8") [18:01:55.239] }, condition = base::local({ [18:01:55.239] c <- base::c [18:01:55.239] inherits <- base::inherits [18:01:55.239] invokeRestart <- base::invokeRestart [18:01:55.239] length <- base::length [18:01:55.239] list <- base::list [18:01:55.239] seq.int <- base::seq.int [18:01:55.239] signalCondition <- base::signalCondition [18:01:55.239] sys.calls <- base::sys.calls [18:01:55.239] `[[` <- base::`[[` [18:01:55.239] `+` <- base::`+` [18:01:55.239] `<<-` <- base::`<<-` [18:01:55.239] sysCalls <- function(calls = sys.calls(), from = 1L) { [18:01:55.239] calls[seq.int(from = from + 12L, to = length(calls) - [18:01:55.239] 3L)] [18:01:55.239] } [18:01:55.239] function(cond) { [18:01:55.239] is_error <- inherits(cond, "error") [18:01:55.239] ignore <- !is_error && !is.null(NULL) && inherits(cond, [18:01:55.239] NULL) [18:01:55.239] if (is_error) { [18:01:55.239] sessionInformation <- function() { [18:01:55.239] list(r = base::R.Version(), locale = base::Sys.getlocale(), [18:01:55.239] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [18:01:55.239] search = base::search(), system = base::Sys.info()) [18:01:55.239] } [18:01:55.239] ...future.conditions[[length(...future.conditions) + [18:01:55.239] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [18:01:55.239] cond$call), session = sessionInformation(), [18:01:55.239] timestamp = base::Sys.time(), signaled = 0L) [18:01:55.239] signalCondition(cond) [18:01:55.239] } [18:01:55.239] else if (!ignore && TRUE && inherits(cond, c("condition", [18:01:55.239] "immediateCondition"))) { [18:01:55.239] signal <- TRUE && inherits(cond, "immediateCondition") [18:01:55.239] ...future.conditions[[length(...future.conditions) + [18:01:55.239] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [18:01:55.239] if (TRUE && !signal) { [18:01:55.239] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.239] { [18:01:55.239] inherits <- base::inherits [18:01:55.239] invokeRestart <- base::invokeRestart [18:01:55.239] is.null <- base::is.null [18:01:55.239] muffled <- FALSE [18:01:55.239] if (inherits(cond, "message")) { [18:01:55.239] muffled <- grepl(pattern, "muffleMessage") [18:01:55.239] if (muffled) [18:01:55.239] invokeRestart("muffleMessage") [18:01:55.239] } [18:01:55.239] else if (inherits(cond, "warning")) { [18:01:55.239] muffled <- grepl(pattern, "muffleWarning") [18:01:55.239] if (muffled) [18:01:55.239] invokeRestart("muffleWarning") [18:01:55.239] } [18:01:55.239] else if (inherits(cond, "condition")) { [18:01:55.239] if (!is.null(pattern)) { [18:01:55.239] computeRestarts <- base::computeRestarts [18:01:55.239] grepl <- base::grepl [18:01:55.239] restarts <- computeRestarts(cond) [18:01:55.239] for (restart in restarts) { [18:01:55.239] name <- restart$name [18:01:55.239] if (is.null(name)) [18:01:55.239] next [18:01:55.239] if (!grepl(pattern, name)) [18:01:55.239] next [18:01:55.239] invokeRestart(restart) [18:01:55.239] muffled <- TRUE [18:01:55.239] break [18:01:55.239] } [18:01:55.239] } [18:01:55.239] } [18:01:55.239] invisible(muffled) [18:01:55.239] } [18:01:55.239] muffleCondition(cond, pattern = "^muffle") [18:01:55.239] } [18:01:55.239] } [18:01:55.239] else { [18:01:55.239] if (TRUE) { [18:01:55.239] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.239] { [18:01:55.239] inherits <- base::inherits [18:01:55.239] invokeRestart <- base::invokeRestart [18:01:55.239] is.null <- base::is.null [18:01:55.239] muffled <- FALSE [18:01:55.239] if (inherits(cond, "message")) { [18:01:55.239] muffled <- grepl(pattern, "muffleMessage") [18:01:55.239] if (muffled) [18:01:55.239] invokeRestart("muffleMessage") [18:01:55.239] } [18:01:55.239] else if (inherits(cond, "warning")) { [18:01:55.239] muffled <- grepl(pattern, "muffleWarning") [18:01:55.239] if (muffled) [18:01:55.239] invokeRestart("muffleWarning") [18:01:55.239] } [18:01:55.239] else if (inherits(cond, "condition")) { [18:01:55.239] if (!is.null(pattern)) { [18:01:55.239] computeRestarts <- base::computeRestarts [18:01:55.239] grepl <- base::grepl [18:01:55.239] restarts <- computeRestarts(cond) [18:01:55.239] for (restart in restarts) { [18:01:55.239] name <- restart$name [18:01:55.239] if (is.null(name)) [18:01:55.239] next [18:01:55.239] if (!grepl(pattern, name)) [18:01:55.239] next [18:01:55.239] invokeRestart(restart) [18:01:55.239] muffled <- TRUE [18:01:55.239] break [18:01:55.239] } [18:01:55.239] } [18:01:55.239] } [18:01:55.239] invisible(muffled) [18:01:55.239] } [18:01:55.239] muffleCondition(cond, pattern = "^muffle") [18:01:55.239] } [18:01:55.239] } [18:01:55.239] } [18:01:55.239] })) [18:01:55.239] }, error = function(ex) { [18:01:55.239] base::structure(base::list(value = NULL, visible = NULL, [18:01:55.239] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.239] ...future.rng), started = ...future.startTime, [18:01:55.239] finished = Sys.time(), session_uuid = NA_character_, [18:01:55.239] version = "1.8"), class = "FutureResult") [18:01:55.239] }, finally = { [18:01:55.239] if (!identical(...future.workdir, getwd())) [18:01:55.239] setwd(...future.workdir) [18:01:55.239] { [18:01:55.239] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [18:01:55.239] ...future.oldOptions$nwarnings <- NULL [18:01:55.239] } [18:01:55.239] base::options(...future.oldOptions) [18:01:55.239] if (.Platform$OS.type == "windows") { [18:01:55.239] old_names <- names(...future.oldEnvVars) [18:01:55.239] envs <- base::Sys.getenv() [18:01:55.239] names <- names(envs) [18:01:55.239] common <- intersect(names, old_names) [18:01:55.239] added <- setdiff(names, old_names) [18:01:55.239] removed <- setdiff(old_names, names) [18:01:55.239] changed <- common[...future.oldEnvVars[common] != [18:01:55.239] envs[common]] [18:01:55.239] NAMES <- toupper(changed) [18:01:55.239] args <- list() [18:01:55.239] for (kk in seq_along(NAMES)) { [18:01:55.239] name <- changed[[kk]] [18:01:55.239] NAME <- NAMES[[kk]] [18:01:55.239] if (name != NAME && is.element(NAME, old_names)) [18:01:55.239] next [18:01:55.239] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.239] } [18:01:55.239] NAMES <- toupper(added) [18:01:55.239] for (kk in seq_along(NAMES)) { [18:01:55.239] name <- added[[kk]] [18:01:55.239] NAME <- NAMES[[kk]] [18:01:55.239] if (name != NAME && is.element(NAME, old_names)) [18:01:55.239] next [18:01:55.239] args[[name]] <- "" [18:01:55.239] } [18:01:55.239] NAMES <- toupper(removed) [18:01:55.239] for (kk in seq_along(NAMES)) { [18:01:55.239] name <- removed[[kk]] [18:01:55.239] NAME <- NAMES[[kk]] [18:01:55.239] if (name != NAME && is.element(NAME, old_names)) [18:01:55.239] next [18:01:55.239] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.239] } [18:01:55.239] if (length(args) > 0) [18:01:55.239] base::do.call(base::Sys.setenv, args = args) [18:01:55.239] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [18:01:55.239] } [18:01:55.239] else { [18:01:55.239] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [18:01:55.239] } [18:01:55.239] { [18:01:55.239] if (base::length(...future.futureOptionsAdded) > [18:01:55.239] 0L) { [18:01:55.239] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [18:01:55.239] base::names(opts) <- ...future.futureOptionsAdded [18:01:55.239] base::options(opts) [18:01:55.239] } [18:01:55.239] { [18:01:55.239] { [18:01:55.239] base::options(mc.cores = ...future.mc.cores.old) [18:01:55.239] NULL [18:01:55.239] } [18:01:55.239] options(future.plan = NULL) [18:01:55.239] if (is.na(NA_character_)) [18:01:55.239] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.239] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [18:01:55.239] future::plan(list(function (..., workers = 2L, [18:01:55.239] envir = parent.frame()) [18:01:55.239] strategy(..., workers = workers, envir = envir)), [18:01:55.239] .cleanup = FALSE, .init = FALSE) [18:01:55.239] } [18:01:55.239] } [18:01:55.239] } [18:01:55.239] }) [18:01:55.239] if (TRUE) { [18:01:55.239] base::sink(type = "output", split = FALSE) [18:01:55.239] if (TRUE) { [18:01:55.239] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [18:01:55.239] } [18:01:55.239] else { [18:01:55.239] ...future.result["stdout"] <- base::list(NULL) [18:01:55.239] } [18:01:55.239] base::close(...future.stdout) [18:01:55.239] ...future.stdout <- NULL [18:01:55.239] } [18:01:55.239] ...future.result$conditions <- ...future.conditions [18:01:55.239] ...future.result$finished <- base::Sys.time() [18:01:55.239] ...future.result [18:01:55.239] } [18:01:55.245] Exporting 2 global objects (4.17 KiB) to cluster node #1 ... [18:01:55.245] Exporting 'env' (4.06 KiB) to cluster node #1 ... [18:01:55.257] Exporting 'env' (4.06 KiB) to cluster node #1 ... DONE [18:01:55.257] Exporting 'b' (112 bytes) to cluster node #1 ... [18:01:55.258] Exporting 'b' (112 bytes) to cluster node #1 ... DONE [18:01:55.258] Exporting 2 global objects (4.17 KiB) to cluster node #1 ... DONE [18:01:55.259] MultisessionFuture started [18:01:55.259] - Launch lazy future ... done [18:01:55.259] run() for 'MultisessionFuture' ... done > > ## Resolve future #3 > message(sprintf("y = %s\n", y)) [18:01:55.259] result() for ClusterFuture ... [18:01:55.260] receiveMessageFromWorker() for ClusterFuture ... [18:01:55.260] - Validating connection of MultisessionFuture [18:01:55.275] - received message: FutureResult [18:01:55.275] - Received FutureResult [18:01:55.275] - Erased future from FutureRegistry [18:01:55.276] result() for ClusterFuture ... [18:01:55.276] - result already collected: FutureResult [18:01:55.276] result() for ClusterFuture ... done [18:01:55.276] receiveMessageFromWorker() for ClusterFuture ... done [18:01:55.276] result() for ClusterFuture ... done [18:01:55.276] result() for ClusterFuture ... [18:01:55.276] - result already collected: FutureResult [18:01:55.277] result() for ClusterFuture ... done y = 5 > > ## Resolve future #1 if not already done > str(as.list(env)) [18:01:55.277] result() for ClusterFuture ... [18:01:55.277] - result already collected: FutureResult [18:01:55.277] result() for ClusterFuture ... done [18:01:55.278] result() for ClusterFuture ... [18:01:55.278] - result already collected: FutureResult [18:01:55.278] 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: 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' [18:01:55.279] getGlobalsAndPackages() ... [18:01:55.279] Searching for globals... [18:01:55.280] - globals found: [4] '{', '[[', 'env', 'b' [18:01:55.281] Searching for globals ... DONE [18:01:55.281] Resolving globals: TRUE [18:01:55.281] Resolving any globals that are futures ... [18:01:55.281] - globals: [4] '{', '[[', 'env', 'b' [18:01:55.281] Resolving any globals that are futures ... DONE [18:01:55.282] Resolving futures part of globals (recursively) ... [18:01:55.282] resolve() on list ... [18:01:55.282] recursive: 99 [18:01:55.282] length: 2 [18:01:55.283] elements: 'env', 'b' [18:01:55.283] resolve() on environment ... [18:01:55.283] recursive: 98 [18:01:55.283] elements: [1] 'a' [18:01:55.284] length: 0 (resolved future 1) [18:01:55.284] resolve() on environment ... DONE [18:01:55.284] length: 1 (resolved future 1) [18:01:55.284] length: 0 (resolved future 2) [18:01:55.284] resolve() on list ... DONE [18:01:55.285] - globals: [2] 'env', 'b' [18:01:55.285] Resolving futures part of globals (recursively) ... DONE [18:01:55.285] The total size of the 2 globals is 168 bytes (168 bytes) [18:01:55.285] 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') [18:01:55.286] - globals: [2] 'env', 'b' [18:01:55.286] [18:01:55.286] getGlobalsAndPackages() ... DONE [18:01:55.286] run() for 'Future' ... [18:01:55.287] - state: 'created' [18:01:55.287] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [18:01:55.299] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [18:01:55.299] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [18:01:55.300] - Field: 'node' [18:01:55.300] - Field: 'label' [18:01:55.300] - Field: 'local' [18:01:55.300] - Field: 'owner' [18:01:55.300] - Field: 'envir' [18:01:55.301] - Field: 'workers' [18:01:55.301] - Field: 'packages' [18:01:55.301] - Field: 'gc' [18:01:55.301] - Field: 'conditions' [18:01:55.301] - Field: 'persistent' [18:01:55.301] - Field: 'expr' [18:01:55.302] - Field: 'uuid' [18:01:55.302] - Field: 'seed' [18:01:55.302] - Field: 'version' [18:01:55.302] - Field: 'result' [18:01:55.302] - Field: 'asynchronous' [18:01:55.303] - Field: 'calls' [18:01:55.303] - Field: 'globals' [18:01:55.303] - Field: 'stdout' [18:01:55.303] - Field: 'earlySignal' [18:01:55.303] - Field: 'lazy' [18:01:55.303] - Field: 'state' [18:01:55.304] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [18:01:55.304] - Launch lazy future ... [18:01:55.304] Packages needed by the future expression (n = 0): [18:01:55.304] Packages needed by future strategies (n = 0): [18:01:55.305] { [18:01:55.305] { [18:01:55.305] { [18:01:55.305] ...future.startTime <- base::Sys.time() [18:01:55.305] { [18:01:55.305] { [18:01:55.305] { [18:01:55.305] { [18:01:55.305] base::local({ [18:01:55.305] has_future <- base::requireNamespace("future", [18:01:55.305] quietly = TRUE) [18:01:55.305] if (has_future) { [18:01:55.305] ns <- base::getNamespace("future") [18:01:55.305] version <- ns[[".package"]][["version"]] [18:01:55.305] if (is.null(version)) [18:01:55.305] version <- utils::packageVersion("future") [18:01:55.305] } [18:01:55.305] else { [18:01:55.305] version <- NULL [18:01:55.305] } [18:01:55.305] if (!has_future || version < "1.8.0") { [18:01:55.305] info <- base::c(r_version = base::gsub("R version ", [18:01:55.305] "", base::R.version$version.string), [18:01:55.305] platform = base::sprintf("%s (%s-bit)", [18:01:55.305] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [18:01:55.305] os = base::paste(base::Sys.info()[base::c("sysname", [18:01:55.305] "release", "version")], collapse = " "), [18:01:55.305] hostname = base::Sys.info()[["nodename"]]) [18:01:55.305] info <- base::sprintf("%s: %s", base::names(info), [18:01:55.305] info) [18:01:55.305] info <- base::paste(info, collapse = "; ") [18:01:55.305] if (!has_future) { [18:01:55.305] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [18:01:55.305] info) [18:01:55.305] } [18:01:55.305] else { [18:01:55.305] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [18:01:55.305] info, version) [18:01:55.305] } [18:01:55.305] base::stop(msg) [18:01:55.305] } [18:01:55.305] }) [18:01:55.305] } [18:01:55.305] ...future.mc.cores.old <- base::getOption("mc.cores") [18:01:55.305] base::options(mc.cores = 1L) [18:01:55.305] } [18:01:55.305] options(future.plan = NULL) [18:01:55.305] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.305] future::plan("default", .cleanup = FALSE, .init = FALSE) [18:01:55.305] } [18:01:55.305] ...future.workdir <- getwd() [18:01:55.305] } [18:01:55.305] ...future.oldOptions <- base::as.list(base::.Options) [18:01:55.305] ...future.oldEnvVars <- base::Sys.getenv() [18:01:55.305] } [18:01:55.305] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [18:01:55.305] future.globals.maxSize = NULL, future.globals.method = NULL, [18:01:55.305] future.globals.onMissing = NULL, future.globals.onReference = NULL, [18:01:55.305] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [18:01:55.305] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [18:01:55.305] future.stdout.windows.reencode = NULL, width = 80L) [18:01:55.305] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [18:01:55.305] base::names(...future.oldOptions)) [18:01:55.305] } [18:01:55.305] if (FALSE) { [18:01:55.305] } [18:01:55.305] else { [18:01:55.305] if (TRUE) { [18:01:55.305] ...future.stdout <- base::rawConnection(base::raw(0L), [18:01:55.305] open = "w") [18:01:55.305] } [18:01:55.305] else { [18:01:55.305] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [18:01:55.305] windows = "NUL", "/dev/null"), open = "w") [18:01:55.305] } [18:01:55.305] base::sink(...future.stdout, type = "output", split = FALSE) [18:01:55.305] base::on.exit(if (!base::is.null(...future.stdout)) { [18:01:55.305] base::sink(type = "output", split = FALSE) [18:01:55.305] base::close(...future.stdout) [18:01:55.305] }, add = TRUE) [18:01:55.305] } [18:01:55.305] ...future.frame <- base::sys.nframe() [18:01:55.305] ...future.conditions <- base::list() [18:01:55.305] ...future.rng <- base::globalenv()$.Random.seed [18:01:55.305] if (FALSE) { [18:01:55.305] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [18:01:55.305] "...future.value", "...future.globalenv.names", ".Random.seed") [18:01:55.305] } [18:01:55.305] ...future.result <- base::tryCatch({ [18:01:55.305] base::withCallingHandlers({ [18:01:55.305] ...future.value <- base::withVisible(base::local({ [18:01:55.305] ...future.makeSendCondition <- local({ [18:01:55.305] sendCondition <- NULL [18:01:55.305] function(frame = 1L) { [18:01:55.305] if (is.function(sendCondition)) [18:01:55.305] return(sendCondition) [18:01:55.305] ns <- getNamespace("parallel") [18:01:55.305] if (exists("sendData", mode = "function", [18:01:55.305] envir = ns)) { [18:01:55.305] parallel_sendData <- get("sendData", mode = "function", [18:01:55.305] envir = ns) [18:01:55.305] envir <- sys.frame(frame) [18:01:55.305] master <- NULL [18:01:55.305] while (!identical(envir, .GlobalEnv) && [18:01:55.305] !identical(envir, emptyenv())) { [18:01:55.305] if (exists("master", mode = "list", envir = envir, [18:01:55.305] inherits = FALSE)) { [18:01:55.305] master <- get("master", mode = "list", [18:01:55.305] envir = envir, inherits = FALSE) [18:01:55.305] if (inherits(master, c("SOCKnode", [18:01:55.305] "SOCK0node"))) { [18:01:55.305] sendCondition <<- function(cond) { [18:01:55.305] data <- list(type = "VALUE", value = cond, [18:01:55.305] success = TRUE) [18:01:55.305] parallel_sendData(master, data) [18:01:55.305] } [18:01:55.305] return(sendCondition) [18:01:55.305] } [18:01:55.305] } [18:01:55.305] frame <- frame + 1L [18:01:55.305] envir <- sys.frame(frame) [18:01:55.305] } [18:01:55.305] } [18:01:55.305] sendCondition <<- function(cond) NULL [18:01:55.305] } [18:01:55.305] }) [18:01:55.305] withCallingHandlers({ [18:01:55.305] { [18:01:55.305] env[[b]] [18:01:55.305] } [18:01:55.305] }, immediateCondition = function(cond) { [18:01:55.305] sendCondition <- ...future.makeSendCondition() [18:01:55.305] sendCondition(cond) [18:01:55.305] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.305] { [18:01:55.305] inherits <- base::inherits [18:01:55.305] invokeRestart <- base::invokeRestart [18:01:55.305] is.null <- base::is.null [18:01:55.305] muffled <- FALSE [18:01:55.305] if (inherits(cond, "message")) { [18:01:55.305] muffled <- grepl(pattern, "muffleMessage") [18:01:55.305] if (muffled) [18:01:55.305] invokeRestart("muffleMessage") [18:01:55.305] } [18:01:55.305] else if (inherits(cond, "warning")) { [18:01:55.305] muffled <- grepl(pattern, "muffleWarning") [18:01:55.305] if (muffled) [18:01:55.305] invokeRestart("muffleWarning") [18:01:55.305] } [18:01:55.305] else if (inherits(cond, "condition")) { [18:01:55.305] if (!is.null(pattern)) { [18:01:55.305] computeRestarts <- base::computeRestarts [18:01:55.305] grepl <- base::grepl [18:01:55.305] restarts <- computeRestarts(cond) [18:01:55.305] for (restart in restarts) { [18:01:55.305] name <- restart$name [18:01:55.305] if (is.null(name)) [18:01:55.305] next [18:01:55.305] if (!grepl(pattern, name)) [18:01:55.305] next [18:01:55.305] invokeRestart(restart) [18:01:55.305] muffled <- TRUE [18:01:55.305] break [18:01:55.305] } [18:01:55.305] } [18:01:55.305] } [18:01:55.305] invisible(muffled) [18:01:55.305] } [18:01:55.305] muffleCondition(cond) [18:01:55.305] }) [18:01:55.305] })) [18:01:55.305] future::FutureResult(value = ...future.value$value, [18:01:55.305] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.305] ...future.rng), globalenv = if (FALSE) [18:01:55.305] list(added = base::setdiff(base::names(base::.GlobalEnv), [18:01:55.305] ...future.globalenv.names)) [18:01:55.305] else NULL, started = ...future.startTime, version = "1.8") [18:01:55.305] }, condition = base::local({ [18:01:55.305] c <- base::c [18:01:55.305] inherits <- base::inherits [18:01:55.305] invokeRestart <- base::invokeRestart [18:01:55.305] length <- base::length [18:01:55.305] list <- base::list [18:01:55.305] seq.int <- base::seq.int [18:01:55.305] signalCondition <- base::signalCondition [18:01:55.305] sys.calls <- base::sys.calls [18:01:55.305] `[[` <- base::`[[` [18:01:55.305] `+` <- base::`+` [18:01:55.305] `<<-` <- base::`<<-` [18:01:55.305] sysCalls <- function(calls = sys.calls(), from = 1L) { [18:01:55.305] calls[seq.int(from = from + 12L, to = length(calls) - [18:01:55.305] 3L)] [18:01:55.305] } [18:01:55.305] function(cond) { [18:01:55.305] is_error <- inherits(cond, "error") [18:01:55.305] ignore <- !is_error && !is.null(NULL) && inherits(cond, [18:01:55.305] NULL) [18:01:55.305] if (is_error) { [18:01:55.305] sessionInformation <- function() { [18:01:55.305] list(r = base::R.Version(), locale = base::Sys.getlocale(), [18:01:55.305] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [18:01:55.305] search = base::search(), system = base::Sys.info()) [18:01:55.305] } [18:01:55.305] ...future.conditions[[length(...future.conditions) + [18:01:55.305] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [18:01:55.305] cond$call), session = sessionInformation(), [18:01:55.305] timestamp = base::Sys.time(), signaled = 0L) [18:01:55.305] signalCondition(cond) [18:01:55.305] } [18:01:55.305] else if (!ignore && TRUE && inherits(cond, c("condition", [18:01:55.305] "immediateCondition"))) { [18:01:55.305] signal <- TRUE && inherits(cond, "immediateCondition") [18:01:55.305] ...future.conditions[[length(...future.conditions) + [18:01:55.305] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [18:01:55.305] if (TRUE && !signal) { [18:01:55.305] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.305] { [18:01:55.305] inherits <- base::inherits [18:01:55.305] invokeRestart <- base::invokeRestart [18:01:55.305] is.null <- base::is.null [18:01:55.305] muffled <- FALSE [18:01:55.305] if (inherits(cond, "message")) { [18:01:55.305] muffled <- grepl(pattern, "muffleMessage") [18:01:55.305] if (muffled) [18:01:55.305] invokeRestart("muffleMessage") [18:01:55.305] } [18:01:55.305] else if (inherits(cond, "warning")) { [18:01:55.305] muffled <- grepl(pattern, "muffleWarning") [18:01:55.305] if (muffled) [18:01:55.305] invokeRestart("muffleWarning") [18:01:55.305] } [18:01:55.305] else if (inherits(cond, "condition")) { [18:01:55.305] if (!is.null(pattern)) { [18:01:55.305] computeRestarts <- base::computeRestarts [18:01:55.305] grepl <- base::grepl [18:01:55.305] restarts <- computeRestarts(cond) [18:01:55.305] for (restart in restarts) { [18:01:55.305] name <- restart$name [18:01:55.305] if (is.null(name)) [18:01:55.305] next [18:01:55.305] if (!grepl(pattern, name)) [18:01:55.305] next [18:01:55.305] invokeRestart(restart) [18:01:55.305] muffled <- TRUE [18:01:55.305] break [18:01:55.305] } [18:01:55.305] } [18:01:55.305] } [18:01:55.305] invisible(muffled) [18:01:55.305] } [18:01:55.305] muffleCondition(cond, pattern = "^muffle") [18:01:55.305] } [18:01:55.305] } [18:01:55.305] else { [18:01:55.305] if (TRUE) { [18:01:55.305] muffleCondition <- function (cond, pattern = "^muffle") [18:01:55.305] { [18:01:55.305] inherits <- base::inherits [18:01:55.305] invokeRestart <- base::invokeRestart [18:01:55.305] is.null <- base::is.null [18:01:55.305] muffled <- FALSE [18:01:55.305] if (inherits(cond, "message")) { [18:01:55.305] muffled <- grepl(pattern, "muffleMessage") [18:01:55.305] if (muffled) [18:01:55.305] invokeRestart("muffleMessage") [18:01:55.305] } [18:01:55.305] else if (inherits(cond, "warning")) { [18:01:55.305] muffled <- grepl(pattern, "muffleWarning") [18:01:55.305] if (muffled) [18:01:55.305] invokeRestart("muffleWarning") [18:01:55.305] } [18:01:55.305] else if (inherits(cond, "condition")) { [18:01:55.305] if (!is.null(pattern)) { [18:01:55.305] computeRestarts <- base::computeRestarts [18:01:55.305] grepl <- base::grepl [18:01:55.305] restarts <- computeRestarts(cond) [18:01:55.305] for (restart in restarts) { [18:01:55.305] name <- restart$name [18:01:55.305] if (is.null(name)) [18:01:55.305] next [18:01:55.305] if (!grepl(pattern, name)) [18:01:55.305] next [18:01:55.305] invokeRestart(restart) [18:01:55.305] muffled <- TRUE [18:01:55.305] break [18:01:55.305] } [18:01:55.305] } [18:01:55.305] } [18:01:55.305] invisible(muffled) [18:01:55.305] } [18:01:55.305] muffleCondition(cond, pattern = "^muffle") [18:01:55.305] } [18:01:55.305] } [18:01:55.305] } [18:01:55.305] })) [18:01:55.305] }, error = function(ex) { [18:01:55.305] base::structure(base::list(value = NULL, visible = NULL, [18:01:55.305] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [18:01:55.305] ...future.rng), started = ...future.startTime, [18:01:55.305] finished = Sys.time(), session_uuid = NA_character_, [18:01:55.305] version = "1.8"), class = "FutureResult") [18:01:55.305] }, finally = { [18:01:55.305] if (!identical(...future.workdir, getwd())) [18:01:55.305] setwd(...future.workdir) [18:01:55.305] { [18:01:55.305] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [18:01:55.305] ...future.oldOptions$nwarnings <- NULL [18:01:55.305] } [18:01:55.305] base::options(...future.oldOptions) [18:01:55.305] if (.Platform$OS.type == "windows") { [18:01:55.305] old_names <- names(...future.oldEnvVars) [18:01:55.305] envs <- base::Sys.getenv() [18:01:55.305] names <- names(envs) [18:01:55.305] common <- intersect(names, old_names) [18:01:55.305] added <- setdiff(names, old_names) [18:01:55.305] removed <- setdiff(old_names, names) [18:01:55.305] changed <- common[...future.oldEnvVars[common] != [18:01:55.305] envs[common]] [18:01:55.305] NAMES <- toupper(changed) [18:01:55.305] args <- list() [18:01:55.305] for (kk in seq_along(NAMES)) { [18:01:55.305] name <- changed[[kk]] [18:01:55.305] NAME <- NAMES[[kk]] [18:01:55.305] if (name != NAME && is.element(NAME, old_names)) [18:01:55.305] next [18:01:55.305] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.305] } [18:01:55.305] NAMES <- toupper(added) [18:01:55.305] for (kk in seq_along(NAMES)) { [18:01:55.305] name <- added[[kk]] [18:01:55.305] NAME <- NAMES[[kk]] [18:01:55.305] if (name != NAME && is.element(NAME, old_names)) [18:01:55.305] next [18:01:55.305] args[[name]] <- "" [18:01:55.305] } [18:01:55.305] NAMES <- toupper(removed) [18:01:55.305] for (kk in seq_along(NAMES)) { [18:01:55.305] name <- removed[[kk]] [18:01:55.305] NAME <- NAMES[[kk]] [18:01:55.305] if (name != NAME && is.element(NAME, old_names)) [18:01:55.305] next [18:01:55.305] args[[name]] <- ...future.oldEnvVars[[name]] [18:01:55.305] } [18:01:55.305] if (length(args) > 0) [18:01:55.305] base::do.call(base::Sys.setenv, args = args) [18:01:55.305] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [18:01:55.305] } [18:01:55.305] else { [18:01:55.305] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [18:01:55.305] } [18:01:55.305] { [18:01:55.305] if (base::length(...future.futureOptionsAdded) > [18:01:55.305] 0L) { [18:01:55.305] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [18:01:55.305] base::names(opts) <- ...future.futureOptionsAdded [18:01:55.305] base::options(opts) [18:01:55.305] } [18:01:55.305] { [18:01:55.305] { [18:01:55.305] base::options(mc.cores = ...future.mc.cores.old) [18:01:55.305] NULL [18:01:55.305] } [18:01:55.305] options(future.plan = NULL) [18:01:55.305] if (is.na(NA_character_)) [18:01:55.305] Sys.unsetenv("R_FUTURE_PLAN") [18:01:55.305] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [18:01:55.305] future::plan(list(function (..., workers = 2L, [18:01:55.305] envir = parent.frame()) [18:01:55.305] strategy(..., workers = workers, envir = envir)), [18:01:55.305] .cleanup = FALSE, .init = FALSE) [18:01:55.305] } [18:01:55.305] } [18:01:55.305] } [18:01:55.305] }) [18:01:55.305] if (TRUE) { [18:01:55.305] base::sink(type = "output", split = FALSE) [18:01:55.305] if (TRUE) { [18:01:55.305] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [18:01:55.305] } [18:01:55.305] else { [18:01:55.305] ...future.result["stdout"] <- base::list(NULL) [18:01:55.305] } [18:01:55.305] base::close(...future.stdout) [18:01:55.305] ...future.stdout <- NULL [18:01:55.305] } [18:01:55.305] ...future.result$conditions <- ...future.conditions [18:01:55.305] ...future.result$finished <- base::Sys.time() [18:01:55.305] ...future.result [18:01:55.305] } [18:01:55.310] Exporting 2 global objects (168 bytes) to cluster node #1 ... [18:01:55.310] Exporting 'env' (56 bytes) to cluster node #1 ... [18:01:55.311] Exporting 'env' (56 bytes) to cluster node #1 ... DONE [18:01:55.311] Exporting 'b' (112 bytes) to cluster node #1 ... [18:01:55.311] Exporting 'b' (112 bytes) to cluster node #1 ... DONE [18:01:55.312] Exporting 2 global objects (168 bytes) to cluster node #1 ... DONE [18:01:55.312] MultisessionFuture started [18:01:55.312] - Launch lazy future ... done [18:01:55.313] run() for 'MultisessionFuture' ... done > ## Resolve future #4 > message(sprintf("y = %s\n", y)) [18:01:55.313] result() for ClusterFuture ... [18:01:55.313] receiveMessageFromWorker() for ClusterFuture ... [18:01:55.313] - Validating connection of MultisessionFuture [18:01:55.329] - received message: FutureResult [18:01:55.329] - Received FutureResult [18:01:55.329] - Erased future from FutureRegistry [18:01:55.330] result() for ClusterFuture ... [18:01:55.330] - result already collected: FutureResult [18:01:55.330] result() for ClusterFuture ... done [18:01:55.330] receiveMessageFromWorker() for ClusterFuture ... done [18:01:55.330] result() for ClusterFuture ... done [18:01:55.330] result() for ClusterFuture ... [18:01:55.331] - result already collected: FutureResult [18:01:55.331] 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") [18:01:55.332] plan(): Setting new future strategy stack: [18:01:55.332] List of future strategies: [18:01:55.332] 1. FutureStrategy: [18:01:55.332] - args: function (..., envir = parent.frame()) [18:01:55.332] - tweaked: FALSE [18:01:55.332] - call: future::plan(oplan) [18:01:55.333] plan(): nbrOfWorkers() = 1 Failed to undo environment variables: - Expected environment variables: [n=201] '!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', 'OMP_THREAD_LIMIT', 'OS', 'PATH', 'PATHEXT', 'PROCESSOR_ARCHITECTURE', 'PROCESSOR_IDENTIFIER', 'PROCESSOR_LEVEL', 'PROCESSOR_REVISION', 'PROGRAMFILES', 'PROMPT', 'PSModulePath', 'PUBLIC', 'PWD', 'ProgramData', 'ProgramFiles(x86)', 'ProgramW6432', 'RETICULATE_AUTOCONFIGURE', 'RTOOLS43_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_RTOOLS43_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_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_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_SUBDIRS_STRICT_', '_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_INSTALL_TIME_PATCHES_', '_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_', '_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_', '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.50 0.12 1.42