R Under development (unstable) (2023-12-20 r85713 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") [01:28:02.487] plan(): Setting new future strategy stack: [01:28:02.489] List of future strategies: [01:28:02.489] 1. sequential: [01:28:02.489] - args: function (..., envir = parent.frame(), workers = "") [01:28:02.489] - tweaked: FALSE [01:28:02.489] - call: future::plan("sequential") [01:28:02.504] 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) [01:28:02.518] plan(): Setting new future strategy stack: [01:28:02.518] List of future strategies: [01:28:02.518] 1. multisession: [01:28:02.518] - args: function (..., workers = 2L, envir = parent.frame()) [01:28:02.518] - tweaked: TRUE [01:28:02.518] - call: plan(multisession, workers = 2L) [01:28:02.532] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... [01:28:02.532] multisession: [01:28:02.532] - args: function (..., workers = 2L, envir = parent.frame()) [01:28:02.532] - tweaked: TRUE [01:28:02.532] - call: plan(multisession, workers = 2L) Warning: R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [01:28:02.534] getGlobalsAndPackages() ... [01:28:02.534] Not searching for globals [01:28:02.535] - globals: [0] [01:28:02.535] getGlobalsAndPackages() ... DONE [01:28:02.535] [local output] makeClusterPSOCK() ... [01:28:02.562] [local output] Workers: [n = 2] 'localhost', 'localhost' [01:28:02.568] [local output] Base port: 36482 [01:28:02.569] [local output] Getting setup options for 2 cluster nodes ... [01:28:02.569] [local output] - Node 1 of 2 ... [01:28:02.569] [local output] localMachine=TRUE => revtunnel=FALSE [01:28:02.571] Testing if worker's PID can be inferred: '"D:/RCompile/recent/R/bin/x64/Rscript" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/Rtmpy453OZ/worker.rank=1.parallelly.parent=14068.36f49945cb7.pid\")), silent = TRUE)" -e "file.exists(\"D:/temp/Rtmpy453OZ/worker.rank=1.parallelly.parent=14068.36f49945cb7.pid\")"' [01:28:02.901] - Possible to infer worker's PID: TRUE [01:28:02.902] [local output] Rscript port: 36482 [01:28:02.902] [local output] - Node 2 of 2 ... [01:28:02.903] [local output] localMachine=TRUE => revtunnel=FALSE [01:28:02.904] [local output] Rscript port: 36482 [01:28:02.905] [local output] Getting setup options for 2 cluster nodes ... done [01:28:02.905] [local output] - Parallel setup requested for some PSOCK nodes [01:28:02.906] [local output] Setting up PSOCK nodes in parallel [01:28:02.906] List of 36 [01:28:02.906] $ worker : chr "localhost" [01:28:02.906] ..- attr(*, "localhost")= logi TRUE [01:28:02.906] $ master : chr "localhost" [01:28:02.906] $ port : int 36482 [01:28:02.906] $ connectTimeout : num 120 [01:28:02.906] $ timeout : num 120 [01:28:02.906] $ rscript : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\"" [01:28:02.906] $ homogeneous : logi TRUE [01:28:02.906] $ rscript_args : chr "--default-packages=datasets,utils,grDevices,graphics,stats,methods -e \"#label=globals,resolve.R:14068:CRANWIN3"| __truncated__ [01:28:02.906] $ rscript_envs : NULL [01:28:02.906] $ rscript_libs : chr [1:2] "D:/temp/RtmpCIb4qz/RLIBS_32fc52ae7b47" "D:/RCompile/recent/R/library" [01:28:02.906] $ rscript_startup : NULL [01:28:02.906] $ rscript_sh : chr "cmd" [01:28:02.906] $ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [01:28:02.906] $ methods : logi TRUE [01:28:02.906] $ socketOptions : chr "no-delay" [01:28:02.906] $ useXDR : logi FALSE [01:28:02.906] $ outfile : chr "/dev/null" [01:28:02.906] $ renice : int NA [01:28:02.906] $ rshcmd : NULL [01:28:02.906] $ user : chr(0) [01:28:02.906] $ revtunnel : logi FALSE [01:28:02.906] $ rshlogfile : NULL [01:28:02.906] $ rshopts : chr(0) [01:28:02.906] $ rank : int 1 [01:28:02.906] $ manual : logi FALSE [01:28:02.906] $ dryrun : logi FALSE [01:28:02.906] $ quiet : logi FALSE [01:28:02.906] $ setup_strategy : chr "parallel" [01:28:02.906] $ local_cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [01:28:02.906] $ pidfile : chr "D:/temp/Rtmpy453OZ/worker.rank=1.parallelly.parent=14068.36f49945cb7.pid" [01:28:02.906] $ rshcmd_label : NULL [01:28:02.906] $ rsh_call : NULL [01:28:02.906] $ cmd : chr "\"D:/RCompile/recent/R/bin/x64/Rscript\" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "| __truncated__ [01:28:02.906] $ localMachine : logi TRUE [01:28:02.906] $ make_fcn :function (worker = getOption2("parallelly.localhost.hostname", "localhost"), [01:28:02.906] master = NULL, port, connectTimeout = getOption2("parallelly.makeNodePSOCK.connectTimeout", [01:28:02.906] 2 * 60), timeout = getOption2("parallelly.makeNodePSOCK.timeout", [01:28:02.906] 30 * 24 * 60 * 60), rscript = NULL, homogeneous = NULL, rscript_args = NULL, [01:28:02.906] rscript_envs = NULL, rscript_libs = NULL, rscript_startup = NULL, rscript_sh = c("auto", [01:28:02.906] "cmd", "sh"), default_packages = c("datasets", "utils", "grDevices", [01:28:02.906] "graphics", "stats", if (methods) "methods"), methods = TRUE, socketOptions = getOption2("parallelly.makeNodePSOCK.socketOptions", [01:28:02.906] "no-delay"), useXDR = getOption2("parallelly.makeNodePSOCK.useXDR", [01:28:02.906] FALSE), outfile = "/dev/null", renice = NA_integer_, rshcmd = getOption2("parallelly.makeNodePSOCK.rshcmd", [01:28:02.906] NULL), user = NULL, revtunnel = NA, rshlogfile = NULL, rshopts = getOption2("parallelly.makeNodePSOCK.rshopts", [01:28:02.906] NULL), rank = 1L, manual = FALSE, dryrun = FALSE, quiet = FALSE, [01:28:02.906] setup_strategy = getOption2("parallelly.makeNodePSOCK.setup_strategy", [01:28:02.906] "parallel"), action = c("launch", "options"), verbose = FALSE) [01:28:02.906] $ arguments :List of 28 [01:28:02.906] ..$ worker : chr "localhost" [01:28:02.906] ..$ master : NULL [01:28:02.906] ..$ port : int 36482 [01:28:02.906] ..$ connectTimeout : num 120 [01:28:02.906] ..$ timeout : num 120 [01:28:02.906] ..$ rscript : NULL [01:28:02.906] ..$ homogeneous : NULL [01:28:02.906] ..$ rscript_args : NULL [01:28:02.906] ..$ rscript_envs : NULL [01:28:02.906] ..$ rscript_libs : chr [1:2] "D:/temp/RtmpCIb4qz/RLIBS_32fc52ae7b47" "D:/RCompile/recent/R/library" [01:28:02.906] ..$ rscript_startup : NULL [01:28:02.906] ..$ rscript_sh : chr [1:3] "auto" "cmd" "sh" [01:28:02.906] ..$ default_packages: chr [1:6] "datasets" "utils" "grDevices" "graphics" ... [01:28:02.906] ..$ methods : logi TRUE [01:28:02.906] ..$ socketOptions : chr "no-delay" [01:28:02.906] ..$ useXDR : logi FALSE [01:28:02.906] ..$ outfile : chr "/dev/null" [01:28:02.906] ..$ renice : int NA [01:28:02.906] ..$ rshcmd : NULL [01:28:02.906] ..$ user : NULL [01:28:02.906] ..$ revtunnel : logi NA [01:28:02.906] ..$ rshlogfile : NULL [01:28:02.906] ..$ rshopts : NULL [01:28:02.906] ..$ rank : int 1 [01:28:02.906] ..$ manual : logi FALSE [01:28:02.906] ..$ dryrun : logi FALSE [01:28:02.906] ..$ quiet : logi FALSE [01:28:02.906] ..$ setup_strategy : chr "parallel" [01:28:02.906] - attr(*, "class")= chr [1:2] "makeNodePSOCKOptions" "makeNodeOptions" [01:28:02.930] [local output] System call to launch all workers: [01:28:02.930] [local output] "D:/RCompile/recent/R/bin/x64/Rscript" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "#label=globals,resolve.R:14068:CRANWIN3:CRAN" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/Rtmpy453OZ/worker.rank=1.parallelly.parent=14068.36f49945cb7.pid\")), silent = TRUE)" -e "options(socketOptions = \"no-delay\")" -e ".libPaths(c(\"D:/temp/RtmpCIb4qz/RLIBS_32fc52ae7b47\",\"D:/RCompile/recent/R/library\"))" -e "workRSOCK <- tryCatch(parallel:::.workRSOCK, error=function(e) parallel:::.slaveRSOCK); workRSOCK()" MASTER=localhost PORT=36482 OUT=/dev/null TIMEOUT=120 XDR=FALSE SETUPTIMEOUT=120 SETUPSTRATEGY=parallel [01:28:02.930] [local output] Starting PSOCK main server [01:28:02.935] [local output] Workers launched [01:28:02.936] [local output] Waiting for workers to connect back [01:28:02.936] - [local output] 0 workers out of 2 ready [01:28:03.123] - [local output] 0 workers out of 2 ready [01:28:03.123] - [local output] 1 workers out of 2 ready [01:28:03.138] - [local output] 1 workers out of 2 ready [01:28:03.138] - [local output] 2 workers out of 2 ready [01:28:03.139] [local output] Launching of workers completed [01:28:03.139] [local output] Collecting session information from workers [01:28:03.140] [local output] - Worker #1 of 2 [01:28:03.141] [local output] - Worker #2 of 2 [01:28:03.141] [local output] makeClusterPSOCK() ... done [01:28:03.155] Packages needed by the future expression (n = 0): [01:28:03.155] Packages needed by future strategies (n = 0): [01:28:03.156] { [01:28:03.156] { [01:28:03.156] { [01:28:03.156] ...future.startTime <- base::Sys.time() [01:28:03.156] { [01:28:03.156] { [01:28:03.156] { [01:28:03.156] { [01:28:03.156] base::local({ [01:28:03.156] has_future <- base::requireNamespace("future", [01:28:03.156] quietly = TRUE) [01:28:03.156] if (has_future) { [01:28:03.156] ns <- base::getNamespace("future") [01:28:03.156] version <- ns[[".package"]][["version"]] [01:28:03.156] if (is.null(version)) [01:28:03.156] version <- utils::packageVersion("future") [01:28:03.156] } [01:28:03.156] else { [01:28:03.156] version <- NULL [01:28:03.156] } [01:28:03.156] if (!has_future || version < "1.8.0") { [01:28:03.156] info <- base::c(r_version = base::gsub("R version ", [01:28:03.156] "", base::R.version$version.string), [01:28:03.156] platform = base::sprintf("%s (%s-bit)", [01:28:03.156] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:28:03.156] os = base::paste(base::Sys.info()[base::c("sysname", [01:28:03.156] "release", "version")], collapse = " "), [01:28:03.156] hostname = base::Sys.info()[["nodename"]]) [01:28:03.156] info <- base::sprintf("%s: %s", base::names(info), [01:28:03.156] info) [01:28:03.156] info <- base::paste(info, collapse = "; ") [01:28:03.156] if (!has_future) { [01:28:03.156] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:28:03.156] info) [01:28:03.156] } [01:28:03.156] else { [01:28:03.156] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:28:03.156] info, version) [01:28:03.156] } [01:28:03.156] base::stop(msg) [01:28:03.156] } [01:28:03.156] }) [01:28:03.156] } [01:28:03.156] ...future.mc.cores.old <- base::getOption("mc.cores") [01:28:03.156] base::options(mc.cores = 1L) [01:28:03.156] } [01:28:03.156] options(future.plan = NULL) [01:28:03.156] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.156] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:28:03.156] } [01:28:03.156] ...future.workdir <- getwd() [01:28:03.156] } [01:28:03.156] ...future.oldOptions <- base::as.list(base::.Options) [01:28:03.156] ...future.oldEnvVars <- base::Sys.getenv() [01:28:03.156] } [01:28:03.156] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:28:03.156] future.globals.maxSize = NULL, future.globals.method = NULL, [01:28:03.156] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:28:03.156] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [01:28:03.156] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:28:03.156] future.stdout.windows.reencode = NULL, width = 80L) [01:28:03.156] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:28:03.156] base::names(...future.oldOptions)) [01:28:03.156] } [01:28:03.156] if (FALSE) { [01:28:03.156] } [01:28:03.156] else { [01:28:03.156] if (TRUE) { [01:28:03.156] ...future.stdout <- base::rawConnection(base::raw(0L), [01:28:03.156] open = "w") [01:28:03.156] } [01:28:03.156] else { [01:28:03.156] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:28:03.156] windows = "NUL", "/dev/null"), open = "w") [01:28:03.156] } [01:28:03.156] base::sink(...future.stdout, type = "output", split = FALSE) [01:28:03.156] base::on.exit(if (!base::is.null(...future.stdout)) { [01:28:03.156] base::sink(type = "output", split = FALSE) [01:28:03.156] base::close(...future.stdout) [01:28:03.156] }, add = TRUE) [01:28:03.156] } [01:28:03.156] ...future.frame <- base::sys.nframe() [01:28:03.156] ...future.conditions <- base::list() [01:28:03.156] ...future.rng <- base::globalenv()$.Random.seed [01:28:03.156] if (FALSE) { [01:28:03.156] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:28:03.156] "...future.value", "...future.globalenv.names", ".Random.seed") [01:28:03.156] } [01:28:03.156] ...future.result <- base::tryCatch({ [01:28:03.156] base::withCallingHandlers({ [01:28:03.156] ...future.value <- base::withVisible(base::local({ [01:28:03.156] ...future.makeSendCondition <- base::local({ [01:28:03.156] sendCondition <- NULL [01:28:03.156] function(frame = 1L) { [01:28:03.156] if (is.function(sendCondition)) [01:28:03.156] return(sendCondition) [01:28:03.156] ns <- getNamespace("parallel") [01:28:03.156] if (exists("sendData", mode = "function", [01:28:03.156] envir = ns)) { [01:28:03.156] parallel_sendData <- get("sendData", mode = "function", [01:28:03.156] envir = ns) [01:28:03.156] envir <- sys.frame(frame) [01:28:03.156] master <- NULL [01:28:03.156] while (!identical(envir, .GlobalEnv) && [01:28:03.156] !identical(envir, emptyenv())) { [01:28:03.156] if (exists("master", mode = "list", envir = envir, [01:28:03.156] inherits = FALSE)) { [01:28:03.156] master <- get("master", mode = "list", [01:28:03.156] envir = envir, inherits = FALSE) [01:28:03.156] if (inherits(master, c("SOCKnode", [01:28:03.156] "SOCK0node"))) { [01:28:03.156] sendCondition <<- function(cond) { [01:28:03.156] data <- list(type = "VALUE", value = cond, [01:28:03.156] success = TRUE) [01:28:03.156] parallel_sendData(master, data) [01:28:03.156] } [01:28:03.156] return(sendCondition) [01:28:03.156] } [01:28:03.156] } [01:28:03.156] frame <- frame + 1L [01:28:03.156] envir <- sys.frame(frame) [01:28:03.156] } [01:28:03.156] } [01:28:03.156] sendCondition <<- function(cond) NULL [01:28:03.156] } [01:28:03.156] }) [01:28:03.156] withCallingHandlers({ [01:28:03.156] NA [01:28:03.156] }, immediateCondition = function(cond) { [01:28:03.156] sendCondition <- ...future.makeSendCondition() [01:28:03.156] sendCondition(cond) [01:28:03.156] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.156] { [01:28:03.156] inherits <- base::inherits [01:28:03.156] invokeRestart <- base::invokeRestart [01:28:03.156] is.null <- base::is.null [01:28:03.156] muffled <- FALSE [01:28:03.156] if (inherits(cond, "message")) { [01:28:03.156] muffled <- grepl(pattern, "muffleMessage") [01:28:03.156] if (muffled) [01:28:03.156] invokeRestart("muffleMessage") [01:28:03.156] } [01:28:03.156] else if (inherits(cond, "warning")) { [01:28:03.156] muffled <- grepl(pattern, "muffleWarning") [01:28:03.156] if (muffled) [01:28:03.156] invokeRestart("muffleWarning") [01:28:03.156] } [01:28:03.156] else if (inherits(cond, "condition")) { [01:28:03.156] if (!is.null(pattern)) { [01:28:03.156] computeRestarts <- base::computeRestarts [01:28:03.156] grepl <- base::grepl [01:28:03.156] restarts <- computeRestarts(cond) [01:28:03.156] for (restart in restarts) { [01:28:03.156] name <- restart$name [01:28:03.156] if (is.null(name)) [01:28:03.156] next [01:28:03.156] if (!grepl(pattern, name)) [01:28:03.156] next [01:28:03.156] invokeRestart(restart) [01:28:03.156] muffled <- TRUE [01:28:03.156] break [01:28:03.156] } [01:28:03.156] } [01:28:03.156] } [01:28:03.156] invisible(muffled) [01:28:03.156] } [01:28:03.156] muffleCondition(cond) [01:28:03.156] }) [01:28:03.156] })) [01:28:03.156] future::FutureResult(value = ...future.value$value, [01:28:03.156] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.156] ...future.rng), globalenv = if (FALSE) [01:28:03.156] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:28:03.156] ...future.globalenv.names)) [01:28:03.156] else NULL, started = ...future.startTime, version = "1.8") [01:28:03.156] }, condition = base::local({ [01:28:03.156] c <- base::c [01:28:03.156] inherits <- base::inherits [01:28:03.156] invokeRestart <- base::invokeRestart [01:28:03.156] length <- base::length [01:28:03.156] list <- base::list [01:28:03.156] seq.int <- base::seq.int [01:28:03.156] signalCondition <- base::signalCondition [01:28:03.156] sys.calls <- base::sys.calls [01:28:03.156] `[[` <- base::`[[` [01:28:03.156] `+` <- base::`+` [01:28:03.156] `<<-` <- base::`<<-` [01:28:03.156] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:28:03.156] calls[seq.int(from = from + 12L, to = length(calls) - [01:28:03.156] 3L)] [01:28:03.156] } [01:28:03.156] function(cond) { [01:28:03.156] is_error <- inherits(cond, "error") [01:28:03.156] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:28:03.156] NULL) [01:28:03.156] if (is_error) { [01:28:03.156] sessionInformation <- function() { [01:28:03.156] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:28:03.156] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:28:03.156] search = base::search(), system = base::Sys.info()) [01:28:03.156] } [01:28:03.156] ...future.conditions[[length(...future.conditions) + [01:28:03.156] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:28:03.156] cond$call), session = sessionInformation(), [01:28:03.156] timestamp = base::Sys.time(), signaled = 0L) [01:28:03.156] signalCondition(cond) [01:28:03.156] } [01:28:03.156] else if (!ignore && TRUE && inherits(cond, c("condition", [01:28:03.156] "immediateCondition"))) { [01:28:03.156] signal <- TRUE && inherits(cond, "immediateCondition") [01:28:03.156] ...future.conditions[[length(...future.conditions) + [01:28:03.156] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:28:03.156] if (TRUE && !signal) { [01:28:03.156] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.156] { [01:28:03.156] inherits <- base::inherits [01:28:03.156] invokeRestart <- base::invokeRestart [01:28:03.156] is.null <- base::is.null [01:28:03.156] muffled <- FALSE [01:28:03.156] if (inherits(cond, "message")) { [01:28:03.156] muffled <- grepl(pattern, "muffleMessage") [01:28:03.156] if (muffled) [01:28:03.156] invokeRestart("muffleMessage") [01:28:03.156] } [01:28:03.156] else if (inherits(cond, "warning")) { [01:28:03.156] muffled <- grepl(pattern, "muffleWarning") [01:28:03.156] if (muffled) [01:28:03.156] invokeRestart("muffleWarning") [01:28:03.156] } [01:28:03.156] else if (inherits(cond, "condition")) { [01:28:03.156] if (!is.null(pattern)) { [01:28:03.156] computeRestarts <- base::computeRestarts [01:28:03.156] grepl <- base::grepl [01:28:03.156] restarts <- computeRestarts(cond) [01:28:03.156] for (restart in restarts) { [01:28:03.156] name <- restart$name [01:28:03.156] if (is.null(name)) [01:28:03.156] next [01:28:03.156] if (!grepl(pattern, name)) [01:28:03.156] next [01:28:03.156] invokeRestart(restart) [01:28:03.156] muffled <- TRUE [01:28:03.156] break [01:28:03.156] } [01:28:03.156] } [01:28:03.156] } [01:28:03.156] invisible(muffled) [01:28:03.156] } [01:28:03.156] muffleCondition(cond, pattern = "^muffle") [01:28:03.156] } [01:28:03.156] } [01:28:03.156] else { [01:28:03.156] if (TRUE) { [01:28:03.156] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.156] { [01:28:03.156] inherits <- base::inherits [01:28:03.156] invokeRestart <- base::invokeRestart [01:28:03.156] is.null <- base::is.null [01:28:03.156] muffled <- FALSE [01:28:03.156] if (inherits(cond, "message")) { [01:28:03.156] muffled <- grepl(pattern, "muffleMessage") [01:28:03.156] if (muffled) [01:28:03.156] invokeRestart("muffleMessage") [01:28:03.156] } [01:28:03.156] else if (inherits(cond, "warning")) { [01:28:03.156] muffled <- grepl(pattern, "muffleWarning") [01:28:03.156] if (muffled) [01:28:03.156] invokeRestart("muffleWarning") [01:28:03.156] } [01:28:03.156] else if (inherits(cond, "condition")) { [01:28:03.156] if (!is.null(pattern)) { [01:28:03.156] computeRestarts <- base::computeRestarts [01:28:03.156] grepl <- base::grepl [01:28:03.156] restarts <- computeRestarts(cond) [01:28:03.156] for (restart in restarts) { [01:28:03.156] name <- restart$name [01:28:03.156] if (is.null(name)) [01:28:03.156] next [01:28:03.156] if (!grepl(pattern, name)) [01:28:03.156] next [01:28:03.156] invokeRestart(restart) [01:28:03.156] muffled <- TRUE [01:28:03.156] break [01:28:03.156] } [01:28:03.156] } [01:28:03.156] } [01:28:03.156] invisible(muffled) [01:28:03.156] } [01:28:03.156] muffleCondition(cond, pattern = "^muffle") [01:28:03.156] } [01:28:03.156] } [01:28:03.156] } [01:28:03.156] })) [01:28:03.156] }, error = function(ex) { [01:28:03.156] base::structure(base::list(value = NULL, visible = NULL, [01:28:03.156] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.156] ...future.rng), started = ...future.startTime, [01:28:03.156] finished = Sys.time(), session_uuid = NA_character_, [01:28:03.156] version = "1.8"), class = "FutureResult") [01:28:03.156] }, finally = { [01:28:03.156] if (!identical(...future.workdir, getwd())) [01:28:03.156] setwd(...future.workdir) [01:28:03.156] { [01:28:03.156] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:28:03.156] ...future.oldOptions$nwarnings <- NULL [01:28:03.156] } [01:28:03.156] base::options(...future.oldOptions) [01:28:03.156] if (.Platform$OS.type == "windows") { [01:28:03.156] old_names <- names(...future.oldEnvVars) [01:28:03.156] envs <- base::Sys.getenv() [01:28:03.156] names <- names(envs) [01:28:03.156] common <- intersect(names, old_names) [01:28:03.156] added <- setdiff(names, old_names) [01:28:03.156] removed <- setdiff(old_names, names) [01:28:03.156] changed <- common[...future.oldEnvVars[common] != [01:28:03.156] envs[common]] [01:28:03.156] NAMES <- toupper(changed) [01:28:03.156] args <- list() [01:28:03.156] for (kk in seq_along(NAMES)) { [01:28:03.156] name <- changed[[kk]] [01:28:03.156] NAME <- NAMES[[kk]] [01:28:03.156] if (name != NAME && is.element(NAME, old_names)) [01:28:03.156] next [01:28:03.156] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.156] } [01:28:03.156] NAMES <- toupper(added) [01:28:03.156] for (kk in seq_along(NAMES)) { [01:28:03.156] name <- added[[kk]] [01:28:03.156] NAME <- NAMES[[kk]] [01:28:03.156] if (name != NAME && is.element(NAME, old_names)) [01:28:03.156] next [01:28:03.156] args[[name]] <- "" [01:28:03.156] } [01:28:03.156] NAMES <- toupper(removed) [01:28:03.156] for (kk in seq_along(NAMES)) { [01:28:03.156] name <- removed[[kk]] [01:28:03.156] NAME <- NAMES[[kk]] [01:28:03.156] if (name != NAME && is.element(NAME, old_names)) [01:28:03.156] next [01:28:03.156] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.156] } [01:28:03.156] if (length(args) > 0) [01:28:03.156] base::do.call(base::Sys.setenv, args = args) [01:28:03.156] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:28:03.156] } [01:28:03.156] else { [01:28:03.156] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:28:03.156] } [01:28:03.156] { [01:28:03.156] if (base::length(...future.futureOptionsAdded) > [01:28:03.156] 0L) { [01:28:03.156] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:28:03.156] base::names(opts) <- ...future.futureOptionsAdded [01:28:03.156] base::options(opts) [01:28:03.156] } [01:28:03.156] { [01:28:03.156] { [01:28:03.156] base::options(mc.cores = ...future.mc.cores.old) [01:28:03.156] NULL [01:28:03.156] } [01:28:03.156] options(future.plan = NULL) [01:28:03.156] if (is.na(NA_character_)) [01:28:03.156] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.156] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:28:03.156] future::plan(list(function (..., workers = 2L, [01:28:03.156] envir = parent.frame()) [01:28:03.156] strategy(..., workers = workers, envir = envir)), [01:28:03.156] .cleanup = FALSE, .init = FALSE) [01:28:03.156] } [01:28:03.156] } [01:28:03.156] } [01:28:03.156] }) [01:28:03.156] if (TRUE) { [01:28:03.156] base::sink(type = "output", split = FALSE) [01:28:03.156] if (TRUE) { [01:28:03.156] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:28:03.156] } [01:28:03.156] else { [01:28:03.156] ...future.result["stdout"] <- base::list(NULL) [01:28:03.156] } [01:28:03.156] base::close(...future.stdout) [01:28:03.156] ...future.stdout <- NULL [01:28:03.156] } [01:28:03.156] ...future.result$conditions <- ...future.conditions [01:28:03.156] ...future.result$finished <- base::Sys.time() [01:28:03.156] ...future.result [01:28:03.156] } [01:28:03.238] MultisessionFuture started [01:28:03.239] result() for ClusterFuture ... [01:28:03.240] receiveMessageFromWorker() for ClusterFuture ... [01:28:03.240] - Validating connection of MultisessionFuture [01:28:03.292] - received message: FutureResult [01:28:03.292] - Received FutureResult [01:28:03.296] - Erased future from FutureRegistry [01:28:03.296] result() for ClusterFuture ... [01:28:03.296] - result already collected: FutureResult [01:28:03.297] result() for ClusterFuture ... done [01:28:03.297] receiveMessageFromWorker() for ClusterFuture ... done [01:28:03.297] result() for ClusterFuture ... done [01:28:03.297] result() for ClusterFuture ... [01:28:03.297] - result already collected: FutureResult [01:28:03.297] result() for ClusterFuture ... done [01:28:03.298] plan(): plan_init() of 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE [01:28:03.298] plan(): nbrOfWorkers() = 2 > > env <- new.env() > > ## Create future #1 (consumes background process #1) > env$a %<-% { 5 } Warning: R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [01:28:03.300] getGlobalsAndPackages() ... [01:28:03.300] Searching for globals... [01:28:03.304] - globals found: [1] '{' [01:28:03.305] Searching for globals ... DONE [01:28:03.305] Resolving globals: TRUE [01:28:03.305] Resolving any globals that are futures ... [01:28:03.305] - globals: [1] '{' [01:28:03.305] Resolving any globals that are futures ... DONE [01:28:03.306] [01:28:03.307] [01:28:03.307] getGlobalsAndPackages() ... DONE [01:28:03.308] run() for 'Future' ... [01:28:03.308] - state: 'created' [01:28:03.309] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [01:28:03.322] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [01:28:03.323] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [01:28:03.323] - Field: 'node' [01:28:03.323] - Field: 'label' [01:28:03.323] - Field: 'local' [01:28:03.324] - Field: 'owner' [01:28:03.324] - Field: 'envir' [01:28:03.324] - Field: 'workers' [01:28:03.324] - Field: 'packages' [01:28:03.324] - Field: 'gc' [01:28:03.325] - Field: 'conditions' [01:28:03.325] - Field: 'persistent' [01:28:03.325] - Field: 'expr' [01:28:03.325] - Field: 'uuid' [01:28:03.326] - Field: 'seed' [01:28:03.326] - Field: 'version' [01:28:03.326] - Field: 'result' [01:28:03.326] - Field: 'asynchronous' [01:28:03.326] - Field: 'calls' [01:28:03.327] - Field: 'globals' [01:28:03.327] - Field: 'stdout' [01:28:03.327] - Field: 'earlySignal' [01:28:03.327] - Field: 'lazy' [01:28:03.327] - Field: 'state' [01:28:03.328] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [01:28:03.328] - Launch lazy future ... [01:28:03.328] Packages needed by the future expression (n = 0): [01:28:03.328] Packages needed by future strategies (n = 0): [01:28:03.329] { [01:28:03.329] { [01:28:03.329] { [01:28:03.329] ...future.startTime <- base::Sys.time() [01:28:03.329] { [01:28:03.329] { [01:28:03.329] { [01:28:03.329] { [01:28:03.329] base::local({ [01:28:03.329] has_future <- base::requireNamespace("future", [01:28:03.329] quietly = TRUE) [01:28:03.329] if (has_future) { [01:28:03.329] ns <- base::getNamespace("future") [01:28:03.329] version <- ns[[".package"]][["version"]] [01:28:03.329] if (is.null(version)) [01:28:03.329] version <- utils::packageVersion("future") [01:28:03.329] } [01:28:03.329] else { [01:28:03.329] version <- NULL [01:28:03.329] } [01:28:03.329] if (!has_future || version < "1.8.0") { [01:28:03.329] info <- base::c(r_version = base::gsub("R version ", [01:28:03.329] "", base::R.version$version.string), [01:28:03.329] platform = base::sprintf("%s (%s-bit)", [01:28:03.329] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:28:03.329] os = base::paste(base::Sys.info()[base::c("sysname", [01:28:03.329] "release", "version")], collapse = " "), [01:28:03.329] hostname = base::Sys.info()[["nodename"]]) [01:28:03.329] info <- base::sprintf("%s: %s", base::names(info), [01:28:03.329] info) [01:28:03.329] info <- base::paste(info, collapse = "; ") [01:28:03.329] if (!has_future) { [01:28:03.329] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:28:03.329] info) [01:28:03.329] } [01:28:03.329] else { [01:28:03.329] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:28:03.329] info, version) [01:28:03.329] } [01:28:03.329] base::stop(msg) [01:28:03.329] } [01:28:03.329] }) [01:28:03.329] } [01:28:03.329] ...future.mc.cores.old <- base::getOption("mc.cores") [01:28:03.329] base::options(mc.cores = 1L) [01:28:03.329] } [01:28:03.329] options(future.plan = NULL) [01:28:03.329] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.329] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:28:03.329] } [01:28:03.329] ...future.workdir <- getwd() [01:28:03.329] } [01:28:03.329] ...future.oldOptions <- base::as.list(base::.Options) [01:28:03.329] ...future.oldEnvVars <- base::Sys.getenv() [01:28:03.329] } [01:28:03.329] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:28:03.329] future.globals.maxSize = NULL, future.globals.method = NULL, [01:28:03.329] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:28:03.329] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [01:28:03.329] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:28:03.329] future.stdout.windows.reencode = NULL, width = 80L) [01:28:03.329] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:28:03.329] base::names(...future.oldOptions)) [01:28:03.329] } [01:28:03.329] if (FALSE) { [01:28:03.329] } [01:28:03.329] else { [01:28:03.329] if (TRUE) { [01:28:03.329] ...future.stdout <- base::rawConnection(base::raw(0L), [01:28:03.329] open = "w") [01:28:03.329] } [01:28:03.329] else { [01:28:03.329] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:28:03.329] windows = "NUL", "/dev/null"), open = "w") [01:28:03.329] } [01:28:03.329] base::sink(...future.stdout, type = "output", split = FALSE) [01:28:03.329] base::on.exit(if (!base::is.null(...future.stdout)) { [01:28:03.329] base::sink(type = "output", split = FALSE) [01:28:03.329] base::close(...future.stdout) [01:28:03.329] }, add = TRUE) [01:28:03.329] } [01:28:03.329] ...future.frame <- base::sys.nframe() [01:28:03.329] ...future.conditions <- base::list() [01:28:03.329] ...future.rng <- base::globalenv()$.Random.seed [01:28:03.329] if (FALSE) { [01:28:03.329] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:28:03.329] "...future.value", "...future.globalenv.names", ".Random.seed") [01:28:03.329] } [01:28:03.329] ...future.result <- base::tryCatch({ [01:28:03.329] base::withCallingHandlers({ [01:28:03.329] ...future.value <- base::withVisible(base::local({ [01:28:03.329] ...future.makeSendCondition <- base::local({ [01:28:03.329] sendCondition <- NULL [01:28:03.329] function(frame = 1L) { [01:28:03.329] if (is.function(sendCondition)) [01:28:03.329] return(sendCondition) [01:28:03.329] ns <- getNamespace("parallel") [01:28:03.329] if (exists("sendData", mode = "function", [01:28:03.329] envir = ns)) { [01:28:03.329] parallel_sendData <- get("sendData", mode = "function", [01:28:03.329] envir = ns) [01:28:03.329] envir <- sys.frame(frame) [01:28:03.329] master <- NULL [01:28:03.329] while (!identical(envir, .GlobalEnv) && [01:28:03.329] !identical(envir, emptyenv())) { [01:28:03.329] if (exists("master", mode = "list", envir = envir, [01:28:03.329] inherits = FALSE)) { [01:28:03.329] master <- get("master", mode = "list", [01:28:03.329] envir = envir, inherits = FALSE) [01:28:03.329] if (inherits(master, c("SOCKnode", [01:28:03.329] "SOCK0node"))) { [01:28:03.329] sendCondition <<- function(cond) { [01:28:03.329] data <- list(type = "VALUE", value = cond, [01:28:03.329] success = TRUE) [01:28:03.329] parallel_sendData(master, data) [01:28:03.329] } [01:28:03.329] return(sendCondition) [01:28:03.329] } [01:28:03.329] } [01:28:03.329] frame <- frame + 1L [01:28:03.329] envir <- sys.frame(frame) [01:28:03.329] } [01:28:03.329] } [01:28:03.329] sendCondition <<- function(cond) NULL [01:28:03.329] } [01:28:03.329] }) [01:28:03.329] withCallingHandlers({ [01:28:03.329] { [01:28:03.329] 5 [01:28:03.329] } [01:28:03.329] }, immediateCondition = function(cond) { [01:28:03.329] sendCondition <- ...future.makeSendCondition() [01:28:03.329] sendCondition(cond) [01:28:03.329] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.329] { [01:28:03.329] inherits <- base::inherits [01:28:03.329] invokeRestart <- base::invokeRestart [01:28:03.329] is.null <- base::is.null [01:28:03.329] muffled <- FALSE [01:28:03.329] if (inherits(cond, "message")) { [01:28:03.329] muffled <- grepl(pattern, "muffleMessage") [01:28:03.329] if (muffled) [01:28:03.329] invokeRestart("muffleMessage") [01:28:03.329] } [01:28:03.329] else if (inherits(cond, "warning")) { [01:28:03.329] muffled <- grepl(pattern, "muffleWarning") [01:28:03.329] if (muffled) [01:28:03.329] invokeRestart("muffleWarning") [01:28:03.329] } [01:28:03.329] else if (inherits(cond, "condition")) { [01:28:03.329] if (!is.null(pattern)) { [01:28:03.329] computeRestarts <- base::computeRestarts [01:28:03.329] grepl <- base::grepl [01:28:03.329] restarts <- computeRestarts(cond) [01:28:03.329] for (restart in restarts) { [01:28:03.329] name <- restart$name [01:28:03.329] if (is.null(name)) [01:28:03.329] next [01:28:03.329] if (!grepl(pattern, name)) [01:28:03.329] next [01:28:03.329] invokeRestart(restart) [01:28:03.329] muffled <- TRUE [01:28:03.329] break [01:28:03.329] } [01:28:03.329] } [01:28:03.329] } [01:28:03.329] invisible(muffled) [01:28:03.329] } [01:28:03.329] muffleCondition(cond) [01:28:03.329] }) [01:28:03.329] })) [01:28:03.329] future::FutureResult(value = ...future.value$value, [01:28:03.329] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.329] ...future.rng), globalenv = if (FALSE) [01:28:03.329] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:28:03.329] ...future.globalenv.names)) [01:28:03.329] else NULL, started = ...future.startTime, version = "1.8") [01:28:03.329] }, condition = base::local({ [01:28:03.329] c <- base::c [01:28:03.329] inherits <- base::inherits [01:28:03.329] invokeRestart <- base::invokeRestart [01:28:03.329] length <- base::length [01:28:03.329] list <- base::list [01:28:03.329] seq.int <- base::seq.int [01:28:03.329] signalCondition <- base::signalCondition [01:28:03.329] sys.calls <- base::sys.calls [01:28:03.329] `[[` <- base::`[[` [01:28:03.329] `+` <- base::`+` [01:28:03.329] `<<-` <- base::`<<-` [01:28:03.329] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:28:03.329] calls[seq.int(from = from + 12L, to = length(calls) - [01:28:03.329] 3L)] [01:28:03.329] } [01:28:03.329] function(cond) { [01:28:03.329] is_error <- inherits(cond, "error") [01:28:03.329] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:28:03.329] NULL) [01:28:03.329] if (is_error) { [01:28:03.329] sessionInformation <- function() { [01:28:03.329] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:28:03.329] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:28:03.329] search = base::search(), system = base::Sys.info()) [01:28:03.329] } [01:28:03.329] ...future.conditions[[length(...future.conditions) + [01:28:03.329] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:28:03.329] cond$call), session = sessionInformation(), [01:28:03.329] timestamp = base::Sys.time(), signaled = 0L) [01:28:03.329] signalCondition(cond) [01:28:03.329] } [01:28:03.329] else if (!ignore && TRUE && inherits(cond, c("condition", [01:28:03.329] "immediateCondition"))) { [01:28:03.329] signal <- TRUE && inherits(cond, "immediateCondition") [01:28:03.329] ...future.conditions[[length(...future.conditions) + [01:28:03.329] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:28:03.329] if (TRUE && !signal) { [01:28:03.329] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.329] { [01:28:03.329] inherits <- base::inherits [01:28:03.329] invokeRestart <- base::invokeRestart [01:28:03.329] is.null <- base::is.null [01:28:03.329] muffled <- FALSE [01:28:03.329] if (inherits(cond, "message")) { [01:28:03.329] muffled <- grepl(pattern, "muffleMessage") [01:28:03.329] if (muffled) [01:28:03.329] invokeRestart("muffleMessage") [01:28:03.329] } [01:28:03.329] else if (inherits(cond, "warning")) { [01:28:03.329] muffled <- grepl(pattern, "muffleWarning") [01:28:03.329] if (muffled) [01:28:03.329] invokeRestart("muffleWarning") [01:28:03.329] } [01:28:03.329] else if (inherits(cond, "condition")) { [01:28:03.329] if (!is.null(pattern)) { [01:28:03.329] computeRestarts <- base::computeRestarts [01:28:03.329] grepl <- base::grepl [01:28:03.329] restarts <- computeRestarts(cond) [01:28:03.329] for (restart in restarts) { [01:28:03.329] name <- restart$name [01:28:03.329] if (is.null(name)) [01:28:03.329] next [01:28:03.329] if (!grepl(pattern, name)) [01:28:03.329] next [01:28:03.329] invokeRestart(restart) [01:28:03.329] muffled <- TRUE [01:28:03.329] break [01:28:03.329] } [01:28:03.329] } [01:28:03.329] } [01:28:03.329] invisible(muffled) [01:28:03.329] } [01:28:03.329] muffleCondition(cond, pattern = "^muffle") [01:28:03.329] } [01:28:03.329] } [01:28:03.329] else { [01:28:03.329] if (TRUE) { [01:28:03.329] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.329] { [01:28:03.329] inherits <- base::inherits [01:28:03.329] invokeRestart <- base::invokeRestart [01:28:03.329] is.null <- base::is.null [01:28:03.329] muffled <- FALSE [01:28:03.329] if (inherits(cond, "message")) { [01:28:03.329] muffled <- grepl(pattern, "muffleMessage") [01:28:03.329] if (muffled) [01:28:03.329] invokeRestart("muffleMessage") [01:28:03.329] } [01:28:03.329] else if (inherits(cond, "warning")) { [01:28:03.329] muffled <- grepl(pattern, "muffleWarning") [01:28:03.329] if (muffled) [01:28:03.329] invokeRestart("muffleWarning") [01:28:03.329] } [01:28:03.329] else if (inherits(cond, "condition")) { [01:28:03.329] if (!is.null(pattern)) { [01:28:03.329] computeRestarts <- base::computeRestarts [01:28:03.329] grepl <- base::grepl [01:28:03.329] restarts <- computeRestarts(cond) [01:28:03.329] for (restart in restarts) { [01:28:03.329] name <- restart$name [01:28:03.329] if (is.null(name)) [01:28:03.329] next [01:28:03.329] if (!grepl(pattern, name)) [01:28:03.329] next [01:28:03.329] invokeRestart(restart) [01:28:03.329] muffled <- TRUE [01:28:03.329] break [01:28:03.329] } [01:28:03.329] } [01:28:03.329] } [01:28:03.329] invisible(muffled) [01:28:03.329] } [01:28:03.329] muffleCondition(cond, pattern = "^muffle") [01:28:03.329] } [01:28:03.329] } [01:28:03.329] } [01:28:03.329] })) [01:28:03.329] }, error = function(ex) { [01:28:03.329] base::structure(base::list(value = NULL, visible = NULL, [01:28:03.329] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.329] ...future.rng), started = ...future.startTime, [01:28:03.329] finished = Sys.time(), session_uuid = NA_character_, [01:28:03.329] version = "1.8"), class = "FutureResult") [01:28:03.329] }, finally = { [01:28:03.329] if (!identical(...future.workdir, getwd())) [01:28:03.329] setwd(...future.workdir) [01:28:03.329] { [01:28:03.329] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:28:03.329] ...future.oldOptions$nwarnings <- NULL [01:28:03.329] } [01:28:03.329] base::options(...future.oldOptions) [01:28:03.329] if (.Platform$OS.type == "windows") { [01:28:03.329] old_names <- names(...future.oldEnvVars) [01:28:03.329] envs <- base::Sys.getenv() [01:28:03.329] names <- names(envs) [01:28:03.329] common <- intersect(names, old_names) [01:28:03.329] added <- setdiff(names, old_names) [01:28:03.329] removed <- setdiff(old_names, names) [01:28:03.329] changed <- common[...future.oldEnvVars[common] != [01:28:03.329] envs[common]] [01:28:03.329] NAMES <- toupper(changed) [01:28:03.329] args <- list() [01:28:03.329] for (kk in seq_along(NAMES)) { [01:28:03.329] name <- changed[[kk]] [01:28:03.329] NAME <- NAMES[[kk]] [01:28:03.329] if (name != NAME && is.element(NAME, old_names)) [01:28:03.329] next [01:28:03.329] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.329] } [01:28:03.329] NAMES <- toupper(added) [01:28:03.329] for (kk in seq_along(NAMES)) { [01:28:03.329] name <- added[[kk]] [01:28:03.329] NAME <- NAMES[[kk]] [01:28:03.329] if (name != NAME && is.element(NAME, old_names)) [01:28:03.329] next [01:28:03.329] args[[name]] <- "" [01:28:03.329] } [01:28:03.329] NAMES <- toupper(removed) [01:28:03.329] for (kk in seq_along(NAMES)) { [01:28:03.329] name <- removed[[kk]] [01:28:03.329] NAME <- NAMES[[kk]] [01:28:03.329] if (name != NAME && is.element(NAME, old_names)) [01:28:03.329] next [01:28:03.329] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.329] } [01:28:03.329] if (length(args) > 0) [01:28:03.329] base::do.call(base::Sys.setenv, args = args) [01:28:03.329] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:28:03.329] } [01:28:03.329] else { [01:28:03.329] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:28:03.329] } [01:28:03.329] { [01:28:03.329] if (base::length(...future.futureOptionsAdded) > [01:28:03.329] 0L) { [01:28:03.329] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:28:03.329] base::names(opts) <- ...future.futureOptionsAdded [01:28:03.329] base::options(opts) [01:28:03.329] } [01:28:03.329] { [01:28:03.329] { [01:28:03.329] base::options(mc.cores = ...future.mc.cores.old) [01:28:03.329] NULL [01:28:03.329] } [01:28:03.329] options(future.plan = NULL) [01:28:03.329] if (is.na(NA_character_)) [01:28:03.329] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.329] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:28:03.329] future::plan(list(function (..., workers = 2L, [01:28:03.329] envir = parent.frame()) [01:28:03.329] strategy(..., workers = workers, envir = envir)), [01:28:03.329] .cleanup = FALSE, .init = FALSE) [01:28:03.329] } [01:28:03.329] } [01:28:03.329] } [01:28:03.329] }) [01:28:03.329] if (TRUE) { [01:28:03.329] base::sink(type = "output", split = FALSE) [01:28:03.329] if (TRUE) { [01:28:03.329] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:28:03.329] } [01:28:03.329] else { [01:28:03.329] ...future.result["stdout"] <- base::list(NULL) [01:28:03.329] } [01:28:03.329] base::close(...future.stdout) [01:28:03.329] ...future.stdout <- NULL [01:28:03.329] } [01:28:03.329] ...future.result$conditions <- ...future.conditions [01:28:03.329] ...future.result$finished <- base::Sys.time() [01:28:03.329] ...future.result [01:28:03.329] } [01:28:03.335] MultisessionFuture started [01:28:03.335] - Launch lazy future ... done [01:28:03.336] run() for 'MultisessionFuture' ... done > > ## Create future #2 (consumes background process #2) > b %<-% { "a" } Warning: R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [01:28:03.336] getGlobalsAndPackages() ... [01:28:03.336] Searching for globals... [01:28:03.337] - globals found: [1] '{' [01:28:03.338] Searching for globals ... DONE [01:28:03.338] Resolving globals: TRUE [01:28:03.338] Resolving any globals that are futures ... [01:28:03.338] - globals: [1] '{' [01:28:03.339] Resolving any globals that are futures ... DONE [01:28:03.339] [01:28:03.339] [01:28:03.340] getGlobalsAndPackages() ... DONE [01:28:03.340] run() for 'Future' ... [01:28:03.340] - state: 'created' [01:28:03.340] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [01:28:03.353] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [01:28:03.353] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [01:28:03.354] - Field: 'node' [01:28:03.354] - Field: 'label' [01:28:03.354] - Field: 'local' [01:28:03.354] - Field: 'owner' [01:28:03.355] - Field: 'envir' [01:28:03.355] - Field: 'workers' [01:28:03.355] - Field: 'packages' [01:28:03.355] - Field: 'gc' [01:28:03.355] - Field: 'conditions' [01:28:03.355] - Field: 'persistent' [01:28:03.356] - Field: 'expr' [01:28:03.356] - Field: 'uuid' [01:28:03.356] - Field: 'seed' [01:28:03.356] - Field: 'version' [01:28:03.356] - Field: 'result' [01:28:03.357] - Field: 'asynchronous' [01:28:03.357] - Field: 'calls' [01:28:03.357] - Field: 'globals' [01:28:03.357] - Field: 'stdout' [01:28:03.358] - Field: 'earlySignal' [01:28:03.358] - Field: 'lazy' [01:28:03.358] - Field: 'state' [01:28:03.358] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [01:28:03.358] - Launch lazy future ... [01:28:03.359] Packages needed by the future expression (n = 0): [01:28:03.359] Packages needed by future strategies (n = 0): [01:28:03.360] { [01:28:03.360] { [01:28:03.360] { [01:28:03.360] ...future.startTime <- base::Sys.time() [01:28:03.360] { [01:28:03.360] { [01:28:03.360] { [01:28:03.360] { [01:28:03.360] base::local({ [01:28:03.360] has_future <- base::requireNamespace("future", [01:28:03.360] quietly = TRUE) [01:28:03.360] if (has_future) { [01:28:03.360] ns <- base::getNamespace("future") [01:28:03.360] version <- ns[[".package"]][["version"]] [01:28:03.360] if (is.null(version)) [01:28:03.360] version <- utils::packageVersion("future") [01:28:03.360] } [01:28:03.360] else { [01:28:03.360] version <- NULL [01:28:03.360] } [01:28:03.360] if (!has_future || version < "1.8.0") { [01:28:03.360] info <- base::c(r_version = base::gsub("R version ", [01:28:03.360] "", base::R.version$version.string), [01:28:03.360] platform = base::sprintf("%s (%s-bit)", [01:28:03.360] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:28:03.360] os = base::paste(base::Sys.info()[base::c("sysname", [01:28:03.360] "release", "version")], collapse = " "), [01:28:03.360] hostname = base::Sys.info()[["nodename"]]) [01:28:03.360] info <- base::sprintf("%s: %s", base::names(info), [01:28:03.360] info) [01:28:03.360] info <- base::paste(info, collapse = "; ") [01:28:03.360] if (!has_future) { [01:28:03.360] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:28:03.360] info) [01:28:03.360] } [01:28:03.360] else { [01:28:03.360] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:28:03.360] info, version) [01:28:03.360] } [01:28:03.360] base::stop(msg) [01:28:03.360] } [01:28:03.360] }) [01:28:03.360] } [01:28:03.360] ...future.mc.cores.old <- base::getOption("mc.cores") [01:28:03.360] base::options(mc.cores = 1L) [01:28:03.360] } [01:28:03.360] options(future.plan = NULL) [01:28:03.360] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.360] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:28:03.360] } [01:28:03.360] ...future.workdir <- getwd() [01:28:03.360] } [01:28:03.360] ...future.oldOptions <- base::as.list(base::.Options) [01:28:03.360] ...future.oldEnvVars <- base::Sys.getenv() [01:28:03.360] } [01:28:03.360] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:28:03.360] future.globals.maxSize = NULL, future.globals.method = NULL, [01:28:03.360] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:28:03.360] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [01:28:03.360] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:28:03.360] future.stdout.windows.reencode = NULL, width = 80L) [01:28:03.360] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:28:03.360] base::names(...future.oldOptions)) [01:28:03.360] } [01:28:03.360] if (FALSE) { [01:28:03.360] } [01:28:03.360] else { [01:28:03.360] if (TRUE) { [01:28:03.360] ...future.stdout <- base::rawConnection(base::raw(0L), [01:28:03.360] open = "w") [01:28:03.360] } [01:28:03.360] else { [01:28:03.360] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:28:03.360] windows = "NUL", "/dev/null"), open = "w") [01:28:03.360] } [01:28:03.360] base::sink(...future.stdout, type = "output", split = FALSE) [01:28:03.360] base::on.exit(if (!base::is.null(...future.stdout)) { [01:28:03.360] base::sink(type = "output", split = FALSE) [01:28:03.360] base::close(...future.stdout) [01:28:03.360] }, add = TRUE) [01:28:03.360] } [01:28:03.360] ...future.frame <- base::sys.nframe() [01:28:03.360] ...future.conditions <- base::list() [01:28:03.360] ...future.rng <- base::globalenv()$.Random.seed [01:28:03.360] if (FALSE) { [01:28:03.360] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:28:03.360] "...future.value", "...future.globalenv.names", ".Random.seed") [01:28:03.360] } [01:28:03.360] ...future.result <- base::tryCatch({ [01:28:03.360] base::withCallingHandlers({ [01:28:03.360] ...future.value <- base::withVisible(base::local({ [01:28:03.360] ...future.makeSendCondition <- base::local({ [01:28:03.360] sendCondition <- NULL [01:28:03.360] function(frame = 1L) { [01:28:03.360] if (is.function(sendCondition)) [01:28:03.360] return(sendCondition) [01:28:03.360] ns <- getNamespace("parallel") [01:28:03.360] if (exists("sendData", mode = "function", [01:28:03.360] envir = ns)) { [01:28:03.360] parallel_sendData <- get("sendData", mode = "function", [01:28:03.360] envir = ns) [01:28:03.360] envir <- sys.frame(frame) [01:28:03.360] master <- NULL [01:28:03.360] while (!identical(envir, .GlobalEnv) && [01:28:03.360] !identical(envir, emptyenv())) { [01:28:03.360] if (exists("master", mode = "list", envir = envir, [01:28:03.360] inherits = FALSE)) { [01:28:03.360] master <- get("master", mode = "list", [01:28:03.360] envir = envir, inherits = FALSE) [01:28:03.360] if (inherits(master, c("SOCKnode", [01:28:03.360] "SOCK0node"))) { [01:28:03.360] sendCondition <<- function(cond) { [01:28:03.360] data <- list(type = "VALUE", value = cond, [01:28:03.360] success = TRUE) [01:28:03.360] parallel_sendData(master, data) [01:28:03.360] } [01:28:03.360] return(sendCondition) [01:28:03.360] } [01:28:03.360] } [01:28:03.360] frame <- frame + 1L [01:28:03.360] envir <- sys.frame(frame) [01:28:03.360] } [01:28:03.360] } [01:28:03.360] sendCondition <<- function(cond) NULL [01:28:03.360] } [01:28:03.360] }) [01:28:03.360] withCallingHandlers({ [01:28:03.360] { [01:28:03.360] "a" [01:28:03.360] } [01:28:03.360] }, immediateCondition = function(cond) { [01:28:03.360] sendCondition <- ...future.makeSendCondition() [01:28:03.360] sendCondition(cond) [01:28:03.360] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.360] { [01:28:03.360] inherits <- base::inherits [01:28:03.360] invokeRestart <- base::invokeRestart [01:28:03.360] is.null <- base::is.null [01:28:03.360] muffled <- FALSE [01:28:03.360] if (inherits(cond, "message")) { [01:28:03.360] muffled <- grepl(pattern, "muffleMessage") [01:28:03.360] if (muffled) [01:28:03.360] invokeRestart("muffleMessage") [01:28:03.360] } [01:28:03.360] else if (inherits(cond, "warning")) { [01:28:03.360] muffled <- grepl(pattern, "muffleWarning") [01:28:03.360] if (muffled) [01:28:03.360] invokeRestart("muffleWarning") [01:28:03.360] } [01:28:03.360] else if (inherits(cond, "condition")) { [01:28:03.360] if (!is.null(pattern)) { [01:28:03.360] computeRestarts <- base::computeRestarts [01:28:03.360] grepl <- base::grepl [01:28:03.360] restarts <- computeRestarts(cond) [01:28:03.360] for (restart in restarts) { [01:28:03.360] name <- restart$name [01:28:03.360] if (is.null(name)) [01:28:03.360] next [01:28:03.360] if (!grepl(pattern, name)) [01:28:03.360] next [01:28:03.360] invokeRestart(restart) [01:28:03.360] muffled <- TRUE [01:28:03.360] break [01:28:03.360] } [01:28:03.360] } [01:28:03.360] } [01:28:03.360] invisible(muffled) [01:28:03.360] } [01:28:03.360] muffleCondition(cond) [01:28:03.360] }) [01:28:03.360] })) [01:28:03.360] future::FutureResult(value = ...future.value$value, [01:28:03.360] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.360] ...future.rng), globalenv = if (FALSE) [01:28:03.360] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:28:03.360] ...future.globalenv.names)) [01:28:03.360] else NULL, started = ...future.startTime, version = "1.8") [01:28:03.360] }, condition = base::local({ [01:28:03.360] c <- base::c [01:28:03.360] inherits <- base::inherits [01:28:03.360] invokeRestart <- base::invokeRestart [01:28:03.360] length <- base::length [01:28:03.360] list <- base::list [01:28:03.360] seq.int <- base::seq.int [01:28:03.360] signalCondition <- base::signalCondition [01:28:03.360] sys.calls <- base::sys.calls [01:28:03.360] `[[` <- base::`[[` [01:28:03.360] `+` <- base::`+` [01:28:03.360] `<<-` <- base::`<<-` [01:28:03.360] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:28:03.360] calls[seq.int(from = from + 12L, to = length(calls) - [01:28:03.360] 3L)] [01:28:03.360] } [01:28:03.360] function(cond) { [01:28:03.360] is_error <- inherits(cond, "error") [01:28:03.360] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:28:03.360] NULL) [01:28:03.360] if (is_error) { [01:28:03.360] sessionInformation <- function() { [01:28:03.360] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:28:03.360] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:28:03.360] search = base::search(), system = base::Sys.info()) [01:28:03.360] } [01:28:03.360] ...future.conditions[[length(...future.conditions) + [01:28:03.360] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:28:03.360] cond$call), session = sessionInformation(), [01:28:03.360] timestamp = base::Sys.time(), signaled = 0L) [01:28:03.360] signalCondition(cond) [01:28:03.360] } [01:28:03.360] else if (!ignore && TRUE && inherits(cond, c("condition", [01:28:03.360] "immediateCondition"))) { [01:28:03.360] signal <- TRUE && inherits(cond, "immediateCondition") [01:28:03.360] ...future.conditions[[length(...future.conditions) + [01:28:03.360] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:28:03.360] if (TRUE && !signal) { [01:28:03.360] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.360] { [01:28:03.360] inherits <- base::inherits [01:28:03.360] invokeRestart <- base::invokeRestart [01:28:03.360] is.null <- base::is.null [01:28:03.360] muffled <- FALSE [01:28:03.360] if (inherits(cond, "message")) { [01:28:03.360] muffled <- grepl(pattern, "muffleMessage") [01:28:03.360] if (muffled) [01:28:03.360] invokeRestart("muffleMessage") [01:28:03.360] } [01:28:03.360] else if (inherits(cond, "warning")) { [01:28:03.360] muffled <- grepl(pattern, "muffleWarning") [01:28:03.360] if (muffled) [01:28:03.360] invokeRestart("muffleWarning") [01:28:03.360] } [01:28:03.360] else if (inherits(cond, "condition")) { [01:28:03.360] if (!is.null(pattern)) { [01:28:03.360] computeRestarts <- base::computeRestarts [01:28:03.360] grepl <- base::grepl [01:28:03.360] restarts <- computeRestarts(cond) [01:28:03.360] for (restart in restarts) { [01:28:03.360] name <- restart$name [01:28:03.360] if (is.null(name)) [01:28:03.360] next [01:28:03.360] if (!grepl(pattern, name)) [01:28:03.360] next [01:28:03.360] invokeRestart(restart) [01:28:03.360] muffled <- TRUE [01:28:03.360] break [01:28:03.360] } [01:28:03.360] } [01:28:03.360] } [01:28:03.360] invisible(muffled) [01:28:03.360] } [01:28:03.360] muffleCondition(cond, pattern = "^muffle") [01:28:03.360] } [01:28:03.360] } [01:28:03.360] else { [01:28:03.360] if (TRUE) { [01:28:03.360] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.360] { [01:28:03.360] inherits <- base::inherits [01:28:03.360] invokeRestart <- base::invokeRestart [01:28:03.360] is.null <- base::is.null [01:28:03.360] muffled <- FALSE [01:28:03.360] if (inherits(cond, "message")) { [01:28:03.360] muffled <- grepl(pattern, "muffleMessage") [01:28:03.360] if (muffled) [01:28:03.360] invokeRestart("muffleMessage") [01:28:03.360] } [01:28:03.360] else if (inherits(cond, "warning")) { [01:28:03.360] muffled <- grepl(pattern, "muffleWarning") [01:28:03.360] if (muffled) [01:28:03.360] invokeRestart("muffleWarning") [01:28:03.360] } [01:28:03.360] else if (inherits(cond, "condition")) { [01:28:03.360] if (!is.null(pattern)) { [01:28:03.360] computeRestarts <- base::computeRestarts [01:28:03.360] grepl <- base::grepl [01:28:03.360] restarts <- computeRestarts(cond) [01:28:03.360] for (restart in restarts) { [01:28:03.360] name <- restart$name [01:28:03.360] if (is.null(name)) [01:28:03.360] next [01:28:03.360] if (!grepl(pattern, name)) [01:28:03.360] next [01:28:03.360] invokeRestart(restart) [01:28:03.360] muffled <- TRUE [01:28:03.360] break [01:28:03.360] } [01:28:03.360] } [01:28:03.360] } [01:28:03.360] invisible(muffled) [01:28:03.360] } [01:28:03.360] muffleCondition(cond, pattern = "^muffle") [01:28:03.360] } [01:28:03.360] } [01:28:03.360] } [01:28:03.360] })) [01:28:03.360] }, error = function(ex) { [01:28:03.360] base::structure(base::list(value = NULL, visible = NULL, [01:28:03.360] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.360] ...future.rng), started = ...future.startTime, [01:28:03.360] finished = Sys.time(), session_uuid = NA_character_, [01:28:03.360] version = "1.8"), class = "FutureResult") [01:28:03.360] }, finally = { [01:28:03.360] if (!identical(...future.workdir, getwd())) [01:28:03.360] setwd(...future.workdir) [01:28:03.360] { [01:28:03.360] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:28:03.360] ...future.oldOptions$nwarnings <- NULL [01:28:03.360] } [01:28:03.360] base::options(...future.oldOptions) [01:28:03.360] if (.Platform$OS.type == "windows") { [01:28:03.360] old_names <- names(...future.oldEnvVars) [01:28:03.360] envs <- base::Sys.getenv() [01:28:03.360] names <- names(envs) [01:28:03.360] common <- intersect(names, old_names) [01:28:03.360] added <- setdiff(names, old_names) [01:28:03.360] removed <- setdiff(old_names, names) [01:28:03.360] changed <- common[...future.oldEnvVars[common] != [01:28:03.360] envs[common]] [01:28:03.360] NAMES <- toupper(changed) [01:28:03.360] args <- list() [01:28:03.360] for (kk in seq_along(NAMES)) { [01:28:03.360] name <- changed[[kk]] [01:28:03.360] NAME <- NAMES[[kk]] [01:28:03.360] if (name != NAME && is.element(NAME, old_names)) [01:28:03.360] next [01:28:03.360] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.360] } [01:28:03.360] NAMES <- toupper(added) [01:28:03.360] for (kk in seq_along(NAMES)) { [01:28:03.360] name <- added[[kk]] [01:28:03.360] NAME <- NAMES[[kk]] [01:28:03.360] if (name != NAME && is.element(NAME, old_names)) [01:28:03.360] next [01:28:03.360] args[[name]] <- "" [01:28:03.360] } [01:28:03.360] NAMES <- toupper(removed) [01:28:03.360] for (kk in seq_along(NAMES)) { [01:28:03.360] name <- removed[[kk]] [01:28:03.360] NAME <- NAMES[[kk]] [01:28:03.360] if (name != NAME && is.element(NAME, old_names)) [01:28:03.360] next [01:28:03.360] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.360] } [01:28:03.360] if (length(args) > 0) [01:28:03.360] base::do.call(base::Sys.setenv, args = args) [01:28:03.360] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:28:03.360] } [01:28:03.360] else { [01:28:03.360] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:28:03.360] } [01:28:03.360] { [01:28:03.360] if (base::length(...future.futureOptionsAdded) > [01:28:03.360] 0L) { [01:28:03.360] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:28:03.360] base::names(opts) <- ...future.futureOptionsAdded [01:28:03.360] base::options(opts) [01:28:03.360] } [01:28:03.360] { [01:28:03.360] { [01:28:03.360] base::options(mc.cores = ...future.mc.cores.old) [01:28:03.360] NULL [01:28:03.360] } [01:28:03.360] options(future.plan = NULL) [01:28:03.360] if (is.na(NA_character_)) [01:28:03.360] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.360] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:28:03.360] future::plan(list(function (..., workers = 2L, [01:28:03.360] envir = parent.frame()) [01:28:03.360] strategy(..., workers = workers, envir = envir)), [01:28:03.360] .cleanup = FALSE, .init = FALSE) [01:28:03.360] } [01:28:03.360] } [01:28:03.360] } [01:28:03.360] }) [01:28:03.360] if (TRUE) { [01:28:03.360] base::sink(type = "output", split = FALSE) [01:28:03.360] if (TRUE) { [01:28:03.360] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:28:03.360] } [01:28:03.360] else { [01:28:03.360] ...future.result["stdout"] <- base::list(NULL) [01:28:03.360] } [01:28:03.360] base::close(...future.stdout) [01:28:03.360] ...future.stdout <- NULL [01:28:03.360] } [01:28:03.360] ...future.result$conditions <- ...future.conditions [01:28:03.360] ...future.result$finished <- base::Sys.time() [01:28:03.360] ...future.result [01:28:03.360] } [01:28:03.463] MultisessionFuture started [01:28:03.463] - Launch lazy future ... done [01:28:03.463] run() for 'MultisessionFuture' ... done > > ## Resolve future #2 (frees up background process #2) > message(sprintf("b = %s\n", sQuote(b))) [01:28:03.463] result() for ClusterFuture ... [01:28:03.464] receiveMessageFromWorker() for ClusterFuture ... [01:28:03.464] - Validating connection of MultisessionFuture [01:28:03.544] - received message: FutureResult [01:28:03.544] - Received FutureResult [01:28:03.544] - Erased future from FutureRegistry [01:28:03.544] result() for ClusterFuture ... [01:28:03.544] - result already collected: FutureResult [01:28:03.545] result() for ClusterFuture ... done [01:28:03.545] receiveMessageFromWorker() for ClusterFuture ... done [01:28:03.545] result() for ClusterFuture ... done [01:28:03.545] result() for ClusterFuture ... [01:28:03.545] - result already collected: FutureResult [01:28:03.546] result() for ClusterFuture ... done b = 'a' > > ## Create future #3 (consumes background process #2) > ## THIS IS THE TRICKY PART: > ## Two globals are identified `env` and `b` and both are resolved. > ## However, object `env[[b]]` (here element `a` of environment `env`) > ## is not touched and therefore not resolved (since it is a future) > ## unless environment `env` is resolved recursively. (Issue #49) > y %<-% { env[[b]] } Warning: R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [01:28:03.546] getGlobalsAndPackages() ... [01:28:03.547] Searching for globals... [01:28:03.555] - globals found: [4] '{', '[[', 'env', 'b' [01:28:03.556] Searching for globals ... DONE [01:28:03.556] Resolving globals: TRUE [01:28:03.556] Resolving any globals that are futures ... [01:28:03.556] - globals: [4] '{', '[[', 'env', 'b' [01:28:03.557] Resolving any globals that are futures ... DONE [01:28:03.557] Resolving futures part of globals (recursively) ... [01:28:03.558] resolve() on list ... [01:28:03.559] recursive: 99 [01:28:03.559] length: 2 [01:28:03.559] elements: 'env', 'b' [01:28:03.560] resolve() on environment ... [01:28:03.560] recursive: 98 [01:28:03.560] elements: [1] '.future_a', 'a' [01:28:03.561] receiveMessageFromWorker() for ClusterFuture ... [01:28:03.561] - Validating connection of MultisessionFuture [01:28:03.562] - received message: FutureResult [01:28:03.562] - Received FutureResult [01:28:03.562] - Erased future from FutureRegistry [01:28:03.562] result() for ClusterFuture ... [01:28:03.562] - result already collected: FutureResult [01:28:03.562] result() for ClusterFuture ... done [01:28:03.563] receiveMessageFromWorker() for ClusterFuture ... done [01:28:03.563] Future #1 [01:28:03.563] result() for ClusterFuture ... [01:28:03.563] - result already collected: FutureResult [01:28:03.563] result() for ClusterFuture ... done [01:28:03.564] result() for ClusterFuture ... [01:28:03.564] - result already collected: FutureResult [01:28:03.564] result() for ClusterFuture ... done [01:28:03.564] A MultisessionFuture was resolved [01:28:03.564] length: 0 (resolved future 1) [01:28:03.565] resolve() on environment ... DONE [01:28:03.565] length: 1 (resolved future 1) [01:28:03.565] length: 0 (resolved future 2) [01:28:03.565] resolve() on list ... DONE [01:28:03.565] - globals: [2] 'env', 'b' [01:28:03.565] Resolving futures part of globals (recursively) ... DONE [01:28:03.567] The total size of the 2 globals is 4.17 KiB (4272 bytes) [01:28:03.567] The total size of the 2 globals exported for future expression ('{; env[[b]]; }') is 4.17 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'env' (4.06 KiB of class 'environment') and 'b' (112 bytes of class 'character') [01:28:03.567] - globals: [2] 'env', 'b' [01:28:03.568] [01:28:03.568] getGlobalsAndPackages() ... DONE [01:28:03.568] run() for 'Future' ... [01:28:03.568] - state: 'created' [01:28:03.568] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [01:28:03.580] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [01:28:03.581] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [01:28:03.581] - Field: 'node' [01:28:03.581] - Field: 'label' [01:28:03.581] - Field: 'local' [01:28:03.581] - Field: 'owner' [01:28:03.581] - Field: 'envir' [01:28:03.582] - Field: 'workers' [01:28:03.582] - Field: 'packages' [01:28:03.582] - Field: 'gc' [01:28:03.582] - Field: 'conditions' [01:28:03.582] - Field: 'persistent' [01:28:03.582] - Field: 'expr' [01:28:03.583] - Field: 'uuid' [01:28:03.583] - Field: 'seed' [01:28:03.583] - Field: 'version' [01:28:03.583] - Field: 'result' [01:28:03.583] - Field: 'asynchronous' [01:28:03.584] - Field: 'calls' [01:28:03.584] - Field: 'globals' [01:28:03.584] - Field: 'stdout' [01:28:03.584] - Field: 'earlySignal' [01:28:03.584] - Field: 'lazy' [01:28:03.584] - Field: 'state' [01:28:03.585] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [01:28:03.585] - Launch lazy future ... [01:28:03.585] Packages needed by the future expression (n = 0): [01:28:03.585] Packages needed by future strategies (n = 0): [01:28:03.586] { [01:28:03.586] { [01:28:03.586] { [01:28:03.586] ...future.startTime <- base::Sys.time() [01:28:03.586] { [01:28:03.586] { [01:28:03.586] { [01:28:03.586] { [01:28:03.586] base::local({ [01:28:03.586] has_future <- base::requireNamespace("future", [01:28:03.586] quietly = TRUE) [01:28:03.586] if (has_future) { [01:28:03.586] ns <- base::getNamespace("future") [01:28:03.586] version <- ns[[".package"]][["version"]] [01:28:03.586] if (is.null(version)) [01:28:03.586] version <- utils::packageVersion("future") [01:28:03.586] } [01:28:03.586] else { [01:28:03.586] version <- NULL [01:28:03.586] } [01:28:03.586] if (!has_future || version < "1.8.0") { [01:28:03.586] info <- base::c(r_version = base::gsub("R version ", [01:28:03.586] "", base::R.version$version.string), [01:28:03.586] platform = base::sprintf("%s (%s-bit)", [01:28:03.586] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:28:03.586] os = base::paste(base::Sys.info()[base::c("sysname", [01:28:03.586] "release", "version")], collapse = " "), [01:28:03.586] hostname = base::Sys.info()[["nodename"]]) [01:28:03.586] info <- base::sprintf("%s: %s", base::names(info), [01:28:03.586] info) [01:28:03.586] info <- base::paste(info, collapse = "; ") [01:28:03.586] if (!has_future) { [01:28:03.586] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:28:03.586] info) [01:28:03.586] } [01:28:03.586] else { [01:28:03.586] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:28:03.586] info, version) [01:28:03.586] } [01:28:03.586] base::stop(msg) [01:28:03.586] } [01:28:03.586] }) [01:28:03.586] } [01:28:03.586] ...future.mc.cores.old <- base::getOption("mc.cores") [01:28:03.586] base::options(mc.cores = 1L) [01:28:03.586] } [01:28:03.586] options(future.plan = NULL) [01:28:03.586] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.586] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:28:03.586] } [01:28:03.586] ...future.workdir <- getwd() [01:28:03.586] } [01:28:03.586] ...future.oldOptions <- base::as.list(base::.Options) [01:28:03.586] ...future.oldEnvVars <- base::Sys.getenv() [01:28:03.586] } [01:28:03.586] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:28:03.586] future.globals.maxSize = NULL, future.globals.method = NULL, [01:28:03.586] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:28:03.586] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [01:28:03.586] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:28:03.586] future.stdout.windows.reencode = NULL, width = 80L) [01:28:03.586] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:28:03.586] base::names(...future.oldOptions)) [01:28:03.586] } [01:28:03.586] if (FALSE) { [01:28:03.586] } [01:28:03.586] else { [01:28:03.586] if (TRUE) { [01:28:03.586] ...future.stdout <- base::rawConnection(base::raw(0L), [01:28:03.586] open = "w") [01:28:03.586] } [01:28:03.586] else { [01:28:03.586] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:28:03.586] windows = "NUL", "/dev/null"), open = "w") [01:28:03.586] } [01:28:03.586] base::sink(...future.stdout, type = "output", split = FALSE) [01:28:03.586] base::on.exit(if (!base::is.null(...future.stdout)) { [01:28:03.586] base::sink(type = "output", split = FALSE) [01:28:03.586] base::close(...future.stdout) [01:28:03.586] }, add = TRUE) [01:28:03.586] } [01:28:03.586] ...future.frame <- base::sys.nframe() [01:28:03.586] ...future.conditions <- base::list() [01:28:03.586] ...future.rng <- base::globalenv()$.Random.seed [01:28:03.586] if (FALSE) { [01:28:03.586] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:28:03.586] "...future.value", "...future.globalenv.names", ".Random.seed") [01:28:03.586] } [01:28:03.586] ...future.result <- base::tryCatch({ [01:28:03.586] base::withCallingHandlers({ [01:28:03.586] ...future.value <- base::withVisible(base::local({ [01:28:03.586] ...future.makeSendCondition <- base::local({ [01:28:03.586] sendCondition <- NULL [01:28:03.586] function(frame = 1L) { [01:28:03.586] if (is.function(sendCondition)) [01:28:03.586] return(sendCondition) [01:28:03.586] ns <- getNamespace("parallel") [01:28:03.586] if (exists("sendData", mode = "function", [01:28:03.586] envir = ns)) { [01:28:03.586] parallel_sendData <- get("sendData", mode = "function", [01:28:03.586] envir = ns) [01:28:03.586] envir <- sys.frame(frame) [01:28:03.586] master <- NULL [01:28:03.586] while (!identical(envir, .GlobalEnv) && [01:28:03.586] !identical(envir, emptyenv())) { [01:28:03.586] if (exists("master", mode = "list", envir = envir, [01:28:03.586] inherits = FALSE)) { [01:28:03.586] master <- get("master", mode = "list", [01:28:03.586] envir = envir, inherits = FALSE) [01:28:03.586] if (inherits(master, c("SOCKnode", [01:28:03.586] "SOCK0node"))) { [01:28:03.586] sendCondition <<- function(cond) { [01:28:03.586] data <- list(type = "VALUE", value = cond, [01:28:03.586] success = TRUE) [01:28:03.586] parallel_sendData(master, data) [01:28:03.586] } [01:28:03.586] return(sendCondition) [01:28:03.586] } [01:28:03.586] } [01:28:03.586] frame <- frame + 1L [01:28:03.586] envir <- sys.frame(frame) [01:28:03.586] } [01:28:03.586] } [01:28:03.586] sendCondition <<- function(cond) NULL [01:28:03.586] } [01:28:03.586] }) [01:28:03.586] withCallingHandlers({ [01:28:03.586] { [01:28:03.586] env[[b]] [01:28:03.586] } [01:28:03.586] }, immediateCondition = function(cond) { [01:28:03.586] sendCondition <- ...future.makeSendCondition() [01:28:03.586] sendCondition(cond) [01:28:03.586] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.586] { [01:28:03.586] inherits <- base::inherits [01:28:03.586] invokeRestart <- base::invokeRestart [01:28:03.586] is.null <- base::is.null [01:28:03.586] muffled <- FALSE [01:28:03.586] if (inherits(cond, "message")) { [01:28:03.586] muffled <- grepl(pattern, "muffleMessage") [01:28:03.586] if (muffled) [01:28:03.586] invokeRestart("muffleMessage") [01:28:03.586] } [01:28:03.586] else if (inherits(cond, "warning")) { [01:28:03.586] muffled <- grepl(pattern, "muffleWarning") [01:28:03.586] if (muffled) [01:28:03.586] invokeRestart("muffleWarning") [01:28:03.586] } [01:28:03.586] else if (inherits(cond, "condition")) { [01:28:03.586] if (!is.null(pattern)) { [01:28:03.586] computeRestarts <- base::computeRestarts [01:28:03.586] grepl <- base::grepl [01:28:03.586] restarts <- computeRestarts(cond) [01:28:03.586] for (restart in restarts) { [01:28:03.586] name <- restart$name [01:28:03.586] if (is.null(name)) [01:28:03.586] next [01:28:03.586] if (!grepl(pattern, name)) [01:28:03.586] next [01:28:03.586] invokeRestart(restart) [01:28:03.586] muffled <- TRUE [01:28:03.586] break [01:28:03.586] } [01:28:03.586] } [01:28:03.586] } [01:28:03.586] invisible(muffled) [01:28:03.586] } [01:28:03.586] muffleCondition(cond) [01:28:03.586] }) [01:28:03.586] })) [01:28:03.586] future::FutureResult(value = ...future.value$value, [01:28:03.586] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.586] ...future.rng), globalenv = if (FALSE) [01:28:03.586] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:28:03.586] ...future.globalenv.names)) [01:28:03.586] else NULL, started = ...future.startTime, version = "1.8") [01:28:03.586] }, condition = base::local({ [01:28:03.586] c <- base::c [01:28:03.586] inherits <- base::inherits [01:28:03.586] invokeRestart <- base::invokeRestart [01:28:03.586] length <- base::length [01:28:03.586] list <- base::list [01:28:03.586] seq.int <- base::seq.int [01:28:03.586] signalCondition <- base::signalCondition [01:28:03.586] sys.calls <- base::sys.calls [01:28:03.586] `[[` <- base::`[[` [01:28:03.586] `+` <- base::`+` [01:28:03.586] `<<-` <- base::`<<-` [01:28:03.586] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:28:03.586] calls[seq.int(from = from + 12L, to = length(calls) - [01:28:03.586] 3L)] [01:28:03.586] } [01:28:03.586] function(cond) { [01:28:03.586] is_error <- inherits(cond, "error") [01:28:03.586] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:28:03.586] NULL) [01:28:03.586] if (is_error) { [01:28:03.586] sessionInformation <- function() { [01:28:03.586] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:28:03.586] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:28:03.586] search = base::search(), system = base::Sys.info()) [01:28:03.586] } [01:28:03.586] ...future.conditions[[length(...future.conditions) + [01:28:03.586] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:28:03.586] cond$call), session = sessionInformation(), [01:28:03.586] timestamp = base::Sys.time(), signaled = 0L) [01:28:03.586] signalCondition(cond) [01:28:03.586] } [01:28:03.586] else if (!ignore && TRUE && inherits(cond, c("condition", [01:28:03.586] "immediateCondition"))) { [01:28:03.586] signal <- TRUE && inherits(cond, "immediateCondition") [01:28:03.586] ...future.conditions[[length(...future.conditions) + [01:28:03.586] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:28:03.586] if (TRUE && !signal) { [01:28:03.586] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.586] { [01:28:03.586] inherits <- base::inherits [01:28:03.586] invokeRestart <- base::invokeRestart [01:28:03.586] is.null <- base::is.null [01:28:03.586] muffled <- FALSE [01:28:03.586] if (inherits(cond, "message")) { [01:28:03.586] muffled <- grepl(pattern, "muffleMessage") [01:28:03.586] if (muffled) [01:28:03.586] invokeRestart("muffleMessage") [01:28:03.586] } [01:28:03.586] else if (inherits(cond, "warning")) { [01:28:03.586] muffled <- grepl(pattern, "muffleWarning") [01:28:03.586] if (muffled) [01:28:03.586] invokeRestart("muffleWarning") [01:28:03.586] } [01:28:03.586] else if (inherits(cond, "condition")) { [01:28:03.586] if (!is.null(pattern)) { [01:28:03.586] computeRestarts <- base::computeRestarts [01:28:03.586] grepl <- base::grepl [01:28:03.586] restarts <- computeRestarts(cond) [01:28:03.586] for (restart in restarts) { [01:28:03.586] name <- restart$name [01:28:03.586] if (is.null(name)) [01:28:03.586] next [01:28:03.586] if (!grepl(pattern, name)) [01:28:03.586] next [01:28:03.586] invokeRestart(restart) [01:28:03.586] muffled <- TRUE [01:28:03.586] break [01:28:03.586] } [01:28:03.586] } [01:28:03.586] } [01:28:03.586] invisible(muffled) [01:28:03.586] } [01:28:03.586] muffleCondition(cond, pattern = "^muffle") [01:28:03.586] } [01:28:03.586] } [01:28:03.586] else { [01:28:03.586] if (TRUE) { [01:28:03.586] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.586] { [01:28:03.586] inherits <- base::inherits [01:28:03.586] invokeRestart <- base::invokeRestart [01:28:03.586] is.null <- base::is.null [01:28:03.586] muffled <- FALSE [01:28:03.586] if (inherits(cond, "message")) { [01:28:03.586] muffled <- grepl(pattern, "muffleMessage") [01:28:03.586] if (muffled) [01:28:03.586] invokeRestart("muffleMessage") [01:28:03.586] } [01:28:03.586] else if (inherits(cond, "warning")) { [01:28:03.586] muffled <- grepl(pattern, "muffleWarning") [01:28:03.586] if (muffled) [01:28:03.586] invokeRestart("muffleWarning") [01:28:03.586] } [01:28:03.586] else if (inherits(cond, "condition")) { [01:28:03.586] if (!is.null(pattern)) { [01:28:03.586] computeRestarts <- base::computeRestarts [01:28:03.586] grepl <- base::grepl [01:28:03.586] restarts <- computeRestarts(cond) [01:28:03.586] for (restart in restarts) { [01:28:03.586] name <- restart$name [01:28:03.586] if (is.null(name)) [01:28:03.586] next [01:28:03.586] if (!grepl(pattern, name)) [01:28:03.586] next [01:28:03.586] invokeRestart(restart) [01:28:03.586] muffled <- TRUE [01:28:03.586] break [01:28:03.586] } [01:28:03.586] } [01:28:03.586] } [01:28:03.586] invisible(muffled) [01:28:03.586] } [01:28:03.586] muffleCondition(cond, pattern = "^muffle") [01:28:03.586] } [01:28:03.586] } [01:28:03.586] } [01:28:03.586] })) [01:28:03.586] }, error = function(ex) { [01:28:03.586] base::structure(base::list(value = NULL, visible = NULL, [01:28:03.586] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.586] ...future.rng), started = ...future.startTime, [01:28:03.586] finished = Sys.time(), session_uuid = NA_character_, [01:28:03.586] version = "1.8"), class = "FutureResult") [01:28:03.586] }, finally = { [01:28:03.586] if (!identical(...future.workdir, getwd())) [01:28:03.586] setwd(...future.workdir) [01:28:03.586] { [01:28:03.586] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:28:03.586] ...future.oldOptions$nwarnings <- NULL [01:28:03.586] } [01:28:03.586] base::options(...future.oldOptions) [01:28:03.586] if (.Platform$OS.type == "windows") { [01:28:03.586] old_names <- names(...future.oldEnvVars) [01:28:03.586] envs <- base::Sys.getenv() [01:28:03.586] names <- names(envs) [01:28:03.586] common <- intersect(names, old_names) [01:28:03.586] added <- setdiff(names, old_names) [01:28:03.586] removed <- setdiff(old_names, names) [01:28:03.586] changed <- common[...future.oldEnvVars[common] != [01:28:03.586] envs[common]] [01:28:03.586] NAMES <- toupper(changed) [01:28:03.586] args <- list() [01:28:03.586] for (kk in seq_along(NAMES)) { [01:28:03.586] name <- changed[[kk]] [01:28:03.586] NAME <- NAMES[[kk]] [01:28:03.586] if (name != NAME && is.element(NAME, old_names)) [01:28:03.586] next [01:28:03.586] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.586] } [01:28:03.586] NAMES <- toupper(added) [01:28:03.586] for (kk in seq_along(NAMES)) { [01:28:03.586] name <- added[[kk]] [01:28:03.586] NAME <- NAMES[[kk]] [01:28:03.586] if (name != NAME && is.element(NAME, old_names)) [01:28:03.586] next [01:28:03.586] args[[name]] <- "" [01:28:03.586] } [01:28:03.586] NAMES <- toupper(removed) [01:28:03.586] for (kk in seq_along(NAMES)) { [01:28:03.586] name <- removed[[kk]] [01:28:03.586] NAME <- NAMES[[kk]] [01:28:03.586] if (name != NAME && is.element(NAME, old_names)) [01:28:03.586] next [01:28:03.586] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.586] } [01:28:03.586] if (length(args) > 0) [01:28:03.586] base::do.call(base::Sys.setenv, args = args) [01:28:03.586] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:28:03.586] } [01:28:03.586] else { [01:28:03.586] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:28:03.586] } [01:28:03.586] { [01:28:03.586] if (base::length(...future.futureOptionsAdded) > [01:28:03.586] 0L) { [01:28:03.586] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:28:03.586] base::names(opts) <- ...future.futureOptionsAdded [01:28:03.586] base::options(opts) [01:28:03.586] } [01:28:03.586] { [01:28:03.586] { [01:28:03.586] base::options(mc.cores = ...future.mc.cores.old) [01:28:03.586] NULL [01:28:03.586] } [01:28:03.586] options(future.plan = NULL) [01:28:03.586] if (is.na(NA_character_)) [01:28:03.586] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.586] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:28:03.586] future::plan(list(function (..., workers = 2L, [01:28:03.586] envir = parent.frame()) [01:28:03.586] strategy(..., workers = workers, envir = envir)), [01:28:03.586] .cleanup = FALSE, .init = FALSE) [01:28:03.586] } [01:28:03.586] } [01:28:03.586] } [01:28:03.586] }) [01:28:03.586] if (TRUE) { [01:28:03.586] base::sink(type = "output", split = FALSE) [01:28:03.586] if (TRUE) { [01:28:03.586] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:28:03.586] } [01:28:03.586] else { [01:28:03.586] ...future.result["stdout"] <- base::list(NULL) [01:28:03.586] } [01:28:03.586] base::close(...future.stdout) [01:28:03.586] ...future.stdout <- NULL [01:28:03.586] } [01:28:03.586] ...future.result$conditions <- ...future.conditions [01:28:03.586] ...future.result$finished <- base::Sys.time() [01:28:03.586] ...future.result [01:28:03.586] } [01:28:03.591] Exporting 2 global objects (4.17 KiB) to cluster node #1 ... [01:28:03.592] Exporting 'env' (4.06 KiB) to cluster node #1 ... [01:28:03.603] Exporting 'env' (4.06 KiB) to cluster node #1 ... DONE [01:28:03.604] Exporting 'b' (112 bytes) to cluster node #1 ... [01:28:03.604] Exporting 'b' (112 bytes) to cluster node #1 ... DONE [01:28:03.604] Exporting 2 global objects (4.17 KiB) to cluster node #1 ... DONE [01:28:03.605] MultisessionFuture started [01:28:03.605] - Launch lazy future ... done [01:28:03.605] run() for 'MultisessionFuture' ... done > > ## Resolve future #3 > message(sprintf("y = %s\n", y)) [01:28:03.605] result() for ClusterFuture ... [01:28:03.606] receiveMessageFromWorker() for ClusterFuture ... [01:28:03.606] - Validating connection of MultisessionFuture [01:28:03.620] - received message: FutureResult [01:28:03.620] - Received FutureResult [01:28:03.621] - Erased future from FutureRegistry [01:28:03.621] result() for ClusterFuture ... [01:28:03.621] - result already collected: FutureResult [01:28:03.621] result() for ClusterFuture ... done [01:28:03.621] receiveMessageFromWorker() for ClusterFuture ... done [01:28:03.621] result() for ClusterFuture ... done [01:28:03.622] result() for ClusterFuture ... [01:28:03.622] - result already collected: FutureResult [01:28:03.622] result() for ClusterFuture ... done y = 5 > > ## Resolve future #1 if not already done > str(as.list(env)) [01:28:03.622] result() for ClusterFuture ... [01:28:03.623] - result already collected: FutureResult [01:28:03.623] result() for ClusterFuture ... done [01:28:03.623] result() for ClusterFuture ... [01:28:03.623] - result already collected: FutureResult [01:28:03.623] result() for ClusterFuture ... done List of 1 $ a: num 5 > > ## Create future #4 > ## Since future #1 is resolved it will work at this point > y %<-% { env[[b]] } Warning: R option 'future.globals.resolve' may only be used for troubleshooting. It must not be used in production since it changes how futures are evaluated and there is a great risk that the results cannot be reproduced elsewhere: 'TRUE' [01:28:03.624] getGlobalsAndPackages() ... [01:28:03.625] Searching for globals... [01:28:03.626] - globals found: [4] '{', '[[', 'env', 'b' [01:28:03.626] Searching for globals ... DONE [01:28:03.626] Resolving globals: TRUE [01:28:03.626] Resolving any globals that are futures ... [01:28:03.626] - globals: [4] '{', '[[', 'env', 'b' [01:28:03.627] Resolving any globals that are futures ... DONE [01:28:03.627] Resolving futures part of globals (recursively) ... [01:28:03.627] resolve() on list ... [01:28:03.628] recursive: 99 [01:28:03.628] length: 2 [01:28:03.628] elements: 'env', 'b' [01:28:03.628] resolve() on environment ... [01:28:03.628] recursive: 98 [01:28:03.629] elements: [1] 'a' [01:28:03.629] length: 0 (resolved future 1) [01:28:03.629] resolve() on environment ... DONE [01:28:03.629] length: 1 (resolved future 1) [01:28:03.630] length: 0 (resolved future 2) [01:28:03.630] resolve() on list ... DONE [01:28:03.630] - globals: [2] 'env', 'b' [01:28:03.630] Resolving futures part of globals (recursively) ... DONE [01:28:03.630] The total size of the 2 globals is 168 bytes (168 bytes) [01:28:03.631] The total size of the 2 globals exported for future expression ('{; env[[b]]; }') is 168 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'b' (112 bytes of class 'character') and 'env' (56 bytes of class 'environment') [01:28:03.631] - globals: [2] 'env', 'b' [01:28:03.631] [01:28:03.631] getGlobalsAndPackages() ... DONE [01:28:03.632] run() for 'Future' ... [01:28:03.632] - state: 'created' [01:28:03.632] - Future backend: 'FutureStrategy', 'tweaked', 'multisession', 'cluster', 'multiprocess', 'future', 'function' [01:28:03.645] - Future class: 'MultisessionFuture', 'ClusterFuture', 'MultiprocessFuture', 'Future', 'environment' [01:28:03.645] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... [01:28:03.645] - Field: 'node' [01:28:03.645] - Field: 'label' [01:28:03.646] - Field: 'local' [01:28:03.646] - Field: 'owner' [01:28:03.646] - Field: 'envir' [01:28:03.646] - Field: 'workers' [01:28:03.646] - Field: 'packages' [01:28:03.646] - Field: 'gc' [01:28:03.647] - Field: 'conditions' [01:28:03.647] - Field: 'persistent' [01:28:03.647] - Field: 'expr' [01:28:03.647] - Field: 'uuid' [01:28:03.647] - Field: 'seed' [01:28:03.647] - Field: 'version' [01:28:03.648] - Field: 'result' [01:28:03.648] - Field: 'asynchronous' [01:28:03.648] - Field: 'calls' [01:28:03.648] - Field: 'globals' [01:28:03.648] - Field: 'stdout' [01:28:03.649] - Field: 'earlySignal' [01:28:03.649] - Field: 'lazy' [01:28:03.649] - Field: 'state' [01:28:03.649] - Copy elements of temporary 'MultisessionFuture' to final 'Future' object ... done [01:28:03.649] - Launch lazy future ... [01:28:03.650] Packages needed by the future expression (n = 0): [01:28:03.650] Packages needed by future strategies (n = 0): [01:28:03.650] { [01:28:03.650] { [01:28:03.650] { [01:28:03.650] ...future.startTime <- base::Sys.time() [01:28:03.650] { [01:28:03.650] { [01:28:03.650] { [01:28:03.650] { [01:28:03.650] base::local({ [01:28:03.650] has_future <- base::requireNamespace("future", [01:28:03.650] quietly = TRUE) [01:28:03.650] if (has_future) { [01:28:03.650] ns <- base::getNamespace("future") [01:28:03.650] version <- ns[[".package"]][["version"]] [01:28:03.650] if (is.null(version)) [01:28:03.650] version <- utils::packageVersion("future") [01:28:03.650] } [01:28:03.650] else { [01:28:03.650] version <- NULL [01:28:03.650] } [01:28:03.650] if (!has_future || version < "1.8.0") { [01:28:03.650] info <- base::c(r_version = base::gsub("R version ", [01:28:03.650] "", base::R.version$version.string), [01:28:03.650] platform = base::sprintf("%s (%s-bit)", [01:28:03.650] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [01:28:03.650] os = base::paste(base::Sys.info()[base::c("sysname", [01:28:03.650] "release", "version")], collapse = " "), [01:28:03.650] hostname = base::Sys.info()[["nodename"]]) [01:28:03.650] info <- base::sprintf("%s: %s", base::names(info), [01:28:03.650] info) [01:28:03.650] info <- base::paste(info, collapse = "; ") [01:28:03.650] if (!has_future) { [01:28:03.650] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [01:28:03.650] info) [01:28:03.650] } [01:28:03.650] else { [01:28:03.650] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [01:28:03.650] info, version) [01:28:03.650] } [01:28:03.650] base::stop(msg) [01:28:03.650] } [01:28:03.650] }) [01:28:03.650] } [01:28:03.650] ...future.mc.cores.old <- base::getOption("mc.cores") [01:28:03.650] base::options(mc.cores = 1L) [01:28:03.650] } [01:28:03.650] options(future.plan = NULL) [01:28:03.650] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.650] future::plan("default", .cleanup = FALSE, .init = FALSE) [01:28:03.650] } [01:28:03.650] ...future.workdir <- getwd() [01:28:03.650] } [01:28:03.650] ...future.oldOptions <- base::as.list(base::.Options) [01:28:03.650] ...future.oldEnvVars <- base::Sys.getenv() [01:28:03.650] } [01:28:03.650] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [01:28:03.650] future.globals.maxSize = NULL, future.globals.method = NULL, [01:28:03.650] future.globals.onMissing = NULL, future.globals.onReference = NULL, [01:28:03.650] future.globals.resolve = TRUE, future.resolve.recursive = NULL, [01:28:03.650] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [01:28:03.650] future.stdout.windows.reencode = NULL, width = 80L) [01:28:03.650] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [01:28:03.650] base::names(...future.oldOptions)) [01:28:03.650] } [01:28:03.650] if (FALSE) { [01:28:03.650] } [01:28:03.650] else { [01:28:03.650] if (TRUE) { [01:28:03.650] ...future.stdout <- base::rawConnection(base::raw(0L), [01:28:03.650] open = "w") [01:28:03.650] } [01:28:03.650] else { [01:28:03.650] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [01:28:03.650] windows = "NUL", "/dev/null"), open = "w") [01:28:03.650] } [01:28:03.650] base::sink(...future.stdout, type = "output", split = FALSE) [01:28:03.650] base::on.exit(if (!base::is.null(...future.stdout)) { [01:28:03.650] base::sink(type = "output", split = FALSE) [01:28:03.650] base::close(...future.stdout) [01:28:03.650] }, add = TRUE) [01:28:03.650] } [01:28:03.650] ...future.frame <- base::sys.nframe() [01:28:03.650] ...future.conditions <- base::list() [01:28:03.650] ...future.rng <- base::globalenv()$.Random.seed [01:28:03.650] if (FALSE) { [01:28:03.650] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [01:28:03.650] "...future.value", "...future.globalenv.names", ".Random.seed") [01:28:03.650] } [01:28:03.650] ...future.result <- base::tryCatch({ [01:28:03.650] base::withCallingHandlers({ [01:28:03.650] ...future.value <- base::withVisible(base::local({ [01:28:03.650] ...future.makeSendCondition <- base::local({ [01:28:03.650] sendCondition <- NULL [01:28:03.650] function(frame = 1L) { [01:28:03.650] if (is.function(sendCondition)) [01:28:03.650] return(sendCondition) [01:28:03.650] ns <- getNamespace("parallel") [01:28:03.650] if (exists("sendData", mode = "function", [01:28:03.650] envir = ns)) { [01:28:03.650] parallel_sendData <- get("sendData", mode = "function", [01:28:03.650] envir = ns) [01:28:03.650] envir <- sys.frame(frame) [01:28:03.650] master <- NULL [01:28:03.650] while (!identical(envir, .GlobalEnv) && [01:28:03.650] !identical(envir, emptyenv())) { [01:28:03.650] if (exists("master", mode = "list", envir = envir, [01:28:03.650] inherits = FALSE)) { [01:28:03.650] master <- get("master", mode = "list", [01:28:03.650] envir = envir, inherits = FALSE) [01:28:03.650] if (inherits(master, c("SOCKnode", [01:28:03.650] "SOCK0node"))) { [01:28:03.650] sendCondition <<- function(cond) { [01:28:03.650] data <- list(type = "VALUE", value = cond, [01:28:03.650] success = TRUE) [01:28:03.650] parallel_sendData(master, data) [01:28:03.650] } [01:28:03.650] return(sendCondition) [01:28:03.650] } [01:28:03.650] } [01:28:03.650] frame <- frame + 1L [01:28:03.650] envir <- sys.frame(frame) [01:28:03.650] } [01:28:03.650] } [01:28:03.650] sendCondition <<- function(cond) NULL [01:28:03.650] } [01:28:03.650] }) [01:28:03.650] withCallingHandlers({ [01:28:03.650] { [01:28:03.650] env[[b]] [01:28:03.650] } [01:28:03.650] }, immediateCondition = function(cond) { [01:28:03.650] sendCondition <- ...future.makeSendCondition() [01:28:03.650] sendCondition(cond) [01:28:03.650] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.650] { [01:28:03.650] inherits <- base::inherits [01:28:03.650] invokeRestart <- base::invokeRestart [01:28:03.650] is.null <- base::is.null [01:28:03.650] muffled <- FALSE [01:28:03.650] if (inherits(cond, "message")) { [01:28:03.650] muffled <- grepl(pattern, "muffleMessage") [01:28:03.650] if (muffled) [01:28:03.650] invokeRestart("muffleMessage") [01:28:03.650] } [01:28:03.650] else if (inherits(cond, "warning")) { [01:28:03.650] muffled <- grepl(pattern, "muffleWarning") [01:28:03.650] if (muffled) [01:28:03.650] invokeRestart("muffleWarning") [01:28:03.650] } [01:28:03.650] else if (inherits(cond, "condition")) { [01:28:03.650] if (!is.null(pattern)) { [01:28:03.650] computeRestarts <- base::computeRestarts [01:28:03.650] grepl <- base::grepl [01:28:03.650] restarts <- computeRestarts(cond) [01:28:03.650] for (restart in restarts) { [01:28:03.650] name <- restart$name [01:28:03.650] if (is.null(name)) [01:28:03.650] next [01:28:03.650] if (!grepl(pattern, name)) [01:28:03.650] next [01:28:03.650] invokeRestart(restart) [01:28:03.650] muffled <- TRUE [01:28:03.650] break [01:28:03.650] } [01:28:03.650] } [01:28:03.650] } [01:28:03.650] invisible(muffled) [01:28:03.650] } [01:28:03.650] muffleCondition(cond) [01:28:03.650] }) [01:28:03.650] })) [01:28:03.650] future::FutureResult(value = ...future.value$value, [01:28:03.650] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.650] ...future.rng), globalenv = if (FALSE) [01:28:03.650] list(added = base::setdiff(base::names(base::.GlobalEnv), [01:28:03.650] ...future.globalenv.names)) [01:28:03.650] else NULL, started = ...future.startTime, version = "1.8") [01:28:03.650] }, condition = base::local({ [01:28:03.650] c <- base::c [01:28:03.650] inherits <- base::inherits [01:28:03.650] invokeRestart <- base::invokeRestart [01:28:03.650] length <- base::length [01:28:03.650] list <- base::list [01:28:03.650] seq.int <- base::seq.int [01:28:03.650] signalCondition <- base::signalCondition [01:28:03.650] sys.calls <- base::sys.calls [01:28:03.650] `[[` <- base::`[[` [01:28:03.650] `+` <- base::`+` [01:28:03.650] `<<-` <- base::`<<-` [01:28:03.650] sysCalls <- function(calls = sys.calls(), from = 1L) { [01:28:03.650] calls[seq.int(from = from + 12L, to = length(calls) - [01:28:03.650] 3L)] [01:28:03.650] } [01:28:03.650] function(cond) { [01:28:03.650] is_error <- inherits(cond, "error") [01:28:03.650] ignore <- !is_error && !is.null(NULL) && inherits(cond, [01:28:03.650] NULL) [01:28:03.650] if (is_error) { [01:28:03.650] sessionInformation <- function() { [01:28:03.650] list(r = base::R.Version(), locale = base::Sys.getlocale(), [01:28:03.650] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [01:28:03.650] search = base::search(), system = base::Sys.info()) [01:28:03.650] } [01:28:03.650] ...future.conditions[[length(...future.conditions) + [01:28:03.650] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [01:28:03.650] cond$call), session = sessionInformation(), [01:28:03.650] timestamp = base::Sys.time(), signaled = 0L) [01:28:03.650] signalCondition(cond) [01:28:03.650] } [01:28:03.650] else if (!ignore && TRUE && inherits(cond, c("condition", [01:28:03.650] "immediateCondition"))) { [01:28:03.650] signal <- TRUE && inherits(cond, "immediateCondition") [01:28:03.650] ...future.conditions[[length(...future.conditions) + [01:28:03.650] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [01:28:03.650] if (TRUE && !signal) { [01:28:03.650] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.650] { [01:28:03.650] inherits <- base::inherits [01:28:03.650] invokeRestart <- base::invokeRestart [01:28:03.650] is.null <- base::is.null [01:28:03.650] muffled <- FALSE [01:28:03.650] if (inherits(cond, "message")) { [01:28:03.650] muffled <- grepl(pattern, "muffleMessage") [01:28:03.650] if (muffled) [01:28:03.650] invokeRestart("muffleMessage") [01:28:03.650] } [01:28:03.650] else if (inherits(cond, "warning")) { [01:28:03.650] muffled <- grepl(pattern, "muffleWarning") [01:28:03.650] if (muffled) [01:28:03.650] invokeRestart("muffleWarning") [01:28:03.650] } [01:28:03.650] else if (inherits(cond, "condition")) { [01:28:03.650] if (!is.null(pattern)) { [01:28:03.650] computeRestarts <- base::computeRestarts [01:28:03.650] grepl <- base::grepl [01:28:03.650] restarts <- computeRestarts(cond) [01:28:03.650] for (restart in restarts) { [01:28:03.650] name <- restart$name [01:28:03.650] if (is.null(name)) [01:28:03.650] next [01:28:03.650] if (!grepl(pattern, name)) [01:28:03.650] next [01:28:03.650] invokeRestart(restart) [01:28:03.650] muffled <- TRUE [01:28:03.650] break [01:28:03.650] } [01:28:03.650] } [01:28:03.650] } [01:28:03.650] invisible(muffled) [01:28:03.650] } [01:28:03.650] muffleCondition(cond, pattern = "^muffle") [01:28:03.650] } [01:28:03.650] } [01:28:03.650] else { [01:28:03.650] if (TRUE) { [01:28:03.650] muffleCondition <- function (cond, pattern = "^muffle") [01:28:03.650] { [01:28:03.650] inherits <- base::inherits [01:28:03.650] invokeRestart <- base::invokeRestart [01:28:03.650] is.null <- base::is.null [01:28:03.650] muffled <- FALSE [01:28:03.650] if (inherits(cond, "message")) { [01:28:03.650] muffled <- grepl(pattern, "muffleMessage") [01:28:03.650] if (muffled) [01:28:03.650] invokeRestart("muffleMessage") [01:28:03.650] } [01:28:03.650] else if (inherits(cond, "warning")) { [01:28:03.650] muffled <- grepl(pattern, "muffleWarning") [01:28:03.650] if (muffled) [01:28:03.650] invokeRestart("muffleWarning") [01:28:03.650] } [01:28:03.650] else if (inherits(cond, "condition")) { [01:28:03.650] if (!is.null(pattern)) { [01:28:03.650] computeRestarts <- base::computeRestarts [01:28:03.650] grepl <- base::grepl [01:28:03.650] restarts <- computeRestarts(cond) [01:28:03.650] for (restart in restarts) { [01:28:03.650] name <- restart$name [01:28:03.650] if (is.null(name)) [01:28:03.650] next [01:28:03.650] if (!grepl(pattern, name)) [01:28:03.650] next [01:28:03.650] invokeRestart(restart) [01:28:03.650] muffled <- TRUE [01:28:03.650] break [01:28:03.650] } [01:28:03.650] } [01:28:03.650] } [01:28:03.650] invisible(muffled) [01:28:03.650] } [01:28:03.650] muffleCondition(cond, pattern = "^muffle") [01:28:03.650] } [01:28:03.650] } [01:28:03.650] } [01:28:03.650] })) [01:28:03.650] }, error = function(ex) { [01:28:03.650] base::structure(base::list(value = NULL, visible = NULL, [01:28:03.650] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [01:28:03.650] ...future.rng), started = ...future.startTime, [01:28:03.650] finished = Sys.time(), session_uuid = NA_character_, [01:28:03.650] version = "1.8"), class = "FutureResult") [01:28:03.650] }, finally = { [01:28:03.650] if (!identical(...future.workdir, getwd())) [01:28:03.650] setwd(...future.workdir) [01:28:03.650] { [01:28:03.650] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [01:28:03.650] ...future.oldOptions$nwarnings <- NULL [01:28:03.650] } [01:28:03.650] base::options(...future.oldOptions) [01:28:03.650] if (.Platform$OS.type == "windows") { [01:28:03.650] old_names <- names(...future.oldEnvVars) [01:28:03.650] envs <- base::Sys.getenv() [01:28:03.650] names <- names(envs) [01:28:03.650] common <- intersect(names, old_names) [01:28:03.650] added <- setdiff(names, old_names) [01:28:03.650] removed <- setdiff(old_names, names) [01:28:03.650] changed <- common[...future.oldEnvVars[common] != [01:28:03.650] envs[common]] [01:28:03.650] NAMES <- toupper(changed) [01:28:03.650] args <- list() [01:28:03.650] for (kk in seq_along(NAMES)) { [01:28:03.650] name <- changed[[kk]] [01:28:03.650] NAME <- NAMES[[kk]] [01:28:03.650] if (name != NAME && is.element(NAME, old_names)) [01:28:03.650] next [01:28:03.650] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.650] } [01:28:03.650] NAMES <- toupper(added) [01:28:03.650] for (kk in seq_along(NAMES)) { [01:28:03.650] name <- added[[kk]] [01:28:03.650] NAME <- NAMES[[kk]] [01:28:03.650] if (name != NAME && is.element(NAME, old_names)) [01:28:03.650] next [01:28:03.650] args[[name]] <- "" [01:28:03.650] } [01:28:03.650] NAMES <- toupper(removed) [01:28:03.650] for (kk in seq_along(NAMES)) { [01:28:03.650] name <- removed[[kk]] [01:28:03.650] NAME <- NAMES[[kk]] [01:28:03.650] if (name != NAME && is.element(NAME, old_names)) [01:28:03.650] next [01:28:03.650] args[[name]] <- ...future.oldEnvVars[[name]] [01:28:03.650] } [01:28:03.650] if (length(args) > 0) [01:28:03.650] base::do.call(base::Sys.setenv, args = args) [01:28:03.650] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [01:28:03.650] } [01:28:03.650] else { [01:28:03.650] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [01:28:03.650] } [01:28:03.650] { [01:28:03.650] if (base::length(...future.futureOptionsAdded) > [01:28:03.650] 0L) { [01:28:03.650] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [01:28:03.650] base::names(opts) <- ...future.futureOptionsAdded [01:28:03.650] base::options(opts) [01:28:03.650] } [01:28:03.650] { [01:28:03.650] { [01:28:03.650] base::options(mc.cores = ...future.mc.cores.old) [01:28:03.650] NULL [01:28:03.650] } [01:28:03.650] options(future.plan = NULL) [01:28:03.650] if (is.na(NA_character_)) [01:28:03.650] Sys.unsetenv("R_FUTURE_PLAN") [01:28:03.650] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [01:28:03.650] future::plan(list(function (..., workers = 2L, [01:28:03.650] envir = parent.frame()) [01:28:03.650] strategy(..., workers = workers, envir = envir)), [01:28:03.650] .cleanup = FALSE, .init = FALSE) [01:28:03.650] } [01:28:03.650] } [01:28:03.650] } [01:28:03.650] }) [01:28:03.650] if (TRUE) { [01:28:03.650] base::sink(type = "output", split = FALSE) [01:28:03.650] if (TRUE) { [01:28:03.650] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [01:28:03.650] } [01:28:03.650] else { [01:28:03.650] ...future.result["stdout"] <- base::list(NULL) [01:28:03.650] } [01:28:03.650] base::close(...future.stdout) [01:28:03.650] ...future.stdout <- NULL [01:28:03.650] } [01:28:03.650] ...future.result$conditions <- ...future.conditions [01:28:03.650] ...future.result$finished <- base::Sys.time() [01:28:03.650] ...future.result [01:28:03.650] } [01:28:03.655] Exporting 2 global objects (168 bytes) to cluster node #1 ... [01:28:03.656] Exporting 'env' (56 bytes) to cluster node #1 ... [01:28:03.656] Exporting 'env' (56 bytes) to cluster node #1 ... DONE [01:28:03.656] Exporting 'b' (112 bytes) to cluster node #1 ... [01:28:03.657] Exporting 'b' (112 bytes) to cluster node #1 ... DONE [01:28:03.657] Exporting 2 global objects (168 bytes) to cluster node #1 ... DONE [01:28:03.658] MultisessionFuture started [01:28:03.658] - Launch lazy future ... done [01:28:03.658] run() for 'MultisessionFuture' ... done > ## Resolve future #4 > message(sprintf("y = %s\n", y)) [01:28:03.659] result() for ClusterFuture ... [01:28:03.659] receiveMessageFromWorker() for ClusterFuture ... [01:28:03.659] - Validating connection of MultisessionFuture [01:28:03.674] - received message: FutureResult [01:28:03.675] - Received FutureResult [01:28:03.675] - Erased future from FutureRegistry [01:28:03.675] result() for ClusterFuture ... [01:28:03.675] - result already collected: FutureResult [01:28:03.675] result() for ClusterFuture ... done [01:28:03.675] receiveMessageFromWorker() for ClusterFuture ... done [01:28:03.676] result() for ClusterFuture ... done [01:28:03.676] result() for ClusterFuture ... [01:28:03.676] - result already collected: FutureResult [01:28:03.676] 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") [01:28:03.677] plan(): Setting new future strategy stack: [01:28:03.677] List of future strategies: [01:28:03.677] 1. FutureStrategy: [01:28:03.677] - args: function (..., envir = parent.frame(), workers = "") [01:28:03.677] - tweaked: FALSE [01:28:03.677] - call: future::plan(oplan) [01:28:03.678] plan(): nbrOfWorkers() = 1 Failed to undo environment variables: - Expected environment variables: [n=204] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', 'BIBINPUTS', 'BINDIR', 'BSTINPUTS', 'COMMONPROGRAMFILES', 'COMPUTERNAME', 'COMSPEC', 'CURL_CA_BUNDLE', 'CYGWIN', 'CommonProgramFiles(x86)', 'CommonProgramW6432', 'DriverData', 'HOME', 'HOMEDRIVE', 'HOMEPATH', 'JAGS_ROOT', 'JAVA_HOME', 'LANGUAGE', 'LC_COLLATE', 'LC_MONETARY', 'LC_TIME', 'LOCALAPPDATA', 'LOGONSERVER', 'LS_HOME', 'LS_LICENSE_PATH', 'MAKE', 'MAKEFLAGS', 'MAKELEVEL', 'MFLAGS', 'MSMPI_BENCHMARKS', 'MSMPI_BIN', 'MSYS2_ENV_CONV_EXCL', 'NUMBER_OF_PROCESSORS', 'OCL', 'OMP_THREAD_LIMIT', 'OS', 'PATH', 'PATHEXT', 'PROCESSOR_ARCHITECTURE', 'PROCESSOR_IDENTIFIER', 'PROCESSOR_LEVEL', 'PROCESSOR_REVISION', 'PROGRAMFILES', 'PROMPT', 'PSModulePath', 'PUBLIC', 'PWD', 'ProgramData', 'ProgramFiles(x86)', 'ProgramW6432', 'RTOOLS43_HOME', 'R_ARCH', 'R_BROWSER', 'R_BZIPCMD', 'R_CMD', 'R_COMPILED_BY', 'R_CRAN_WEB', 'R_CUSTOM_TOOLS_PATH', 'R_CUSTOM_TOOLS_SOFT', 'R_DOC_DIR', 'R_ENVIRON_USER', 'R_GSCMD', 'R_GZIPCMD', 'R_HOME', 'R_INCLUDE_DIR', 'R_INSTALL_TAR', 'R_LIBS', 'R_LIBS_SITE', 'R_LIBS_USER', 'R_MAX_NUM_DLLS', 'R_OSTYPE', 'R_PAPERSIZE', 'R_PAPERSIZE_USER', 'R_PARALLELLY_MAKENODEPSOCK_AUTOKILL', 'R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT', 'R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL', 'R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS', 'R_PARALLELLY_MAKENODEPSOCK_TIMEOUT', 'R_PARALLELLY_RANDOM_PORTS', 'R_PARALLEL_PORT', 'R_RD4PDF', 'R_RTOOLS43_PATH', 'R_SCRIPT_LEGACY', 'R_SHARE_DIR', 'R_TESTS', 'R_UNZIPCMD', 'R_USER', 'R_VERSION', 'R_ZIPCMD', 'SED', 'SHLVL', 'SYSTEMDRIVE', 'SYSTEMROOT', 'TAR', 'TAR_OPTIONS', 'TEMP', 'TERM', 'TEXINPUTS', 'TMP', 'TMPDIR', 'USERDOMAIN', 'USERDOMAIN_ROAMINGPROFILE', 'USERNAME', 'USERPROFILE', 'WINDIR', '_', '_R_CHECK_AUTOCONF_', '_R_CHECK_BOGUS_RETURN_', '_R_CHECK_BROWSER_NONINTERACTIVE_', '_R_CHECK_BUILD_VIGNETTES_SEPARATELY_', '_R_CHECK_CODETOOLS_PROFILE_', '_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_', '_R_CHECK_CODE_ATTACH_', '_R_CHECK_CODE_CLASS_IS_STRING_', '_R_CHECK_CODE_DATA_INTO_GLOBALENV_', '_R_CHECK_CODE_USAGE_VIA_NAMESPACES_', '_R_CHECK_CODE_USAGE_WITHOUT_LOADING_', '_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_', '_R_CHECK_CODOC_VARIABLES_IN_USAGES_', '_R_CHECK_COMPACT_DATA2_', '_R_CHECK_COMPILATION_FLAGS_', '_R_CHECK_CONNECTIONS_LEFT_OPEN_', '_R_CHECK_CRAN_INCOMING_', '_R_CHECK_CRAN_INCOMING_CHECK_FILE_URIS_', '_R_CHECK_CRAN_INCOMING_CHECK_URLS_IN_PARALLEL_', '_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_', '_R_CHECK_CRAN_INCOMING_REMOTE_', '_R_CHECK_CRAN_INCOMING_USE_ASPELL_', '_R_CHECK_DATALIST_', '_R_CHECK_DEPRECATED_DEFUNCT_', '_R_CHECK_DOC_SIZES2_', '_R_CHECK_DOT_FIRSTLIB_', '_R_CHECK_DOT_INTERNAL_', '_R_CHECK_EXAMPLE_TIMING_THRESHOLD_', '_R_CHECK_EXECUTABLES_', '_R_CHECK_EXECUTABLES_EXCLUSIONS_', '_R_CHECK_FF_CALLS_', '_R_CHECK_FF_DUP_', '_R_CHECK_FORCE_SUGGESTS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_LEEWAY_', '_R_CHECK_HAVE_MYSQL_', '_R_CHECK_HAVE_ODBC_', '_R_CHECK_HAVE_PERL_', '_R_CHECK_HAVE_POSTGRES_', '_R_CHECK_INSTALL_DEPENDS_', '_R_CHECK_INTERNALS2_', '_R_CHECK_LENGTH_1_CONDITION_', '_R_CHECK_LICENSE_', '_R_CHECK_LIMIT_CORES_', '_R_CHECK_MATRIX_DATA_', '_R_CHECK_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_SUBDIRS_STRICT_', '_R_CHECK_SUGGESTS_ONLY_', '_R_CHECK_SYSTEM_CLOCK_', '_R_CHECK_TESTS_NLINES_', '_R_CHECK_TEST_TIMING_', '_R_CHECK_TIMINGS_', '_R_CHECK_TOPLEVEL_FILES_', '_R_CHECK_UNDOC_USE_ALL_NAMES_', '_R_CHECK_UNSAFE_CALLS_', '_R_CHECK_URLS_SHOW_301_STATUS_', '_R_CHECK_VC_DIRS_', '_R_CHECK_VIGNETTES_NLINES_', '_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_', '_R_CHECK_VIGNETTE_TIMING_', '_R_CHECK_VIGNETTE_TITLES_', '_R_CHECK_WINDOWS_DEVICE_', '_R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_', '_R_CLASS_MATRIX_ARRAY_', '_R_INSTALL_TIME_PATCHES_', '_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_', '_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_', '__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.54 0.06 1.46