R Under development (unstable) (2024-05-14 r86553 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [10:56:15.274] plan(): Setting new future strategy stack: [10:56:15.275] List of future strategies: [10:56:15.275] 1. mirai_multisession: [10:56:15.275] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:15.275] - tweaked: FALSE [10:56:15.275] - call: future::plan(future.mirai::mirai_multisession) [10:56:15.287] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:15.287] < mirai | $data > [10:56:15.292] getGlobalsAndPackages() ... [10:56:15.292] Not searching for globals [10:56:15.293] - globals: [0] [10:56:15.293] getGlobalsAndPackages() ... DONE [10:56:15.293] getGlobalsAndPackages() ... [10:56:15.293] [10:56:15.294] - globals: [0] [10:56:15.294] getGlobalsAndPackages() ... DONE [10:56:15.626] Packages needed by the future expression (n = 0): [10:56:15.627] Packages needed by future strategies (n = 0): [10:56:15.628] { [10:56:15.628] { [10:56:15.628] { [10:56:15.628] ...future.startTime <- base::Sys.time() [10:56:15.628] { [10:56:15.628] { [10:56:15.628] { [10:56:15.628] base::local({ [10:56:15.628] has_future <- base::requireNamespace("future", [10:56:15.628] quietly = TRUE) [10:56:15.628] if (has_future) { [10:56:15.628] ns <- base::getNamespace("future") [10:56:15.628] version <- ns[[".package"]][["version"]] [10:56:15.628] if (is.null(version)) [10:56:15.628] version <- utils::packageVersion("future") [10:56:15.628] } [10:56:15.628] else { [10:56:15.628] version <- NULL [10:56:15.628] } [10:56:15.628] if (!has_future || version < "1.8.0") { [10:56:15.628] info <- base::c(r_version = base::gsub("R version ", [10:56:15.628] "", base::R.version$version.string), [10:56:15.628] platform = base::sprintf("%s (%s-bit)", [10:56:15.628] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.628] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.628] "release", "version")], collapse = " "), [10:56:15.628] hostname = base::Sys.info()[["nodename"]]) [10:56:15.628] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.628] info) [10:56:15.628] info <- base::paste(info, collapse = "; ") [10:56:15.628] if (!has_future) { [10:56:15.628] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.628] info) [10:56:15.628] } [10:56:15.628] else { [10:56:15.628] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.628] info, version) [10:56:15.628] } [10:56:15.628] base::stop(msg) [10:56:15.628] } [10:56:15.628] }) [10:56:15.628] } [10:56:15.628] ...future.strategy.old <- future::plan("list") [10:56:15.628] options(future.plan = NULL) [10:56:15.628] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.628] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.628] } [10:56:15.628] ...future.workdir <- getwd() [10:56:15.628] } [10:56:15.628] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.628] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.628] } [10:56:15.628] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.628] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.628] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.628] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.628] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.628] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.628] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.628] base::names(...future.oldOptions)) [10:56:15.628] } [10:56:15.628] if (FALSE) { [10:56:15.628] } [10:56:15.628] else { [10:56:15.628] if (TRUE) { [10:56:15.628] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.628] open = "w") [10:56:15.628] } [10:56:15.628] else { [10:56:15.628] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.628] windows = "NUL", "/dev/null"), open = "w") [10:56:15.628] } [10:56:15.628] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.628] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.628] base::sink(type = "output", split = FALSE) [10:56:15.628] base::close(...future.stdout) [10:56:15.628] }, add = TRUE) [10:56:15.628] } [10:56:15.628] ...future.frame <- base::sys.nframe() [10:56:15.628] ...future.conditions <- base::list() [10:56:15.628] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.628] if (FALSE) { [10:56:15.628] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.628] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.628] } [10:56:15.628] ...future.result <- base::tryCatch({ [10:56:15.628] base::withCallingHandlers({ [10:56:15.628] ...future.value <- base::withVisible(base::local(NA)) [10:56:15.628] future::FutureResult(value = ...future.value$value, [10:56:15.628] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.628] ...future.rng), globalenv = if (FALSE) [10:56:15.628] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.628] ...future.globalenv.names)) [10:56:15.628] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.628] }, condition = base::local({ [10:56:15.628] c <- base::c [10:56:15.628] inherits <- base::inherits [10:56:15.628] invokeRestart <- base::invokeRestart [10:56:15.628] length <- base::length [10:56:15.628] list <- base::list [10:56:15.628] seq.int <- base::seq.int [10:56:15.628] signalCondition <- base::signalCondition [10:56:15.628] sys.calls <- base::sys.calls [10:56:15.628] `[[` <- base::`[[` [10:56:15.628] `+` <- base::`+` [10:56:15.628] `<<-` <- base::`<<-` [10:56:15.628] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.628] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.628] 3L)] [10:56:15.628] } [10:56:15.628] function(cond) { [10:56:15.628] is_error <- inherits(cond, "error") [10:56:15.628] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.628] NULL) [10:56:15.628] if (is_error) { [10:56:15.628] sessionInformation <- function() { [10:56:15.628] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.628] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.628] search = base::search(), system = base::Sys.info()) [10:56:15.628] } [10:56:15.628] ...future.conditions[[length(...future.conditions) + [10:56:15.628] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.628] cond$call), session = sessionInformation(), [10:56:15.628] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.628] signalCondition(cond) [10:56:15.628] } [10:56:15.628] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.628] signal <- FALSE && inherits(cond, character(0)) [10:56:15.628] ...future.conditions[[length(...future.conditions) + [10:56:15.628] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.628] if (FALSE && !signal) { [10:56:15.628] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.628] { [10:56:15.628] inherits <- base::inherits [10:56:15.628] invokeRestart <- base::invokeRestart [10:56:15.628] is.null <- base::is.null [10:56:15.628] muffled <- FALSE [10:56:15.628] if (inherits(cond, "message")) { [10:56:15.628] muffled <- grepl(pattern, "muffleMessage") [10:56:15.628] if (muffled) [10:56:15.628] invokeRestart("muffleMessage") [10:56:15.628] } [10:56:15.628] else if (inherits(cond, "warning")) { [10:56:15.628] muffled <- grepl(pattern, "muffleWarning") [10:56:15.628] if (muffled) [10:56:15.628] invokeRestart("muffleWarning") [10:56:15.628] } [10:56:15.628] else if (inherits(cond, "condition")) { [10:56:15.628] if (!is.null(pattern)) { [10:56:15.628] computeRestarts <- base::computeRestarts [10:56:15.628] grepl <- base::grepl [10:56:15.628] restarts <- computeRestarts(cond) [10:56:15.628] for (restart in restarts) { [10:56:15.628] name <- restart$name [10:56:15.628] if (is.null(name)) [10:56:15.628] next [10:56:15.628] if (!grepl(pattern, name)) [10:56:15.628] next [10:56:15.628] invokeRestart(restart) [10:56:15.628] muffled <- TRUE [10:56:15.628] break [10:56:15.628] } [10:56:15.628] } [10:56:15.628] } [10:56:15.628] invisible(muffled) [10:56:15.628] } [10:56:15.628] muffleCondition(cond, pattern = "^muffle") [10:56:15.628] } [10:56:15.628] } [10:56:15.628] else { [10:56:15.628] if (TRUE) { [10:56:15.628] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.628] { [10:56:15.628] inherits <- base::inherits [10:56:15.628] invokeRestart <- base::invokeRestart [10:56:15.628] is.null <- base::is.null [10:56:15.628] muffled <- FALSE [10:56:15.628] if (inherits(cond, "message")) { [10:56:15.628] muffled <- grepl(pattern, "muffleMessage") [10:56:15.628] if (muffled) [10:56:15.628] invokeRestart("muffleMessage") [10:56:15.628] } [10:56:15.628] else if (inherits(cond, "warning")) { [10:56:15.628] muffled <- grepl(pattern, "muffleWarning") [10:56:15.628] if (muffled) [10:56:15.628] invokeRestart("muffleWarning") [10:56:15.628] } [10:56:15.628] else if (inherits(cond, "condition")) { [10:56:15.628] if (!is.null(pattern)) { [10:56:15.628] computeRestarts <- base::computeRestarts [10:56:15.628] grepl <- base::grepl [10:56:15.628] restarts <- computeRestarts(cond) [10:56:15.628] for (restart in restarts) { [10:56:15.628] name <- restart$name [10:56:15.628] if (is.null(name)) [10:56:15.628] next [10:56:15.628] if (!grepl(pattern, name)) [10:56:15.628] next [10:56:15.628] invokeRestart(restart) [10:56:15.628] muffled <- TRUE [10:56:15.628] break [10:56:15.628] } [10:56:15.628] } [10:56:15.628] } [10:56:15.628] invisible(muffled) [10:56:15.628] } [10:56:15.628] muffleCondition(cond, pattern = "^muffle") [10:56:15.628] } [10:56:15.628] } [10:56:15.628] } [10:56:15.628] })) [10:56:15.628] }, error = function(ex) { [10:56:15.628] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.628] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.628] ...future.rng), started = ...future.startTime, [10:56:15.628] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.628] version = "1.8"), class = "FutureResult") [10:56:15.628] }, finally = { [10:56:15.628] if (!identical(...future.workdir, getwd())) [10:56:15.628] setwd(...future.workdir) [10:56:15.628] { [10:56:15.628] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.628] ...future.oldOptions$nwarnings <- NULL [10:56:15.628] } [10:56:15.628] base::options(...future.oldOptions) [10:56:15.628] if (.Platform$OS.type == "windows") { [10:56:15.628] old_names <- names(...future.oldEnvVars) [10:56:15.628] envs <- base::Sys.getenv() [10:56:15.628] names <- names(envs) [10:56:15.628] common <- intersect(names, old_names) [10:56:15.628] added <- setdiff(names, old_names) [10:56:15.628] removed <- setdiff(old_names, names) [10:56:15.628] changed <- common[...future.oldEnvVars[common] != [10:56:15.628] envs[common]] [10:56:15.628] NAMES <- toupper(changed) [10:56:15.628] args <- list() [10:56:15.628] for (kk in seq_along(NAMES)) { [10:56:15.628] name <- changed[[kk]] [10:56:15.628] NAME <- NAMES[[kk]] [10:56:15.628] if (name != NAME && is.element(NAME, old_names)) [10:56:15.628] next [10:56:15.628] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.628] } [10:56:15.628] NAMES <- toupper(added) [10:56:15.628] for (kk in seq_along(NAMES)) { [10:56:15.628] name <- added[[kk]] [10:56:15.628] NAME <- NAMES[[kk]] [10:56:15.628] if (name != NAME && is.element(NAME, old_names)) [10:56:15.628] next [10:56:15.628] args[[name]] <- "" [10:56:15.628] } [10:56:15.628] NAMES <- toupper(removed) [10:56:15.628] for (kk in seq_along(NAMES)) { [10:56:15.628] name <- removed[[kk]] [10:56:15.628] NAME <- NAMES[[kk]] [10:56:15.628] if (name != NAME && is.element(NAME, old_names)) [10:56:15.628] next [10:56:15.628] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.628] } [10:56:15.628] if (length(args) > 0) [10:56:15.628] base::do.call(base::Sys.setenv, args = args) [10:56:15.628] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.628] } [10:56:15.628] else { [10:56:15.628] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.628] } [10:56:15.628] { [10:56:15.628] if (base::length(...future.futureOptionsAdded) > [10:56:15.628] 0L) { [10:56:15.628] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.628] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.628] base::options(opts) [10:56:15.628] } [10:56:15.628] { [10:56:15.628] NULL [10:56:15.628] options(future.plan = NULL) [10:56:15.628] if (is.na(NA_character_)) [10:56:15.628] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.628] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.628] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.628] .init = FALSE) [10:56:15.628] } [10:56:15.628] } [10:56:15.628] } [10:56:15.628] }) [10:56:15.628] if (TRUE) { [10:56:15.628] base::sink(type = "output", split = FALSE) [10:56:15.628] if (TRUE) { [10:56:15.628] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.628] } [10:56:15.628] else { [10:56:15.628] ...future.result["stdout"] <- base::list(NULL) [10:56:15.628] } [10:56:15.628] base::close(...future.stdout) [10:56:15.628] ...future.stdout <- NULL [10:56:15.628] } [10:56:15.628] ...future.result$conditions <- ...future.conditions [10:56:15.628] ...future.result$finished <- base::Sys.time() [10:56:15.628] ...future.result [10:56:15.628] } [10:56:15.742] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:15.743] plan(): nbrOfWorkers() = 2 > > plan(mirai_multisession) [10:56:15.743] plan(): Setting new future strategy stack: [10:56:15.744] List of future strategies: [10:56:15.744] 1. mirai_multisession: [10:56:15.744] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:15.744] - tweaked: FALSE [10:56:15.744] - call: plan(mirai_multisession) [10:56:15.757] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:15.757] < mirai | $data > [10:56:15.759] getGlobalsAndPackages() ... [10:56:15.760] Not searching for globals [10:56:15.760] - globals: [0] [10:56:15.760] getGlobalsAndPackages() ... DONE [10:56:15.760] getGlobalsAndPackages() ... [10:56:15.760] [10:56:15.760] - globals: [0] [10:56:15.761] getGlobalsAndPackages() ... DONE [10:56:15.761] Packages needed by the future expression (n = 0): [10:56:15.761] Packages needed by future strategies (n = 0): [10:56:15.762] { [10:56:15.762] { [10:56:15.762] { [10:56:15.762] ...future.startTime <- base::Sys.time() [10:56:15.762] { [10:56:15.762] { [10:56:15.762] { [10:56:15.762] base::local({ [10:56:15.762] has_future <- base::requireNamespace("future", [10:56:15.762] quietly = TRUE) [10:56:15.762] if (has_future) { [10:56:15.762] ns <- base::getNamespace("future") [10:56:15.762] version <- ns[[".package"]][["version"]] [10:56:15.762] if (is.null(version)) [10:56:15.762] version <- utils::packageVersion("future") [10:56:15.762] } [10:56:15.762] else { [10:56:15.762] version <- NULL [10:56:15.762] } [10:56:15.762] if (!has_future || version < "1.8.0") { [10:56:15.762] info <- base::c(r_version = base::gsub("R version ", [10:56:15.762] "", base::R.version$version.string), [10:56:15.762] platform = base::sprintf("%s (%s-bit)", [10:56:15.762] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.762] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.762] "release", "version")], collapse = " "), [10:56:15.762] hostname = base::Sys.info()[["nodename"]]) [10:56:15.762] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.762] info) [10:56:15.762] info <- base::paste(info, collapse = "; ") [10:56:15.762] if (!has_future) { [10:56:15.762] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.762] info) [10:56:15.762] } [10:56:15.762] else { [10:56:15.762] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.762] info, version) [10:56:15.762] } [10:56:15.762] base::stop(msg) [10:56:15.762] } [10:56:15.762] }) [10:56:15.762] } [10:56:15.762] ...future.strategy.old <- future::plan("list") [10:56:15.762] options(future.plan = NULL) [10:56:15.762] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.762] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.762] } [10:56:15.762] ...future.workdir <- getwd() [10:56:15.762] } [10:56:15.762] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.762] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.762] } [10:56:15.762] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.762] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.762] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.762] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.762] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.762] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.762] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.762] base::names(...future.oldOptions)) [10:56:15.762] } [10:56:15.762] if (FALSE) { [10:56:15.762] } [10:56:15.762] else { [10:56:15.762] if (TRUE) { [10:56:15.762] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.762] open = "w") [10:56:15.762] } [10:56:15.762] else { [10:56:15.762] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.762] windows = "NUL", "/dev/null"), open = "w") [10:56:15.762] } [10:56:15.762] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.762] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.762] base::sink(type = "output", split = FALSE) [10:56:15.762] base::close(...future.stdout) [10:56:15.762] }, add = TRUE) [10:56:15.762] } [10:56:15.762] ...future.frame <- base::sys.nframe() [10:56:15.762] ...future.conditions <- base::list() [10:56:15.762] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.762] if (FALSE) { [10:56:15.762] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.762] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.762] } [10:56:15.762] ...future.result <- base::tryCatch({ [10:56:15.762] base::withCallingHandlers({ [10:56:15.762] ...future.value <- base::withVisible(base::local(NA)) [10:56:15.762] future::FutureResult(value = ...future.value$value, [10:56:15.762] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.762] ...future.rng), globalenv = if (FALSE) [10:56:15.762] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.762] ...future.globalenv.names)) [10:56:15.762] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.762] }, condition = base::local({ [10:56:15.762] c <- base::c [10:56:15.762] inherits <- base::inherits [10:56:15.762] invokeRestart <- base::invokeRestart [10:56:15.762] length <- base::length [10:56:15.762] list <- base::list [10:56:15.762] seq.int <- base::seq.int [10:56:15.762] signalCondition <- base::signalCondition [10:56:15.762] sys.calls <- base::sys.calls [10:56:15.762] `[[` <- base::`[[` [10:56:15.762] `+` <- base::`+` [10:56:15.762] `<<-` <- base::`<<-` [10:56:15.762] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.762] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.762] 3L)] [10:56:15.762] } [10:56:15.762] function(cond) { [10:56:15.762] is_error <- inherits(cond, "error") [10:56:15.762] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.762] NULL) [10:56:15.762] if (is_error) { [10:56:15.762] sessionInformation <- function() { [10:56:15.762] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.762] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.762] search = base::search(), system = base::Sys.info()) [10:56:15.762] } [10:56:15.762] ...future.conditions[[length(...future.conditions) + [10:56:15.762] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.762] cond$call), session = sessionInformation(), [10:56:15.762] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.762] signalCondition(cond) [10:56:15.762] } [10:56:15.762] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.762] signal <- FALSE && inherits(cond, character(0)) [10:56:15.762] ...future.conditions[[length(...future.conditions) + [10:56:15.762] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.762] if (FALSE && !signal) { [10:56:15.762] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.762] { [10:56:15.762] inherits <- base::inherits [10:56:15.762] invokeRestart <- base::invokeRestart [10:56:15.762] is.null <- base::is.null [10:56:15.762] muffled <- FALSE [10:56:15.762] if (inherits(cond, "message")) { [10:56:15.762] muffled <- grepl(pattern, "muffleMessage") [10:56:15.762] if (muffled) [10:56:15.762] invokeRestart("muffleMessage") [10:56:15.762] } [10:56:15.762] else if (inherits(cond, "warning")) { [10:56:15.762] muffled <- grepl(pattern, "muffleWarning") [10:56:15.762] if (muffled) [10:56:15.762] invokeRestart("muffleWarning") [10:56:15.762] } [10:56:15.762] else if (inherits(cond, "condition")) { [10:56:15.762] if (!is.null(pattern)) { [10:56:15.762] computeRestarts <- base::computeRestarts [10:56:15.762] grepl <- base::grepl [10:56:15.762] restarts <- computeRestarts(cond) [10:56:15.762] for (restart in restarts) { [10:56:15.762] name <- restart$name [10:56:15.762] if (is.null(name)) [10:56:15.762] next [10:56:15.762] if (!grepl(pattern, name)) [10:56:15.762] next [10:56:15.762] invokeRestart(restart) [10:56:15.762] muffled <- TRUE [10:56:15.762] break [10:56:15.762] } [10:56:15.762] } [10:56:15.762] } [10:56:15.762] invisible(muffled) [10:56:15.762] } [10:56:15.762] muffleCondition(cond, pattern = "^muffle") [10:56:15.762] } [10:56:15.762] } [10:56:15.762] else { [10:56:15.762] if (TRUE) { [10:56:15.762] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.762] { [10:56:15.762] inherits <- base::inherits [10:56:15.762] invokeRestart <- base::invokeRestart [10:56:15.762] is.null <- base::is.null [10:56:15.762] muffled <- FALSE [10:56:15.762] if (inherits(cond, "message")) { [10:56:15.762] muffled <- grepl(pattern, "muffleMessage") [10:56:15.762] if (muffled) [10:56:15.762] invokeRestart("muffleMessage") [10:56:15.762] } [10:56:15.762] else if (inherits(cond, "warning")) { [10:56:15.762] muffled <- grepl(pattern, "muffleWarning") [10:56:15.762] if (muffled) [10:56:15.762] invokeRestart("muffleWarning") [10:56:15.762] } [10:56:15.762] else if (inherits(cond, "condition")) { [10:56:15.762] if (!is.null(pattern)) { [10:56:15.762] computeRestarts <- base::computeRestarts [10:56:15.762] grepl <- base::grepl [10:56:15.762] restarts <- computeRestarts(cond) [10:56:15.762] for (restart in restarts) { [10:56:15.762] name <- restart$name [10:56:15.762] if (is.null(name)) [10:56:15.762] next [10:56:15.762] if (!grepl(pattern, name)) [10:56:15.762] next [10:56:15.762] invokeRestart(restart) [10:56:15.762] muffled <- TRUE [10:56:15.762] break [10:56:15.762] } [10:56:15.762] } [10:56:15.762] } [10:56:15.762] invisible(muffled) [10:56:15.762] } [10:56:15.762] muffleCondition(cond, pattern = "^muffle") [10:56:15.762] } [10:56:15.762] } [10:56:15.762] } [10:56:15.762] })) [10:56:15.762] }, error = function(ex) { [10:56:15.762] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.762] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.762] ...future.rng), started = ...future.startTime, [10:56:15.762] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.762] version = "1.8"), class = "FutureResult") [10:56:15.762] }, finally = { [10:56:15.762] if (!identical(...future.workdir, getwd())) [10:56:15.762] setwd(...future.workdir) [10:56:15.762] { [10:56:15.762] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.762] ...future.oldOptions$nwarnings <- NULL [10:56:15.762] } [10:56:15.762] base::options(...future.oldOptions) [10:56:15.762] if (.Platform$OS.type == "windows") { [10:56:15.762] old_names <- names(...future.oldEnvVars) [10:56:15.762] envs <- base::Sys.getenv() [10:56:15.762] names <- names(envs) [10:56:15.762] common <- intersect(names, old_names) [10:56:15.762] added <- setdiff(names, old_names) [10:56:15.762] removed <- setdiff(old_names, names) [10:56:15.762] changed <- common[...future.oldEnvVars[common] != [10:56:15.762] envs[common]] [10:56:15.762] NAMES <- toupper(changed) [10:56:15.762] args <- list() [10:56:15.762] for (kk in seq_along(NAMES)) { [10:56:15.762] name <- changed[[kk]] [10:56:15.762] NAME <- NAMES[[kk]] [10:56:15.762] if (name != NAME && is.element(NAME, old_names)) [10:56:15.762] next [10:56:15.762] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.762] } [10:56:15.762] NAMES <- toupper(added) [10:56:15.762] for (kk in seq_along(NAMES)) { [10:56:15.762] name <- added[[kk]] [10:56:15.762] NAME <- NAMES[[kk]] [10:56:15.762] if (name != NAME && is.element(NAME, old_names)) [10:56:15.762] next [10:56:15.762] args[[name]] <- "" [10:56:15.762] } [10:56:15.762] NAMES <- toupper(removed) [10:56:15.762] for (kk in seq_along(NAMES)) { [10:56:15.762] name <- removed[[kk]] [10:56:15.762] NAME <- NAMES[[kk]] [10:56:15.762] if (name != NAME && is.element(NAME, old_names)) [10:56:15.762] next [10:56:15.762] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.762] } [10:56:15.762] if (length(args) > 0) [10:56:15.762] base::do.call(base::Sys.setenv, args = args) [10:56:15.762] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.762] } [10:56:15.762] else { [10:56:15.762] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.762] } [10:56:15.762] { [10:56:15.762] if (base::length(...future.futureOptionsAdded) > [10:56:15.762] 0L) { [10:56:15.762] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.762] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.762] base::options(opts) [10:56:15.762] } [10:56:15.762] { [10:56:15.762] NULL [10:56:15.762] options(future.plan = NULL) [10:56:15.762] if (is.na(NA_character_)) [10:56:15.762] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.762] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.762] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.762] .init = FALSE) [10:56:15.762] } [10:56:15.762] } [10:56:15.762] } [10:56:15.762] }) [10:56:15.762] if (TRUE) { [10:56:15.762] base::sink(type = "output", split = FALSE) [10:56:15.762] if (TRUE) { [10:56:15.762] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.762] } [10:56:15.762] else { [10:56:15.762] ...future.result["stdout"] <- base::list(NULL) [10:56:15.762] } [10:56:15.762] base::close(...future.stdout) [10:56:15.762] ...future.stdout <- NULL [10:56:15.762] } [10:56:15.762] ...future.result$conditions <- ...future.conditions [10:56:15.762] ...future.result$finished <- base::Sys.time() [10:56:15.762] ...future.result [10:56:15.762] } [10:56:15.872] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:15.872] plan(): nbrOfWorkers() = 2 > > message("*** Globals - manually ...") *** Globals - manually ... > > message("*** Globals manually specified as named list ...") *** Globals manually specified as named list ... > > globals <- list( + a = 1, + b = 2, + sumtwo = function(x) x[1] + x[2] + ) > > ## Assign 'globals' globally > attach_locally(globals) > > ## Truth > v0 <- local({ + x <- 1:10 + sumtwo(a + b * x) + }) > > > message("*** Globals - automatic ...") *** Globals - automatic ... > > attach_locally(globals) > f <- future({ + x <- 1:10 + sumtwo(a + b * x) + }, globals = TRUE) [10:56:15.875] getGlobalsAndPackages() ... [10:56:15.876] Searching for globals... [10:56:15.887] - globals found: [9] '{', '<-', ':', 'sumtwo', '+', 'a', '*', 'b', '[' [10:56:15.887] Searching for globals ... DONE [10:56:15.887] Resolving globals: FALSE [10:56:15.889] The total size of the 3 globals is 1.20 KiB (1232 bytes) [10:56:15.889] The total size of the 3 globals exported for future expression ('{; x <- 1:10; sumtwo(a + b * x); }') is 1.20 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'sumtwo' (1.09 KiB of class 'function'), 'a' (56 bytes of class 'numeric') and 'b' (56 bytes of class 'numeric') [10:56:15.890] - globals: [3] 'sumtwo', 'a', 'b' [10:56:15.890] [10:56:15.890] getGlobalsAndPackages() ... DONE [10:56:15.890] run() for 'Future' ... [10:56:15.891] - state: 'created' [10:56:15.891] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:15.893] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:15.894] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:15.894] - Field: 'label' [10:56:15.894] - Field: 'local' [10:56:15.894] - Field: 'owner' [10:56:15.894] - Field: 'envir' [10:56:15.894] - Field: 'packages' [10:56:15.895] - Field: 'gc' [10:56:15.895] - Field: 'conditions' [10:56:15.895] - Field: 'expr' [10:56:15.895] - Field: 'uuid' [10:56:15.895] - Field: 'seed' [10:56:15.895] - Field: 'version' [10:56:15.896] - Field: 'result' [10:56:15.896] - Field: 'asynchronous' [10:56:15.896] - Field: 'calls' [10:56:15.896] - Field: 'globals' [10:56:15.896] - Field: 'stdout' [10:56:15.897] - Field: 'earlySignal' [10:56:15.897] - Field: 'lazy' [10:56:15.897] - Field: 'state' [10:56:15.897] - Field: '.cluster' [10:56:15.897] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:15.897] - Launch lazy future ... [10:56:15.898] Packages needed by the future expression (n = 0): [10:56:15.898] Packages needed by future strategies (n = 0): [10:56:15.898] { [10:56:15.898] { [10:56:15.898] { [10:56:15.898] ...future.startTime <- base::Sys.time() [10:56:15.898] { [10:56:15.898] { [10:56:15.898] { [10:56:15.898] base::local({ [10:56:15.898] has_future <- base::requireNamespace("future", [10:56:15.898] quietly = TRUE) [10:56:15.898] if (has_future) { [10:56:15.898] ns <- base::getNamespace("future") [10:56:15.898] version <- ns[[".package"]][["version"]] [10:56:15.898] if (is.null(version)) [10:56:15.898] version <- utils::packageVersion("future") [10:56:15.898] } [10:56:15.898] else { [10:56:15.898] version <- NULL [10:56:15.898] } [10:56:15.898] if (!has_future || version < "1.8.0") { [10:56:15.898] info <- base::c(r_version = base::gsub("R version ", [10:56:15.898] "", base::R.version$version.string), [10:56:15.898] platform = base::sprintf("%s (%s-bit)", [10:56:15.898] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.898] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.898] "release", "version")], collapse = " "), [10:56:15.898] hostname = base::Sys.info()[["nodename"]]) [10:56:15.898] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.898] info) [10:56:15.898] info <- base::paste(info, collapse = "; ") [10:56:15.898] if (!has_future) { [10:56:15.898] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.898] info) [10:56:15.898] } [10:56:15.898] else { [10:56:15.898] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.898] info, version) [10:56:15.898] } [10:56:15.898] base::stop(msg) [10:56:15.898] } [10:56:15.898] }) [10:56:15.898] } [10:56:15.898] ...future.strategy.old <- future::plan("list") [10:56:15.898] options(future.plan = NULL) [10:56:15.898] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.898] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.898] } [10:56:15.898] ...future.workdir <- getwd() [10:56:15.898] } [10:56:15.898] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.898] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.898] } [10:56:15.898] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.898] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.898] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.898] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.898] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.898] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.898] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.898] base::names(...future.oldOptions)) [10:56:15.898] } [10:56:15.898] if (FALSE) { [10:56:15.898] } [10:56:15.898] else { [10:56:15.898] if (TRUE) { [10:56:15.898] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.898] open = "w") [10:56:15.898] } [10:56:15.898] else { [10:56:15.898] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.898] windows = "NUL", "/dev/null"), open = "w") [10:56:15.898] } [10:56:15.898] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.898] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.898] base::sink(type = "output", split = FALSE) [10:56:15.898] base::close(...future.stdout) [10:56:15.898] }, add = TRUE) [10:56:15.898] } [10:56:15.898] ...future.frame <- base::sys.nframe() [10:56:15.898] ...future.conditions <- base::list() [10:56:15.898] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.898] if (FALSE) { [10:56:15.898] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.898] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.898] } [10:56:15.898] ...future.result <- base::tryCatch({ [10:56:15.898] base::withCallingHandlers({ [10:56:15.898] ...future.value <- base::withVisible(base::local({ [10:56:15.898] x <- 1:10 [10:56:15.898] sumtwo(a + b * x) [10:56:15.898] })) [10:56:15.898] future::FutureResult(value = ...future.value$value, [10:56:15.898] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.898] ...future.rng), globalenv = if (FALSE) [10:56:15.898] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.898] ...future.globalenv.names)) [10:56:15.898] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.898] }, condition = base::local({ [10:56:15.898] c <- base::c [10:56:15.898] inherits <- base::inherits [10:56:15.898] invokeRestart <- base::invokeRestart [10:56:15.898] length <- base::length [10:56:15.898] list <- base::list [10:56:15.898] seq.int <- base::seq.int [10:56:15.898] signalCondition <- base::signalCondition [10:56:15.898] sys.calls <- base::sys.calls [10:56:15.898] `[[` <- base::`[[` [10:56:15.898] `+` <- base::`+` [10:56:15.898] `<<-` <- base::`<<-` [10:56:15.898] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.898] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.898] 3L)] [10:56:15.898] } [10:56:15.898] function(cond) { [10:56:15.898] is_error <- inherits(cond, "error") [10:56:15.898] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.898] NULL) [10:56:15.898] if (is_error) { [10:56:15.898] sessionInformation <- function() { [10:56:15.898] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.898] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.898] search = base::search(), system = base::Sys.info()) [10:56:15.898] } [10:56:15.898] ...future.conditions[[length(...future.conditions) + [10:56:15.898] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.898] cond$call), session = sessionInformation(), [10:56:15.898] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.898] signalCondition(cond) [10:56:15.898] } [10:56:15.898] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.898] signal <- FALSE && inherits(cond, character(0)) [10:56:15.898] ...future.conditions[[length(...future.conditions) + [10:56:15.898] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.898] if (FALSE && !signal) { [10:56:15.898] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.898] { [10:56:15.898] inherits <- base::inherits [10:56:15.898] invokeRestart <- base::invokeRestart [10:56:15.898] is.null <- base::is.null [10:56:15.898] muffled <- FALSE [10:56:15.898] if (inherits(cond, "message")) { [10:56:15.898] muffled <- grepl(pattern, "muffleMessage") [10:56:15.898] if (muffled) [10:56:15.898] invokeRestart("muffleMessage") [10:56:15.898] } [10:56:15.898] else if (inherits(cond, "warning")) { [10:56:15.898] muffled <- grepl(pattern, "muffleWarning") [10:56:15.898] if (muffled) [10:56:15.898] invokeRestart("muffleWarning") [10:56:15.898] } [10:56:15.898] else if (inherits(cond, "condition")) { [10:56:15.898] if (!is.null(pattern)) { [10:56:15.898] computeRestarts <- base::computeRestarts [10:56:15.898] grepl <- base::grepl [10:56:15.898] restarts <- computeRestarts(cond) [10:56:15.898] for (restart in restarts) { [10:56:15.898] name <- restart$name [10:56:15.898] if (is.null(name)) [10:56:15.898] next [10:56:15.898] if (!grepl(pattern, name)) [10:56:15.898] next [10:56:15.898] invokeRestart(restart) [10:56:15.898] muffled <- TRUE [10:56:15.898] break [10:56:15.898] } [10:56:15.898] } [10:56:15.898] } [10:56:15.898] invisible(muffled) [10:56:15.898] } [10:56:15.898] muffleCondition(cond, pattern = "^muffle") [10:56:15.898] } [10:56:15.898] } [10:56:15.898] else { [10:56:15.898] if (TRUE) { [10:56:15.898] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.898] { [10:56:15.898] inherits <- base::inherits [10:56:15.898] invokeRestart <- base::invokeRestart [10:56:15.898] is.null <- base::is.null [10:56:15.898] muffled <- FALSE [10:56:15.898] if (inherits(cond, "message")) { [10:56:15.898] muffled <- grepl(pattern, "muffleMessage") [10:56:15.898] if (muffled) [10:56:15.898] invokeRestart("muffleMessage") [10:56:15.898] } [10:56:15.898] else if (inherits(cond, "warning")) { [10:56:15.898] muffled <- grepl(pattern, "muffleWarning") [10:56:15.898] if (muffled) [10:56:15.898] invokeRestart("muffleWarning") [10:56:15.898] } [10:56:15.898] else if (inherits(cond, "condition")) { [10:56:15.898] if (!is.null(pattern)) { [10:56:15.898] computeRestarts <- base::computeRestarts [10:56:15.898] grepl <- base::grepl [10:56:15.898] restarts <- computeRestarts(cond) [10:56:15.898] for (restart in restarts) { [10:56:15.898] name <- restart$name [10:56:15.898] if (is.null(name)) [10:56:15.898] next [10:56:15.898] if (!grepl(pattern, name)) [10:56:15.898] next [10:56:15.898] invokeRestart(restart) [10:56:15.898] muffled <- TRUE [10:56:15.898] break [10:56:15.898] } [10:56:15.898] } [10:56:15.898] } [10:56:15.898] invisible(muffled) [10:56:15.898] } [10:56:15.898] muffleCondition(cond, pattern = "^muffle") [10:56:15.898] } [10:56:15.898] } [10:56:15.898] } [10:56:15.898] })) [10:56:15.898] }, error = function(ex) { [10:56:15.898] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.898] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.898] ...future.rng), started = ...future.startTime, [10:56:15.898] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.898] version = "1.8"), class = "FutureResult") [10:56:15.898] }, finally = { [10:56:15.898] if (!identical(...future.workdir, getwd())) [10:56:15.898] setwd(...future.workdir) [10:56:15.898] { [10:56:15.898] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.898] ...future.oldOptions$nwarnings <- NULL [10:56:15.898] } [10:56:15.898] base::options(...future.oldOptions) [10:56:15.898] if (.Platform$OS.type == "windows") { [10:56:15.898] old_names <- names(...future.oldEnvVars) [10:56:15.898] envs <- base::Sys.getenv() [10:56:15.898] names <- names(envs) [10:56:15.898] common <- intersect(names, old_names) [10:56:15.898] added <- setdiff(names, old_names) [10:56:15.898] removed <- setdiff(old_names, names) [10:56:15.898] changed <- common[...future.oldEnvVars[common] != [10:56:15.898] envs[common]] [10:56:15.898] NAMES <- toupper(changed) [10:56:15.898] args <- list() [10:56:15.898] for (kk in seq_along(NAMES)) { [10:56:15.898] name <- changed[[kk]] [10:56:15.898] NAME <- NAMES[[kk]] [10:56:15.898] if (name != NAME && is.element(NAME, old_names)) [10:56:15.898] next [10:56:15.898] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.898] } [10:56:15.898] NAMES <- toupper(added) [10:56:15.898] for (kk in seq_along(NAMES)) { [10:56:15.898] name <- added[[kk]] [10:56:15.898] NAME <- NAMES[[kk]] [10:56:15.898] if (name != NAME && is.element(NAME, old_names)) [10:56:15.898] next [10:56:15.898] args[[name]] <- "" [10:56:15.898] } [10:56:15.898] NAMES <- toupper(removed) [10:56:15.898] for (kk in seq_along(NAMES)) { [10:56:15.898] name <- removed[[kk]] [10:56:15.898] NAME <- NAMES[[kk]] [10:56:15.898] if (name != NAME && is.element(NAME, old_names)) [10:56:15.898] next [10:56:15.898] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.898] } [10:56:15.898] if (length(args) > 0) [10:56:15.898] base::do.call(base::Sys.setenv, args = args) [10:56:15.898] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.898] } [10:56:15.898] else { [10:56:15.898] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.898] } [10:56:15.898] { [10:56:15.898] if (base::length(...future.futureOptionsAdded) > [10:56:15.898] 0L) { [10:56:15.898] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.898] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.898] base::options(opts) [10:56:15.898] } [10:56:15.898] { [10:56:15.898] NULL [10:56:15.898] options(future.plan = NULL) [10:56:15.898] if (is.na(NA_character_)) [10:56:15.898] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.898] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.898] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.898] .init = FALSE) [10:56:15.898] } [10:56:15.898] } [10:56:15.898] } [10:56:15.898] }) [10:56:15.898] if (TRUE) { [10:56:15.898] base::sink(type = "output", split = FALSE) [10:56:15.898] if (TRUE) { [10:56:15.898] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.898] } [10:56:15.898] else { [10:56:15.898] ...future.result["stdout"] <- base::list(NULL) [10:56:15.898] } [10:56:15.898] base::close(...future.stdout) [10:56:15.898] ...future.stdout <- NULL [10:56:15.898] } [10:56:15.898] ...future.result$conditions <- ...future.conditions [10:56:15.898] ...future.result$finished <- base::Sys.time() [10:56:15.898] ...future.result [10:56:15.898] } [10:56:15.902] - Launch lazy future ... done [10:56:15.902] run() for 'MiraiFuture' ... done > print(f) MiraiFuture: Label: '' Expression: { x <- 1:10 sumtwo(a + b * x) } Lazy evaluation: FALSE Asynchronous evaluation: TRUE Local evaluation: TRUE Environment: R_GlobalEnv Capture standard output: TRUE Capture condition classes: 'condition' (excluding 'nothing') Globals: 3 objects totaling 1.20 KiB (function 'sumtwo' of 1.09 KiB, numeric 'a' of 56 bytes, numeric 'b' of 56 bytes) Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) [10:56:15.904] resolved() for 'MiraiFuture' ... [10:56:15.904] - state: 'running' [10:56:15.904] - run: TRUE [10:56:15.905] - result: 'NULL' [10:56:15.905] - resolved: FALSE [10:56:15.905] resolved() for 'MiraiFuture' ... done Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: d34f57d7-a67f-bea6-6aa1-5f5fedb288bd Class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' > rm(list = names(globals)) > y <- value(f) > print(y) [1] 8 > stopifnot(all.equal(y, v0)) > > attach_locally(globals) > y %<-% { + x <- 1:10 + sumtwo(a + b * x) + } %globals% TRUE [10:56:15.908] getGlobalsAndPackages() ... [10:56:15.908] Searching for globals... [10:56:15.911] - globals found: [9] '{', '<-', ':', 'sumtwo', '+', 'a', '*', 'b', '[' [10:56:15.911] Searching for globals ... DONE [10:56:15.911] Resolving globals: FALSE [10:56:15.912] The total size of the 3 globals is 1.20 KiB (1232 bytes) [10:56:15.912] The total size of the 3 globals exported for future expression ('{; x <- 1:10; sumtwo(a + b * x); }') is 1.20 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'sumtwo' (1.09 KiB of class 'function'), 'a' (56 bytes of class 'numeric') and 'b' (56 bytes of class 'numeric') [10:56:15.913] - globals: [3] 'sumtwo', 'a', 'b' [10:56:15.913] [10:56:15.913] getGlobalsAndPackages() ... DONE [10:56:15.913] run() for 'Future' ... [10:56:15.914] - state: 'created' [10:56:15.914] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:15.918] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:15.918] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:15.919] - Field: 'label' [10:56:15.919] - Field: 'local' [10:56:15.919] - Field: 'owner' [10:56:15.919] - Field: 'envir' [10:56:15.919] - Field: 'packages' [10:56:15.920] - Field: 'gc' [10:56:15.920] - Field: 'conditions' [10:56:15.920] - Field: 'expr' [10:56:15.920] - Field: 'uuid' [10:56:15.920] - Field: 'seed' [10:56:15.920] - Field: 'version' [10:56:15.921] - Field: 'result' [10:56:15.921] - Field: 'asynchronous' [10:56:15.921] - Field: 'calls' [10:56:15.921] - Field: 'globals' [10:56:15.921] - Field: 'stdout' [10:56:15.921] - Field: 'earlySignal' [10:56:15.922] - Field: 'lazy' [10:56:15.922] - Field: 'state' [10:56:15.922] - Field: '.cluster' [10:56:15.922] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:15.922] - Launch lazy future ... [10:56:15.922] Packages needed by the future expression (n = 0): [10:56:15.923] Packages needed by future strategies (n = 0): [10:56:15.923] { [10:56:15.923] { [10:56:15.923] { [10:56:15.923] ...future.startTime <- base::Sys.time() [10:56:15.923] { [10:56:15.923] { [10:56:15.923] { [10:56:15.923] base::local({ [10:56:15.923] has_future <- base::requireNamespace("future", [10:56:15.923] quietly = TRUE) [10:56:15.923] if (has_future) { [10:56:15.923] ns <- base::getNamespace("future") [10:56:15.923] version <- ns[[".package"]][["version"]] [10:56:15.923] if (is.null(version)) [10:56:15.923] version <- utils::packageVersion("future") [10:56:15.923] } [10:56:15.923] else { [10:56:15.923] version <- NULL [10:56:15.923] } [10:56:15.923] if (!has_future || version < "1.8.0") { [10:56:15.923] info <- base::c(r_version = base::gsub("R version ", [10:56:15.923] "", base::R.version$version.string), [10:56:15.923] platform = base::sprintf("%s (%s-bit)", [10:56:15.923] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.923] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.923] "release", "version")], collapse = " "), [10:56:15.923] hostname = base::Sys.info()[["nodename"]]) [10:56:15.923] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.923] info) [10:56:15.923] info <- base::paste(info, collapse = "; ") [10:56:15.923] if (!has_future) { [10:56:15.923] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.923] info) [10:56:15.923] } [10:56:15.923] else { [10:56:15.923] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.923] info, version) [10:56:15.923] } [10:56:15.923] base::stop(msg) [10:56:15.923] } [10:56:15.923] }) [10:56:15.923] } [10:56:15.923] ...future.strategy.old <- future::plan("list") [10:56:15.923] options(future.plan = NULL) [10:56:15.923] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.923] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.923] } [10:56:15.923] ...future.workdir <- getwd() [10:56:15.923] } [10:56:15.923] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.923] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.923] } [10:56:15.923] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.923] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.923] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.923] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.923] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.923] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.923] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.923] base::names(...future.oldOptions)) [10:56:15.923] } [10:56:15.923] if (FALSE) { [10:56:15.923] } [10:56:15.923] else { [10:56:15.923] if (TRUE) { [10:56:15.923] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.923] open = "w") [10:56:15.923] } [10:56:15.923] else { [10:56:15.923] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.923] windows = "NUL", "/dev/null"), open = "w") [10:56:15.923] } [10:56:15.923] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.923] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.923] base::sink(type = "output", split = FALSE) [10:56:15.923] base::close(...future.stdout) [10:56:15.923] }, add = TRUE) [10:56:15.923] } [10:56:15.923] ...future.frame <- base::sys.nframe() [10:56:15.923] ...future.conditions <- base::list() [10:56:15.923] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.923] if (FALSE) { [10:56:15.923] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.923] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.923] } [10:56:15.923] ...future.result <- base::tryCatch({ [10:56:15.923] base::withCallingHandlers({ [10:56:15.923] ...future.value <- base::withVisible(base::local({ [10:56:15.923] x <- 1:10 [10:56:15.923] sumtwo(a + b * x) [10:56:15.923] })) [10:56:15.923] future::FutureResult(value = ...future.value$value, [10:56:15.923] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.923] ...future.rng), globalenv = if (FALSE) [10:56:15.923] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.923] ...future.globalenv.names)) [10:56:15.923] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.923] }, condition = base::local({ [10:56:15.923] c <- base::c [10:56:15.923] inherits <- base::inherits [10:56:15.923] invokeRestart <- base::invokeRestart [10:56:15.923] length <- base::length [10:56:15.923] list <- base::list [10:56:15.923] seq.int <- base::seq.int [10:56:15.923] signalCondition <- base::signalCondition [10:56:15.923] sys.calls <- base::sys.calls [10:56:15.923] `[[` <- base::`[[` [10:56:15.923] `+` <- base::`+` [10:56:15.923] `<<-` <- base::`<<-` [10:56:15.923] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.923] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.923] 3L)] [10:56:15.923] } [10:56:15.923] function(cond) { [10:56:15.923] is_error <- inherits(cond, "error") [10:56:15.923] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.923] NULL) [10:56:15.923] if (is_error) { [10:56:15.923] sessionInformation <- function() { [10:56:15.923] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.923] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.923] search = base::search(), system = base::Sys.info()) [10:56:15.923] } [10:56:15.923] ...future.conditions[[length(...future.conditions) + [10:56:15.923] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.923] cond$call), session = sessionInformation(), [10:56:15.923] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.923] signalCondition(cond) [10:56:15.923] } [10:56:15.923] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.923] signal <- FALSE && inherits(cond, character(0)) [10:56:15.923] ...future.conditions[[length(...future.conditions) + [10:56:15.923] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.923] if (FALSE && !signal) { [10:56:15.923] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.923] { [10:56:15.923] inherits <- base::inherits [10:56:15.923] invokeRestart <- base::invokeRestart [10:56:15.923] is.null <- base::is.null [10:56:15.923] muffled <- FALSE [10:56:15.923] if (inherits(cond, "message")) { [10:56:15.923] muffled <- grepl(pattern, "muffleMessage") [10:56:15.923] if (muffled) [10:56:15.923] invokeRestart("muffleMessage") [10:56:15.923] } [10:56:15.923] else if (inherits(cond, "warning")) { [10:56:15.923] muffled <- grepl(pattern, "muffleWarning") [10:56:15.923] if (muffled) [10:56:15.923] invokeRestart("muffleWarning") [10:56:15.923] } [10:56:15.923] else if (inherits(cond, "condition")) { [10:56:15.923] if (!is.null(pattern)) { [10:56:15.923] computeRestarts <- base::computeRestarts [10:56:15.923] grepl <- base::grepl [10:56:15.923] restarts <- computeRestarts(cond) [10:56:15.923] for (restart in restarts) { [10:56:15.923] name <- restart$name [10:56:15.923] if (is.null(name)) [10:56:15.923] next [10:56:15.923] if (!grepl(pattern, name)) [10:56:15.923] next [10:56:15.923] invokeRestart(restart) [10:56:15.923] muffled <- TRUE [10:56:15.923] break [10:56:15.923] } [10:56:15.923] } [10:56:15.923] } [10:56:15.923] invisible(muffled) [10:56:15.923] } [10:56:15.923] muffleCondition(cond, pattern = "^muffle") [10:56:15.923] } [10:56:15.923] } [10:56:15.923] else { [10:56:15.923] if (TRUE) { [10:56:15.923] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.923] { [10:56:15.923] inherits <- base::inherits [10:56:15.923] invokeRestart <- base::invokeRestart [10:56:15.923] is.null <- base::is.null [10:56:15.923] muffled <- FALSE [10:56:15.923] if (inherits(cond, "message")) { [10:56:15.923] muffled <- grepl(pattern, "muffleMessage") [10:56:15.923] if (muffled) [10:56:15.923] invokeRestart("muffleMessage") [10:56:15.923] } [10:56:15.923] else if (inherits(cond, "warning")) { [10:56:15.923] muffled <- grepl(pattern, "muffleWarning") [10:56:15.923] if (muffled) [10:56:15.923] invokeRestart("muffleWarning") [10:56:15.923] } [10:56:15.923] else if (inherits(cond, "condition")) { [10:56:15.923] if (!is.null(pattern)) { [10:56:15.923] computeRestarts <- base::computeRestarts [10:56:15.923] grepl <- base::grepl [10:56:15.923] restarts <- computeRestarts(cond) [10:56:15.923] for (restart in restarts) { [10:56:15.923] name <- restart$name [10:56:15.923] if (is.null(name)) [10:56:15.923] next [10:56:15.923] if (!grepl(pattern, name)) [10:56:15.923] next [10:56:15.923] invokeRestart(restart) [10:56:15.923] muffled <- TRUE [10:56:15.923] break [10:56:15.923] } [10:56:15.923] } [10:56:15.923] } [10:56:15.923] invisible(muffled) [10:56:15.923] } [10:56:15.923] muffleCondition(cond, pattern = "^muffle") [10:56:15.923] } [10:56:15.923] } [10:56:15.923] } [10:56:15.923] })) [10:56:15.923] }, error = function(ex) { [10:56:15.923] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.923] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.923] ...future.rng), started = ...future.startTime, [10:56:15.923] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.923] version = "1.8"), class = "FutureResult") [10:56:15.923] }, finally = { [10:56:15.923] if (!identical(...future.workdir, getwd())) [10:56:15.923] setwd(...future.workdir) [10:56:15.923] { [10:56:15.923] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.923] ...future.oldOptions$nwarnings <- NULL [10:56:15.923] } [10:56:15.923] base::options(...future.oldOptions) [10:56:15.923] if (.Platform$OS.type == "windows") { [10:56:15.923] old_names <- names(...future.oldEnvVars) [10:56:15.923] envs <- base::Sys.getenv() [10:56:15.923] names <- names(envs) [10:56:15.923] common <- intersect(names, old_names) [10:56:15.923] added <- setdiff(names, old_names) [10:56:15.923] removed <- setdiff(old_names, names) [10:56:15.923] changed <- common[...future.oldEnvVars[common] != [10:56:15.923] envs[common]] [10:56:15.923] NAMES <- toupper(changed) [10:56:15.923] args <- list() [10:56:15.923] for (kk in seq_along(NAMES)) { [10:56:15.923] name <- changed[[kk]] [10:56:15.923] NAME <- NAMES[[kk]] [10:56:15.923] if (name != NAME && is.element(NAME, old_names)) [10:56:15.923] next [10:56:15.923] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.923] } [10:56:15.923] NAMES <- toupper(added) [10:56:15.923] for (kk in seq_along(NAMES)) { [10:56:15.923] name <- added[[kk]] [10:56:15.923] NAME <- NAMES[[kk]] [10:56:15.923] if (name != NAME && is.element(NAME, old_names)) [10:56:15.923] next [10:56:15.923] args[[name]] <- "" [10:56:15.923] } [10:56:15.923] NAMES <- toupper(removed) [10:56:15.923] for (kk in seq_along(NAMES)) { [10:56:15.923] name <- removed[[kk]] [10:56:15.923] NAME <- NAMES[[kk]] [10:56:15.923] if (name != NAME && is.element(NAME, old_names)) [10:56:15.923] next [10:56:15.923] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.923] } [10:56:15.923] if (length(args) > 0) [10:56:15.923] base::do.call(base::Sys.setenv, args = args) [10:56:15.923] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.923] } [10:56:15.923] else { [10:56:15.923] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.923] } [10:56:15.923] { [10:56:15.923] if (base::length(...future.futureOptionsAdded) > [10:56:15.923] 0L) { [10:56:15.923] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.923] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.923] base::options(opts) [10:56:15.923] } [10:56:15.923] { [10:56:15.923] NULL [10:56:15.923] options(future.plan = NULL) [10:56:15.923] if (is.na(NA_character_)) [10:56:15.923] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.923] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.923] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.923] .init = FALSE) [10:56:15.923] } [10:56:15.923] } [10:56:15.923] } [10:56:15.923] }) [10:56:15.923] if (TRUE) { [10:56:15.923] base::sink(type = "output", split = FALSE) [10:56:15.923] if (TRUE) { [10:56:15.923] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.923] } [10:56:15.923] else { [10:56:15.923] ...future.result["stdout"] <- base::list(NULL) [10:56:15.923] } [10:56:15.923] base::close(...future.stdout) [10:56:15.923] ...future.stdout <- NULL [10:56:15.923] } [10:56:15.923] ...future.result$conditions <- ...future.conditions [10:56:15.923] ...future.result$finished <- base::Sys.time() [10:56:15.923] ...future.result [10:56:15.923] } [10:56:15.927] - Launch lazy future ... done [10:56:15.927] run() for 'MiraiFuture' ... done > rm(list = names(globals)) > print(y) [1] 8 > stopifnot(all.equal(y, v0)) > > ## No need to search for globals > y %<-% { 1 } %globals% FALSE [10:56:15.931] getGlobalsAndPackages() ... [10:56:15.931] Not searching for globals [10:56:15.931] - globals: [0] [10:56:15.932] getGlobalsAndPackages() ... DONE [10:56:15.932] run() for 'Future' ... [10:56:15.932] - state: 'created' [10:56:15.932] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:15.935] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:15.935] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:15.935] - Field: 'label' [10:56:15.935] - Field: 'local' [10:56:15.935] - Field: 'owner' [10:56:15.936] - Field: 'envir' [10:56:15.936] - Field: 'packages' [10:56:15.936] - Field: 'gc' [10:56:15.936] - Field: 'conditions' [10:56:15.936] - Field: 'expr' [10:56:15.936] - Field: 'uuid' [10:56:15.937] - Field: 'seed' [10:56:15.937] - Field: 'version' [10:56:15.937] - Field: 'result' [10:56:15.937] - Field: 'asynchronous' [10:56:15.937] - Field: 'calls' [10:56:15.937] - Field: 'globals' [10:56:15.938] - Field: 'stdout' [10:56:15.938] - Field: 'earlySignal' [10:56:15.938] - Field: 'lazy' [10:56:15.938] - Field: 'state' [10:56:15.938] - Field: '.cluster' [10:56:15.938] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:15.939] - Launch lazy future ... [10:56:15.939] Packages needed by the future expression (n = 0): [10:56:15.939] Packages needed by future strategies (n = 0): [10:56:15.940] { [10:56:15.940] { [10:56:15.940] { [10:56:15.940] ...future.startTime <- base::Sys.time() [10:56:15.940] { [10:56:15.940] { [10:56:15.940] { [10:56:15.940] base::local({ [10:56:15.940] has_future <- base::requireNamespace("future", [10:56:15.940] quietly = TRUE) [10:56:15.940] if (has_future) { [10:56:15.940] ns <- base::getNamespace("future") [10:56:15.940] version <- ns[[".package"]][["version"]] [10:56:15.940] if (is.null(version)) [10:56:15.940] version <- utils::packageVersion("future") [10:56:15.940] } [10:56:15.940] else { [10:56:15.940] version <- NULL [10:56:15.940] } [10:56:15.940] if (!has_future || version < "1.8.0") { [10:56:15.940] info <- base::c(r_version = base::gsub("R version ", [10:56:15.940] "", base::R.version$version.string), [10:56:15.940] platform = base::sprintf("%s (%s-bit)", [10:56:15.940] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.940] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.940] "release", "version")], collapse = " "), [10:56:15.940] hostname = base::Sys.info()[["nodename"]]) [10:56:15.940] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.940] info) [10:56:15.940] info <- base::paste(info, collapse = "; ") [10:56:15.940] if (!has_future) { [10:56:15.940] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.940] info) [10:56:15.940] } [10:56:15.940] else { [10:56:15.940] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.940] info, version) [10:56:15.940] } [10:56:15.940] base::stop(msg) [10:56:15.940] } [10:56:15.940] }) [10:56:15.940] } [10:56:15.940] ...future.strategy.old <- future::plan("list") [10:56:15.940] options(future.plan = NULL) [10:56:15.940] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.940] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.940] } [10:56:15.940] ...future.workdir <- getwd() [10:56:15.940] } [10:56:15.940] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.940] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.940] } [10:56:15.940] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.940] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.940] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.940] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.940] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.940] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.940] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.940] base::names(...future.oldOptions)) [10:56:15.940] } [10:56:15.940] if (FALSE) { [10:56:15.940] } [10:56:15.940] else { [10:56:15.940] if (TRUE) { [10:56:15.940] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.940] open = "w") [10:56:15.940] } [10:56:15.940] else { [10:56:15.940] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.940] windows = "NUL", "/dev/null"), open = "w") [10:56:15.940] } [10:56:15.940] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.940] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.940] base::sink(type = "output", split = FALSE) [10:56:15.940] base::close(...future.stdout) [10:56:15.940] }, add = TRUE) [10:56:15.940] } [10:56:15.940] ...future.frame <- base::sys.nframe() [10:56:15.940] ...future.conditions <- base::list() [10:56:15.940] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.940] if (FALSE) { [10:56:15.940] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.940] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.940] } [10:56:15.940] ...future.result <- base::tryCatch({ [10:56:15.940] base::withCallingHandlers({ [10:56:15.940] ...future.value <- base::withVisible(base::local({ [10:56:15.940] 1 [10:56:15.940] })) [10:56:15.940] future::FutureResult(value = ...future.value$value, [10:56:15.940] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.940] ...future.rng), globalenv = if (FALSE) [10:56:15.940] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.940] ...future.globalenv.names)) [10:56:15.940] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.940] }, condition = base::local({ [10:56:15.940] c <- base::c [10:56:15.940] inherits <- base::inherits [10:56:15.940] invokeRestart <- base::invokeRestart [10:56:15.940] length <- base::length [10:56:15.940] list <- base::list [10:56:15.940] seq.int <- base::seq.int [10:56:15.940] signalCondition <- base::signalCondition [10:56:15.940] sys.calls <- base::sys.calls [10:56:15.940] `[[` <- base::`[[` [10:56:15.940] `+` <- base::`+` [10:56:15.940] `<<-` <- base::`<<-` [10:56:15.940] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.940] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.940] 3L)] [10:56:15.940] } [10:56:15.940] function(cond) { [10:56:15.940] is_error <- inherits(cond, "error") [10:56:15.940] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.940] NULL) [10:56:15.940] if (is_error) { [10:56:15.940] sessionInformation <- function() { [10:56:15.940] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.940] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.940] search = base::search(), system = base::Sys.info()) [10:56:15.940] } [10:56:15.940] ...future.conditions[[length(...future.conditions) + [10:56:15.940] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.940] cond$call), session = sessionInformation(), [10:56:15.940] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.940] signalCondition(cond) [10:56:15.940] } [10:56:15.940] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.940] signal <- FALSE && inherits(cond, character(0)) [10:56:15.940] ...future.conditions[[length(...future.conditions) + [10:56:15.940] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.940] if (FALSE && !signal) { [10:56:15.940] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.940] { [10:56:15.940] inherits <- base::inherits [10:56:15.940] invokeRestart <- base::invokeRestart [10:56:15.940] is.null <- base::is.null [10:56:15.940] muffled <- FALSE [10:56:15.940] if (inherits(cond, "message")) { [10:56:15.940] muffled <- grepl(pattern, "muffleMessage") [10:56:15.940] if (muffled) [10:56:15.940] invokeRestart("muffleMessage") [10:56:15.940] } [10:56:15.940] else if (inherits(cond, "warning")) { [10:56:15.940] muffled <- grepl(pattern, "muffleWarning") [10:56:15.940] if (muffled) [10:56:15.940] invokeRestart("muffleWarning") [10:56:15.940] } [10:56:15.940] else if (inherits(cond, "condition")) { [10:56:15.940] if (!is.null(pattern)) { [10:56:15.940] computeRestarts <- base::computeRestarts [10:56:15.940] grepl <- base::grepl [10:56:15.940] restarts <- computeRestarts(cond) [10:56:15.940] for (restart in restarts) { [10:56:15.940] name <- restart$name [10:56:15.940] if (is.null(name)) [10:56:15.940] next [10:56:15.940] if (!grepl(pattern, name)) [10:56:15.940] next [10:56:15.940] invokeRestart(restart) [10:56:15.940] muffled <- TRUE [10:56:15.940] break [10:56:15.940] } [10:56:15.940] } [10:56:15.940] } [10:56:15.940] invisible(muffled) [10:56:15.940] } [10:56:15.940] muffleCondition(cond, pattern = "^muffle") [10:56:15.940] } [10:56:15.940] } [10:56:15.940] else { [10:56:15.940] if (TRUE) { [10:56:15.940] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.940] { [10:56:15.940] inherits <- base::inherits [10:56:15.940] invokeRestart <- base::invokeRestart [10:56:15.940] is.null <- base::is.null [10:56:15.940] muffled <- FALSE [10:56:15.940] if (inherits(cond, "message")) { [10:56:15.940] muffled <- grepl(pattern, "muffleMessage") [10:56:15.940] if (muffled) [10:56:15.940] invokeRestart("muffleMessage") [10:56:15.940] } [10:56:15.940] else if (inherits(cond, "warning")) { [10:56:15.940] muffled <- grepl(pattern, "muffleWarning") [10:56:15.940] if (muffled) [10:56:15.940] invokeRestart("muffleWarning") [10:56:15.940] } [10:56:15.940] else if (inherits(cond, "condition")) { [10:56:15.940] if (!is.null(pattern)) { [10:56:15.940] computeRestarts <- base::computeRestarts [10:56:15.940] grepl <- base::grepl [10:56:15.940] restarts <- computeRestarts(cond) [10:56:15.940] for (restart in restarts) { [10:56:15.940] name <- restart$name [10:56:15.940] if (is.null(name)) [10:56:15.940] next [10:56:15.940] if (!grepl(pattern, name)) [10:56:15.940] next [10:56:15.940] invokeRestart(restart) [10:56:15.940] muffled <- TRUE [10:56:15.940] break [10:56:15.940] } [10:56:15.940] } [10:56:15.940] } [10:56:15.940] invisible(muffled) [10:56:15.940] } [10:56:15.940] muffleCondition(cond, pattern = "^muffle") [10:56:15.940] } [10:56:15.940] } [10:56:15.940] } [10:56:15.940] })) [10:56:15.940] }, error = function(ex) { [10:56:15.940] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.940] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.940] ...future.rng), started = ...future.startTime, [10:56:15.940] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.940] version = "1.8"), class = "FutureResult") [10:56:15.940] }, finally = { [10:56:15.940] if (!identical(...future.workdir, getwd())) [10:56:15.940] setwd(...future.workdir) [10:56:15.940] { [10:56:15.940] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.940] ...future.oldOptions$nwarnings <- NULL [10:56:15.940] } [10:56:15.940] base::options(...future.oldOptions) [10:56:15.940] if (.Platform$OS.type == "windows") { [10:56:15.940] old_names <- names(...future.oldEnvVars) [10:56:15.940] envs <- base::Sys.getenv() [10:56:15.940] names <- names(envs) [10:56:15.940] common <- intersect(names, old_names) [10:56:15.940] added <- setdiff(names, old_names) [10:56:15.940] removed <- setdiff(old_names, names) [10:56:15.940] changed <- common[...future.oldEnvVars[common] != [10:56:15.940] envs[common]] [10:56:15.940] NAMES <- toupper(changed) [10:56:15.940] args <- list() [10:56:15.940] for (kk in seq_along(NAMES)) { [10:56:15.940] name <- changed[[kk]] [10:56:15.940] NAME <- NAMES[[kk]] [10:56:15.940] if (name != NAME && is.element(NAME, old_names)) [10:56:15.940] next [10:56:15.940] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.940] } [10:56:15.940] NAMES <- toupper(added) [10:56:15.940] for (kk in seq_along(NAMES)) { [10:56:15.940] name <- added[[kk]] [10:56:15.940] NAME <- NAMES[[kk]] [10:56:15.940] if (name != NAME && is.element(NAME, old_names)) [10:56:15.940] next [10:56:15.940] args[[name]] <- "" [10:56:15.940] } [10:56:15.940] NAMES <- toupper(removed) [10:56:15.940] for (kk in seq_along(NAMES)) { [10:56:15.940] name <- removed[[kk]] [10:56:15.940] NAME <- NAMES[[kk]] [10:56:15.940] if (name != NAME && is.element(NAME, old_names)) [10:56:15.940] next [10:56:15.940] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.940] } [10:56:15.940] if (length(args) > 0) [10:56:15.940] base::do.call(base::Sys.setenv, args = args) [10:56:15.940] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.940] } [10:56:15.940] else { [10:56:15.940] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.940] } [10:56:15.940] { [10:56:15.940] if (base::length(...future.futureOptionsAdded) > [10:56:15.940] 0L) { [10:56:15.940] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.940] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.940] base::options(opts) [10:56:15.940] } [10:56:15.940] { [10:56:15.940] NULL [10:56:15.940] options(future.plan = NULL) [10:56:15.940] if (is.na(NA_character_)) [10:56:15.940] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.940] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.940] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.940] .init = FALSE) [10:56:15.940] } [10:56:15.940] } [10:56:15.940] } [10:56:15.940] }) [10:56:15.940] if (TRUE) { [10:56:15.940] base::sink(type = "output", split = FALSE) [10:56:15.940] if (TRUE) { [10:56:15.940] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.940] } [10:56:15.940] else { [10:56:15.940] ...future.result["stdout"] <- base::list(NULL) [10:56:15.940] } [10:56:15.940] base::close(...future.stdout) [10:56:15.940] ...future.stdout <- NULL [10:56:15.940] } [10:56:15.940] ...future.result$conditions <- ...future.conditions [10:56:15.940] ...future.result$finished <- base::Sys.time() [10:56:15.940] ...future.result [10:56:15.940] } [10:56:15.943] - Launch lazy future ... done [10:56:15.943] run() for 'MiraiFuture' ... done > print(y) [1] 1 > stopifnot(identical(y, 1)) > > ## Exception - missing global > attach_locally(globals) > f <- future({ + x <- 1:10 + sumtwo(a + b * x) + }, globals = FALSE) [10:56:15.946] getGlobalsAndPackages() ... [10:56:15.946] Not searching for globals [10:56:15.946] - globals: [0] [10:56:15.946] getGlobalsAndPackages() ... DONE [10:56:15.946] run() for 'Future' ... [10:56:15.947] - state: 'created' [10:56:15.947] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:15.949] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:15.949] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:15.950] - Field: 'label' [10:56:15.950] - Field: 'local' [10:56:15.950] - Field: 'owner' [10:56:15.950] - Field: 'envir' [10:56:15.950] - Field: 'packages' [10:56:15.950] - Field: 'gc' [10:56:15.951] - Field: 'conditions' [10:56:15.951] - Field: 'expr' [10:56:15.951] - Field: 'uuid' [10:56:15.951] - Field: 'seed' [10:56:15.951] - Field: 'version' [10:56:15.951] - Field: 'result' [10:56:15.952] - Field: 'asynchronous' [10:56:15.952] - Field: 'calls' [10:56:15.952] - Field: 'globals' [10:56:15.952] - Field: 'stdout' [10:56:15.952] - Field: 'earlySignal' [10:56:15.952] - Field: 'lazy' [10:56:15.953] - Field: 'state' [10:56:15.953] - Field: '.cluster' [10:56:15.953] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:15.953] - Launch lazy future ... [10:56:15.953] Packages needed by the future expression (n = 0): [10:56:15.954] Packages needed by future strategies (n = 0): [10:56:15.954] { [10:56:15.954] { [10:56:15.954] { [10:56:15.954] ...future.startTime <- base::Sys.time() [10:56:15.954] { [10:56:15.954] { [10:56:15.954] { [10:56:15.954] base::local({ [10:56:15.954] has_future <- base::requireNamespace("future", [10:56:15.954] quietly = TRUE) [10:56:15.954] if (has_future) { [10:56:15.954] ns <- base::getNamespace("future") [10:56:15.954] version <- ns[[".package"]][["version"]] [10:56:15.954] if (is.null(version)) [10:56:15.954] version <- utils::packageVersion("future") [10:56:15.954] } [10:56:15.954] else { [10:56:15.954] version <- NULL [10:56:15.954] } [10:56:15.954] if (!has_future || version < "1.8.0") { [10:56:15.954] info <- base::c(r_version = base::gsub("R version ", [10:56:15.954] "", base::R.version$version.string), [10:56:15.954] platform = base::sprintf("%s (%s-bit)", [10:56:15.954] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.954] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.954] "release", "version")], collapse = " "), [10:56:15.954] hostname = base::Sys.info()[["nodename"]]) [10:56:15.954] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.954] info) [10:56:15.954] info <- base::paste(info, collapse = "; ") [10:56:15.954] if (!has_future) { [10:56:15.954] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.954] info) [10:56:15.954] } [10:56:15.954] else { [10:56:15.954] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.954] info, version) [10:56:15.954] } [10:56:15.954] base::stop(msg) [10:56:15.954] } [10:56:15.954] }) [10:56:15.954] } [10:56:15.954] ...future.strategy.old <- future::plan("list") [10:56:15.954] options(future.plan = NULL) [10:56:15.954] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.954] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.954] } [10:56:15.954] ...future.workdir <- getwd() [10:56:15.954] } [10:56:15.954] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.954] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.954] } [10:56:15.954] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.954] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.954] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.954] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.954] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.954] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.954] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.954] base::names(...future.oldOptions)) [10:56:15.954] } [10:56:15.954] if (FALSE) { [10:56:15.954] } [10:56:15.954] else { [10:56:15.954] if (TRUE) { [10:56:15.954] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.954] open = "w") [10:56:15.954] } [10:56:15.954] else { [10:56:15.954] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.954] windows = "NUL", "/dev/null"), open = "w") [10:56:15.954] } [10:56:15.954] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.954] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.954] base::sink(type = "output", split = FALSE) [10:56:15.954] base::close(...future.stdout) [10:56:15.954] }, add = TRUE) [10:56:15.954] } [10:56:15.954] ...future.frame <- base::sys.nframe() [10:56:15.954] ...future.conditions <- base::list() [10:56:15.954] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.954] if (FALSE) { [10:56:15.954] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.954] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.954] } [10:56:15.954] ...future.result <- base::tryCatch({ [10:56:15.954] base::withCallingHandlers({ [10:56:15.954] ...future.value <- base::withVisible(base::local({ [10:56:15.954] x <- 1:10 [10:56:15.954] sumtwo(a + b * x) [10:56:15.954] })) [10:56:15.954] future::FutureResult(value = ...future.value$value, [10:56:15.954] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.954] ...future.rng), globalenv = if (FALSE) [10:56:15.954] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.954] ...future.globalenv.names)) [10:56:15.954] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.954] }, condition = base::local({ [10:56:15.954] c <- base::c [10:56:15.954] inherits <- base::inherits [10:56:15.954] invokeRestart <- base::invokeRestart [10:56:15.954] length <- base::length [10:56:15.954] list <- base::list [10:56:15.954] seq.int <- base::seq.int [10:56:15.954] signalCondition <- base::signalCondition [10:56:15.954] sys.calls <- base::sys.calls [10:56:15.954] `[[` <- base::`[[` [10:56:15.954] `+` <- base::`+` [10:56:15.954] `<<-` <- base::`<<-` [10:56:15.954] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.954] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.954] 3L)] [10:56:15.954] } [10:56:15.954] function(cond) { [10:56:15.954] is_error <- inherits(cond, "error") [10:56:15.954] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.954] NULL) [10:56:15.954] if (is_error) { [10:56:15.954] sessionInformation <- function() { [10:56:15.954] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.954] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.954] search = base::search(), system = base::Sys.info()) [10:56:15.954] } [10:56:15.954] ...future.conditions[[length(...future.conditions) + [10:56:15.954] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.954] cond$call), session = sessionInformation(), [10:56:15.954] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.954] signalCondition(cond) [10:56:15.954] } [10:56:15.954] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.954] signal <- FALSE && inherits(cond, character(0)) [10:56:15.954] ...future.conditions[[length(...future.conditions) + [10:56:15.954] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.954] if (FALSE && !signal) { [10:56:15.954] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.954] { [10:56:15.954] inherits <- base::inherits [10:56:15.954] invokeRestart <- base::invokeRestart [10:56:15.954] is.null <- base::is.null [10:56:15.954] muffled <- FALSE [10:56:15.954] if (inherits(cond, "message")) { [10:56:15.954] muffled <- grepl(pattern, "muffleMessage") [10:56:15.954] if (muffled) [10:56:15.954] invokeRestart("muffleMessage") [10:56:15.954] } [10:56:15.954] else if (inherits(cond, "warning")) { [10:56:15.954] muffled <- grepl(pattern, "muffleWarning") [10:56:15.954] if (muffled) [10:56:15.954] invokeRestart("muffleWarning") [10:56:15.954] } [10:56:15.954] else if (inherits(cond, "condition")) { [10:56:15.954] if (!is.null(pattern)) { [10:56:15.954] computeRestarts <- base::computeRestarts [10:56:15.954] grepl <- base::grepl [10:56:15.954] restarts <- computeRestarts(cond) [10:56:15.954] for (restart in restarts) { [10:56:15.954] name <- restart$name [10:56:15.954] if (is.null(name)) [10:56:15.954] next [10:56:15.954] if (!grepl(pattern, name)) [10:56:15.954] next [10:56:15.954] invokeRestart(restart) [10:56:15.954] muffled <- TRUE [10:56:15.954] break [10:56:15.954] } [10:56:15.954] } [10:56:15.954] } [10:56:15.954] invisible(muffled) [10:56:15.954] } [10:56:15.954] muffleCondition(cond, pattern = "^muffle") [10:56:15.954] } [10:56:15.954] } [10:56:15.954] else { [10:56:15.954] if (TRUE) { [10:56:15.954] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.954] { [10:56:15.954] inherits <- base::inherits [10:56:15.954] invokeRestart <- base::invokeRestart [10:56:15.954] is.null <- base::is.null [10:56:15.954] muffled <- FALSE [10:56:15.954] if (inherits(cond, "message")) { [10:56:15.954] muffled <- grepl(pattern, "muffleMessage") [10:56:15.954] if (muffled) [10:56:15.954] invokeRestart("muffleMessage") [10:56:15.954] } [10:56:15.954] else if (inherits(cond, "warning")) { [10:56:15.954] muffled <- grepl(pattern, "muffleWarning") [10:56:15.954] if (muffled) [10:56:15.954] invokeRestart("muffleWarning") [10:56:15.954] } [10:56:15.954] else if (inherits(cond, "condition")) { [10:56:15.954] if (!is.null(pattern)) { [10:56:15.954] computeRestarts <- base::computeRestarts [10:56:15.954] grepl <- base::grepl [10:56:15.954] restarts <- computeRestarts(cond) [10:56:15.954] for (restart in restarts) { [10:56:15.954] name <- restart$name [10:56:15.954] if (is.null(name)) [10:56:15.954] next [10:56:15.954] if (!grepl(pattern, name)) [10:56:15.954] next [10:56:15.954] invokeRestart(restart) [10:56:15.954] muffled <- TRUE [10:56:15.954] break [10:56:15.954] } [10:56:15.954] } [10:56:15.954] } [10:56:15.954] invisible(muffled) [10:56:15.954] } [10:56:15.954] muffleCondition(cond, pattern = "^muffle") [10:56:15.954] } [10:56:15.954] } [10:56:15.954] } [10:56:15.954] })) [10:56:15.954] }, error = function(ex) { [10:56:15.954] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.954] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.954] ...future.rng), started = ...future.startTime, [10:56:15.954] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.954] version = "1.8"), class = "FutureResult") [10:56:15.954] }, finally = { [10:56:15.954] if (!identical(...future.workdir, getwd())) [10:56:15.954] setwd(...future.workdir) [10:56:15.954] { [10:56:15.954] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.954] ...future.oldOptions$nwarnings <- NULL [10:56:15.954] } [10:56:15.954] base::options(...future.oldOptions) [10:56:15.954] if (.Platform$OS.type == "windows") { [10:56:15.954] old_names <- names(...future.oldEnvVars) [10:56:15.954] envs <- base::Sys.getenv() [10:56:15.954] names <- names(envs) [10:56:15.954] common <- intersect(names, old_names) [10:56:15.954] added <- setdiff(names, old_names) [10:56:15.954] removed <- setdiff(old_names, names) [10:56:15.954] changed <- common[...future.oldEnvVars[common] != [10:56:15.954] envs[common]] [10:56:15.954] NAMES <- toupper(changed) [10:56:15.954] args <- list() [10:56:15.954] for (kk in seq_along(NAMES)) { [10:56:15.954] name <- changed[[kk]] [10:56:15.954] NAME <- NAMES[[kk]] [10:56:15.954] if (name != NAME && is.element(NAME, old_names)) [10:56:15.954] next [10:56:15.954] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.954] } [10:56:15.954] NAMES <- toupper(added) [10:56:15.954] for (kk in seq_along(NAMES)) { [10:56:15.954] name <- added[[kk]] [10:56:15.954] NAME <- NAMES[[kk]] [10:56:15.954] if (name != NAME && is.element(NAME, old_names)) [10:56:15.954] next [10:56:15.954] args[[name]] <- "" [10:56:15.954] } [10:56:15.954] NAMES <- toupper(removed) [10:56:15.954] for (kk in seq_along(NAMES)) { [10:56:15.954] name <- removed[[kk]] [10:56:15.954] NAME <- NAMES[[kk]] [10:56:15.954] if (name != NAME && is.element(NAME, old_names)) [10:56:15.954] next [10:56:15.954] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.954] } [10:56:15.954] if (length(args) > 0) [10:56:15.954] base::do.call(base::Sys.setenv, args = args) [10:56:15.954] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.954] } [10:56:15.954] else { [10:56:15.954] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.954] } [10:56:15.954] { [10:56:15.954] if (base::length(...future.futureOptionsAdded) > [10:56:15.954] 0L) { [10:56:15.954] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.954] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.954] base::options(opts) [10:56:15.954] } [10:56:15.954] { [10:56:15.954] NULL [10:56:15.954] options(future.plan = NULL) [10:56:15.954] if (is.na(NA_character_)) [10:56:15.954] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.954] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.954] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.954] .init = FALSE) [10:56:15.954] } [10:56:15.954] } [10:56:15.954] } [10:56:15.954] }) [10:56:15.954] if (TRUE) { [10:56:15.954] base::sink(type = "output", split = FALSE) [10:56:15.954] if (TRUE) { [10:56:15.954] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.954] } [10:56:15.954] else { [10:56:15.954] ...future.result["stdout"] <- base::list(NULL) [10:56:15.954] } [10:56:15.954] base::close(...future.stdout) [10:56:15.954] ...future.stdout <- NULL [10:56:15.954] } [10:56:15.954] ...future.result$conditions <- ...future.conditions [10:56:15.954] ...future.result$finished <- base::Sys.time() [10:56:15.954] ...future.result [10:56:15.954] } [10:56:15.958] - Launch lazy future ... done [10:56:15.958] run() for 'MiraiFuture' ... done > print(f) MiraiFuture: Label: '' Expression: { x <- 1:10 sumtwo(a + b * x) } Lazy evaluation: FALSE Asynchronous evaluation: TRUE Local evaluation: TRUE Environment: R_GlobalEnv Capture standard output: TRUE Capture condition classes: 'condition' (excluding 'nothing') Globals: Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) [10:56:15.959] resolved() for 'MiraiFuture' ... [10:56:15.959] - state: 'running' [10:56:15.959] - run: TRUE [10:56:15.959] - result: 'NULL' [10:56:15.959] - resolved: FALSE [10:56:15.960] resolved() for 'MiraiFuture' ... done Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: d34f57d7-a67f-bea6-6aa1-5f5fedb288bd Class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' > rm(list = names(globals)) > y <- tryCatch(value(f), error = identity) [10:56:15.960] signalConditions() ... [10:56:15.961] - include = 'immediateCondition' [10:56:15.961] - exclude = [10:56:15.961] - resignal = FALSE [10:56:15.961] - Number of conditions: 1 [10:56:15.961] signalConditions() ... done [10:56:15.962] Future state: 'finished' [10:56:15.962] signalConditions() ... [10:56:15.962] - include = 'condition' [10:56:15.962] - exclude = 'immediateCondition' [10:56:15.962] - resignal = TRUE [10:56:15.962] - Number of conditions: 1 [10:56:15.963] - Condition #1: 'simpleError', 'error', 'condition' [10:56:15.963] signalConditions() ... done > if (!inherits(f, c("MulticoreFuture"))) { + stopifnot(inherits(y, "error")) + } > > message("*** Globals - automatic ... DONE") *** Globals - automatic ... DONE > > > message("*** Globals manually specified as named list ...") *** Globals manually specified as named list ... > > ## Make sure globals do not exist > rm(list = names(globals)) Warning in rm(list = names(globals)) : object 'a' not found Warning in rm(list = names(globals)) : object 'b' not found Warning in rm(list = names(globals)) : object 'sumtwo' not found > > f <- future({ + x <- 1:10 + sumtwo(a + b * x) + }, globals = globals) [10:56:15.964] getGlobalsAndPackages() ... [10:56:15.964] - globals passed as-list: [3] 'a', 'b', 'sumtwo' [10:56:15.964] Resolving globals: FALSE [10:56:15.966] The total size of the 3 globals is 1.20 KiB (1232 bytes) [10:56:15.966] The total size of the 3 globals exported for future expression ('{; x <- 1:10; sumtwo(a + b * x); }') is 1.20 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'sumtwo' (1.09 KiB of class 'function'), 'a' (56 bytes of class 'numeric') and 'b' (56 bytes of class 'numeric') [10:56:15.967] - globals: [3] 'a', 'b', 'sumtwo' [10:56:15.967] [10:56:15.967] getGlobalsAndPackages() ... DONE [10:56:15.967] run() for 'Future' ... [10:56:15.968] - state: 'created' [10:56:15.968] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:15.970] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:15.970] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:15.970] - Field: 'label' [10:56:15.971] - Field: 'local' [10:56:15.971] - Field: 'owner' [10:56:15.971] - Field: 'envir' [10:56:15.971] - Field: 'packages' [10:56:15.971] - Field: 'gc' [10:56:15.971] - Field: 'conditions' [10:56:15.972] - Field: 'expr' [10:56:15.972] - Field: 'uuid' [10:56:15.972] - Field: 'seed' [10:56:15.972] - Field: 'version' [10:56:15.972] - Field: 'result' [10:56:15.972] - Field: 'asynchronous' [10:56:15.973] - Field: 'calls' [10:56:15.973] - Field: 'globals' [10:56:15.973] - Field: 'stdout' [10:56:15.973] - Field: 'earlySignal' [10:56:15.973] - Field: 'lazy' [10:56:15.973] - Field: 'state' [10:56:15.974] - Field: '.cluster' [10:56:15.974] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:15.974] - Launch lazy future ... [10:56:15.974] Packages needed by the future expression (n = 0): [10:56:15.974] Packages needed by future strategies (n = 0): [10:56:15.975] { [10:56:15.975] { [10:56:15.975] { [10:56:15.975] ...future.startTime <- base::Sys.time() [10:56:15.975] { [10:56:15.975] { [10:56:15.975] { [10:56:15.975] base::local({ [10:56:15.975] has_future <- base::requireNamespace("future", [10:56:15.975] quietly = TRUE) [10:56:15.975] if (has_future) { [10:56:15.975] ns <- base::getNamespace("future") [10:56:15.975] version <- ns[[".package"]][["version"]] [10:56:15.975] if (is.null(version)) [10:56:15.975] version <- utils::packageVersion("future") [10:56:15.975] } [10:56:15.975] else { [10:56:15.975] version <- NULL [10:56:15.975] } [10:56:15.975] if (!has_future || version < "1.8.0") { [10:56:15.975] info <- base::c(r_version = base::gsub("R version ", [10:56:15.975] "", base::R.version$version.string), [10:56:15.975] platform = base::sprintf("%s (%s-bit)", [10:56:15.975] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.975] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.975] "release", "version")], collapse = " "), [10:56:15.975] hostname = base::Sys.info()[["nodename"]]) [10:56:15.975] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.975] info) [10:56:15.975] info <- base::paste(info, collapse = "; ") [10:56:15.975] if (!has_future) { [10:56:15.975] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.975] info) [10:56:15.975] } [10:56:15.975] else { [10:56:15.975] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.975] info, version) [10:56:15.975] } [10:56:15.975] base::stop(msg) [10:56:15.975] } [10:56:15.975] }) [10:56:15.975] } [10:56:15.975] ...future.strategy.old <- future::plan("list") [10:56:15.975] options(future.plan = NULL) [10:56:15.975] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.975] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.975] } [10:56:15.975] ...future.workdir <- getwd() [10:56:15.975] } [10:56:15.975] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.975] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.975] } [10:56:15.975] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.975] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.975] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.975] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.975] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.975] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.975] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.975] base::names(...future.oldOptions)) [10:56:15.975] } [10:56:15.975] if (FALSE) { [10:56:15.975] } [10:56:15.975] else { [10:56:15.975] if (TRUE) { [10:56:15.975] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.975] open = "w") [10:56:15.975] } [10:56:15.975] else { [10:56:15.975] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.975] windows = "NUL", "/dev/null"), open = "w") [10:56:15.975] } [10:56:15.975] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.975] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.975] base::sink(type = "output", split = FALSE) [10:56:15.975] base::close(...future.stdout) [10:56:15.975] }, add = TRUE) [10:56:15.975] } [10:56:15.975] ...future.frame <- base::sys.nframe() [10:56:15.975] ...future.conditions <- base::list() [10:56:15.975] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.975] if (FALSE) { [10:56:15.975] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.975] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.975] } [10:56:15.975] ...future.result <- base::tryCatch({ [10:56:15.975] base::withCallingHandlers({ [10:56:15.975] ...future.value <- base::withVisible(base::local({ [10:56:15.975] x <- 1:10 [10:56:15.975] sumtwo(a + b * x) [10:56:15.975] })) [10:56:15.975] future::FutureResult(value = ...future.value$value, [10:56:15.975] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.975] ...future.rng), globalenv = if (FALSE) [10:56:15.975] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.975] ...future.globalenv.names)) [10:56:15.975] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.975] }, condition = base::local({ [10:56:15.975] c <- base::c [10:56:15.975] inherits <- base::inherits [10:56:15.975] invokeRestart <- base::invokeRestart [10:56:15.975] length <- base::length [10:56:15.975] list <- base::list [10:56:15.975] seq.int <- base::seq.int [10:56:15.975] signalCondition <- base::signalCondition [10:56:15.975] sys.calls <- base::sys.calls [10:56:15.975] `[[` <- base::`[[` [10:56:15.975] `+` <- base::`+` [10:56:15.975] `<<-` <- base::`<<-` [10:56:15.975] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.975] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.975] 3L)] [10:56:15.975] } [10:56:15.975] function(cond) { [10:56:15.975] is_error <- inherits(cond, "error") [10:56:15.975] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.975] NULL) [10:56:15.975] if (is_error) { [10:56:15.975] sessionInformation <- function() { [10:56:15.975] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.975] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.975] search = base::search(), system = base::Sys.info()) [10:56:15.975] } [10:56:15.975] ...future.conditions[[length(...future.conditions) + [10:56:15.975] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.975] cond$call), session = sessionInformation(), [10:56:15.975] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.975] signalCondition(cond) [10:56:15.975] } [10:56:15.975] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.975] signal <- FALSE && inherits(cond, character(0)) [10:56:15.975] ...future.conditions[[length(...future.conditions) + [10:56:15.975] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.975] if (FALSE && !signal) { [10:56:15.975] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.975] { [10:56:15.975] inherits <- base::inherits [10:56:15.975] invokeRestart <- base::invokeRestart [10:56:15.975] is.null <- base::is.null [10:56:15.975] muffled <- FALSE [10:56:15.975] if (inherits(cond, "message")) { [10:56:15.975] muffled <- grepl(pattern, "muffleMessage") [10:56:15.975] if (muffled) [10:56:15.975] invokeRestart("muffleMessage") [10:56:15.975] } [10:56:15.975] else if (inherits(cond, "warning")) { [10:56:15.975] muffled <- grepl(pattern, "muffleWarning") [10:56:15.975] if (muffled) [10:56:15.975] invokeRestart("muffleWarning") [10:56:15.975] } [10:56:15.975] else if (inherits(cond, "condition")) { [10:56:15.975] if (!is.null(pattern)) { [10:56:15.975] computeRestarts <- base::computeRestarts [10:56:15.975] grepl <- base::grepl [10:56:15.975] restarts <- computeRestarts(cond) [10:56:15.975] for (restart in restarts) { [10:56:15.975] name <- restart$name [10:56:15.975] if (is.null(name)) [10:56:15.975] next [10:56:15.975] if (!grepl(pattern, name)) [10:56:15.975] next [10:56:15.975] invokeRestart(restart) [10:56:15.975] muffled <- TRUE [10:56:15.975] break [10:56:15.975] } [10:56:15.975] } [10:56:15.975] } [10:56:15.975] invisible(muffled) [10:56:15.975] } [10:56:15.975] muffleCondition(cond, pattern = "^muffle") [10:56:15.975] } [10:56:15.975] } [10:56:15.975] else { [10:56:15.975] if (TRUE) { [10:56:15.975] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.975] { [10:56:15.975] inherits <- base::inherits [10:56:15.975] invokeRestart <- base::invokeRestart [10:56:15.975] is.null <- base::is.null [10:56:15.975] muffled <- FALSE [10:56:15.975] if (inherits(cond, "message")) { [10:56:15.975] muffled <- grepl(pattern, "muffleMessage") [10:56:15.975] if (muffled) [10:56:15.975] invokeRestart("muffleMessage") [10:56:15.975] } [10:56:15.975] else if (inherits(cond, "warning")) { [10:56:15.975] muffled <- grepl(pattern, "muffleWarning") [10:56:15.975] if (muffled) [10:56:15.975] invokeRestart("muffleWarning") [10:56:15.975] } [10:56:15.975] else if (inherits(cond, "condition")) { [10:56:15.975] if (!is.null(pattern)) { [10:56:15.975] computeRestarts <- base::computeRestarts [10:56:15.975] grepl <- base::grepl [10:56:15.975] restarts <- computeRestarts(cond) [10:56:15.975] for (restart in restarts) { [10:56:15.975] name <- restart$name [10:56:15.975] if (is.null(name)) [10:56:15.975] next [10:56:15.975] if (!grepl(pattern, name)) [10:56:15.975] next [10:56:15.975] invokeRestart(restart) [10:56:15.975] muffled <- TRUE [10:56:15.975] break [10:56:15.975] } [10:56:15.975] } [10:56:15.975] } [10:56:15.975] invisible(muffled) [10:56:15.975] } [10:56:15.975] muffleCondition(cond, pattern = "^muffle") [10:56:15.975] } [10:56:15.975] } [10:56:15.975] } [10:56:15.975] })) [10:56:15.975] }, error = function(ex) { [10:56:15.975] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.975] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.975] ...future.rng), started = ...future.startTime, [10:56:15.975] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.975] version = "1.8"), class = "FutureResult") [10:56:15.975] }, finally = { [10:56:15.975] if (!identical(...future.workdir, getwd())) [10:56:15.975] setwd(...future.workdir) [10:56:15.975] { [10:56:15.975] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.975] ...future.oldOptions$nwarnings <- NULL [10:56:15.975] } [10:56:15.975] base::options(...future.oldOptions) [10:56:15.975] if (.Platform$OS.type == "windows") { [10:56:15.975] old_names <- names(...future.oldEnvVars) [10:56:15.975] envs <- base::Sys.getenv() [10:56:15.975] names <- names(envs) [10:56:15.975] common <- intersect(names, old_names) [10:56:15.975] added <- setdiff(names, old_names) [10:56:15.975] removed <- setdiff(old_names, names) [10:56:15.975] changed <- common[...future.oldEnvVars[common] != [10:56:15.975] envs[common]] [10:56:15.975] NAMES <- toupper(changed) [10:56:15.975] args <- list() [10:56:15.975] for (kk in seq_along(NAMES)) { [10:56:15.975] name <- changed[[kk]] [10:56:15.975] NAME <- NAMES[[kk]] [10:56:15.975] if (name != NAME && is.element(NAME, old_names)) [10:56:15.975] next [10:56:15.975] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.975] } [10:56:15.975] NAMES <- toupper(added) [10:56:15.975] for (kk in seq_along(NAMES)) { [10:56:15.975] name <- added[[kk]] [10:56:15.975] NAME <- NAMES[[kk]] [10:56:15.975] if (name != NAME && is.element(NAME, old_names)) [10:56:15.975] next [10:56:15.975] args[[name]] <- "" [10:56:15.975] } [10:56:15.975] NAMES <- toupper(removed) [10:56:15.975] for (kk in seq_along(NAMES)) { [10:56:15.975] name <- removed[[kk]] [10:56:15.975] NAME <- NAMES[[kk]] [10:56:15.975] if (name != NAME && is.element(NAME, old_names)) [10:56:15.975] next [10:56:15.975] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.975] } [10:56:15.975] if (length(args) > 0) [10:56:15.975] base::do.call(base::Sys.setenv, args = args) [10:56:15.975] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.975] } [10:56:15.975] else { [10:56:15.975] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.975] } [10:56:15.975] { [10:56:15.975] if (base::length(...future.futureOptionsAdded) > [10:56:15.975] 0L) { [10:56:15.975] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.975] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.975] base::options(opts) [10:56:15.975] } [10:56:15.975] { [10:56:15.975] NULL [10:56:15.975] options(future.plan = NULL) [10:56:15.975] if (is.na(NA_character_)) [10:56:15.975] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.975] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.975] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.975] .init = FALSE) [10:56:15.975] } [10:56:15.975] } [10:56:15.975] } [10:56:15.975] }) [10:56:15.975] if (TRUE) { [10:56:15.975] base::sink(type = "output", split = FALSE) [10:56:15.975] if (TRUE) { [10:56:15.975] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.975] } [10:56:15.975] else { [10:56:15.975] ...future.result["stdout"] <- base::list(NULL) [10:56:15.975] } [10:56:15.975] base::close(...future.stdout) [10:56:15.975] ...future.stdout <- NULL [10:56:15.975] } [10:56:15.975] ...future.result$conditions <- ...future.conditions [10:56:15.975] ...future.result$finished <- base::Sys.time() [10:56:15.975] ...future.result [10:56:15.975] } [10:56:15.979] - Launch lazy future ... done [10:56:15.979] run() for 'MiraiFuture' ... done > print(f) MiraiFuture: Label: '' Expression: { x <- 1:10 sumtwo(a + b * x) } Lazy evaluation: FALSE Asynchronous evaluation: TRUE Local evaluation: TRUE Environment: R_GlobalEnv Capture standard output: TRUE Capture condition classes: 'condition' (excluding 'nothing') Globals: 3 objects totaling 1.20 KiB (numeric 'a' of 56 bytes, numeric 'b' of 56 bytes, function 'sumtwo' of 1.09 KiB) Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) [10:56:15.980] resolved() for 'MiraiFuture' ... [10:56:15.980] - state: 'running' [10:56:15.980] - run: TRUE [10:56:15.980] - result: 'NULL' [10:56:15.981] - resolved: FALSE [10:56:15.981] resolved() for 'MiraiFuture' ... done Resolved: TRUE Value: Conditions captured: Early signaling: FALSE Owner process: d34f57d7-a67f-bea6-6aa1-5f5fedb288bd Class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' > v <- value(f) > print(v) [1] 8 > stopifnot(all.equal(v, v0)) > > y %<-% { + x <- 1:10 + sumtwo(a + b * x) + } %globals% globals [10:56:15.982] getGlobalsAndPackages() ... [10:56:15.982] - globals passed as-list: [3] 'a', 'b', 'sumtwo' [10:56:15.982] Resolving globals: FALSE [10:56:15.983] The total size of the 3 globals is 1.20 KiB (1232 bytes) [10:56:15.983] The total size of the 3 globals exported for future expression ('{; x <- 1:10; sumtwo(a + b * x); }') is 1.20 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'sumtwo' (1.09 KiB of class 'function'), 'a' (56 bytes of class 'numeric') and 'b' (56 bytes of class 'numeric') [10:56:15.983] - globals: [3] 'a', 'b', 'sumtwo' [10:56:15.983] [10:56:15.984] getGlobalsAndPackages() ... DONE [10:56:15.984] run() for 'Future' ... [10:56:15.984] - state: 'created' [10:56:15.984] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:15.986] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:15.987] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:15.987] - Field: 'label' [10:56:15.987] - Field: 'local' [10:56:15.987] - Field: 'owner' [10:56:15.987] - Field: 'envir' [10:56:15.988] - Field: 'packages' [10:56:15.988] - Field: 'gc' [10:56:15.988] - Field: 'conditions' [10:56:15.988] - Field: 'expr' [10:56:15.988] - Field: 'uuid' [10:56:15.988] - Field: 'seed' [10:56:15.989] - Field: 'version' [10:56:15.989] - Field: 'result' [10:56:15.989] - Field: 'asynchronous' [10:56:15.989] - Field: 'calls' [10:56:15.989] - Field: 'globals' [10:56:15.989] - Field: 'stdout' [10:56:15.990] - Field: 'earlySignal' [10:56:15.990] - Field: 'lazy' [10:56:15.990] - Field: 'state' [10:56:15.990] - Field: '.cluster' [10:56:15.990] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:15.990] - Launch lazy future ... [10:56:15.991] Packages needed by the future expression (n = 0): [10:56:15.991] Packages needed by future strategies (n = 0): [10:56:15.991] { [10:56:15.991] { [10:56:15.991] { [10:56:15.991] ...future.startTime <- base::Sys.time() [10:56:15.991] { [10:56:15.991] { [10:56:15.991] { [10:56:15.991] base::local({ [10:56:15.991] has_future <- base::requireNamespace("future", [10:56:15.991] quietly = TRUE) [10:56:15.991] if (has_future) { [10:56:15.991] ns <- base::getNamespace("future") [10:56:15.991] version <- ns[[".package"]][["version"]] [10:56:15.991] if (is.null(version)) [10:56:15.991] version <- utils::packageVersion("future") [10:56:15.991] } [10:56:15.991] else { [10:56:15.991] version <- NULL [10:56:15.991] } [10:56:15.991] if (!has_future || version < "1.8.0") { [10:56:15.991] info <- base::c(r_version = base::gsub("R version ", [10:56:15.991] "", base::R.version$version.string), [10:56:15.991] platform = base::sprintf("%s (%s-bit)", [10:56:15.991] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:15.991] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:15.991] "release", "version")], collapse = " "), [10:56:15.991] hostname = base::Sys.info()[["nodename"]]) [10:56:15.991] info <- base::sprintf("%s: %s", base::names(info), [10:56:15.991] info) [10:56:15.991] info <- base::paste(info, collapse = "; ") [10:56:15.991] if (!has_future) { [10:56:15.991] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:15.991] info) [10:56:15.991] } [10:56:15.991] else { [10:56:15.991] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:15.991] info, version) [10:56:15.991] } [10:56:15.991] base::stop(msg) [10:56:15.991] } [10:56:15.991] }) [10:56:15.991] } [10:56:15.991] ...future.strategy.old <- future::plan("list") [10:56:15.991] options(future.plan = NULL) [10:56:15.991] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.991] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:15.991] } [10:56:15.991] ...future.workdir <- getwd() [10:56:15.991] } [10:56:15.991] ...future.oldOptions <- base::as.list(base::.Options) [10:56:15.991] ...future.oldEnvVars <- base::Sys.getenv() [10:56:15.991] } [10:56:15.991] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:15.991] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:15.991] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:15.991] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:15.991] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:15.991] future.stdout.windows.reencode = NULL, width = 80L) [10:56:15.991] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:15.991] base::names(...future.oldOptions)) [10:56:15.991] } [10:56:15.991] if (FALSE) { [10:56:15.991] } [10:56:15.991] else { [10:56:15.991] if (TRUE) { [10:56:15.991] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:15.991] open = "w") [10:56:15.991] } [10:56:15.991] else { [10:56:15.991] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:15.991] windows = "NUL", "/dev/null"), open = "w") [10:56:15.991] } [10:56:15.991] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:15.991] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:15.991] base::sink(type = "output", split = FALSE) [10:56:15.991] base::close(...future.stdout) [10:56:15.991] }, add = TRUE) [10:56:15.991] } [10:56:15.991] ...future.frame <- base::sys.nframe() [10:56:15.991] ...future.conditions <- base::list() [10:56:15.991] ...future.rng <- base::globalenv()$.Random.seed [10:56:15.991] if (FALSE) { [10:56:15.991] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:15.991] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:15.991] } [10:56:15.991] ...future.result <- base::tryCatch({ [10:56:15.991] base::withCallingHandlers({ [10:56:15.991] ...future.value <- base::withVisible(base::local({ [10:56:15.991] x <- 1:10 [10:56:15.991] sumtwo(a + b * x) [10:56:15.991] })) [10:56:15.991] future::FutureResult(value = ...future.value$value, [10:56:15.991] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.991] ...future.rng), globalenv = if (FALSE) [10:56:15.991] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:15.991] ...future.globalenv.names)) [10:56:15.991] else NULL, started = ...future.startTime, version = "1.8") [10:56:15.991] }, condition = base::local({ [10:56:15.991] c <- base::c [10:56:15.991] inherits <- base::inherits [10:56:15.991] invokeRestart <- base::invokeRestart [10:56:15.991] length <- base::length [10:56:15.991] list <- base::list [10:56:15.991] seq.int <- base::seq.int [10:56:15.991] signalCondition <- base::signalCondition [10:56:15.991] sys.calls <- base::sys.calls [10:56:15.991] `[[` <- base::`[[` [10:56:15.991] `+` <- base::`+` [10:56:15.991] `<<-` <- base::`<<-` [10:56:15.991] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:15.991] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:15.991] 3L)] [10:56:15.991] } [10:56:15.991] function(cond) { [10:56:15.991] is_error <- inherits(cond, "error") [10:56:15.991] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:15.991] NULL) [10:56:15.991] if (is_error) { [10:56:15.991] sessionInformation <- function() { [10:56:15.991] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:15.991] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:15.991] search = base::search(), system = base::Sys.info()) [10:56:15.991] } [10:56:15.991] ...future.conditions[[length(...future.conditions) + [10:56:15.991] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:15.991] cond$call), session = sessionInformation(), [10:56:15.991] timestamp = base::Sys.time(), signaled = 0L) [10:56:15.991] signalCondition(cond) [10:56:15.991] } [10:56:15.991] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:15.991] signal <- FALSE && inherits(cond, character(0)) [10:56:15.991] ...future.conditions[[length(...future.conditions) + [10:56:15.991] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:15.991] if (FALSE && !signal) { [10:56:15.991] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.991] { [10:56:15.991] inherits <- base::inherits [10:56:15.991] invokeRestart <- base::invokeRestart [10:56:15.991] is.null <- base::is.null [10:56:15.991] muffled <- FALSE [10:56:15.991] if (inherits(cond, "message")) { [10:56:15.991] muffled <- grepl(pattern, "muffleMessage") [10:56:15.991] if (muffled) [10:56:15.991] invokeRestart("muffleMessage") [10:56:15.991] } [10:56:15.991] else if (inherits(cond, "warning")) { [10:56:15.991] muffled <- grepl(pattern, "muffleWarning") [10:56:15.991] if (muffled) [10:56:15.991] invokeRestart("muffleWarning") [10:56:15.991] } [10:56:15.991] else if (inherits(cond, "condition")) { [10:56:15.991] if (!is.null(pattern)) { [10:56:15.991] computeRestarts <- base::computeRestarts [10:56:15.991] grepl <- base::grepl [10:56:15.991] restarts <- computeRestarts(cond) [10:56:15.991] for (restart in restarts) { [10:56:15.991] name <- restart$name [10:56:15.991] if (is.null(name)) [10:56:15.991] next [10:56:15.991] if (!grepl(pattern, name)) [10:56:15.991] next [10:56:15.991] invokeRestart(restart) [10:56:15.991] muffled <- TRUE [10:56:15.991] break [10:56:15.991] } [10:56:15.991] } [10:56:15.991] } [10:56:15.991] invisible(muffled) [10:56:15.991] } [10:56:15.991] muffleCondition(cond, pattern = "^muffle") [10:56:15.991] } [10:56:15.991] } [10:56:15.991] else { [10:56:15.991] if (TRUE) { [10:56:15.991] muffleCondition <- function (cond, pattern = "^muffle") [10:56:15.991] { [10:56:15.991] inherits <- base::inherits [10:56:15.991] invokeRestart <- base::invokeRestart [10:56:15.991] is.null <- base::is.null [10:56:15.991] muffled <- FALSE [10:56:15.991] if (inherits(cond, "message")) { [10:56:15.991] muffled <- grepl(pattern, "muffleMessage") [10:56:15.991] if (muffled) [10:56:15.991] invokeRestart("muffleMessage") [10:56:15.991] } [10:56:15.991] else if (inherits(cond, "warning")) { [10:56:15.991] muffled <- grepl(pattern, "muffleWarning") [10:56:15.991] if (muffled) [10:56:15.991] invokeRestart("muffleWarning") [10:56:15.991] } [10:56:15.991] else if (inherits(cond, "condition")) { [10:56:15.991] if (!is.null(pattern)) { [10:56:15.991] computeRestarts <- base::computeRestarts [10:56:15.991] grepl <- base::grepl [10:56:15.991] restarts <- computeRestarts(cond) [10:56:15.991] for (restart in restarts) { [10:56:15.991] name <- restart$name [10:56:15.991] if (is.null(name)) [10:56:15.991] next [10:56:15.991] if (!grepl(pattern, name)) [10:56:15.991] next [10:56:15.991] invokeRestart(restart) [10:56:15.991] muffled <- TRUE [10:56:15.991] break [10:56:15.991] } [10:56:15.991] } [10:56:15.991] } [10:56:15.991] invisible(muffled) [10:56:15.991] } [10:56:15.991] muffleCondition(cond, pattern = "^muffle") [10:56:15.991] } [10:56:15.991] } [10:56:15.991] } [10:56:15.991] })) [10:56:15.991] }, error = function(ex) { [10:56:15.991] base::structure(base::list(value = NULL, visible = NULL, [10:56:15.991] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:15.991] ...future.rng), started = ...future.startTime, [10:56:15.991] finished = Sys.time(), session_uuid = NA_character_, [10:56:15.991] version = "1.8"), class = "FutureResult") [10:56:15.991] }, finally = { [10:56:15.991] if (!identical(...future.workdir, getwd())) [10:56:15.991] setwd(...future.workdir) [10:56:15.991] { [10:56:15.991] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:15.991] ...future.oldOptions$nwarnings <- NULL [10:56:15.991] } [10:56:15.991] base::options(...future.oldOptions) [10:56:15.991] if (.Platform$OS.type == "windows") { [10:56:15.991] old_names <- names(...future.oldEnvVars) [10:56:15.991] envs <- base::Sys.getenv() [10:56:15.991] names <- names(envs) [10:56:15.991] common <- intersect(names, old_names) [10:56:15.991] added <- setdiff(names, old_names) [10:56:15.991] removed <- setdiff(old_names, names) [10:56:15.991] changed <- common[...future.oldEnvVars[common] != [10:56:15.991] envs[common]] [10:56:15.991] NAMES <- toupper(changed) [10:56:15.991] args <- list() [10:56:15.991] for (kk in seq_along(NAMES)) { [10:56:15.991] name <- changed[[kk]] [10:56:15.991] NAME <- NAMES[[kk]] [10:56:15.991] if (name != NAME && is.element(NAME, old_names)) [10:56:15.991] next [10:56:15.991] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.991] } [10:56:15.991] NAMES <- toupper(added) [10:56:15.991] for (kk in seq_along(NAMES)) { [10:56:15.991] name <- added[[kk]] [10:56:15.991] NAME <- NAMES[[kk]] [10:56:15.991] if (name != NAME && is.element(NAME, old_names)) [10:56:15.991] next [10:56:15.991] args[[name]] <- "" [10:56:15.991] } [10:56:15.991] NAMES <- toupper(removed) [10:56:15.991] for (kk in seq_along(NAMES)) { [10:56:15.991] name <- removed[[kk]] [10:56:15.991] NAME <- NAMES[[kk]] [10:56:15.991] if (name != NAME && is.element(NAME, old_names)) [10:56:15.991] next [10:56:15.991] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:15.991] } [10:56:15.991] if (length(args) > 0) [10:56:15.991] base::do.call(base::Sys.setenv, args = args) [10:56:15.991] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:15.991] } [10:56:15.991] else { [10:56:15.991] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:15.991] } [10:56:15.991] { [10:56:15.991] if (base::length(...future.futureOptionsAdded) > [10:56:15.991] 0L) { [10:56:15.991] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:15.991] base::names(opts) <- ...future.futureOptionsAdded [10:56:15.991] base::options(opts) [10:56:15.991] } [10:56:15.991] { [10:56:15.991] NULL [10:56:15.991] options(future.plan = NULL) [10:56:15.991] if (is.na(NA_character_)) [10:56:15.991] Sys.unsetenv("R_FUTURE_PLAN") [10:56:15.991] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:15.991] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:15.991] .init = FALSE) [10:56:15.991] } [10:56:15.991] } [10:56:15.991] } [10:56:15.991] }) [10:56:15.991] if (TRUE) { [10:56:15.991] base::sink(type = "output", split = FALSE) [10:56:15.991] if (TRUE) { [10:56:15.991] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:15.991] } [10:56:15.991] else { [10:56:15.991] ...future.result["stdout"] <- base::list(NULL) [10:56:15.991] } [10:56:15.991] base::close(...future.stdout) [10:56:15.991] ...future.stdout <- NULL [10:56:15.991] } [10:56:15.991] ...future.result$conditions <- ...future.conditions [10:56:15.991] ...future.result$finished <- base::Sys.time() [10:56:15.991] ...future.result [10:56:15.991] } [10:56:15.995] - Launch lazy future ... done [10:56:15.995] run() for 'MiraiFuture' ... done > print(y) [1] 8 > stopifnot(all.equal(y, v0)) > > message("*** Globals manually specified as named list ... DONE") *** Globals manually specified as named list ... DONE > > > message("*** Globals manually specified by their names ...") *** Globals manually specified by their names ... > > attach_locally(globals) > f <- future({ + x <- 1:10 + sumtwo(a + b * x) + }, globals = c("a", "b", "sumtwo")) [10:56:15.998] getGlobalsAndPackages() ... [10:56:15.999] Retrieving globals ... [10:56:15.999] - globals retrieved: [3] 'a', 'b', 'sumtwo' [10:56:15.999] Retrieving globals ... DONE [10:56:15.999] Resolving globals: FALSE [10:56:16.000] The total size of the 3 globals is 1.20 KiB (1232 bytes) [10:56:16.000] The total size of the 3 globals exported for future expression ('{; x <- 1:10; sumtwo(a + b * x); }') is 1.20 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'sumtwo' (1.09 KiB of class 'function'), 'a' (56 bytes of class 'numeric') and 'b' (56 bytes of class 'numeric') [10:56:16.000] - globals: [3] 'a', 'b', 'sumtwo' [10:56:16.001] [10:56:16.001] getGlobalsAndPackages() ... DONE [10:56:16.001] run() for 'Future' ... [10:56:16.001] - state: 'created' [10:56:16.001] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:16.004] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:16.004] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:16.004] - Field: 'label' [10:56:16.004] - Field: 'local' [10:56:16.004] - Field: 'owner' [10:56:16.005] - Field: 'envir' [10:56:16.005] - Field: 'packages' [10:56:16.005] - Field: 'gc' [10:56:16.005] - Field: 'conditions' [10:56:16.005] - Field: 'expr' [10:56:16.006] - Field: 'uuid' [10:56:16.006] - Field: 'seed' [10:56:16.006] - Field: 'version' [10:56:16.006] - Field: 'result' [10:56:16.006] - Field: 'asynchronous' [10:56:16.006] - Field: 'calls' [10:56:16.007] - Field: 'globals' [10:56:16.007] - Field: 'stdout' [10:56:16.007] - Field: 'earlySignal' [10:56:16.007] - Field: 'lazy' [10:56:16.008] - Field: 'state' [10:56:16.009] - Field: '.cluster' [10:56:16.009] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:16.009] - Launch lazy future ... [10:56:16.009] Packages needed by the future expression (n = 0): [10:56:16.009] Packages needed by future strategies (n = 0): [10:56:16.010] { [10:56:16.010] { [10:56:16.010] { [10:56:16.010] ...future.startTime <- base::Sys.time() [10:56:16.010] { [10:56:16.010] { [10:56:16.010] { [10:56:16.010] base::local({ [10:56:16.010] has_future <- base::requireNamespace("future", [10:56:16.010] quietly = TRUE) [10:56:16.010] if (has_future) { [10:56:16.010] ns <- base::getNamespace("future") [10:56:16.010] version <- ns[[".package"]][["version"]] [10:56:16.010] if (is.null(version)) [10:56:16.010] version <- utils::packageVersion("future") [10:56:16.010] } [10:56:16.010] else { [10:56:16.010] version <- NULL [10:56:16.010] } [10:56:16.010] if (!has_future || version < "1.8.0") { [10:56:16.010] info <- base::c(r_version = base::gsub("R version ", [10:56:16.010] "", base::R.version$version.string), [10:56:16.010] platform = base::sprintf("%s (%s-bit)", [10:56:16.010] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:16.010] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:16.010] "release", "version")], collapse = " "), [10:56:16.010] hostname = base::Sys.info()[["nodename"]]) [10:56:16.010] info <- base::sprintf("%s: %s", base::names(info), [10:56:16.010] info) [10:56:16.010] info <- base::paste(info, collapse = "; ") [10:56:16.010] if (!has_future) { [10:56:16.010] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:16.010] info) [10:56:16.010] } [10:56:16.010] else { [10:56:16.010] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:16.010] info, version) [10:56:16.010] } [10:56:16.010] base::stop(msg) [10:56:16.010] } [10:56:16.010] }) [10:56:16.010] } [10:56:16.010] ...future.strategy.old <- future::plan("list") [10:56:16.010] options(future.plan = NULL) [10:56:16.010] Sys.unsetenv("R_FUTURE_PLAN") [10:56:16.010] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:16.010] } [10:56:16.010] ...future.workdir <- getwd() [10:56:16.010] } [10:56:16.010] ...future.oldOptions <- base::as.list(base::.Options) [10:56:16.010] ...future.oldEnvVars <- base::Sys.getenv() [10:56:16.010] } [10:56:16.010] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:16.010] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:16.010] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:16.010] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:16.010] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:16.010] future.stdout.windows.reencode = NULL, width = 80L) [10:56:16.010] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:16.010] base::names(...future.oldOptions)) [10:56:16.010] } [10:56:16.010] if (FALSE) { [10:56:16.010] } [10:56:16.010] else { [10:56:16.010] if (TRUE) { [10:56:16.010] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:16.010] open = "w") [10:56:16.010] } [10:56:16.010] else { [10:56:16.010] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:16.010] windows = "NUL", "/dev/null"), open = "w") [10:56:16.010] } [10:56:16.010] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:16.010] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:16.010] base::sink(type = "output", split = FALSE) [10:56:16.010] base::close(...future.stdout) [10:56:16.010] }, add = TRUE) [10:56:16.010] } [10:56:16.010] ...future.frame <- base::sys.nframe() [10:56:16.010] ...future.conditions <- base::list() [10:56:16.010] ...future.rng <- base::globalenv()$.Random.seed [10:56:16.010] if (FALSE) { [10:56:16.010] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:16.010] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:16.010] } [10:56:16.010] ...future.result <- base::tryCatch({ [10:56:16.010] base::withCallingHandlers({ [10:56:16.010] ...future.value <- base::withVisible(base::local({ [10:56:16.010] x <- 1:10 [10:56:16.010] sumtwo(a + b * x) [10:56:16.010] })) [10:56:16.010] future::FutureResult(value = ...future.value$value, [10:56:16.010] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:16.010] ...future.rng), globalenv = if (FALSE) [10:56:16.010] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:16.010] ...future.globalenv.names)) [10:56:16.010] else NULL, started = ...future.startTime, version = "1.8") [10:56:16.010] }, condition = base::local({ [10:56:16.010] c <- base::c [10:56:16.010] inherits <- base::inherits [10:56:16.010] invokeRestart <- base::invokeRestart [10:56:16.010] length <- base::length [10:56:16.010] list <- base::list [10:56:16.010] seq.int <- base::seq.int [10:56:16.010] signalCondition <- base::signalCondition [10:56:16.010] sys.calls <- base::sys.calls [10:56:16.010] `[[` <- base::`[[` [10:56:16.010] `+` <- base::`+` [10:56:16.010] `<<-` <- base::`<<-` [10:56:16.010] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:16.010] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:16.010] 3L)] [10:56:16.010] } [10:56:16.010] function(cond) { [10:56:16.010] is_error <- inherits(cond, "error") [10:56:16.010] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:16.010] NULL) [10:56:16.010] if (is_error) { [10:56:16.010] sessionInformation <- function() { [10:56:16.010] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:16.010] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:16.010] search = base::search(), system = base::Sys.info()) [10:56:16.010] } [10:56:16.010] ...future.conditions[[length(...future.conditions) + [10:56:16.010] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:16.010] cond$call), session = sessionInformation(), [10:56:16.010] timestamp = base::Sys.time(), signaled = 0L) [10:56:16.010] signalCondition(cond) [10:56:16.010] } [10:56:16.010] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:16.010] signal <- FALSE && inherits(cond, character(0)) [10:56:16.010] ...future.conditions[[length(...future.conditions) + [10:56:16.010] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:16.010] if (FALSE && !signal) { [10:56:16.010] muffleCondition <- function (cond, pattern = "^muffle") [10:56:16.010] { [10:56:16.010] inherits <- base::inherits [10:56:16.010] invokeRestart <- base::invokeRestart [10:56:16.010] is.null <- base::is.null [10:56:16.010] muffled <- FALSE [10:56:16.010] if (inherits(cond, "message")) { [10:56:16.010] muffled <- grepl(pattern, "muffleMessage") [10:56:16.010] if (muffled) [10:56:16.010] invokeRestart("muffleMessage") [10:56:16.010] } [10:56:16.010] else if (inherits(cond, "warning")) { [10:56:16.010] muffled <- grepl(pattern, "muffleWarning") [10:56:16.010] if (muffled) [10:56:16.010] invokeRestart("muffleWarning") [10:56:16.010] } [10:56:16.010] else if (inherits(cond, "condition")) { [10:56:16.010] if (!is.null(pattern)) { [10:56:16.010] computeRestarts <- base::computeRestarts [10:56:16.010] grepl <- base::grepl [10:56:16.010] restarts <- computeRestarts(cond) [10:56:16.010] for (restart in restarts) { [10:56:16.010] name <- restart$name [10:56:16.010] if (is.null(name)) [10:56:16.010] next [10:56:16.010] if (!grepl(pattern, name)) [10:56:16.010] next [10:56:16.010] invokeRestart(restart) [10:56:16.010] muffled <- TRUE [10:56:16.010] break [10:56:16.010] } [10:56:16.010] } [10:56:16.010] } [10:56:16.010] invisible(muffled) [10:56:16.010] } [10:56:16.010] muffleCondition(cond, pattern = "^muffle") [10:56:16.010] } [10:56:16.010] } [10:56:16.010] else { [10:56:16.010] if (TRUE) { [10:56:16.010] muffleCondition <- function (cond, pattern = "^muffle") [10:56:16.010] { [10:56:16.010] inherits <- base::inherits [10:56:16.010] invokeRestart <- base::invokeRestart [10:56:16.010] is.null <- base::is.null [10:56:16.010] muffled <- FALSE [10:56:16.010] if (inherits(cond, "message")) { [10:56:16.010] muffled <- grepl(pattern, "muffleMessage") [10:56:16.010] if (muffled) [10:56:16.010] invokeRestart("muffleMessage") [10:56:16.010] } [10:56:16.010] else if (inherits(cond, "warning")) { [10:56:16.010] muffled <- grepl(pattern, "muffleWarning") [10:56:16.010] if (muffled) [10:56:16.010] invokeRestart("muffleWarning") [10:56:16.010] } [10:56:16.010] else if (inherits(cond, "condition")) { [10:56:16.010] if (!is.null(pattern)) { [10:56:16.010] computeRestarts <- base::computeRestarts [10:56:16.010] grepl <- base::grepl [10:56:16.010] restarts <- computeRestarts(cond) [10:56:16.010] for (restart in restarts) { [10:56:16.010] name <- restart$name [10:56:16.010] if (is.null(name)) [10:56:16.010] next [10:56:16.010] if (!grepl(pattern, name)) [10:56:16.010] next [10:56:16.010] invokeRestart(restart) [10:56:16.010] muffled <- TRUE [10:56:16.010] break [10:56:16.010] } [10:56:16.010] } [10:56:16.010] } [10:56:16.010] invisible(muffled) [10:56:16.010] } [10:56:16.010] muffleCondition(cond, pattern = "^muffle") [10:56:16.010] } [10:56:16.010] } [10:56:16.010] } [10:56:16.010] })) [10:56:16.010] }, error = function(ex) { [10:56:16.010] base::structure(base::list(value = NULL, visible = NULL, [10:56:16.010] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:16.010] ...future.rng), started = ...future.startTime, [10:56:16.010] finished = Sys.time(), session_uuid = NA_character_, [10:56:16.010] version = "1.8"), class = "FutureResult") [10:56:16.010] }, finally = { [10:56:16.010] if (!identical(...future.workdir, getwd())) [10:56:16.010] setwd(...future.workdir) [10:56:16.010] { [10:56:16.010] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:16.010] ...future.oldOptions$nwarnings <- NULL [10:56:16.010] } [10:56:16.010] base::options(...future.oldOptions) [10:56:16.010] if (.Platform$OS.type == "windows") { [10:56:16.010] old_names <- names(...future.oldEnvVars) [10:56:16.010] envs <- base::Sys.getenv() [10:56:16.010] names <- names(envs) [10:56:16.010] common <- intersect(names, old_names) [10:56:16.010] added <- setdiff(names, old_names) [10:56:16.010] removed <- setdiff(old_names, names) [10:56:16.010] changed <- common[...future.oldEnvVars[common] != [10:56:16.010] envs[common]] [10:56:16.010] NAMES <- toupper(changed) [10:56:16.010] args <- list() [10:56:16.010] for (kk in seq_along(NAMES)) { [10:56:16.010] name <- changed[[kk]] [10:56:16.010] NAME <- NAMES[[kk]] [10:56:16.010] if (name != NAME && is.element(NAME, old_names)) [10:56:16.010] next [10:56:16.010] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:16.010] } [10:56:16.010] NAMES <- toupper(added) [10:56:16.010] for (kk in seq_along(NAMES)) { [10:56:16.010] name <- added[[kk]] [10:56:16.010] NAME <- NAMES[[kk]] [10:56:16.010] if (name != NAME && is.element(NAME, old_names)) [10:56:16.010] next [10:56:16.010] args[[name]] <- "" [10:56:16.010] } [10:56:16.010] NAMES <- toupper(removed) [10:56:16.010] for (kk in seq_along(NAMES)) { [10:56:16.010] name <- removed[[kk]] [10:56:16.010] NAME <- NAMES[[kk]] [10:56:16.010] if (name != NAME && is.element(NAME, old_names)) [10:56:16.010] next [10:56:16.010] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:16.010] } [10:56:16.010] if (length(args) > 0) [10:56:16.010] base::do.call(base::Sys.setenv, args = args) [10:56:16.010] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:16.010] } [10:56:16.010] else { [10:56:16.010] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:16.010] } [10:56:16.010] { [10:56:16.010] if (base::length(...future.futureOptionsAdded) > [10:56:16.010] 0L) { [10:56:16.010] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:16.010] base::names(opts) <- ...future.futureOptionsAdded [10:56:16.010] base::options(opts) [10:56:16.010] } [10:56:16.010] { [10:56:16.010] NULL [10:56:16.010] options(future.plan = NULL) [10:56:16.010] if (is.na(NA_character_)) [10:56:16.010] Sys.unsetenv("R_FUTURE_PLAN") [10:56:16.010] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:16.010] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:16.010] .init = FALSE) [10:56:16.010] } [10:56:16.010] } [10:56:16.010] } [10:56:16.010] }) [10:56:16.010] if (TRUE) { [10:56:16.010] base::sink(type = "output", split = FALSE) [10:56:16.010] if (TRUE) { [10:56:16.010] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:16.010] } [10:56:16.010] else { [10:56:16.010] ...future.result["stdout"] <- base::list(NULL) [10:56:16.010] } [10:56:16.010] base::close(...future.stdout) [10:56:16.010] ...future.stdout <- NULL [10:56:16.010] } [10:56:16.010] ...future.result$conditions <- ...future.conditions [10:56:16.010] ...future.result$finished <- base::Sys.time() [10:56:16.010] ...future.result [10:56:16.010] } [10:56:16.014] - Launch lazy future ... done [10:56:16.014] run() for 'MiraiFuture' ... done > print(f) MiraiFuture: Label: '' Expression: { x <- 1:10 sumtwo(a + b * x) } Lazy evaluation: FALSE Asynchronous evaluation: TRUE Local evaluation: TRUE Environment: R_GlobalEnv Capture standard output: TRUE Capture condition classes: 'condition' (excluding 'nothing') Globals: 3 objects totaling 1.20 KiB (numeric 'a' of 56 bytes, numeric 'b' of 56 bytes, function 'sumtwo' of 1.09 KiB) Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) [10:56:16.015] resolved() for 'MiraiFuture' ... [10:56:16.015] - state: 'running' [10:56:16.015] - run: TRUE [10:56:16.015] - result: 'NULL' [10:56:16.015] - resolved: FALSE [10:56:16.016] resolved() for 'MiraiFuture' ... done Resolved: TRUE Value: Conditions captured: Early signaling: FALSE Owner process: d34f57d7-a67f-bea6-6aa1-5f5fedb288bd Class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' > rm(list = names(globals)) > v <- value(f) > print(v) [1] 8 > stopifnot(all.equal(v, v0)) > > attach_locally(globals) > y %<-% { + x <- 1:10 + sumtwo(a + b * x) + } %globals% c("a", "b", "sumtwo") [10:56:16.017] getGlobalsAndPackages() ... [10:56:16.017] Retrieving globals ... [10:56:16.017] - globals retrieved: [3] 'a', 'b', 'sumtwo' [10:56:16.017] Retrieving globals ... DONE [10:56:16.017] Resolving globals: FALSE [10:56:16.018] The total size of the 3 globals is 1.20 KiB (1232 bytes) [10:56:16.018] The total size of the 3 globals exported for future expression ('{; x <- 1:10; sumtwo(a + b * x); }') is 1.20 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'sumtwo' (1.09 KiB of class 'function'), 'a' (56 bytes of class 'numeric') and 'b' (56 bytes of class 'numeric') [10:56:16.018] - globals: [3] 'a', 'b', 'sumtwo' [10:56:16.019] [10:56:16.019] getGlobalsAndPackages() ... DONE [10:56:16.019] run() for 'Future' ... [10:56:16.019] - state: 'created' [10:56:16.020] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:16.022] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:16.022] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:16.022] - Field: 'label' [10:56:16.022] - Field: 'local' [10:56:16.023] - Field: 'owner' [10:56:16.023] - Field: 'envir' [10:56:16.023] - Field: 'packages' [10:56:16.023] - Field: 'gc' [10:56:16.023] - Field: 'conditions' [10:56:16.023] - Field: 'expr' [10:56:16.024] - Field: 'uuid' [10:56:16.024] - Field: 'seed' [10:56:16.024] - Field: 'version' [10:56:16.024] - Field: 'result' [10:56:16.024] - Field: 'asynchronous' [10:56:16.024] - Field: 'calls' [10:56:16.025] - Field: 'globals' [10:56:16.025] - Field: 'stdout' [10:56:16.025] - Field: 'earlySignal' [10:56:16.025] - Field: 'lazy' [10:56:16.025] - Field: 'state' [10:56:16.025] - Field: '.cluster' [10:56:16.026] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:16.026] - Launch lazy future ... [10:56:16.026] Packages needed by the future expression (n = 0): [10:56:16.026] Packages needed by future strategies (n = 0): [10:56:16.027] { [10:56:16.027] { [10:56:16.027] { [10:56:16.027] ...future.startTime <- base::Sys.time() [10:56:16.027] { [10:56:16.027] { [10:56:16.027] { [10:56:16.027] base::local({ [10:56:16.027] has_future <- base::requireNamespace("future", [10:56:16.027] quietly = TRUE) [10:56:16.027] if (has_future) { [10:56:16.027] ns <- base::getNamespace("future") [10:56:16.027] version <- ns[[".package"]][["version"]] [10:56:16.027] if (is.null(version)) [10:56:16.027] version <- utils::packageVersion("future") [10:56:16.027] } [10:56:16.027] else { [10:56:16.027] version <- NULL [10:56:16.027] } [10:56:16.027] if (!has_future || version < "1.8.0") { [10:56:16.027] info <- base::c(r_version = base::gsub("R version ", [10:56:16.027] "", base::R.version$version.string), [10:56:16.027] platform = base::sprintf("%s (%s-bit)", [10:56:16.027] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:16.027] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:16.027] "release", "version")], collapse = " "), [10:56:16.027] hostname = base::Sys.info()[["nodename"]]) [10:56:16.027] info <- base::sprintf("%s: %s", base::names(info), [10:56:16.027] info) [10:56:16.027] info <- base::paste(info, collapse = "; ") [10:56:16.027] if (!has_future) { [10:56:16.027] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:16.027] info) [10:56:16.027] } [10:56:16.027] else { [10:56:16.027] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:16.027] info, version) [10:56:16.027] } [10:56:16.027] base::stop(msg) [10:56:16.027] } [10:56:16.027] }) [10:56:16.027] } [10:56:16.027] ...future.strategy.old <- future::plan("list") [10:56:16.027] options(future.plan = NULL) [10:56:16.027] Sys.unsetenv("R_FUTURE_PLAN") [10:56:16.027] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:16.027] } [10:56:16.027] ...future.workdir <- getwd() [10:56:16.027] } [10:56:16.027] ...future.oldOptions <- base::as.list(base::.Options) [10:56:16.027] ...future.oldEnvVars <- base::Sys.getenv() [10:56:16.027] } [10:56:16.027] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:16.027] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:16.027] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:16.027] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:16.027] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:16.027] future.stdout.windows.reencode = NULL, width = 80L) [10:56:16.027] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:16.027] base::names(...future.oldOptions)) [10:56:16.027] } [10:56:16.027] if (FALSE) { [10:56:16.027] } [10:56:16.027] else { [10:56:16.027] if (TRUE) { [10:56:16.027] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:16.027] open = "w") [10:56:16.027] } [10:56:16.027] else { [10:56:16.027] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:16.027] windows = "NUL", "/dev/null"), open = "w") [10:56:16.027] } [10:56:16.027] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:16.027] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:16.027] base::sink(type = "output", split = FALSE) [10:56:16.027] base::close(...future.stdout) [10:56:16.027] }, add = TRUE) [10:56:16.027] } [10:56:16.027] ...future.frame <- base::sys.nframe() [10:56:16.027] ...future.conditions <- base::list() [10:56:16.027] ...future.rng <- base::globalenv()$.Random.seed [10:56:16.027] if (FALSE) { [10:56:16.027] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:16.027] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:16.027] } [10:56:16.027] ...future.result <- base::tryCatch({ [10:56:16.027] base::withCallingHandlers({ [10:56:16.027] ...future.value <- base::withVisible(base::local({ [10:56:16.027] x <- 1:10 [10:56:16.027] sumtwo(a + b * x) [10:56:16.027] })) [10:56:16.027] future::FutureResult(value = ...future.value$value, [10:56:16.027] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:16.027] ...future.rng), globalenv = if (FALSE) [10:56:16.027] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:16.027] ...future.globalenv.names)) [10:56:16.027] else NULL, started = ...future.startTime, version = "1.8") [10:56:16.027] }, condition = base::local({ [10:56:16.027] c <- base::c [10:56:16.027] inherits <- base::inherits [10:56:16.027] invokeRestart <- base::invokeRestart [10:56:16.027] length <- base::length [10:56:16.027] list <- base::list [10:56:16.027] seq.int <- base::seq.int [10:56:16.027] signalCondition <- base::signalCondition [10:56:16.027] sys.calls <- base::sys.calls [10:56:16.027] `[[` <- base::`[[` [10:56:16.027] `+` <- base::`+` [10:56:16.027] `<<-` <- base::`<<-` [10:56:16.027] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:16.027] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:16.027] 3L)] [10:56:16.027] } [10:56:16.027] function(cond) { [10:56:16.027] is_error <- inherits(cond, "error") [10:56:16.027] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:16.027] NULL) [10:56:16.027] if (is_error) { [10:56:16.027] sessionInformation <- function() { [10:56:16.027] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:16.027] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:16.027] search = base::search(), system = base::Sys.info()) [10:56:16.027] } [10:56:16.027] ...future.conditions[[length(...future.conditions) + [10:56:16.027] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:16.027] cond$call), session = sessionInformation(), [10:56:16.027] timestamp = base::Sys.time(), signaled = 0L) [10:56:16.027] signalCondition(cond) [10:56:16.027] } [10:56:16.027] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:16.027] signal <- FALSE && inherits(cond, character(0)) [10:56:16.027] ...future.conditions[[length(...future.conditions) + [10:56:16.027] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:16.027] if (FALSE && !signal) { [10:56:16.027] muffleCondition <- function (cond, pattern = "^muffle") [10:56:16.027] { [10:56:16.027] inherits <- base::inherits [10:56:16.027] invokeRestart <- base::invokeRestart [10:56:16.027] is.null <- base::is.null [10:56:16.027] muffled <- FALSE [10:56:16.027] if (inherits(cond, "message")) { [10:56:16.027] muffled <- grepl(pattern, "muffleMessage") [10:56:16.027] if (muffled) [10:56:16.027] invokeRestart("muffleMessage") [10:56:16.027] } [10:56:16.027] else if (inherits(cond, "warning")) { [10:56:16.027] muffled <- grepl(pattern, "muffleWarning") [10:56:16.027] if (muffled) [10:56:16.027] invokeRestart("muffleWarning") [10:56:16.027] } [10:56:16.027] else if (inherits(cond, "condition")) { [10:56:16.027] if (!is.null(pattern)) { [10:56:16.027] computeRestarts <- base::computeRestarts [10:56:16.027] grepl <- base::grepl [10:56:16.027] restarts <- computeRestarts(cond) [10:56:16.027] for (restart in restarts) { [10:56:16.027] name <- restart$name [10:56:16.027] if (is.null(name)) [10:56:16.027] next [10:56:16.027] if (!grepl(pattern, name)) [10:56:16.027] next [10:56:16.027] invokeRestart(restart) [10:56:16.027] muffled <- TRUE [10:56:16.027] break [10:56:16.027] } [10:56:16.027] } [10:56:16.027] } [10:56:16.027] invisible(muffled) [10:56:16.027] } [10:56:16.027] muffleCondition(cond, pattern = "^muffle") [10:56:16.027] } [10:56:16.027] } [10:56:16.027] else { [10:56:16.027] if (TRUE) { [10:56:16.027] muffleCondition <- function (cond, pattern = "^muffle") [10:56:16.027] { [10:56:16.027] inherits <- base::inherits [10:56:16.027] invokeRestart <- base::invokeRestart [10:56:16.027] is.null <- base::is.null [10:56:16.027] muffled <- FALSE [10:56:16.027] if (inherits(cond, "message")) { [10:56:16.027] muffled <- grepl(pattern, "muffleMessage") [10:56:16.027] if (muffled) [10:56:16.027] invokeRestart("muffleMessage") [10:56:16.027] } [10:56:16.027] else if (inherits(cond, "warning")) { [10:56:16.027] muffled <- grepl(pattern, "muffleWarning") [10:56:16.027] if (muffled) [10:56:16.027] invokeRestart("muffleWarning") [10:56:16.027] } [10:56:16.027] else if (inherits(cond, "condition")) { [10:56:16.027] if (!is.null(pattern)) { [10:56:16.027] computeRestarts <- base::computeRestarts [10:56:16.027] grepl <- base::grepl [10:56:16.027] restarts <- computeRestarts(cond) [10:56:16.027] for (restart in restarts) { [10:56:16.027] name <- restart$name [10:56:16.027] if (is.null(name)) [10:56:16.027] next [10:56:16.027] if (!grepl(pattern, name)) [10:56:16.027] next [10:56:16.027] invokeRestart(restart) [10:56:16.027] muffled <- TRUE [10:56:16.027] break [10:56:16.027] } [10:56:16.027] } [10:56:16.027] } [10:56:16.027] invisible(muffled) [10:56:16.027] } [10:56:16.027] muffleCondition(cond, pattern = "^muffle") [10:56:16.027] } [10:56:16.027] } [10:56:16.027] } [10:56:16.027] })) [10:56:16.027] }, error = function(ex) { [10:56:16.027] base::structure(base::list(value = NULL, visible = NULL, [10:56:16.027] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:16.027] ...future.rng), started = ...future.startTime, [10:56:16.027] finished = Sys.time(), session_uuid = NA_character_, [10:56:16.027] version = "1.8"), class = "FutureResult") [10:56:16.027] }, finally = { [10:56:16.027] if (!identical(...future.workdir, getwd())) [10:56:16.027] setwd(...future.workdir) [10:56:16.027] { [10:56:16.027] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:16.027] ...future.oldOptions$nwarnings <- NULL [10:56:16.027] } [10:56:16.027] base::options(...future.oldOptions) [10:56:16.027] if (.Platform$OS.type == "windows") { [10:56:16.027] old_names <- names(...future.oldEnvVars) [10:56:16.027] envs <- base::Sys.getenv() [10:56:16.027] names <- names(envs) [10:56:16.027] common <- intersect(names, old_names) [10:56:16.027] added <- setdiff(names, old_names) [10:56:16.027] removed <- setdiff(old_names, names) [10:56:16.027] changed <- common[...future.oldEnvVars[common] != [10:56:16.027] envs[common]] [10:56:16.027] NAMES <- toupper(changed) [10:56:16.027] args <- list() [10:56:16.027] for (kk in seq_along(NAMES)) { [10:56:16.027] name <- changed[[kk]] [10:56:16.027] NAME <- NAMES[[kk]] [10:56:16.027] if (name != NAME && is.element(NAME, old_names)) [10:56:16.027] next [10:56:16.027] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:16.027] } [10:56:16.027] NAMES <- toupper(added) [10:56:16.027] for (kk in seq_along(NAMES)) { [10:56:16.027] name <- added[[kk]] [10:56:16.027] NAME <- NAMES[[kk]] [10:56:16.027] if (name != NAME && is.element(NAME, old_names)) [10:56:16.027] next [10:56:16.027] args[[name]] <- "" [10:56:16.027] } [10:56:16.027] NAMES <- toupper(removed) [10:56:16.027] for (kk in seq_along(NAMES)) { [10:56:16.027] name <- removed[[kk]] [10:56:16.027] NAME <- NAMES[[kk]] [10:56:16.027] if (name != NAME && is.element(NAME, old_names)) [10:56:16.027] next [10:56:16.027] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:16.027] } [10:56:16.027] if (length(args) > 0) [10:56:16.027] base::do.call(base::Sys.setenv, args = args) [10:56:16.027] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:16.027] } [10:56:16.027] else { [10:56:16.027] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:16.027] } [10:56:16.027] { [10:56:16.027] if (base::length(...future.futureOptionsAdded) > [10:56:16.027] 0L) { [10:56:16.027] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:16.027] base::names(opts) <- ...future.futureOptionsAdded [10:56:16.027] base::options(opts) [10:56:16.027] } [10:56:16.027] { [10:56:16.027] NULL [10:56:16.027] options(future.plan = NULL) [10:56:16.027] if (is.na(NA_character_)) [10:56:16.027] Sys.unsetenv("R_FUTURE_PLAN") [10:56:16.027] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:16.027] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:16.027] .init = FALSE) [10:56:16.027] } [10:56:16.027] } [10:56:16.027] } [10:56:16.027] }) [10:56:16.027] if (TRUE) { [10:56:16.027] base::sink(type = "output", split = FALSE) [10:56:16.027] if (TRUE) { [10:56:16.027] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:16.027] } [10:56:16.027] else { [10:56:16.027] ...future.result["stdout"] <- base::list(NULL) [10:56:16.027] } [10:56:16.027] base::close(...future.stdout) [10:56:16.027] ...future.stdout <- NULL [10:56:16.027] } [10:56:16.027] ...future.result$conditions <- ...future.conditions [10:56:16.027] ...future.result$finished <- base::Sys.time() [10:56:16.027] ...future.result [10:56:16.027] } [10:56:16.031] - Launch lazy future ... done [10:56:16.031] run() for 'MiraiFuture' ... done > rm(list = names(globals)) > print(y) [1] 8 > stopifnot(all.equal(y, v0)) > > message("*** Globals manually specified by their names ... DONE") *** Globals manually specified by their names ... DONE > > > message("*** Globals - manually ... DONE") *** Globals - manually ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.39 0.09 1.04