R Under development (unstable) (2024-07-28 r86931 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") [17:27:57.843] plan(): Setting new future strategy stack: [17:27:57.845] List of future strategies: [17:27:57.845] 1. sequential: [17:27:57.845] - args: function (..., envir = parent.frame(), workers = "") [17:27:57.845] - tweaked: FALSE [17:27:57.845] - call: future::plan("sequential") [17:27:57.871] plan(): nbrOfWorkers() = 1 > library("listenv") > > oopts <- c(oopts, options(future.globals.resolve = TRUE)) > setTimeLimit(cpu = 10, elapsed = 10, transient = TRUE) > > message("*** Tricky use cases related to globals (part 2) ...") *** Tricky use cases related to globals (part 2) ... > > ## Allow for two background processes > plan(multisession, workers = 2L) [17:27:57.889] plan(): Setting new future strategy stack: [17:27:57.889] List of future strategies: [17:27:57.889] 1. multisession: [17:27:57.889] - args: function (..., workers = 2L, envir = parent.frame()) [17:27:57.889] - tweaked: TRUE [17:27:57.889] - call: plan(multisession, workers = 2L) [17:27:57.913] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... [17:27:57.913] multisession: [17:27:57.913] - args: function (..., workers = 2L, envir = parent.frame()) [17:27:57.913] - tweaked: TRUE [17:27:57.913] - call: plan(multisession, workers = 2L) Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:27:57.916] getGlobalsAndPackages() ... [17:27:57.916] Not searching for globals [17:27:57.916] - globals: [0] [17:27:57.917] getGlobalsAndPackages() ... DONE [17:27:57.917] [local output] makeClusterPSOCK() ... [17:27:57.967] [local output] Workers: [n = 2] 'localhost', 'localhost' [17:27:57.976] [local output] Base port: 31907 [17:27:57.977] [local output] Getting setup options for 2 cluster nodes ... [17:27:57.977] [local output] - Node #1 of 2 ... [17:27:57.978] [local output] localMachine=TRUE => revtunnel=FALSE [17:27:57.980] Testing if worker's PID can be inferred: '"D:/RCompile/recent/R/bin/x64/Rscript" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpMDR7Y2/worker.rank=1.parallelly.parent=171488.29de065bf5.pid\")), silent = TRUE)" -e "file.exists(\"D:/temp/RtmpMDR7Y2/worker.rank=1.parallelly.parent=171488.29de065bf5.pid\")"' [17:27:58.533] - Possible to infer worker's PID: TRUE [17:27:58.535] [local output] Rscript port: 31907 [17:27:58.536] [local output] - Node #2 of 2 ... [17:27:58.537] [local output] localMachine=TRUE => revtunnel=FALSE [17:27:58.539] [local output] Rscript port: 31907 [17:27:58.540] [local output] Getting setup options for 2 cluster nodes ... done [17:27:58.540] [local output] - Parallel setup requested for some PSOCK nodes [17:27:58.541] [local output] Setting up PSOCK nodes in parallel [17:27:58.542] List of 36 [17:27:58.542] $ worker : chr "localhost" [17:27:58.542] ..- attr(*, "localhost")= logi TRUE [17:27:58.542] $ master : chr "localhost" [17:27:58.542] $ port : int 31907 [17:27:58.542] $ connectTimeout : num 120 [17:27:58.542] $ timeout : num 120 [17:27:58.542] $ rscript : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\"" [17:27:58.542] $ homogeneous : logi TRUE [17:27:58.542] $ rscript_args : chr "--default-packages=datasets,utils,grDevices,graphics,stats,methods -e \"#label=globals,resolve.R:171488:CRANWIN"| __truncated__ [17:27:58.542] $ rscript_envs : NULL [17:27:58.542] $ rscript_libs : chr [1:2] "D:/temp/RtmpsXpk4j/RLIBS_1097c668d2fda" "D:/RCompile/recent/R/library" [17:27:58.542] $ rscript_startup : NULL [17:27:58.542] $ rscript_sh : chr [1:2] "cmd" "cmd" [17:27:58.542] $ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [17:27:58.542] $ methods : logi TRUE [17:27:58.542] $ socketOptions : chr "no-delay" [17:27:58.542] $ useXDR : logi FALSE [17:27:58.542] $ outfile : chr "/dev/null" [17:27:58.542] $ renice : int NA [17:27:58.542] $ rshcmd : NULL [17:27:58.542] $ user : chr(0) [17:27:58.542] $ revtunnel : logi FALSE [17:27:58.542] $ rshlogfile : NULL [17:27:58.542] $ rshopts : chr(0) [17:27:58.542] $ rank : int 1 [17:27:58.542] $ manual : logi FALSE [17:27:58.542] $ dryrun : logi FALSE [17:27:58.542] $ quiet : logi FALSE [17:27:58.542] $ setup_strategy : chr "parallel" [17:27:58.542] $ local_cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [17:27:58.542] $ pidfile : chr "D:/temp/RtmpMDR7Y2/worker.rank=1.parallelly.parent=171488.29de065bf5.pid" [17:27:58.542] $ rshcmd_label : NULL [17:27:58.542] $ rsh_call : NULL [17:27:58.542] $ cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [17:27:58.542] $ localMachine : logi TRUE [17:27:58.542] $ make_fcn :function (worker = getOption2("parallelly.localhost.hostname", "localhost"), [17:27:58.542] master = NULL, port, connectTimeout = getOption2("parallelly.makeNodePSOCK.connectTimeout", [17:27:58.542] 2 * 60), timeout = getOption2("parallelly.makeNodePSOCK.timeout", [17:27:58.542] 30 * 24 * 60 * 60), rscript = NULL, homogeneous = NULL, rscript_args = NULL, [17:27:58.542] rscript_envs = NULL, rscript_libs = NULL, rscript_startup = NULL, rscript_sh = c("auto", [17:27:58.542] "cmd", "sh", "none"), default_packages = c("datasets", "utils", [17:27:58.542] "grDevices", "graphics", "stats", if (methods) "methods"), methods = TRUE, [17:27:58.542] socketOptions = getOption2("parallelly.makeNodePSOCK.socketOptions", [17:27:58.542] "no-delay"), useXDR = getOption2("parallelly.makeNodePSOCK.useXDR", [17:27:58.542] FALSE), outfile = "/dev/null", renice = NA_integer_, rshcmd = getOption2("parallelly.makeNodePSOCK.rshcmd", [17:27:58.542] NULL), user = NULL, revtunnel = NA, rshlogfile = NULL, rshopts = getOption2("parallelly.makeNodePSOCK.rshopts", [17:27:58.542] NULL), rank = 1L, manual = FALSE, dryrun = FALSE, quiet = FALSE, [17:27:58.542] setup_strategy = getOption2("parallelly.makeNodePSOCK.setup_strategy", [17:27:58.542] "parallel"), action = c("launch", "options"), verbose = FALSE) [17:27:58.542] $ arguments :List of 28 [17:27:58.542] ..$ worker : chr "localhost" [17:27:58.542] ..$ master : NULL [17:27:58.542] ..$ port : int 31907 [17:27:58.542] ..$ connectTimeout : num 120 [17:27:58.542] ..$ timeout : num 120 [17:27:58.542] ..$ rscript : NULL [17:27:58.542] ..$ homogeneous : NULL [17:27:58.542] ..$ rscript_args : NULL [17:27:58.542] ..$ rscript_envs : NULL [17:27:58.542] ..$ rscript_libs : chr [1:2] "D:/temp/RtmpsXpk4j/RLIBS_1097c668d2fda" "D:/RCompile/recent/R/library" [17:27:58.542] ..$ rscript_startup : NULL [17:27:58.542] ..$ rscript_sh : chr "auto" [17:27:58.542] ..$ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [17:27:58.542] ..$ methods : logi TRUE [17:27:58.542] ..$ socketOptions : chr "no-delay" [17:27:58.542] ..$ useXDR : logi FALSE [17:27:58.542] ..$ outfile : chr "/dev/null" [17:27:58.542] ..$ renice : int NA [17:27:58.542] ..$ rshcmd : NULL [17:27:58.542] ..$ user : NULL [17:27:58.542] ..$ revtunnel : logi NA [17:27:58.542] ..$ rshlogfile : NULL [17:27:58.542] ..$ rshopts : NULL [17:27:58.542] ..$ rank : int 1 [17:27:58.542] ..$ manual : logi FALSE [17:27:58.542] ..$ dryrun : logi FALSE [17:27:58.542] ..$ quiet : logi FALSE [17:27:58.542] ..$ setup_strategy : chr "parallel" [17:27:58.542] - attr(*, "class")= chr [1:2] "makeNodePSOCKOptions" "makeNodeOptions" [17:27:58.577] [local output] System call to launch all workers: [17:27:58.577] [local output] "D:/RCompile/recent/R/bin/x64/Rscript" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "#label=globals,resolve.R:171488:CRANWIN3:CRAN" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpMDR7Y2/worker.rank=1.parallelly.parent=171488.29de065bf5.pid\")), silent = TRUE)" -e "options(socketOptions = \"no-delay\")" -e ".libPaths(c(\"D:/temp/RtmpsXpk4j/RLIBS_1097c668d2fda\",\"D:/RCompile/recent/R/library\"))" -e "workRSOCK <- tryCatch(parallel:::.workRSOCK, error=function(e) parallel:::.slaveRSOCK); workRSOCK()" MASTER=localhost PORT=31907 OUT=/dev/null TIMEOUT=120 XDR=FALSE SETUPTIMEOUT=120 SETUPSTRATEGY=parallel [17:27:58.578] [local output] Starting PSOCK main server [17:27:58.588] [local output] Workers launched [17:27:58.588] [local output] Waiting for workers to connect back [17:27:58.589] - [local output] 0 workers out of 2 ready [17:27:58.834] - [local output] 0 workers out of 2 ready [17:27:58.834] - [local output] 1 workers out of 2 ready [17:27:58.839] - [local output] 1 workers out of 2 ready [17:27:58.839] - [local output] 2 workers out of 2 ready [17:27:58.839] [local output] Launching of 2 workers completed [17:27:58.840] [local output] Number of nodes in cluster: 2 [17:27:58.840] [local output] Collecting session information from 2 workers [17:27:58.841] [local output] - Worker #1 of 2 [17:27:58.842] [local output] - Worker #2 of 2 [17:27:58.842] [local output] makeClusterPSOCK() ... done [17:27:58.860] Packages needed by the future expression (n = 0): [17:27:58.860] Packages needed by future strategies (n = 0): [17:27:58.862] { [17:27:58.862] { [17:27:58.862] { [17:27:58.862] ...future.startTime <- base::Sys.time() [17:27:58.862] { [17:27:58.862] { [17:27:58.862] { [17:27:58.862] { [17:27:58.862] base::local({ [17:27:58.862] has_future <- base::requireNamespace("future", [17:27:58.862] quietly = TRUE) [17:27:58.862] if (has_future) { [17:27:58.862] ns <- base::getNamespace("future") [17:27:58.862] version <- ns[[".package"]][["version"]] [17:27:58.862] if (is.null(version)) [17:27:58.862] version <- utils::packageVersion("future") [17:27:58.862] } [17:27:58.862] else { [17:27:58.862] version <- NULL [17:27:58.862] } [17:27:58.862] if (!has_future || version < "1.8.0") { [17:27:58.862] info <- base::c(r_version = base::gsub("R version ", [17:27:58.862] "", base::R.version$version.string), [17:27:58.862] platform = base::sprintf("%s (%s-bit)", [17:27:58.862] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:27:58.862] os = base::paste(base::Sys.info()[base::c("sysname", [17:27:58.862] "release", "version")], collapse = " "), [17:27:58.862] hostname = base::Sys.info()[["nodename"]]) [17:27:58.862] info <- base::sprintf("%s: %s", base::names(info), [17:27:58.862] info) [17:27:58.862] info <- base::paste(info, collapse = "; ") [17:27:58.862] if (!has_future) { [17:27:58.862] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:27:58.862] info) [17:27:58.862] } [17:27:58.862] else { [17:27:58.862] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:27:58.862] info, version) [17:27:58.862] } [17:27:58.862] base::stop(msg) [17:27:58.862] } [17:27:58.862] }) [17:27:58.862] } [17:27:58.862] ...future.mc.cores.old <- base::getOption("mc.cores") [17:27:58.862] base::options(mc.cores = 1L) [17:27:58.862] } [17:27:58.862] ...future.strategy.old <- future::plan("list") [17:27:58.862] options(future.plan = NULL) [17:27:58.862] Sys.unsetenv("R_FUTURE_PLAN") [17:27:58.862] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:27:58.862] } [17:27:58.862] ...future.workdir <- getwd() [17:27:58.862] } [17:27:58.862] ...future.oldOptions <- base::as.list(base::.Options) [17:27:58.862] ...future.oldEnvVars <- base::Sys.getenv() [17:27:58.862] } [17:27:58.862] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:27:58.862] future.globals.maxSize = NULL, future.globals.method = NULL, [17:27:58.862] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:27:58.862] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:27:58.862] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:27:58.862] future.stdout.windows.reencode = NULL, width = 80L) [17:27:58.862] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:27:58.862] base::names(...future.oldOptions)) [17:27:58.862] } [17:27:58.862] if (FALSE) { [17:27:58.862] } [17:27:58.862] else { [17:27:58.862] if (TRUE) { [17:27:58.862] ...future.stdout <- base::rawConnection(base::raw(0L), [17:27:58.862] open = "w") [17:27:58.862] } [17:27:58.862] else { [17:27:58.862] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:27:58.862] windows = "NUL", "/dev/null"), open = "w") [17:27:58.862] } [17:27:58.862] base::sink(...future.stdout, type = "output", split = FALSE) [17:27:58.862] base::on.exit(if (!base::is.null(...future.stdout)) { [17:27:58.862] base::sink(type = "output", split = FALSE) [17:27:58.862] base::close(...future.stdout) [17:27:58.862] }, add = TRUE) [17:27:58.862] } [17:27:58.862] ...future.frame <- base::sys.nframe() [17:27:58.862] ...future.conditions <- base::list() [17:27:58.862] ...future.rng <- base::globalenv()$.Random.seed [17:27:58.862] if (FALSE) { [17:27:58.862] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:27:58.862] "...future.value", "...future.globalenv.names", ".Random.seed") [17:27:58.862] } [17:27:58.862] ...future.result <- base::tryCatch({ [17:27:58.862] base::withCallingHandlers({ [17:27:58.862] ...future.value <- base::withVisible(base::local({ [17:27:58.862] ...future.makeSendCondition <- base::local({ [17:27:58.862] sendCondition <- NULL [17:27:58.862] function(frame = 1L) { [17:27:58.862] if (is.function(sendCondition)) [17:27:58.862] return(sendCondition) [17:27:58.862] ns <- getNamespace("parallel") [17:27:58.862] if (exists("sendData", mode = "function", [17:27:58.862] envir = ns)) { [17:27:58.862] parallel_sendData <- get("sendData", mode = "function", [17:27:58.862] envir = ns) [17:27:58.862] envir <- sys.frame(frame) [17:27:58.862] master <- NULL [17:27:58.862] while (!identical(envir, .GlobalEnv) && [17:27:58.862] !identical(envir, emptyenv())) { [17:27:58.862] if (exists("master", mode = "list", envir = envir, [17:27:58.862] inherits = FALSE)) { [17:27:58.862] master <- get("master", mode = "list", [17:27:58.862] envir = envir, inherits = FALSE) [17:27:58.862] if (inherits(master, c("SOCKnode", [17:27:58.862] "SOCK0node"))) { [17:27:58.862] sendCondition <<- function(cond) { [17:27:58.862] data <- list(type = "VALUE", value = cond, [17:27:58.862] success = TRUE) [17:27:58.862] parallel_sendData(master, data) [17:27:58.862] } [17:27:58.862] return(sendCondition) [17:27:58.862] } [17:27:58.862] } [17:27:58.862] frame <- frame + 1L [17:27:58.862] envir <- sys.frame(frame) [17:27:58.862] } [17:27:58.862] } [17:27:58.862] sendCondition <<- function(cond) NULL [17:27:58.862] } [17:27:58.862] }) [17:27:58.862] withCallingHandlers({ [17:27:58.862] NA [17:27:58.862] }, immediateCondition = function(cond) { [17:27:58.862] sendCondition <- ...future.makeSendCondition() [17:27:58.862] sendCondition(cond) [17:27:58.862] muffleCondition <- function (cond, pattern = "^muffle") [17:27:58.862] { [17:27:58.862] inherits <- base::inherits [17:27:58.862] invokeRestart <- base::invokeRestart [17:27:58.862] is.null <- base::is.null [17:27:58.862] muffled <- FALSE [17:27:58.862] if (inherits(cond, "message")) { [17:27:58.862] muffled <- grepl(pattern, "muffleMessage") [17:27:58.862] if (muffled) [17:27:58.862] invokeRestart("muffleMessage") [17:27:58.862] } [17:27:58.862] else if (inherits(cond, "warning")) { [17:27:58.862] muffled <- grepl(pattern, "muffleWarning") [17:27:58.862] if (muffled) [17:27:58.862] invokeRestart("muffleWarning") [17:27:58.862] } [17:27:58.862] else if (inherits(cond, "condition")) { [17:27:58.862] if (!is.null(pattern)) { [17:27:58.862] computeRestarts <- base::computeRestarts [17:27:58.862] grepl <- base::grepl [17:27:58.862] restarts <- computeRestarts(cond) [17:27:58.862] for (restart in restarts) { [17:27:58.862] name <- restart$name [17:27:58.862] if (is.null(name)) [17:27:58.862] next [17:27:58.862] if (!grepl(pattern, name)) [17:27:58.862] next [17:27:58.862] invokeRestart(restart) [17:27:58.862] muffled <- TRUE [17:27:58.862] break [17:27:58.862] } [17:27:58.862] } [17:27:58.862] } [17:27:58.862] invisible(muffled) [17:27:58.862] } [17:27:58.862] muffleCondition(cond) [17:27:58.862] }) [17:27:58.862] })) [17:27:58.862] future::FutureResult(value = ...future.value$value, [17:27:58.862] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:27:58.862] ...future.rng), globalenv = if (FALSE) [17:27:58.862] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:27:58.862] ...future.globalenv.names)) [17:27:58.862] else NULL, started = ...future.startTime, version = "1.8") [17:27:58.862] }, condition = base::local({ [17:27:58.862] c <- base::c [17:27:58.862] inherits <- base::inherits [17:27:58.862] invokeRestart <- base::invokeRestart [17:27:58.862] length <- base::length [17:27:58.862] list <- base::list [17:27:58.862] seq.int <- base::seq.int [17:27:58.862] signalCondition <- base::signalCondition [17:27:58.862] sys.calls <- base::sys.calls [17:27:58.862] `[[` <- base::`[[` [17:27:58.862] `+` <- base::`+` [17:27:58.862] `<<-` <- base::`<<-` [17:27:58.862] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:27:58.862] calls[seq.int(from = from + 12L, to = length(calls) - [17:27:58.862] 3L)] [17:27:58.862] } [17:27:58.862] function(cond) { [17:27:58.862] is_error <- inherits(cond, "error") [17:27:58.862] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:27:58.862] NULL) [17:27:58.862] if (is_error) { [17:27:58.862] sessionInformation <- function() { [17:27:58.862] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:27:58.862] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:27:58.862] search = base::search(), system = base::Sys.info()) [17:27:58.862] } [17:27:58.862] ...future.conditions[[length(...future.conditions) + [17:27:58.862] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:27:58.862] cond$call), session = sessionInformation(), [17:27:58.862] timestamp = base::Sys.time(), signaled = 0L) [17:27:58.862] signalCondition(cond) [17:27:58.862] } [17:27:58.862] else if (!ignore && TRUE && inherits(cond, c("condition", [17:27:58.862] "immediateCondition"))) { [17:27:58.862] signal <- TRUE && inherits(cond, "immediateCondition") [17:27:58.862] ...future.conditions[[length(...future.conditions) + [17:27:58.862] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:27:58.862] if (TRUE && !signal) { [17:27:58.862] muffleCondition <- function (cond, pattern = "^muffle") [17:27:58.862] { [17:27:58.862] inherits <- base::inherits [17:27:58.862] invokeRestart <- base::invokeRestart [17:27:58.862] is.null <- base::is.null [17:27:58.862] muffled <- FALSE [17:27:58.862] if (inherits(cond, "message")) { [17:27:58.862] muffled <- grepl(pattern, "muffleMessage") [17:27:58.862] if (muffled) [17:27:58.862] invokeRestart("muffleMessage") [17:27:58.862] } [17:27:58.862] else if (inherits(cond, "warning")) { [17:27:58.862] muffled <- grepl(pattern, "muffleWarning") [17:27:58.862] if (muffled) [17:27:58.862] invokeRestart("muffleWarning") [17:27:58.862] } [17:27:58.862] else if (inherits(cond, "condition")) { [17:27:58.862] if (!is.null(pattern)) { [17:27:58.862] computeRestarts <- base::computeRestarts [17:27:58.862] grepl <- base::grepl [17:27:58.862] restarts <- computeRestarts(cond) [17:27:58.862] for (restart in restarts) { [17:27:58.862] name <- restart$name [17:27:58.862] if (is.null(name)) [17:27:58.862] next [17:27:58.862] if (!grepl(pattern, name)) [17:27:58.862] next [17:27:58.862] invokeRestart(restart) [17:27:58.862] muffled <- TRUE [17:27:58.862] break [17:27:58.862] } [17:27:58.862] } [17:27:58.862] } [17:27:58.862] invisible(muffled) [17:27:58.862] } [17:27:58.862] muffleCondition(cond, pattern = "^muffle") [17:27:58.862] } [17:27:58.862] } [17:27:58.862] else { [17:27:58.862] if (TRUE) { [17:27:58.862] muffleCondition <- function (cond, pattern = "^muffle") [17:27:58.862] { [17:27:58.862] inherits <- base::inherits [17:27:58.862] invokeRestart <- base::invokeRestart [17:27:58.862] is.null <- base::is.null [17:27:58.862] muffled <- FALSE [17:27:58.862] if (inherits(cond, "message")) { [17:27:58.862] muffled <- grepl(pattern, "muffleMessage") [17:27:58.862] if (muffled) [17:27:58.862] invokeRestart("muffleMessage") [17:27:58.862] } [17:27:58.862] else if (inherits(cond, "warning")) { [17:27:58.862] muffled <- grepl(pattern, "muffleWarning") [17:27:58.862] if (muffled) [17:27:58.862] invokeRestart("muffleWarning") [17:27:58.862] } [17:27:58.862] else if (inherits(cond, "condition")) { [17:27:58.862] if (!is.null(pattern)) { [17:27:58.862] computeRestarts <- base::computeRestarts [17:27:58.862] grepl <- base::grepl [17:27:58.862] restarts <- computeRestarts(cond) [17:27:58.862] for (restart in restarts) { [17:27:58.862] name <- restart$name [17:27:58.862] if (is.null(name)) [17:27:58.862] next [17:27:58.862] if (!grepl(pattern, name)) [17:27:58.862] next [17:27:58.862] invokeRestart(restart) [17:27:58.862] muffled <- TRUE [17:27:58.862] break [17:27:58.862] } [17:27:58.862] } [17:27:58.862] } [17:27:58.862] invisible(muffled) [17:27:58.862] } [17:27:58.862] muffleCondition(cond, pattern = "^muffle") [17:27:58.862] } [17:27:58.862] } [17:27:58.862] } [17:27:58.862] })) [17:27:58.862] }, error = function(ex) { [17:27:58.862] base::structure(base::list(value = NULL, visible = NULL, [17:27:58.862] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:27:58.862] ...future.rng), started = ...future.startTime, [17:27:58.862] finished = Sys.time(), session_uuid = NA_character_, [17:27:58.862] version = "1.8"), class = "FutureResult") [17:27:58.862] }, finally = { [17:27:58.862] if (!identical(...future.workdir, getwd())) [17:27:58.862] setwd(...future.workdir) [17:27:58.862] { [17:27:58.862] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:27:58.862] ...future.oldOptions$nwarnings <- NULL [17:27:58.862] } [17:27:58.862] base::options(...future.oldOptions) [17:27:58.862] if (.Platform$OS.type == "windows") { [17:27:58.862] old_names <- names(...future.oldEnvVars) [17:27:58.862] envs <- base::Sys.getenv() [17:27:58.862] names <- names(envs) [17:27:58.862] common <- intersect(names, old_names) [17:27:58.862] added <- setdiff(names, old_names) [17:27:58.862] removed <- setdiff(old_names, names) [17:27:58.862] changed <- common[...future.oldEnvVars[common] != [17:27:58.862] envs[common]] [17:27:58.862] NAMES <- toupper(changed) [17:27:58.862] args <- list() [17:27:58.862] for (kk in seq_along(NAMES)) { [17:27:58.862] name <- changed[[kk]] [17:27:58.862] NAME <- NAMES[[kk]] [17:27:58.862] if (name != NAME && is.element(NAME, old_names)) [17:27:58.862] next [17:27:58.862] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:58.862] } [17:27:58.862] NAMES <- toupper(added) [17:27:58.862] for (kk in seq_along(NAMES)) { [17:27:58.862] name <- added[[kk]] [17:27:58.862] NAME <- NAMES[[kk]] [17:27:58.862] if (name != NAME && is.element(NAME, old_names)) [17:27:58.862] next [17:27:58.862] args[[name]] <- "" [17:27:58.862] } [17:27:58.862] NAMES <- toupper(removed) [17:27:58.862] for (kk in seq_along(NAMES)) { [17:27:58.862] name <- removed[[kk]] [17:27:58.862] NAME <- NAMES[[kk]] [17:27:58.862] if (name != NAME && is.element(NAME, old_names)) [17:27:58.862] next [17:27:58.862] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:58.862] } [17:27:58.862] if (length(args) > 0) [17:27:58.862] base::do.call(base::Sys.setenv, args = args) [17:27:58.862] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:27:58.862] } [17:27:58.862] else { [17:27:58.862] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:27:58.862] } [17:27:58.862] { [17:27:58.862] if (base::length(...future.futureOptionsAdded) > [17:27:58.862] 0L) { [17:27:58.862] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:27:58.862] base::names(opts) <- ...future.futureOptionsAdded [17:27:58.862] base::options(opts) [17:27:58.862] } [17:27:58.862] { [17:27:58.862] { [17:27:58.862] base::options(mc.cores = ...future.mc.cores.old) [17:27:58.862] NULL [17:27:58.862] } [17:27:58.862] options(future.plan = NULL) [17:27:58.862] if (is.na(NA_character_)) [17:27:58.862] Sys.unsetenv("R_FUTURE_PLAN") [17:27:58.862] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:27:58.862] future::plan(...future.strategy.old, .cleanup = FALSE, [17:27:58.862] .init = FALSE) [17:27:58.862] } [17:27:58.862] } [17:27:58.862] } [17:27:58.862] }) [17:27:58.862] if (TRUE) { [17:27:58.862] base::sink(type = "output", split = FALSE) [17:27:58.862] if (TRUE) { [17:27:58.862] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:27:58.862] } [17:27:58.862] else { [17:27:58.862] ...future.result["stdout"] <- base::list(NULL) [17:27:58.862] } [17:27:58.862] base::close(...future.stdout) [17:27:58.862] ...future.stdout <- NULL [17:27:58.862] } [17:27:58.862] ...future.result$conditions <- ...future.conditions [17:27:58.862] ...future.result$finished <- base::Sys.time() [17:27:58.862] ...future.result [17:27:58.862] } [17:27:59.022] MultisessionFuture started [17:27:59.023] result() for ClusterFuture ... [17:27:59.023] receiveMessageFromWorker() for ClusterFuture ... [17:27:59.024] - Validating connection of MultisessionFuture [17:27:59.091] - received message: FutureResult [17:27:59.092] - Received FutureResult [17:27:59.097] - Erased future from FutureRegistry [17:27:59.098] result() for ClusterFuture ... [17:27:59.098] - result already collected: FutureResult [17:27:59.098] result() for ClusterFuture ... done [17:27:59.099] receiveMessageFromWorker() for ClusterFuture ... done [17:27:59.099] result() for ClusterFuture ... done [17:27:59.099] result() for ClusterFuture ... [17:27:59.100] - result already collected: FutureResult [17:27:59.100] result() for ClusterFuture ... done [17:27:59.100] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE [17:27:59.101] plan(): nbrOfWorkers() = 2 > > env <- new.env() > > ## Create future #1 (consumes background process #1) > env$a %<-% { 5 } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:27:59.103] getGlobalsAndPackages() ... [17:27:59.104] Searching for globals... [17:27:59.109] - globals found: [1] '{' [17:27:59.110] Searching for globals ... DONE [17:27:59.110] Resolving globals: TRUE [17:27:59.110] Resolving any globals that are futures ... [17:27:59.111] - globals: [1] '{' [17:27:59.111] Resolving any globals that are futures ... DONE [17:27:59.112] [17:27:59.112] [17:27:59.113] getGlobalsAndPackages() ... DONE [17:27:59.113] run() for 'Future' ... [17:27:59.114] - state: 'created' [17:27:59.114] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:27:59.131] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:27:59.132] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:27:59.132] - Field: 'node' [17:27:59.132] - Field: 'label' [17:27:59.133] - Field: 'local' [17:27:59.133] - Field: 'owner' [17:27:59.133] - Field: 'envir' [17:27:59.134] - Field: 'workers' [17:27:59.134] - Field: 'packages' [17:27:59.134] - Field: 'gc' [17:27:59.134] - Field: 'conditions' [17:27:59.135] - Field: 'persistent' [17:27:59.135] - Field: 'expr' [17:27:59.135] - Field: 'uuid' [17:27:59.136] - Field: 'seed' [17:27:59.136] - Field: 'version' [17:27:59.136] - Field: 'result' [17:27:59.137] - Field: 'asynchronous' [17:27:59.137] - Field: 'calls' [17:27:59.138] - Field: 'globals' [17:27:59.138] - Field: 'stdout' [17:27:59.138] - Field: 'earlySignal' [17:27:59.139] - Field: 'lazy' [17:27:59.139] - Field: 'state' [17:27:59.139] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:27:59.139] - Launch lazy future ... [17:27:59.140] Packages needed by the future expression (n = 0): [17:27:59.140] Packages needed by future strategies (n = 0): [17:27:59.141] { [17:27:59.141] { [17:27:59.141] { [17:27:59.141] ...future.startTime <- base::Sys.time() [17:27:59.141] { [17:27:59.141] { [17:27:59.141] { [17:27:59.141] { [17:27:59.141] base::local({ [17:27:59.141] has_future <- base::requireNamespace("future", [17:27:59.141] quietly = TRUE) [17:27:59.141] if (has_future) { [17:27:59.141] ns <- base::getNamespace("future") [17:27:59.141] version <- ns[[".package"]][["version"]] [17:27:59.141] if (is.null(version)) [17:27:59.141] version <- utils::packageVersion("future") [17:27:59.141] } [17:27:59.141] else { [17:27:59.141] version <- NULL [17:27:59.141] } [17:27:59.141] if (!has_future || version < "1.8.0") { [17:27:59.141] info <- base::c(r_version = base::gsub("R version ", [17:27:59.141] "", base::R.version$version.string), [17:27:59.141] platform = base::sprintf("%s (%s-bit)", [17:27:59.141] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:27:59.141] os = base::paste(base::Sys.info()[base::c("sysname", [17:27:59.141] "release", "version")], collapse = " "), [17:27:59.141] hostname = base::Sys.info()[["nodename"]]) [17:27:59.141] info <- base::sprintf("%s: %s", base::names(info), [17:27:59.141] info) [17:27:59.141] info <- base::paste(info, collapse = "; ") [17:27:59.141] if (!has_future) { [17:27:59.141] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:27:59.141] info) [17:27:59.141] } [17:27:59.141] else { [17:27:59.141] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:27:59.141] info, version) [17:27:59.141] } [17:27:59.141] base::stop(msg) [17:27:59.141] } [17:27:59.141] }) [17:27:59.141] } [17:27:59.141] ...future.mc.cores.old <- base::getOption("mc.cores") [17:27:59.141] base::options(mc.cores = 1L) [17:27:59.141] } [17:27:59.141] ...future.strategy.old <- future::plan("list") [17:27:59.141] options(future.plan = NULL) [17:27:59.141] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.141] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:27:59.141] } [17:27:59.141] ...future.workdir <- getwd() [17:27:59.141] } [17:27:59.141] ...future.oldOptions <- base::as.list(base::.Options) [17:27:59.141] ...future.oldEnvVars <- base::Sys.getenv() [17:27:59.141] } [17:27:59.141] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:27:59.141] future.globals.maxSize = NULL, future.globals.method = NULL, [17:27:59.141] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:27:59.141] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:27:59.141] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:27:59.141] future.stdout.windows.reencode = NULL, width = 80L) [17:27:59.141] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:27:59.141] base::names(...future.oldOptions)) [17:27:59.141] } [17:27:59.141] if (FALSE) { [17:27:59.141] } [17:27:59.141] else { [17:27:59.141] if (TRUE) { [17:27:59.141] ...future.stdout <- base::rawConnection(base::raw(0L), [17:27:59.141] open = "w") [17:27:59.141] } [17:27:59.141] else { [17:27:59.141] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:27:59.141] windows = "NUL", "/dev/null"), open = "w") [17:27:59.141] } [17:27:59.141] base::sink(...future.stdout, type = "output", split = FALSE) [17:27:59.141] base::on.exit(if (!base::is.null(...future.stdout)) { [17:27:59.141] base::sink(type = "output", split = FALSE) [17:27:59.141] base::close(...future.stdout) [17:27:59.141] }, add = TRUE) [17:27:59.141] } [17:27:59.141] ...future.frame <- base::sys.nframe() [17:27:59.141] ...future.conditions <- base::list() [17:27:59.141] ...future.rng <- base::globalenv()$.Random.seed [17:27:59.141] if (FALSE) { [17:27:59.141] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:27:59.141] "...future.value", "...future.globalenv.names", ".Random.seed") [17:27:59.141] } [17:27:59.141] ...future.result <- base::tryCatch({ [17:27:59.141] base::withCallingHandlers({ [17:27:59.141] ...future.value <- base::withVisible(base::local({ [17:27:59.141] ...future.makeSendCondition <- base::local({ [17:27:59.141] sendCondition <- NULL [17:27:59.141] function(frame = 1L) { [17:27:59.141] if (is.function(sendCondition)) [17:27:59.141] return(sendCondition) [17:27:59.141] ns <- getNamespace("parallel") [17:27:59.141] if (exists("sendData", mode = "function", [17:27:59.141] envir = ns)) { [17:27:59.141] parallel_sendData <- get("sendData", mode = "function", [17:27:59.141] envir = ns) [17:27:59.141] envir <- sys.frame(frame) [17:27:59.141] master <- NULL [17:27:59.141] while (!identical(envir, .GlobalEnv) && [17:27:59.141] !identical(envir, emptyenv())) { [17:27:59.141] if (exists("master", mode = "list", envir = envir, [17:27:59.141] inherits = FALSE)) { [17:27:59.141] master <- get("master", mode = "list", [17:27:59.141] envir = envir, inherits = FALSE) [17:27:59.141] if (inherits(master, c("SOCKnode", [17:27:59.141] "SOCK0node"))) { [17:27:59.141] sendCondition <<- function(cond) { [17:27:59.141] data <- list(type = "VALUE", value = cond, [17:27:59.141] success = TRUE) [17:27:59.141] parallel_sendData(master, data) [17:27:59.141] } [17:27:59.141] return(sendCondition) [17:27:59.141] } [17:27:59.141] } [17:27:59.141] frame <- frame + 1L [17:27:59.141] envir <- sys.frame(frame) [17:27:59.141] } [17:27:59.141] } [17:27:59.141] sendCondition <<- function(cond) NULL [17:27:59.141] } [17:27:59.141] }) [17:27:59.141] withCallingHandlers({ [17:27:59.141] { [17:27:59.141] 5 [17:27:59.141] } [17:27:59.141] }, immediateCondition = function(cond) { [17:27:59.141] sendCondition <- ...future.makeSendCondition() [17:27:59.141] sendCondition(cond) [17:27:59.141] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.141] { [17:27:59.141] inherits <- base::inherits [17:27:59.141] invokeRestart <- base::invokeRestart [17:27:59.141] is.null <- base::is.null [17:27:59.141] muffled <- FALSE [17:27:59.141] if (inherits(cond, "message")) { [17:27:59.141] muffled <- grepl(pattern, "muffleMessage") [17:27:59.141] if (muffled) [17:27:59.141] invokeRestart("muffleMessage") [17:27:59.141] } [17:27:59.141] else if (inherits(cond, "warning")) { [17:27:59.141] muffled <- grepl(pattern, "muffleWarning") [17:27:59.141] if (muffled) [17:27:59.141] invokeRestart("muffleWarning") [17:27:59.141] } [17:27:59.141] else if (inherits(cond, "condition")) { [17:27:59.141] if (!is.null(pattern)) { [17:27:59.141] computeRestarts <- base::computeRestarts [17:27:59.141] grepl <- base::grepl [17:27:59.141] restarts <- computeRestarts(cond) [17:27:59.141] for (restart in restarts) { [17:27:59.141] name <- restart$name [17:27:59.141] if (is.null(name)) [17:27:59.141] next [17:27:59.141] if (!grepl(pattern, name)) [17:27:59.141] next [17:27:59.141] invokeRestart(restart) [17:27:59.141] muffled <- TRUE [17:27:59.141] break [17:27:59.141] } [17:27:59.141] } [17:27:59.141] } [17:27:59.141] invisible(muffled) [17:27:59.141] } [17:27:59.141] muffleCondition(cond) [17:27:59.141] }) [17:27:59.141] })) [17:27:59.141] future::FutureResult(value = ...future.value$value, [17:27:59.141] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.141] ...future.rng), globalenv = if (FALSE) [17:27:59.141] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:27:59.141] ...future.globalenv.names)) [17:27:59.141] else NULL, started = ...future.startTime, version = "1.8") [17:27:59.141] }, condition = base::local({ [17:27:59.141] c <- base::c [17:27:59.141] inherits <- base::inherits [17:27:59.141] invokeRestart <- base::invokeRestart [17:27:59.141] length <- base::length [17:27:59.141] list <- base::list [17:27:59.141] seq.int <- base::seq.int [17:27:59.141] signalCondition <- base::signalCondition [17:27:59.141] sys.calls <- base::sys.calls [17:27:59.141] `[[` <- base::`[[` [17:27:59.141] `+` <- base::`+` [17:27:59.141] `<<-` <- base::`<<-` [17:27:59.141] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:27:59.141] calls[seq.int(from = from + 12L, to = length(calls) - [17:27:59.141] 3L)] [17:27:59.141] } [17:27:59.141] function(cond) { [17:27:59.141] is_error <- inherits(cond, "error") [17:27:59.141] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:27:59.141] NULL) [17:27:59.141] if (is_error) { [17:27:59.141] sessionInformation <- function() { [17:27:59.141] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:27:59.141] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:27:59.141] search = base::search(), system = base::Sys.info()) [17:27:59.141] } [17:27:59.141] ...future.conditions[[length(...future.conditions) + [17:27:59.141] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:27:59.141] cond$call), session = sessionInformation(), [17:27:59.141] timestamp = base::Sys.time(), signaled = 0L) [17:27:59.141] signalCondition(cond) [17:27:59.141] } [17:27:59.141] else if (!ignore && TRUE && inherits(cond, c("condition", [17:27:59.141] "immediateCondition"))) { [17:27:59.141] signal <- TRUE && inherits(cond, "immediateCondition") [17:27:59.141] ...future.conditions[[length(...future.conditions) + [17:27:59.141] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:27:59.141] if (TRUE && !signal) { [17:27:59.141] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.141] { [17:27:59.141] inherits <- base::inherits [17:27:59.141] invokeRestart <- base::invokeRestart [17:27:59.141] is.null <- base::is.null [17:27:59.141] muffled <- FALSE [17:27:59.141] if (inherits(cond, "message")) { [17:27:59.141] muffled <- grepl(pattern, "muffleMessage") [17:27:59.141] if (muffled) [17:27:59.141] invokeRestart("muffleMessage") [17:27:59.141] } [17:27:59.141] else if (inherits(cond, "warning")) { [17:27:59.141] muffled <- grepl(pattern, "muffleWarning") [17:27:59.141] if (muffled) [17:27:59.141] invokeRestart("muffleWarning") [17:27:59.141] } [17:27:59.141] else if (inherits(cond, "condition")) { [17:27:59.141] if (!is.null(pattern)) { [17:27:59.141] computeRestarts <- base::computeRestarts [17:27:59.141] grepl <- base::grepl [17:27:59.141] restarts <- computeRestarts(cond) [17:27:59.141] for (restart in restarts) { [17:27:59.141] name <- restart$name [17:27:59.141] if (is.null(name)) [17:27:59.141] next [17:27:59.141] if (!grepl(pattern, name)) [17:27:59.141] next [17:27:59.141] invokeRestart(restart) [17:27:59.141] muffled <- TRUE [17:27:59.141] break [17:27:59.141] } [17:27:59.141] } [17:27:59.141] } [17:27:59.141] invisible(muffled) [17:27:59.141] } [17:27:59.141] muffleCondition(cond, pattern = "^muffle") [17:27:59.141] } [17:27:59.141] } [17:27:59.141] else { [17:27:59.141] if (TRUE) { [17:27:59.141] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.141] { [17:27:59.141] inherits <- base::inherits [17:27:59.141] invokeRestart <- base::invokeRestart [17:27:59.141] is.null <- base::is.null [17:27:59.141] muffled <- FALSE [17:27:59.141] if (inherits(cond, "message")) { [17:27:59.141] muffled <- grepl(pattern, "muffleMessage") [17:27:59.141] if (muffled) [17:27:59.141] invokeRestart("muffleMessage") [17:27:59.141] } [17:27:59.141] else if (inherits(cond, "warning")) { [17:27:59.141] muffled <- grepl(pattern, "muffleWarning") [17:27:59.141] if (muffled) [17:27:59.141] invokeRestart("muffleWarning") [17:27:59.141] } [17:27:59.141] else if (inherits(cond, "condition")) { [17:27:59.141] if (!is.null(pattern)) { [17:27:59.141] computeRestarts <- base::computeRestarts [17:27:59.141] grepl <- base::grepl [17:27:59.141] restarts <- computeRestarts(cond) [17:27:59.141] for (restart in restarts) { [17:27:59.141] name <- restart$name [17:27:59.141] if (is.null(name)) [17:27:59.141] next [17:27:59.141] if (!grepl(pattern, name)) [17:27:59.141] next [17:27:59.141] invokeRestart(restart) [17:27:59.141] muffled <- TRUE [17:27:59.141] break [17:27:59.141] } [17:27:59.141] } [17:27:59.141] } [17:27:59.141] invisible(muffled) [17:27:59.141] } [17:27:59.141] muffleCondition(cond, pattern = "^muffle") [17:27:59.141] } [17:27:59.141] } [17:27:59.141] } [17:27:59.141] })) [17:27:59.141] }, error = function(ex) { [17:27:59.141] base::structure(base::list(value = NULL, visible = NULL, [17:27:59.141] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.141] ...future.rng), started = ...future.startTime, [17:27:59.141] finished = Sys.time(), session_uuid = NA_character_, [17:27:59.141] version = "1.8"), class = "FutureResult") [17:27:59.141] }, finally = { [17:27:59.141] if (!identical(...future.workdir, getwd())) [17:27:59.141] setwd(...future.workdir) [17:27:59.141] { [17:27:59.141] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:27:59.141] ...future.oldOptions$nwarnings <- NULL [17:27:59.141] } [17:27:59.141] base::options(...future.oldOptions) [17:27:59.141] if (.Platform$OS.type == "windows") { [17:27:59.141] old_names <- names(...future.oldEnvVars) [17:27:59.141] envs <- base::Sys.getenv() [17:27:59.141] names <- names(envs) [17:27:59.141] common <- intersect(names, old_names) [17:27:59.141] added <- setdiff(names, old_names) [17:27:59.141] removed <- setdiff(old_names, names) [17:27:59.141] changed <- common[...future.oldEnvVars[common] != [17:27:59.141] envs[common]] [17:27:59.141] NAMES <- toupper(changed) [17:27:59.141] args <- list() [17:27:59.141] for (kk in seq_along(NAMES)) { [17:27:59.141] name <- changed[[kk]] [17:27:59.141] NAME <- NAMES[[kk]] [17:27:59.141] if (name != NAME && is.element(NAME, old_names)) [17:27:59.141] next [17:27:59.141] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.141] } [17:27:59.141] NAMES <- toupper(added) [17:27:59.141] for (kk in seq_along(NAMES)) { [17:27:59.141] name <- added[[kk]] [17:27:59.141] NAME <- NAMES[[kk]] [17:27:59.141] if (name != NAME && is.element(NAME, old_names)) [17:27:59.141] next [17:27:59.141] args[[name]] <- "" [17:27:59.141] } [17:27:59.141] NAMES <- toupper(removed) [17:27:59.141] for (kk in seq_along(NAMES)) { [17:27:59.141] name <- removed[[kk]] [17:27:59.141] NAME <- NAMES[[kk]] [17:27:59.141] if (name != NAME && is.element(NAME, old_names)) [17:27:59.141] next [17:27:59.141] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.141] } [17:27:59.141] if (length(args) > 0) [17:27:59.141] base::do.call(base::Sys.setenv, args = args) [17:27:59.141] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:27:59.141] } [17:27:59.141] else { [17:27:59.141] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:27:59.141] } [17:27:59.141] { [17:27:59.141] if (base::length(...future.futureOptionsAdded) > [17:27:59.141] 0L) { [17:27:59.141] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:27:59.141] base::names(opts) <- ...future.futureOptionsAdded [17:27:59.141] base::options(opts) [17:27:59.141] } [17:27:59.141] { [17:27:59.141] { [17:27:59.141] base::options(mc.cores = ...future.mc.cores.old) [17:27:59.141] NULL [17:27:59.141] } [17:27:59.141] options(future.plan = NULL) [17:27:59.141] if (is.na(NA_character_)) [17:27:59.141] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.141] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:27:59.141] future::plan(...future.strategy.old, .cleanup = FALSE, [17:27:59.141] .init = FALSE) [17:27:59.141] } [17:27:59.141] } [17:27:59.141] } [17:27:59.141] }) [17:27:59.141] if (TRUE) { [17:27:59.141] base::sink(type = "output", split = FALSE) [17:27:59.141] if (TRUE) { [17:27:59.141] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:27:59.141] } [17:27:59.141] else { [17:27:59.141] ...future.result["stdout"] <- base::list(NULL) [17:27:59.141] } [17:27:59.141] base::close(...future.stdout) [17:27:59.141] ...future.stdout <- NULL [17:27:59.141] } [17:27:59.141] ...future.result$conditions <- ...future.conditions [17:27:59.141] ...future.result$finished <- base::Sys.time() [17:27:59.141] ...future.result [17:27:59.141] } [17:27:59.153] MultisessionFuture started [17:27:59.153] - Launch lazy future ... done [17:27:59.154] run() for 'MultisessionFuture' ... done > > ## Create future #2 (consumes background process #2) > b %<-% { "a" } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:27:59.155] getGlobalsAndPackages() ... [17:27:59.155] Searching for globals... [17:27:59.157] - globals found: [1] '{' [17:27:59.157] Searching for globals ... DONE [17:27:59.157] Resolving globals: TRUE [17:27:59.158] Resolving any globals that are futures ... [17:27:59.158] - globals: [1] '{' [17:27:59.158] Resolving any globals that are futures ... DONE [17:27:59.159] [17:27:59.159] [17:27:59.159] getGlobalsAndPackages() ... DONE [17:27:59.160] run() for 'Future' ... [17:27:59.160] - state: 'created' [17:27:59.161] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:27:59.178] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:27:59.178] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:27:59.179] - Field: 'node' [17:27:59.179] - Field: 'label' [17:27:59.179] - Field: 'local' [17:27:59.180] - Field: 'owner' [17:27:59.180] - Field: 'envir' [17:27:59.180] - Field: 'workers' [17:27:59.181] - Field: 'packages' [17:27:59.181] - Field: 'gc' [17:27:59.181] - Field: 'conditions' [17:27:59.182] - Field: 'persistent' [17:27:59.182] - Field: 'expr' [17:27:59.182] - Field: 'uuid' [17:27:59.183] - Field: 'seed' [17:27:59.183] - Field: 'version' [17:27:59.183] - Field: 'result' [17:27:59.184] - Field: 'asynchronous' [17:27:59.184] - Field: 'calls' [17:27:59.185] - Field: 'globals' [17:27:59.185] - Field: 'stdout' [17:27:59.185] - Field: 'earlySignal' [17:27:59.186] - Field: 'lazy' [17:27:59.186] - Field: 'state' [17:27:59.186] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:27:59.187] - Launch lazy future ... [17:27:59.187] Packages needed by the future expression (n = 0): [17:27:59.188] Packages needed by future strategies (n = 0): [17:27:59.189] { [17:27:59.189] { [17:27:59.189] { [17:27:59.189] ...future.startTime <- base::Sys.time() [17:27:59.189] { [17:27:59.189] { [17:27:59.189] { [17:27:59.189] { [17:27:59.189] base::local({ [17:27:59.189] has_future <- base::requireNamespace("future", [17:27:59.189] quietly = TRUE) [17:27:59.189] if (has_future) { [17:27:59.189] ns <- base::getNamespace("future") [17:27:59.189] version <- ns[[".package"]][["version"]] [17:27:59.189] if (is.null(version)) [17:27:59.189] version <- utils::packageVersion("future") [17:27:59.189] } [17:27:59.189] else { [17:27:59.189] version <- NULL [17:27:59.189] } [17:27:59.189] if (!has_future || version < "1.8.0") { [17:27:59.189] info <- base::c(r_version = base::gsub("R version ", [17:27:59.189] "", base::R.version$version.string), [17:27:59.189] platform = base::sprintf("%s (%s-bit)", [17:27:59.189] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:27:59.189] os = base::paste(base::Sys.info()[base::c("sysname", [17:27:59.189] "release", "version")], collapse = " "), [17:27:59.189] hostname = base::Sys.info()[["nodename"]]) [17:27:59.189] info <- base::sprintf("%s: %s", base::names(info), [17:27:59.189] info) [17:27:59.189] info <- base::paste(info, collapse = "; ") [17:27:59.189] if (!has_future) { [17:27:59.189] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:27:59.189] info) [17:27:59.189] } [17:27:59.189] else { [17:27:59.189] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:27:59.189] info, version) [17:27:59.189] } [17:27:59.189] base::stop(msg) [17:27:59.189] } [17:27:59.189] }) [17:27:59.189] } [17:27:59.189] ...future.mc.cores.old <- base::getOption("mc.cores") [17:27:59.189] base::options(mc.cores = 1L) [17:27:59.189] } [17:27:59.189] ...future.strategy.old <- future::plan("list") [17:27:59.189] options(future.plan = NULL) [17:27:59.189] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.189] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:27:59.189] } [17:27:59.189] ...future.workdir <- getwd() [17:27:59.189] } [17:27:59.189] ...future.oldOptions <- base::as.list(base::.Options) [17:27:59.189] ...future.oldEnvVars <- base::Sys.getenv() [17:27:59.189] } [17:27:59.189] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:27:59.189] future.globals.maxSize = NULL, future.globals.method = NULL, [17:27:59.189] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:27:59.189] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:27:59.189] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:27:59.189] future.stdout.windows.reencode = NULL, width = 80L) [17:27:59.189] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:27:59.189] base::names(...future.oldOptions)) [17:27:59.189] } [17:27:59.189] if (FALSE) { [17:27:59.189] } [17:27:59.189] else { [17:27:59.189] if (TRUE) { [17:27:59.189] ...future.stdout <- base::rawConnection(base::raw(0L), [17:27:59.189] open = "w") [17:27:59.189] } [17:27:59.189] else { [17:27:59.189] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:27:59.189] windows = "NUL", "/dev/null"), open = "w") [17:27:59.189] } [17:27:59.189] base::sink(...future.stdout, type = "output", split = FALSE) [17:27:59.189] base::on.exit(if (!base::is.null(...future.stdout)) { [17:27:59.189] base::sink(type = "output", split = FALSE) [17:27:59.189] base::close(...future.stdout) [17:27:59.189] }, add = TRUE) [17:27:59.189] } [17:27:59.189] ...future.frame <- base::sys.nframe() [17:27:59.189] ...future.conditions <- base::list() [17:27:59.189] ...future.rng <- base::globalenv()$.Random.seed [17:27:59.189] if (FALSE) { [17:27:59.189] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:27:59.189] "...future.value", "...future.globalenv.names", ".Random.seed") [17:27:59.189] } [17:27:59.189] ...future.result <- base::tryCatch({ [17:27:59.189] base::withCallingHandlers({ [17:27:59.189] ...future.value <- base::withVisible(base::local({ [17:27:59.189] ...future.makeSendCondition <- base::local({ [17:27:59.189] sendCondition <- NULL [17:27:59.189] function(frame = 1L) { [17:27:59.189] if (is.function(sendCondition)) [17:27:59.189] return(sendCondition) [17:27:59.189] ns <- getNamespace("parallel") [17:27:59.189] if (exists("sendData", mode = "function", [17:27:59.189] envir = ns)) { [17:27:59.189] parallel_sendData <- get("sendData", mode = "function", [17:27:59.189] envir = ns) [17:27:59.189] envir <- sys.frame(frame) [17:27:59.189] master <- NULL [17:27:59.189] while (!identical(envir, .GlobalEnv) && [17:27:59.189] !identical(envir, emptyenv())) { [17:27:59.189] if (exists("master", mode = "list", envir = envir, [17:27:59.189] inherits = FALSE)) { [17:27:59.189] master <- get("master", mode = "list", [17:27:59.189] envir = envir, inherits = FALSE) [17:27:59.189] if (inherits(master, c("SOCKnode", [17:27:59.189] "SOCK0node"))) { [17:27:59.189] sendCondition <<- function(cond) { [17:27:59.189] data <- list(type = "VALUE", value = cond, [17:27:59.189] success = TRUE) [17:27:59.189] parallel_sendData(master, data) [17:27:59.189] } [17:27:59.189] return(sendCondition) [17:27:59.189] } [17:27:59.189] } [17:27:59.189] frame <- frame + 1L [17:27:59.189] envir <- sys.frame(frame) [17:27:59.189] } [17:27:59.189] } [17:27:59.189] sendCondition <<- function(cond) NULL [17:27:59.189] } [17:27:59.189] }) [17:27:59.189] withCallingHandlers({ [17:27:59.189] { [17:27:59.189] "a" [17:27:59.189] } [17:27:59.189] }, immediateCondition = function(cond) { [17:27:59.189] sendCondition <- ...future.makeSendCondition() [17:27:59.189] sendCondition(cond) [17:27:59.189] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.189] { [17:27:59.189] inherits <- base::inherits [17:27:59.189] invokeRestart <- base::invokeRestart [17:27:59.189] is.null <- base::is.null [17:27:59.189] muffled <- FALSE [17:27:59.189] if (inherits(cond, "message")) { [17:27:59.189] muffled <- grepl(pattern, "muffleMessage") [17:27:59.189] if (muffled) [17:27:59.189] invokeRestart("muffleMessage") [17:27:59.189] } [17:27:59.189] else if (inherits(cond, "warning")) { [17:27:59.189] muffled <- grepl(pattern, "muffleWarning") [17:27:59.189] if (muffled) [17:27:59.189] invokeRestart("muffleWarning") [17:27:59.189] } [17:27:59.189] else if (inherits(cond, "condition")) { [17:27:59.189] if (!is.null(pattern)) { [17:27:59.189] computeRestarts <- base::computeRestarts [17:27:59.189] grepl <- base::grepl [17:27:59.189] restarts <- computeRestarts(cond) [17:27:59.189] for (restart in restarts) { [17:27:59.189] name <- restart$name [17:27:59.189] if (is.null(name)) [17:27:59.189] next [17:27:59.189] if (!grepl(pattern, name)) [17:27:59.189] next [17:27:59.189] invokeRestart(restart) [17:27:59.189] muffled <- TRUE [17:27:59.189] break [17:27:59.189] } [17:27:59.189] } [17:27:59.189] } [17:27:59.189] invisible(muffled) [17:27:59.189] } [17:27:59.189] muffleCondition(cond) [17:27:59.189] }) [17:27:59.189] })) [17:27:59.189] future::FutureResult(value = ...future.value$value, [17:27:59.189] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.189] ...future.rng), globalenv = if (FALSE) [17:27:59.189] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:27:59.189] ...future.globalenv.names)) [17:27:59.189] else NULL, started = ...future.startTime, version = "1.8") [17:27:59.189] }, condition = base::local({ [17:27:59.189] c <- base::c [17:27:59.189] inherits <- base::inherits [17:27:59.189] invokeRestart <- base::invokeRestart [17:27:59.189] length <- base::length [17:27:59.189] list <- base::list [17:27:59.189] seq.int <- base::seq.int [17:27:59.189] signalCondition <- base::signalCondition [17:27:59.189] sys.calls <- base::sys.calls [17:27:59.189] `[[` <- base::`[[` [17:27:59.189] `+` <- base::`+` [17:27:59.189] `<<-` <- base::`<<-` [17:27:59.189] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:27:59.189] calls[seq.int(from = from + 12L, to = length(calls) - [17:27:59.189] 3L)] [17:27:59.189] } [17:27:59.189] function(cond) { [17:27:59.189] is_error <- inherits(cond, "error") [17:27:59.189] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:27:59.189] NULL) [17:27:59.189] if (is_error) { [17:27:59.189] sessionInformation <- function() { [17:27:59.189] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:27:59.189] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:27:59.189] search = base::search(), system = base::Sys.info()) [17:27:59.189] } [17:27:59.189] ...future.conditions[[length(...future.conditions) + [17:27:59.189] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:27:59.189] cond$call), session = sessionInformation(), [17:27:59.189] timestamp = base::Sys.time(), signaled = 0L) [17:27:59.189] signalCondition(cond) [17:27:59.189] } [17:27:59.189] else if (!ignore && TRUE && inherits(cond, c("condition", [17:27:59.189] "immediateCondition"))) { [17:27:59.189] signal <- TRUE && inherits(cond, "immediateCondition") [17:27:59.189] ...future.conditions[[length(...future.conditions) + [17:27:59.189] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:27:59.189] if (TRUE && !signal) { [17:27:59.189] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.189] { [17:27:59.189] inherits <- base::inherits [17:27:59.189] invokeRestart <- base::invokeRestart [17:27:59.189] is.null <- base::is.null [17:27:59.189] muffled <- FALSE [17:27:59.189] if (inherits(cond, "message")) { [17:27:59.189] muffled <- grepl(pattern, "muffleMessage") [17:27:59.189] if (muffled) [17:27:59.189] invokeRestart("muffleMessage") [17:27:59.189] } [17:27:59.189] else if (inherits(cond, "warning")) { [17:27:59.189] muffled <- grepl(pattern, "muffleWarning") [17:27:59.189] if (muffled) [17:27:59.189] invokeRestart("muffleWarning") [17:27:59.189] } [17:27:59.189] else if (inherits(cond, "condition")) { [17:27:59.189] if (!is.null(pattern)) { [17:27:59.189] computeRestarts <- base::computeRestarts [17:27:59.189] grepl <- base::grepl [17:27:59.189] restarts <- computeRestarts(cond) [17:27:59.189] for (restart in restarts) { [17:27:59.189] name <- restart$name [17:27:59.189] if (is.null(name)) [17:27:59.189] next [17:27:59.189] if (!grepl(pattern, name)) [17:27:59.189] next [17:27:59.189] invokeRestart(restart) [17:27:59.189] muffled <- TRUE [17:27:59.189] break [17:27:59.189] } [17:27:59.189] } [17:27:59.189] } [17:27:59.189] invisible(muffled) [17:27:59.189] } [17:27:59.189] muffleCondition(cond, pattern = "^muffle") [17:27:59.189] } [17:27:59.189] } [17:27:59.189] else { [17:27:59.189] if (TRUE) { [17:27:59.189] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.189] { [17:27:59.189] inherits <- base::inherits [17:27:59.189] invokeRestart <- base::invokeRestart [17:27:59.189] is.null <- base::is.null [17:27:59.189] muffled <- FALSE [17:27:59.189] if (inherits(cond, "message")) { [17:27:59.189] muffled <- grepl(pattern, "muffleMessage") [17:27:59.189] if (muffled) [17:27:59.189] invokeRestart("muffleMessage") [17:27:59.189] } [17:27:59.189] else if (inherits(cond, "warning")) { [17:27:59.189] muffled <- grepl(pattern, "muffleWarning") [17:27:59.189] if (muffled) [17:27:59.189] invokeRestart("muffleWarning") [17:27:59.189] } [17:27:59.189] else if (inherits(cond, "condition")) { [17:27:59.189] if (!is.null(pattern)) { [17:27:59.189] computeRestarts <- base::computeRestarts [17:27:59.189] grepl <- base::grepl [17:27:59.189] restarts <- computeRestarts(cond) [17:27:59.189] for (restart in restarts) { [17:27:59.189] name <- restart$name [17:27:59.189] if (is.null(name)) [17:27:59.189] next [17:27:59.189] if (!grepl(pattern, name)) [17:27:59.189] next [17:27:59.189] invokeRestart(restart) [17:27:59.189] muffled <- TRUE [17:27:59.189] break [17:27:59.189] } [17:27:59.189] } [17:27:59.189] } [17:27:59.189] invisible(muffled) [17:27:59.189] } [17:27:59.189] muffleCondition(cond, pattern = "^muffle") [17:27:59.189] } [17:27:59.189] } [17:27:59.189] } [17:27:59.189] })) [17:27:59.189] }, error = function(ex) { [17:27:59.189] base::structure(base::list(value = NULL, visible = NULL, [17:27:59.189] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.189] ...future.rng), started = ...future.startTime, [17:27:59.189] finished = Sys.time(), session_uuid = NA_character_, [17:27:59.189] version = "1.8"), class = "FutureResult") [17:27:59.189] }, finally = { [17:27:59.189] if (!identical(...future.workdir, getwd())) [17:27:59.189] setwd(...future.workdir) [17:27:59.189] { [17:27:59.189] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:27:59.189] ...future.oldOptions$nwarnings <- NULL [17:27:59.189] } [17:27:59.189] base::options(...future.oldOptions) [17:27:59.189] if (.Platform$OS.type == "windows") { [17:27:59.189] old_names <- names(...future.oldEnvVars) [17:27:59.189] envs <- base::Sys.getenv() [17:27:59.189] names <- names(envs) [17:27:59.189] common <- intersect(names, old_names) [17:27:59.189] added <- setdiff(names, old_names) [17:27:59.189] removed <- setdiff(old_names, names) [17:27:59.189] changed <- common[...future.oldEnvVars[common] != [17:27:59.189] envs[common]] [17:27:59.189] NAMES <- toupper(changed) [17:27:59.189] args <- list() [17:27:59.189] for (kk in seq_along(NAMES)) { [17:27:59.189] name <- changed[[kk]] [17:27:59.189] NAME <- NAMES[[kk]] [17:27:59.189] if (name != NAME && is.element(NAME, old_names)) [17:27:59.189] next [17:27:59.189] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.189] } [17:27:59.189] NAMES <- toupper(added) [17:27:59.189] for (kk in seq_along(NAMES)) { [17:27:59.189] name <- added[[kk]] [17:27:59.189] NAME <- NAMES[[kk]] [17:27:59.189] if (name != NAME && is.element(NAME, old_names)) [17:27:59.189] next [17:27:59.189] args[[name]] <- "" [17:27:59.189] } [17:27:59.189] NAMES <- toupper(removed) [17:27:59.189] for (kk in seq_along(NAMES)) { [17:27:59.189] name <- removed[[kk]] [17:27:59.189] NAME <- NAMES[[kk]] [17:27:59.189] if (name != NAME && is.element(NAME, old_names)) [17:27:59.189] next [17:27:59.189] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.189] } [17:27:59.189] if (length(args) > 0) [17:27:59.189] base::do.call(base::Sys.setenv, args = args) [17:27:59.189] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:27:59.189] } [17:27:59.189] else { [17:27:59.189] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:27:59.189] } [17:27:59.189] { [17:27:59.189] if (base::length(...future.futureOptionsAdded) > [17:27:59.189] 0L) { [17:27:59.189] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:27:59.189] base::names(opts) <- ...future.futureOptionsAdded [17:27:59.189] base::options(opts) [17:27:59.189] } [17:27:59.189] { [17:27:59.189] { [17:27:59.189] base::options(mc.cores = ...future.mc.cores.old) [17:27:59.189] NULL [17:27:59.189] } [17:27:59.189] options(future.plan = NULL) [17:27:59.189] if (is.na(NA_character_)) [17:27:59.189] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.189] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:27:59.189] future::plan(...future.strategy.old, .cleanup = FALSE, [17:27:59.189] .init = FALSE) [17:27:59.189] } [17:27:59.189] } [17:27:59.189] } [17:27:59.189] }) [17:27:59.189] if (TRUE) { [17:27:59.189] base::sink(type = "output", split = FALSE) [17:27:59.189] if (TRUE) { [17:27:59.189] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:27:59.189] } [17:27:59.189] else { [17:27:59.189] ...future.result["stdout"] <- base::list(NULL) [17:27:59.189] } [17:27:59.189] base::close(...future.stdout) [17:27:59.189] ...future.stdout <- NULL [17:27:59.189] } [17:27:59.189] ...future.result$conditions <- ...future.conditions [17:27:59.189] ...future.result$finished <- base::Sys.time() [17:27:59.189] ...future.result [17:27:59.189] } [17:27:59.331] MultisessionFuture started [17:27:59.331] - Launch lazy future ... done [17:27:59.331] run() for 'MultisessionFuture' ... done > > ## Resolve future #2 (frees up background process #2) > message(sprintf("b = %s\n", sQuote(b))) [17:27:59.332] result() for ClusterFuture ... [17:27:59.332] receiveMessageFromWorker() for ClusterFuture ... [17:27:59.333] - Validating connection of MultisessionFuture [17:27:59.427] - received message: FutureResult [17:27:59.428] - Received FutureResult [17:27:59.428] - Erased future from FutureRegistry [17:27:59.429] result() for ClusterFuture ... [17:27:59.429] - result already collected: FutureResult [17:27:59.429] result() for ClusterFuture ... done [17:27:59.429] receiveMessageFromWorker() for ClusterFuture ... done [17:27:59.430] result() for ClusterFuture ... done [17:27:59.430] result() for ClusterFuture ... [17:27:59.430] - result already collected: FutureResult [17:27:59.430] result() for ClusterFuture ... done b = 'a' > > ## Create future #3 (consumes background process #2) > ## THIS IS THE TRICKY PART: > ## Two globals are identified `env` and `b` and both are resolved. > ## However, object `env[[b]]` (here element `a` of environment `env`) > ## is not touched and therefore not resolved (since it is a future) > ## unless environment `env` is resolved recursively. (Issue #49) > y %<-% { env[[b]] } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:27:59.432] getGlobalsAndPackages() ... [17:27:59.432] Searching for globals... [17:27:59.444] - globals found: [4] '{', '[[', 'env', 'b' [17:27:59.445] Searching for globals ... DONE [17:27:59.445] Resolving globals: TRUE [17:27:59.445] Resolving any globals that are futures ... [17:27:59.445] - globals: [4] '{', '[[', 'env', 'b' [17:27:59.445] Resolving any globals that are futures ... DONE [17:27:59.446] Resolving futures part of globals (recursively) ... [17:27:59.447] resolve() on list ... [17:27:59.447] recursive: 99 [17:27:59.448] length: 2 [17:27:59.448] elements: 'env', 'b' [17:27:59.449] resolve() on environment ... [17:27:59.449] recursive: 98 [17:27:59.450] elements: [1] '.future_a', 'a' [17:27:59.451] receiveMessageFromWorker() for ClusterFuture ... [17:27:59.451] - Validating connection of MultisessionFuture [17:27:59.452] - received message: FutureResult [17:27:59.452] - Received FutureResult [17:27:59.452] - Erased future from FutureRegistry [17:27:59.453] result() for ClusterFuture ... [17:27:59.453] - result already collected: FutureResult [17:27:59.453] result() for ClusterFuture ... done [17:27:59.453] receiveMessageFromWorker() for ClusterFuture ... done [17:27:59.454] Future #1 [17:27:59.454] result() for ClusterFuture ... [17:27:59.454] - result already collected: FutureResult [17:27:59.455] result() for ClusterFuture ... done [17:27:59.455] result() for ClusterFuture ... [17:27:59.455] - result already collected: FutureResult [17:27:59.456] result() for ClusterFuture ... done [17:27:59.456] A MultisessionFuture was resolved [17:27:59.456] length: 0 (resolved future 1) [17:27:59.457] resolve() on environment ... DONE [17:27:59.457] length: 1 (resolved future 1) [17:27:59.457] length: 0 (resolved future 2) [17:27:59.458] resolve() on list ... DONE [17:27:59.458] - globals: [2] 'env', 'b' [17:27:59.458] Resolving futures part of globals (recursively) ... DONE [17:27:59.472] The total size of the 2 globals is 326.96 KiB (334807 bytes) [17:27:59.473] The total size of the 2 globals exported for future expression ('{; env[[b]]; }') is 326.96 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'env' (326.92 KiB of class 'environment') and 'b' (40 bytes of class 'character') [17:27:59.473] - globals: [2] 'env', 'b' [17:27:59.474] [17:27:59.474] getGlobalsAndPackages() ... DONE [17:27:59.474] run() for 'Future' ... [17:27:59.475] - state: 'created' [17:27:59.475] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:27:59.490] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:27:59.491] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:27:59.491] - Field: 'node' [17:27:59.491] - Field: 'label' [17:27:59.492] - Field: 'local' [17:27:59.492] - Field: 'owner' [17:27:59.492] - Field: 'envir' [17:27:59.492] - Field: 'workers' [17:27:59.492] - Field: 'packages' [17:27:59.492] - Field: 'gc' [17:27:59.493] - Field: 'conditions' [17:27:59.493] - Field: 'persistent' [17:27:59.493] - Field: 'expr' [17:27:59.493] - Field: 'uuid' [17:27:59.493] - Field: 'seed' [17:27:59.494] - Field: 'version' [17:27:59.494] - Field: 'result' [17:27:59.494] - Field: 'asynchronous' [17:27:59.494] - Field: 'calls' [17:27:59.494] - Field: 'globals' [17:27:59.494] - Field: 'stdout' [17:27:59.495] - Field: 'earlySignal' [17:27:59.495] - Field: 'lazy' [17:27:59.495] - Field: 'state' [17:27:59.495] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:27:59.495] - Launch lazy future ... [17:27:59.496] Packages needed by the future expression (n = 0): [17:27:59.496] Packages needed by future strategies (n = 0): [17:27:59.497] { [17:27:59.497] { [17:27:59.497] { [17:27:59.497] ...future.startTime <- base::Sys.time() [17:27:59.497] { [17:27:59.497] { [17:27:59.497] { [17:27:59.497] { [17:27:59.497] base::local({ [17:27:59.497] has_future <- base::requireNamespace("future", [17:27:59.497] quietly = TRUE) [17:27:59.497] if (has_future) { [17:27:59.497] ns <- base::getNamespace("future") [17:27:59.497] version <- ns[[".package"]][["version"]] [17:27:59.497] if (is.null(version)) [17:27:59.497] version <- utils::packageVersion("future") [17:27:59.497] } [17:27:59.497] else { [17:27:59.497] version <- NULL [17:27:59.497] } [17:27:59.497] if (!has_future || version < "1.8.0") { [17:27:59.497] info <- base::c(r_version = base::gsub("R version ", [17:27:59.497] "", base::R.version$version.string), [17:27:59.497] platform = base::sprintf("%s (%s-bit)", [17:27:59.497] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:27:59.497] os = base::paste(base::Sys.info()[base::c("sysname", [17:27:59.497] "release", "version")], collapse = " "), [17:27:59.497] hostname = base::Sys.info()[["nodename"]]) [17:27:59.497] info <- base::sprintf("%s: %s", base::names(info), [17:27:59.497] info) [17:27:59.497] info <- base::paste(info, collapse = "; ") [17:27:59.497] if (!has_future) { [17:27:59.497] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:27:59.497] info) [17:27:59.497] } [17:27:59.497] else { [17:27:59.497] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:27:59.497] info, version) [17:27:59.497] } [17:27:59.497] base::stop(msg) [17:27:59.497] } [17:27:59.497] }) [17:27:59.497] } [17:27:59.497] ...future.mc.cores.old <- base::getOption("mc.cores") [17:27:59.497] base::options(mc.cores = 1L) [17:27:59.497] } [17:27:59.497] ...future.strategy.old <- future::plan("list") [17:27:59.497] options(future.plan = NULL) [17:27:59.497] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.497] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:27:59.497] } [17:27:59.497] ...future.workdir <- getwd() [17:27:59.497] } [17:27:59.497] ...future.oldOptions <- base::as.list(base::.Options) [17:27:59.497] ...future.oldEnvVars <- base::Sys.getenv() [17:27:59.497] } [17:27:59.497] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:27:59.497] future.globals.maxSize = NULL, future.globals.method = NULL, [17:27:59.497] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:27:59.497] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:27:59.497] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:27:59.497] future.stdout.windows.reencode = NULL, width = 80L) [17:27:59.497] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:27:59.497] base::names(...future.oldOptions)) [17:27:59.497] } [17:27:59.497] if (FALSE) { [17:27:59.497] } [17:27:59.497] else { [17:27:59.497] if (TRUE) { [17:27:59.497] ...future.stdout <- base::rawConnection(base::raw(0L), [17:27:59.497] open = "w") [17:27:59.497] } [17:27:59.497] else { [17:27:59.497] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:27:59.497] windows = "NUL", "/dev/null"), open = "w") [17:27:59.497] } [17:27:59.497] base::sink(...future.stdout, type = "output", split = FALSE) [17:27:59.497] base::on.exit(if (!base::is.null(...future.stdout)) { [17:27:59.497] base::sink(type = "output", split = FALSE) [17:27:59.497] base::close(...future.stdout) [17:27:59.497] }, add = TRUE) [17:27:59.497] } [17:27:59.497] ...future.frame <- base::sys.nframe() [17:27:59.497] ...future.conditions <- base::list() [17:27:59.497] ...future.rng <- base::globalenv()$.Random.seed [17:27:59.497] if (FALSE) { [17:27:59.497] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:27:59.497] "...future.value", "...future.globalenv.names", ".Random.seed") [17:27:59.497] } [17:27:59.497] ...future.result <- base::tryCatch({ [17:27:59.497] base::withCallingHandlers({ [17:27:59.497] ...future.value <- base::withVisible(base::local({ [17:27:59.497] ...future.makeSendCondition <- base::local({ [17:27:59.497] sendCondition <- NULL [17:27:59.497] function(frame = 1L) { [17:27:59.497] if (is.function(sendCondition)) [17:27:59.497] return(sendCondition) [17:27:59.497] ns <- getNamespace("parallel") [17:27:59.497] if (exists("sendData", mode = "function", [17:27:59.497] envir = ns)) { [17:27:59.497] parallel_sendData <- get("sendData", mode = "function", [17:27:59.497] envir = ns) [17:27:59.497] envir <- sys.frame(frame) [17:27:59.497] master <- NULL [17:27:59.497] while (!identical(envir, .GlobalEnv) && [17:27:59.497] !identical(envir, emptyenv())) { [17:27:59.497] if (exists("master", mode = "list", envir = envir, [17:27:59.497] inherits = FALSE)) { [17:27:59.497] master <- get("master", mode = "list", [17:27:59.497] envir = envir, inherits = FALSE) [17:27:59.497] if (inherits(master, c("SOCKnode", [17:27:59.497] "SOCK0node"))) { [17:27:59.497] sendCondition <<- function(cond) { [17:27:59.497] data <- list(type = "VALUE", value = cond, [17:27:59.497] success = TRUE) [17:27:59.497] parallel_sendData(master, data) [17:27:59.497] } [17:27:59.497] return(sendCondition) [17:27:59.497] } [17:27:59.497] } [17:27:59.497] frame <- frame + 1L [17:27:59.497] envir <- sys.frame(frame) [17:27:59.497] } [17:27:59.497] } [17:27:59.497] sendCondition <<- function(cond) NULL [17:27:59.497] } [17:27:59.497] }) [17:27:59.497] withCallingHandlers({ [17:27:59.497] { [17:27:59.497] env[[b]] [17:27:59.497] } [17:27:59.497] }, immediateCondition = function(cond) { [17:27:59.497] sendCondition <- ...future.makeSendCondition() [17:27:59.497] sendCondition(cond) [17:27:59.497] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.497] { [17:27:59.497] inherits <- base::inherits [17:27:59.497] invokeRestart <- base::invokeRestart [17:27:59.497] is.null <- base::is.null [17:27:59.497] muffled <- FALSE [17:27:59.497] if (inherits(cond, "message")) { [17:27:59.497] muffled <- grepl(pattern, "muffleMessage") [17:27:59.497] if (muffled) [17:27:59.497] invokeRestart("muffleMessage") [17:27:59.497] } [17:27:59.497] else if (inherits(cond, "warning")) { [17:27:59.497] muffled <- grepl(pattern, "muffleWarning") [17:27:59.497] if (muffled) [17:27:59.497] invokeRestart("muffleWarning") [17:27:59.497] } [17:27:59.497] else if (inherits(cond, "condition")) { [17:27:59.497] if (!is.null(pattern)) { [17:27:59.497] computeRestarts <- base::computeRestarts [17:27:59.497] grepl <- base::grepl [17:27:59.497] restarts <- computeRestarts(cond) [17:27:59.497] for (restart in restarts) { [17:27:59.497] name <- restart$name [17:27:59.497] if (is.null(name)) [17:27:59.497] next [17:27:59.497] if (!grepl(pattern, name)) [17:27:59.497] next [17:27:59.497] invokeRestart(restart) [17:27:59.497] muffled <- TRUE [17:27:59.497] break [17:27:59.497] } [17:27:59.497] } [17:27:59.497] } [17:27:59.497] invisible(muffled) [17:27:59.497] } [17:27:59.497] muffleCondition(cond) [17:27:59.497] }) [17:27:59.497] })) [17:27:59.497] future::FutureResult(value = ...future.value$value, [17:27:59.497] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.497] ...future.rng), globalenv = if (FALSE) [17:27:59.497] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:27:59.497] ...future.globalenv.names)) [17:27:59.497] else NULL, started = ...future.startTime, version = "1.8") [17:27:59.497] }, condition = base::local({ [17:27:59.497] c <- base::c [17:27:59.497] inherits <- base::inherits [17:27:59.497] invokeRestart <- base::invokeRestart [17:27:59.497] length <- base::length [17:27:59.497] list <- base::list [17:27:59.497] seq.int <- base::seq.int [17:27:59.497] signalCondition <- base::signalCondition [17:27:59.497] sys.calls <- base::sys.calls [17:27:59.497] `[[` <- base::`[[` [17:27:59.497] `+` <- base::`+` [17:27:59.497] `<<-` <- base::`<<-` [17:27:59.497] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:27:59.497] calls[seq.int(from = from + 12L, to = length(calls) - [17:27:59.497] 3L)] [17:27:59.497] } [17:27:59.497] function(cond) { [17:27:59.497] is_error <- inherits(cond, "error") [17:27:59.497] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:27:59.497] NULL) [17:27:59.497] if (is_error) { [17:27:59.497] sessionInformation <- function() { [17:27:59.497] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:27:59.497] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:27:59.497] search = base::search(), system = base::Sys.info()) [17:27:59.497] } [17:27:59.497] ...future.conditions[[length(...future.conditions) + [17:27:59.497] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:27:59.497] cond$call), session = sessionInformation(), [17:27:59.497] timestamp = base::Sys.time(), signaled = 0L) [17:27:59.497] signalCondition(cond) [17:27:59.497] } [17:27:59.497] else if (!ignore && TRUE && inherits(cond, c("condition", [17:27:59.497] "immediateCondition"))) { [17:27:59.497] signal <- TRUE && inherits(cond, "immediateCondition") [17:27:59.497] ...future.conditions[[length(...future.conditions) + [17:27:59.497] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:27:59.497] if (TRUE && !signal) { [17:27:59.497] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.497] { [17:27:59.497] inherits <- base::inherits [17:27:59.497] invokeRestart <- base::invokeRestart [17:27:59.497] is.null <- base::is.null [17:27:59.497] muffled <- FALSE [17:27:59.497] if (inherits(cond, "message")) { [17:27:59.497] muffled <- grepl(pattern, "muffleMessage") [17:27:59.497] if (muffled) [17:27:59.497] invokeRestart("muffleMessage") [17:27:59.497] } [17:27:59.497] else if (inherits(cond, "warning")) { [17:27:59.497] muffled <- grepl(pattern, "muffleWarning") [17:27:59.497] if (muffled) [17:27:59.497] invokeRestart("muffleWarning") [17:27:59.497] } [17:27:59.497] else if (inherits(cond, "condition")) { [17:27:59.497] if (!is.null(pattern)) { [17:27:59.497] computeRestarts <- base::computeRestarts [17:27:59.497] grepl <- base::grepl [17:27:59.497] restarts <- computeRestarts(cond) [17:27:59.497] for (restart in restarts) { [17:27:59.497] name <- restart$name [17:27:59.497] if (is.null(name)) [17:27:59.497] next [17:27:59.497] if (!grepl(pattern, name)) [17:27:59.497] next [17:27:59.497] invokeRestart(restart) [17:27:59.497] muffled <- TRUE [17:27:59.497] break [17:27:59.497] } [17:27:59.497] } [17:27:59.497] } [17:27:59.497] invisible(muffled) [17:27:59.497] } [17:27:59.497] muffleCondition(cond, pattern = "^muffle") [17:27:59.497] } [17:27:59.497] } [17:27:59.497] else { [17:27:59.497] if (TRUE) { [17:27:59.497] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.497] { [17:27:59.497] inherits <- base::inherits [17:27:59.497] invokeRestart <- base::invokeRestart [17:27:59.497] is.null <- base::is.null [17:27:59.497] muffled <- FALSE [17:27:59.497] if (inherits(cond, "message")) { [17:27:59.497] muffled <- grepl(pattern, "muffleMessage") [17:27:59.497] if (muffled) [17:27:59.497] invokeRestart("muffleMessage") [17:27:59.497] } [17:27:59.497] else if (inherits(cond, "warning")) { [17:27:59.497] muffled <- grepl(pattern, "muffleWarning") [17:27:59.497] if (muffled) [17:27:59.497] invokeRestart("muffleWarning") [17:27:59.497] } [17:27:59.497] else if (inherits(cond, "condition")) { [17:27:59.497] if (!is.null(pattern)) { [17:27:59.497] computeRestarts <- base::computeRestarts [17:27:59.497] grepl <- base::grepl [17:27:59.497] restarts <- computeRestarts(cond) [17:27:59.497] for (restart in restarts) { [17:27:59.497] name <- restart$name [17:27:59.497] if (is.null(name)) [17:27:59.497] next [17:27:59.497] if (!grepl(pattern, name)) [17:27:59.497] next [17:27:59.497] invokeRestart(restart) [17:27:59.497] muffled <- TRUE [17:27:59.497] break [17:27:59.497] } [17:27:59.497] } [17:27:59.497] } [17:27:59.497] invisible(muffled) [17:27:59.497] } [17:27:59.497] muffleCondition(cond, pattern = "^muffle") [17:27:59.497] } [17:27:59.497] } [17:27:59.497] } [17:27:59.497] })) [17:27:59.497] }, error = function(ex) { [17:27:59.497] base::structure(base::list(value = NULL, visible = NULL, [17:27:59.497] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.497] ...future.rng), started = ...future.startTime, [17:27:59.497] finished = Sys.time(), session_uuid = NA_character_, [17:27:59.497] version = "1.8"), class = "FutureResult") [17:27:59.497] }, finally = { [17:27:59.497] if (!identical(...future.workdir, getwd())) [17:27:59.497] setwd(...future.workdir) [17:27:59.497] { [17:27:59.497] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:27:59.497] ...future.oldOptions$nwarnings <- NULL [17:27:59.497] } [17:27:59.497] base::options(...future.oldOptions) [17:27:59.497] if (.Platform$OS.type == "windows") { [17:27:59.497] old_names <- names(...future.oldEnvVars) [17:27:59.497] envs <- base::Sys.getenv() [17:27:59.497] names <- names(envs) [17:27:59.497] common <- intersect(names, old_names) [17:27:59.497] added <- setdiff(names, old_names) [17:27:59.497] removed <- setdiff(old_names, names) [17:27:59.497] changed <- common[...future.oldEnvVars[common] != [17:27:59.497] envs[common]] [17:27:59.497] NAMES <- toupper(changed) [17:27:59.497] args <- list() [17:27:59.497] for (kk in seq_along(NAMES)) { [17:27:59.497] name <- changed[[kk]] [17:27:59.497] NAME <- NAMES[[kk]] [17:27:59.497] if (name != NAME && is.element(NAME, old_names)) [17:27:59.497] next [17:27:59.497] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.497] } [17:27:59.497] NAMES <- toupper(added) [17:27:59.497] for (kk in seq_along(NAMES)) { [17:27:59.497] name <- added[[kk]] [17:27:59.497] NAME <- NAMES[[kk]] [17:27:59.497] if (name != NAME && is.element(NAME, old_names)) [17:27:59.497] next [17:27:59.497] args[[name]] <- "" [17:27:59.497] } [17:27:59.497] NAMES <- toupper(removed) [17:27:59.497] for (kk in seq_along(NAMES)) { [17:27:59.497] name <- removed[[kk]] [17:27:59.497] NAME <- NAMES[[kk]] [17:27:59.497] if (name != NAME && is.element(NAME, old_names)) [17:27:59.497] next [17:27:59.497] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.497] } [17:27:59.497] if (length(args) > 0) [17:27:59.497] base::do.call(base::Sys.setenv, args = args) [17:27:59.497] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:27:59.497] } [17:27:59.497] else { [17:27:59.497] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:27:59.497] } [17:27:59.497] { [17:27:59.497] if (base::length(...future.futureOptionsAdded) > [17:27:59.497] 0L) { [17:27:59.497] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:27:59.497] base::names(opts) <- ...future.futureOptionsAdded [17:27:59.497] base::options(opts) [17:27:59.497] } [17:27:59.497] { [17:27:59.497] { [17:27:59.497] base::options(mc.cores = ...future.mc.cores.old) [17:27:59.497] NULL [17:27:59.497] } [17:27:59.497] options(future.plan = NULL) [17:27:59.497] if (is.na(NA_character_)) [17:27:59.497] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.497] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:27:59.497] future::plan(...future.strategy.old, .cleanup = FALSE, [17:27:59.497] .init = FALSE) [17:27:59.497] } [17:27:59.497] } [17:27:59.497] } [17:27:59.497] }) [17:27:59.497] if (TRUE) { [17:27:59.497] base::sink(type = "output", split = FALSE) [17:27:59.497] if (TRUE) { [17:27:59.497] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:27:59.497] } [17:27:59.497] else { [17:27:59.497] ...future.result["stdout"] <- base::list(NULL) [17:27:59.497] } [17:27:59.497] base::close(...future.stdout) [17:27:59.497] ...future.stdout <- NULL [17:27:59.497] } [17:27:59.497] ...future.result$conditions <- ...future.conditions [17:27:59.497] ...future.result$finished <- base::Sys.time() [17:27:59.497] ...future.result [17:27:59.497] } [17:27:59.517] Exporting 2 global objects (327.17 KiB) to cluster node #1 ... [17:27:59.529] Exporting 'env' (326.92 KiB) to cluster node #1 ... [17:27:59.545] Exporting 'env' (326.92 KiB) to cluster node #1 ... DONE [17:27:59.545] Exporting 'b' (40 bytes) to cluster node #1 ... [17:27:59.546] Exporting 'b' (40 bytes) to cluster node #1 ... DONE [17:27:59.546] Exporting 2 global objects (327.17 KiB) to cluster node #1 ... DONE [17:27:59.547] MultisessionFuture started [17:27:59.548] - Launch lazy future ... done [17:27:59.548] run() for 'MultisessionFuture' ... done > > ## Resolve future #3 > message(sprintf("y = %s\n", y)) [17:27:59.549] result() for ClusterFuture ... [17:27:59.549] receiveMessageFromWorker() for ClusterFuture ... [17:27:59.549] - Validating connection of MultisessionFuture [17:27:59.566] - received message: FutureResult [17:27:59.566] - Received FutureResult [17:27:59.566] - Erased future from FutureRegistry [17:27:59.566] result() for ClusterFuture ... [17:27:59.567] - result already collected: FutureResult [17:27:59.567] result() for ClusterFuture ... done [17:27:59.567] receiveMessageFromWorker() for ClusterFuture ... done [17:27:59.567] result() for ClusterFuture ... done [17:27:59.567] result() for ClusterFuture ... [17:27:59.567] - result already collected: FutureResult [17:27:59.568] result() for ClusterFuture ... done y = 5 > > ## Resolve future #1 if not already done > str(as.list(env)) [17:27:59.568] result() for ClusterFuture ... [17:27:59.568] - result already collected: FutureResult [17:27:59.568] result() for ClusterFuture ... done [17:27:59.569] result() for ClusterFuture ... [17:27:59.569] - result already collected: FutureResult [17:27:59.569] result() for ClusterFuture ... done List of 1 $ a: num 5 > > ## Create future #4 > ## Since future #1 is resolved it will work at this point > y %<-% { env[[b]] } Warning in getGlobalsAndPackages(expr, envir = envir, tweak = tweakExpression, : R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [17:27:59.570] getGlobalsAndPackages() ... [17:27:59.571] Searching for globals... [17:27:59.572] - globals found: [4] '{', '[[', 'env', 'b' [17:27:59.572] Searching for globals ... DONE [17:27:59.572] Resolving globals: TRUE [17:27:59.572] Resolving any globals that are futures ... [17:27:59.573] - globals: [4] '{', '[[', 'env', 'b' [17:27:59.573] Resolving any globals that are futures ... DONE [17:27:59.573] Resolving futures part of globals (recursively) ... [17:27:59.574] resolve() on list ... [17:27:59.574] recursive: 99 [17:27:59.574] length: 2 [17:27:59.574] elements: 'env', 'b' [17:27:59.574] resolve() on environment ... [17:27:59.575] recursive: 98 [17:27:59.575] elements: [1] 'a' [17:27:59.575] length: 0 (resolved future 1) [17:27:59.575] resolve() on environment ... DONE [17:27:59.576] length: 1 (resolved future 1) [17:27:59.576] length: 0 (resolved future 2) [17:27:59.576] resolve() on list ... DONE [17:27:59.576] - globals: [2] 'env', 'b' [17:27:59.576] Resolving futures part of globals (recursively) ... DONE [17:27:59.576] The total size of the 2 globals is 499 bytes (499 bytes) [17:27:59.577] The total size of the 2 globals exported for future expression ('{; env[[b]]; }') is 499 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'env' (459 bytes of class 'environment') and 'b' (40 bytes of class 'character') [17:27:59.577] - globals: [2] 'env', 'b' [17:27:59.577] [17:27:59.577] getGlobalsAndPackages() ... DONE [17:27:59.578] run() for 'Future' ... [17:27:59.578] - state: 'created' [17:27:59.578] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [17:27:59.592] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [17:27:59.592] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [17:27:59.592] - Field: 'node' [17:27:59.593] - Field: 'label' [17:27:59.593] - Field: 'local' [17:27:59.593] - Field: 'owner' [17:27:59.593] - Field: 'envir' [17:27:59.593] - Field: 'workers' [17:27:59.594] - Field: 'packages' [17:27:59.594] - Field: 'gc' [17:27:59.594] - Field: 'conditions' [17:27:59.594] - Field: 'persistent' [17:27:59.594] - Field: 'expr' [17:27:59.595] - Field: 'uuid' [17:27:59.595] - Field: 'seed' [17:27:59.595] - Field: 'version' [17:27:59.595] - Field: 'result' [17:27:59.596] - Field: 'asynchronous' [17:27:59.596] - Field: 'calls' [17:27:59.597] - Field: 'globals' [17:27:59.597] - Field: 'stdout' [17:27:59.597] - Field: 'earlySignal' [17:27:59.598] - Field: 'lazy' [17:27:59.598] - Field: 'state' [17:27:59.598] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [17:27:59.598] - Launch lazy future ... [17:27:59.599] Packages needed by the future expression (n = 0): [17:27:59.599] Packages needed by future strategies (n = 0): [17:27:59.600] { [17:27:59.600] { [17:27:59.600] { [17:27:59.600] ...future.startTime <- base::Sys.time() [17:27:59.600] { [17:27:59.600] { [17:27:59.600] { [17:27:59.600] { [17:27:59.600] base::local({ [17:27:59.600] has_future <- base::requireNamespace("future", [17:27:59.600] quietly = TRUE) [17:27:59.600] if (has_future) { [17:27:59.600] ns <- base::getNamespace("future") [17:27:59.600] version <- ns[[".package"]][["version"]] [17:27:59.600] if (is.null(version)) [17:27:59.600] version <- utils::packageVersion("future") [17:27:59.600] } [17:27:59.600] else { [17:27:59.600] version <- NULL [17:27:59.600] } [17:27:59.600] if (!has_future || version < "1.8.0") { [17:27:59.600] info <- base::c(r_version = base::gsub("R version ", [17:27:59.600] "", base::R.version$version.string), [17:27:59.600] platform = base::sprintf("%s (%s-bit)", [17:27:59.600] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [17:27:59.600] os = base::paste(base::Sys.info()[base::c("sysname", [17:27:59.600] "release", "version")], collapse = " "), [17:27:59.600] hostname = base::Sys.info()[["nodename"]]) [17:27:59.600] info <- base::sprintf("%s: %s", base::names(info), [17:27:59.600] info) [17:27:59.600] info <- base::paste(info, collapse = "; ") [17:27:59.600] if (!has_future) { [17:27:59.600] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [17:27:59.600] info) [17:27:59.600] } [17:27:59.600] else { [17:27:59.600] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [17:27:59.600] info, version) [17:27:59.600] } [17:27:59.600] base::stop(msg) [17:27:59.600] } [17:27:59.600] }) [17:27:59.600] } [17:27:59.600] ...future.mc.cores.old <- base::getOption("mc.cores") [17:27:59.600] base::options(mc.cores = 1L) [17:27:59.600] } [17:27:59.600] ...future.strategy.old <- future::plan("list") [17:27:59.600] options(future.plan = NULL) [17:27:59.600] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.600] future::plan("default", .cleanup = FALSE, .init = FALSE) [17:27:59.600] } [17:27:59.600] ...future.workdir <- getwd() [17:27:59.600] } [17:27:59.600] ...future.oldOptions <- base::as.list(base::.Options) [17:27:59.600] ...future.oldEnvVars <- base::Sys.getenv() [17:27:59.600] } [17:27:59.600] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [17:27:59.600] future.globals.maxSize = NULL, future.globals.method = NULL, [17:27:59.600] future.globals.onMissing = NULL, future.globals.onReference = NULL, [17:27:59.600] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [17:27:59.600] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [17:27:59.600] future.stdout.windows.reencode = NULL, width = 80L) [17:27:59.600] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [17:27:59.600] base::names(...future.oldOptions)) [17:27:59.600] } [17:27:59.600] if (FALSE) { [17:27:59.600] } [17:27:59.600] else { [17:27:59.600] if (TRUE) { [17:27:59.600] ...future.stdout <- base::rawConnection(base::raw(0L), [17:27:59.600] open = "w") [17:27:59.600] } [17:27:59.600] else { [17:27:59.600] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [17:27:59.600] windows = "NUL", "/dev/null"), open = "w") [17:27:59.600] } [17:27:59.600] base::sink(...future.stdout, type = "output", split = FALSE) [17:27:59.600] base::on.exit(if (!base::is.null(...future.stdout)) { [17:27:59.600] base::sink(type = "output", split = FALSE) [17:27:59.600] base::close(...future.stdout) [17:27:59.600] }, add = TRUE) [17:27:59.600] } [17:27:59.600] ...future.frame <- base::sys.nframe() [17:27:59.600] ...future.conditions <- base::list() [17:27:59.600] ...future.rng <- base::globalenv()$.Random.seed [17:27:59.600] if (FALSE) { [17:27:59.600] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [17:27:59.600] "...future.value", "...future.globalenv.names", ".Random.seed") [17:27:59.600] } [17:27:59.600] ...future.result <- base::tryCatch({ [17:27:59.600] base::withCallingHandlers({ [17:27:59.600] ...future.value <- base::withVisible(base::local({ [17:27:59.600] ...future.makeSendCondition <- base::local({ [17:27:59.600] sendCondition <- NULL [17:27:59.600] function(frame = 1L) { [17:27:59.600] if (is.function(sendCondition)) [17:27:59.600] return(sendCondition) [17:27:59.600] ns <- getNamespace("parallel") [17:27:59.600] if (exists("sendData", mode = "function", [17:27:59.600] envir = ns)) { [17:27:59.600] parallel_sendData <- get("sendData", mode = "function", [17:27:59.600] envir = ns) [17:27:59.600] envir <- sys.frame(frame) [17:27:59.600] master <- NULL [17:27:59.600] while (!identical(envir, .GlobalEnv) && [17:27:59.600] !identical(envir, emptyenv())) { [17:27:59.600] if (exists("master", mode = "list", envir = envir, [17:27:59.600] inherits = FALSE)) { [17:27:59.600] master <- get("master", mode = "list", [17:27:59.600] envir = envir, inherits = FALSE) [17:27:59.600] if (inherits(master, c("SOCKnode", [17:27:59.600] "SOCK0node"))) { [17:27:59.600] sendCondition <<- function(cond) { [17:27:59.600] data <- list(type = "VALUE", value = cond, [17:27:59.600] success = TRUE) [17:27:59.600] parallel_sendData(master, data) [17:27:59.600] } [17:27:59.600] return(sendCondition) [17:27:59.600] } [17:27:59.600] } [17:27:59.600] frame <- frame + 1L [17:27:59.600] envir <- sys.frame(frame) [17:27:59.600] } [17:27:59.600] } [17:27:59.600] sendCondition <<- function(cond) NULL [17:27:59.600] } [17:27:59.600] }) [17:27:59.600] withCallingHandlers({ [17:27:59.600] { [17:27:59.600] env[[b]] [17:27:59.600] } [17:27:59.600] }, immediateCondition = function(cond) { [17:27:59.600] sendCondition <- ...future.makeSendCondition() [17:27:59.600] sendCondition(cond) [17:27:59.600] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.600] { [17:27:59.600] inherits <- base::inherits [17:27:59.600] invokeRestart <- base::invokeRestart [17:27:59.600] is.null <- base::is.null [17:27:59.600] muffled <- FALSE [17:27:59.600] if (inherits(cond, "message")) { [17:27:59.600] muffled <- grepl(pattern, "muffleMessage") [17:27:59.600] if (muffled) [17:27:59.600] invokeRestart("muffleMessage") [17:27:59.600] } [17:27:59.600] else if (inherits(cond, "warning")) { [17:27:59.600] muffled <- grepl(pattern, "muffleWarning") [17:27:59.600] if (muffled) [17:27:59.600] invokeRestart("muffleWarning") [17:27:59.600] } [17:27:59.600] else if (inherits(cond, "condition")) { [17:27:59.600] if (!is.null(pattern)) { [17:27:59.600] computeRestarts <- base::computeRestarts [17:27:59.600] grepl <- base::grepl [17:27:59.600] restarts <- computeRestarts(cond) [17:27:59.600] for (restart in restarts) { [17:27:59.600] name <- restart$name [17:27:59.600] if (is.null(name)) [17:27:59.600] next [17:27:59.600] if (!grepl(pattern, name)) [17:27:59.600] next [17:27:59.600] invokeRestart(restart) [17:27:59.600] muffled <- TRUE [17:27:59.600] break [17:27:59.600] } [17:27:59.600] } [17:27:59.600] } [17:27:59.600] invisible(muffled) [17:27:59.600] } [17:27:59.600] muffleCondition(cond) [17:27:59.600] }) [17:27:59.600] })) [17:27:59.600] future::FutureResult(value = ...future.value$value, [17:27:59.600] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.600] ...future.rng), globalenv = if (FALSE) [17:27:59.600] list(added = base::setdiff(base::names(base::.GlobalEnv), [17:27:59.600] ...future.globalenv.names)) [17:27:59.600] else NULL, started = ...future.startTime, version = "1.8") [17:27:59.600] }, condition = base::local({ [17:27:59.600] c <- base::c [17:27:59.600] inherits <- base::inherits [17:27:59.600] invokeRestart <- base::invokeRestart [17:27:59.600] length <- base::length [17:27:59.600] list <- base::list [17:27:59.600] seq.int <- base::seq.int [17:27:59.600] signalCondition <- base::signalCondition [17:27:59.600] sys.calls <- base::sys.calls [17:27:59.600] `[[` <- base::`[[` [17:27:59.600] `+` <- base::`+` [17:27:59.600] `<<-` <- base::`<<-` [17:27:59.600] sysCalls <- function(calls = sys.calls(), from = 1L) { [17:27:59.600] calls[seq.int(from = from + 12L, to = length(calls) - [17:27:59.600] 3L)] [17:27:59.600] } [17:27:59.600] function(cond) { [17:27:59.600] is_error <- inherits(cond, "error") [17:27:59.600] ignore <- !is_error && !is.null(NULL) && inherits(cond, [17:27:59.600] NULL) [17:27:59.600] if (is_error) { [17:27:59.600] sessionInformation <- function() { [17:27:59.600] list(r = base::R.Version(), locale = base::Sys.getlocale(), [17:27:59.600] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [17:27:59.600] search = base::search(), system = base::Sys.info()) [17:27:59.600] } [17:27:59.600] ...future.conditions[[length(...future.conditions) + [17:27:59.600] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [17:27:59.600] cond$call), session = sessionInformation(), [17:27:59.600] timestamp = base::Sys.time(), signaled = 0L) [17:27:59.600] signalCondition(cond) [17:27:59.600] } [17:27:59.600] else if (!ignore && TRUE && inherits(cond, c("condition", [17:27:59.600] "immediateCondition"))) { [17:27:59.600] signal <- TRUE && inherits(cond, "immediateCondition") [17:27:59.600] ...future.conditions[[length(...future.conditions) + [17:27:59.600] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [17:27:59.600] if (TRUE && !signal) { [17:27:59.600] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.600] { [17:27:59.600] inherits <- base::inherits [17:27:59.600] invokeRestart <- base::invokeRestart [17:27:59.600] is.null <- base::is.null [17:27:59.600] muffled <- FALSE [17:27:59.600] if (inherits(cond, "message")) { [17:27:59.600] muffled <- grepl(pattern, "muffleMessage") [17:27:59.600] if (muffled) [17:27:59.600] invokeRestart("muffleMessage") [17:27:59.600] } [17:27:59.600] else if (inherits(cond, "warning")) { [17:27:59.600] muffled <- grepl(pattern, "muffleWarning") [17:27:59.600] if (muffled) [17:27:59.600] invokeRestart("muffleWarning") [17:27:59.600] } [17:27:59.600] else if (inherits(cond, "condition")) { [17:27:59.600] if (!is.null(pattern)) { [17:27:59.600] computeRestarts <- base::computeRestarts [17:27:59.600] grepl <- base::grepl [17:27:59.600] restarts <- computeRestarts(cond) [17:27:59.600] for (restart in restarts) { [17:27:59.600] name <- restart$name [17:27:59.600] if (is.null(name)) [17:27:59.600] next [17:27:59.600] if (!grepl(pattern, name)) [17:27:59.600] next [17:27:59.600] invokeRestart(restart) [17:27:59.600] muffled <- TRUE [17:27:59.600] break [17:27:59.600] } [17:27:59.600] } [17:27:59.600] } [17:27:59.600] invisible(muffled) [17:27:59.600] } [17:27:59.600] muffleCondition(cond, pattern = "^muffle") [17:27:59.600] } [17:27:59.600] } [17:27:59.600] else { [17:27:59.600] if (TRUE) { [17:27:59.600] muffleCondition <- function (cond, pattern = "^muffle") [17:27:59.600] { [17:27:59.600] inherits <- base::inherits [17:27:59.600] invokeRestart <- base::invokeRestart [17:27:59.600] is.null <- base::is.null [17:27:59.600] muffled <- FALSE [17:27:59.600] if (inherits(cond, "message")) { [17:27:59.600] muffled <- grepl(pattern, "muffleMessage") [17:27:59.600] if (muffled) [17:27:59.600] invokeRestart("muffleMessage") [17:27:59.600] } [17:27:59.600] else if (inherits(cond, "warning")) { [17:27:59.600] muffled <- grepl(pattern, "muffleWarning") [17:27:59.600] if (muffled) [17:27:59.600] invokeRestart("muffleWarning") [17:27:59.600] } [17:27:59.600] else if (inherits(cond, "condition")) { [17:27:59.600] if (!is.null(pattern)) { [17:27:59.600] computeRestarts <- base::computeRestarts [17:27:59.600] grepl <- base::grepl [17:27:59.600] restarts <- computeRestarts(cond) [17:27:59.600] for (restart in restarts) { [17:27:59.600] name <- restart$name [17:27:59.600] if (is.null(name)) [17:27:59.600] next [17:27:59.600] if (!grepl(pattern, name)) [17:27:59.600] next [17:27:59.600] invokeRestart(restart) [17:27:59.600] muffled <- TRUE [17:27:59.600] break [17:27:59.600] } [17:27:59.600] } [17:27:59.600] } [17:27:59.600] invisible(muffled) [17:27:59.600] } [17:27:59.600] muffleCondition(cond, pattern = "^muffle") [17:27:59.600] } [17:27:59.600] } [17:27:59.600] } [17:27:59.600] })) [17:27:59.600] }, error = function(ex) { [17:27:59.600] base::structure(base::list(value = NULL, visible = NULL, [17:27:59.600] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [17:27:59.600] ...future.rng), started = ...future.startTime, [17:27:59.600] finished = Sys.time(), session_uuid = NA_character_, [17:27:59.600] version = "1.8"), class = "FutureResult") [17:27:59.600] }, finally = { [17:27:59.600] if (!identical(...future.workdir, getwd())) [17:27:59.600] setwd(...future.workdir) [17:27:59.600] { [17:27:59.600] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [17:27:59.600] ...future.oldOptions$nwarnings <- NULL [17:27:59.600] } [17:27:59.600] base::options(...future.oldOptions) [17:27:59.600] if (.Platform$OS.type == "windows") { [17:27:59.600] old_names <- names(...future.oldEnvVars) [17:27:59.600] envs <- base::Sys.getenv() [17:27:59.600] names <- names(envs) [17:27:59.600] common <- intersect(names, old_names) [17:27:59.600] added <- setdiff(names, old_names) [17:27:59.600] removed <- setdiff(old_names, names) [17:27:59.600] changed <- common[...future.oldEnvVars[common] != [17:27:59.600] envs[common]] [17:27:59.600] NAMES <- toupper(changed) [17:27:59.600] args <- list() [17:27:59.600] for (kk in seq_along(NAMES)) { [17:27:59.600] name <- changed[[kk]] [17:27:59.600] NAME <- NAMES[[kk]] [17:27:59.600] if (name != NAME && is.element(NAME, old_names)) [17:27:59.600] next [17:27:59.600] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.600] } [17:27:59.600] NAMES <- toupper(added) [17:27:59.600] for (kk in seq_along(NAMES)) { [17:27:59.600] name <- added[[kk]] [17:27:59.600] NAME <- NAMES[[kk]] [17:27:59.600] if (name != NAME && is.element(NAME, old_names)) [17:27:59.600] next [17:27:59.600] args[[name]] <- "" [17:27:59.600] } [17:27:59.600] NAMES <- toupper(removed) [17:27:59.600] for (kk in seq_along(NAMES)) { [17:27:59.600] name <- removed[[kk]] [17:27:59.600] NAME <- NAMES[[kk]] [17:27:59.600] if (name != NAME && is.element(NAME, old_names)) [17:27:59.600] next [17:27:59.600] args[[name]] <- ...future.oldEnvVars[[name]] [17:27:59.600] } [17:27:59.600] if (length(args) > 0) [17:27:59.600] base::do.call(base::Sys.setenv, args = args) [17:27:59.600] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [17:27:59.600] } [17:27:59.600] else { [17:27:59.600] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [17:27:59.600] } [17:27:59.600] { [17:27:59.600] if (base::length(...future.futureOptionsAdded) > [17:27:59.600] 0L) { [17:27:59.600] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [17:27:59.600] base::names(opts) <- ...future.futureOptionsAdded [17:27:59.600] base::options(opts) [17:27:59.600] } [17:27:59.600] { [17:27:59.600] { [17:27:59.600] base::options(mc.cores = ...future.mc.cores.old) [17:27:59.600] NULL [17:27:59.600] } [17:27:59.600] options(future.plan = NULL) [17:27:59.600] if (is.na(NA_character_)) [17:27:59.600] Sys.unsetenv("R_FUTURE_PLAN") [17:27:59.600] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [17:27:59.600] future::plan(...future.strategy.old, .cleanup = FALSE, [17:27:59.600] .init = FALSE) [17:27:59.600] } [17:27:59.600] } [17:27:59.600] } [17:27:59.600] }) [17:27:59.600] if (TRUE) { [17:27:59.600] base::sink(type = "output", split = FALSE) [17:27:59.600] if (TRUE) { [17:27:59.600] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [17:27:59.600] } [17:27:59.600] else { [17:27:59.600] ...future.result["stdout"] <- base::list(NULL) [17:27:59.600] } [17:27:59.600] base::close(...future.stdout) [17:27:59.600] ...future.stdout <- NULL [17:27:59.600] } [17:27:59.600] ...future.result$conditions <- ...future.conditions [17:27:59.600] ...future.result$finished <- base::Sys.time() [17:27:59.600] ...future.result [17:27:59.600] } [17:27:59.609] Exporting 2 global objects (805 bytes) to cluster node #1 ... [17:27:59.610] Exporting 'env' (459 bytes) to cluster node #1 ... [17:27:59.610] Exporting 'env' (459 bytes) to cluster node #1 ... DONE [17:27:59.611] Exporting 'b' (40 bytes) to cluster node #1 ... [17:27:59.611] Exporting 'b' (40 bytes) to cluster node #1 ... DONE [17:27:59.612] Exporting 2 global objects (805 bytes) to cluster node #1 ... DONE [17:27:59.613] MultisessionFuture started [17:27:59.613] - Launch lazy future ... done [17:27:59.613] run() for 'MultisessionFuture' ... done > ## Resolve future #4 > message(sprintf("y = %s\n", y)) [17:27:59.614] result() for ClusterFuture ... [17:27:59.614] receiveMessageFromWorker() for ClusterFuture ... [17:27:59.614] - Validating connection of MultisessionFuture [17:27:59.628] - received message: FutureResult [17:27:59.628] - Received FutureResult [17:27:59.629] - Erased future from FutureRegistry [17:27:59.629] result() for ClusterFuture ... [17:27:59.629] - result already collected: FutureResult [17:27:59.630] result() for ClusterFuture ... done [17:27:59.630] receiveMessageFromWorker() for ClusterFuture ... done [17:27:59.630] result() for ClusterFuture ... done [17:27:59.630] result() for ClusterFuture ... [17:27:59.631] - result already collected: FutureResult [17:27:59.631] result() for ClusterFuture ... done y = 5 > > message("*** Tricky use cases related to globals (part 2) ... DONE") *** Tricky use cases related to globals (part 2) ... DONE > > ## Cleanup > setTimeLimit() > source("incl/end.R") [17:27:59.633] plan(): Setting new future strategy stack: [17:27:59.633] List of future strategies: [17:27:59.633] 1. FutureStrategy: [17:27:59.633] - args: function (..., envir = parent.frame(), workers = "") [17:27:59.633] - tweaked: FALSE [17:27:59.633] - call: future::plan(oplan) [17:27:59.640] plan(): nbrOfWorkers() = 1 Failed to undo environment variables: - Expected environment variables: [n=205] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', 'BIBINPUTS', 'BINDIR', 'BSTINPUTS', 'COMMONPROGRAMFILES', 'COMPUTERNAME', 'COMSPEC', 'CURL_CA_BUNDLE', 'CYGWIN', 'CommonProgramFiles(x86)', 'CommonProgramW6432', 'DriverData', 'HOME', 'HOMEDRIVE', 'HOMEPATH', 'JAGS_ROOT', 'JAVA_HOME', 'LANGUAGE', 'LC_COLLATE', 'LC_MONETARY', 'LC_TIME', 'LOCALAPPDATA', 'LOGONSERVER', 'LS_HOME', 'LS_LICENSE_PATH', 'MAKE', 'MAKEFLAGS', 'MAKELEVEL', 'MFLAGS', 'MSMPI_BENCHMARKS', 'MSMPI_BIN', 'MSYS2_ENV_CONV_EXCL', 'NUMBER_OF_PROCESSORS', 'OCL', 'OMP_THREAD_LIMIT', 'OS', 'PATH', 'PATHEXT', 'PROCESSOR_ARCHITECTURE', 'PROCESSOR_IDENTIFIER', 'PROCESSOR_LEVEL', 'PROCESSOR_REVISION', 'PROGRAMFILES', 'PROMPT', 'PSModulePath', 'PUBLIC', 'PWD', 'ProgramData', 'ProgramFiles(x86)', 'ProgramW6432', 'RTOOLS43_HOME', 'RTOOLS44_HOME', 'R_ARCH', 'R_BROWSER', 'R_BZIPCMD', 'R_CMD', 'R_COMPILED_BY', 'R_CRAN_WEB', 'R_CUSTOM_TOOLS_PATH', 'R_CUSTOM_TOOLS_SOFT', 'R_DOC_DIR', 'R_ENVIRON_USER', 'R_GSCMD', 'R_GZIPCMD', 'R_HOME', 'R_INCLUDE_DIR', 'R_INSTALL_TAR', 'R_LIBS', 'R_LIBS_SITE', 'R_LIBS_USER', 'R_MAX_NUM_DLLS', 'R_OSTYPE', 'R_PAPERSIZE', 'R_PAPERSIZE_USER', 'R_PARALLELLY_MAKENODEPSOCK_AUTOKILL', 'R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT', 'R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL', 'R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS', 'R_PARALLELLY_MAKENODEPSOCK_TIMEOUT', 'R_PARALLELLY_RANDOM_PORTS', 'R_PARALLEL_PORT', 'R_RD4PDF', 'R_RTOOLS44_PATH', 'R_SCRIPT_LEGACY', 'R_SHARE_DIR', 'R_TESTS', 'R_UNZIPCMD', 'R_USER', 'R_VERSION', 'R_ZIPCMD', 'SED', 'SHLVL', 'SYSTEMDRIVE', 'SYSTEMROOT', 'TAR', 'TAR_OPTIONS', 'TEMP', 'TERM', 'TEXINPUTS', 'TMP', 'TMPDIR', 'USERDOMAIN', 'USERDOMAIN_ROAMINGPROFILE', 'USERNAME', 'USERPROFILE', 'WINDIR', '_', '_R_CHECK_AUTOCONF_', '_R_CHECK_BOGUS_RETURN_', '_R_CHECK_BROWSER_NONINTERACTIVE_', '_R_CHECK_BUILD_VIGNETTES_SEPARATELY_', '_R_CHECK_CODETOOLS_PROFILE_', '_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_', '_R_CHECK_CODE_ATTACH_', '_R_CHECK_CODE_CLASS_IS_STRING_', '_R_CHECK_CODE_DATA_INTO_GLOBALENV_', '_R_CHECK_CODE_USAGE_VIA_NAMESPACES_', '_R_CHECK_CODE_USAGE_WITHOUT_LOADING_', '_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_', '_R_CHECK_CODOC_VARIABLES_IN_USAGES_', '_R_CHECK_COMPACT_DATA2_', '_R_CHECK_COMPILATION_FLAGS_', '_R_CHECK_CONNECTIONS_LEFT_OPEN_', '_R_CHECK_CRAN_INCOMING_', '_R_CHECK_CRAN_INCOMING_CHECK_FILE_URIS_', '_R_CHECK_CRAN_INCOMING_CHECK_URLS_IN_PARALLEL_', '_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_', '_R_CHECK_CRAN_INCOMING_REMOTE_', '_R_CHECK_CRAN_INCOMING_USE_ASPELL_', '_R_CHECK_DATALIST_', '_R_CHECK_DEPRECATED_DEFUNCT_', '_R_CHECK_DOC_SIZES2_', '_R_CHECK_DOT_FIRSTLIB_', '_R_CHECK_DOT_INTERNAL_', '_R_CHECK_EXAMPLE_TIMING_THRESHOLD_', '_R_CHECK_EXECUTABLES_', '_R_CHECK_EXECUTABLES_EXCLUSIONS_', '_R_CHECK_FF_CALLS_', '_R_CHECK_FF_DUP_', '_R_CHECK_FORCE_SUGGESTS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_LEEWAY_', '_R_CHECK_HAVE_MYSQL_', '_R_CHECK_HAVE_ODBC_', '_R_CHECK_HAVE_PERL_', '_R_CHECK_HAVE_POSTGRES_', '_R_CHECK_INSTALL_DEPENDS_', '_R_CHECK_INTERNALS2_', '_R_CHECK_LENGTH_1_CONDITION_', '_R_CHECK_LICENSE_', '_R_CHECK_LIMIT_CORES_', '_R_CHECK_MATRIX_DATA_', '_R_CHECK_MBCS_CONVERSION_FAILURE_', '_R_CHECK_NATIVE_ROUTINE_REGISTRATION_', '_R_CHECK_NEWS_IN_PLAIN_TEXT_', '_R_CHECK_NO_RECOMMENDED_', '_R_CHECK_NO_STOP_ON_TEST_ERROR_', '_R_CHECK_ORPHANED_', '_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_', '_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_', '_R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_', '_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_', '_R_CHECK_PACKAGE_NAME_', '_R_CHECK_PKG_SIZES_', '_R_CHECK_PKG_SIZES_THRESHOLD_', '_R_CHECK_PRAGMAS_', '_R_CHECK_RD_EXAMPLES_T_AND_F_', '_R_CHECK_RD_LINE_WIDTHS_', '_R_CHECK_RD_MATH_RENDERING_', '_R_CHECK_RD_NOTE_LOST_BRACES_', '_R_CHECK_RD_VALIDATE_RD2HTML_', '_R_CHECK_REPLACING_IMPORTS_', '_R_CHECK_R_DEPENDS_', '_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_', '_R_CHECK_SCREEN_DEVICE_', '_R_CHECK_SERIALIZATION_', '_R_CHECK_SHLIB_OPENMP_FLAGS_', '_R_CHECK_SRC_MINUS_W_IMPLICIT_', '_R_CHECK_SUBDIRS_NOCASE_', '_R_CHECK_SUGGESTS_ONLY_', '_R_CHECK_SYSTEM_CLOCK_', '_R_CHECK_TESTS_NLINES_', '_R_CHECK_TEST_TIMING_', '_R_CHECK_TIMINGS_', '_R_CHECK_TOPLEVEL_FILES_', '_R_CHECK_UNDOC_USE_ALL_NAMES_', '_R_CHECK_UNSAFE_CALLS_', '_R_CHECK_URLS_SHOW_301_STATUS_', '_R_CHECK_VC_DIRS_', '_R_CHECK_VIGNETTES_NLINES_', '_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_', '_R_CHECK_VIGNETTE_TIMING_', '_R_CHECK_VIGNETTE_TITLES_', '_R_CHECK_WINDOWS_DEVICE_', '_R_CHECK_XREFS_NOTE_MISSING_PACKAGE_ANCHORS_', '_R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_', '_R_CLASS_MATRIX_ARRAY_', '_R_DEPRECATED_IS_R_', '_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_', '_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_', '__R_CHECK_DOC_FILES_NOTE_IF_ALL_SPECIAL__', 'maj.version', 'nextArg--timingsnextArg--install' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: List of 3 $ name : chr "MAKEFLAGS" $ expected: 'Dlist' chr "" $ actual : 'Dlist' chr NA > > proc.time() user system elapsed 0.82 0.15 2.21