R version 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" 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 [13:11:05.043] plan(): Setting new future strategy stack: [13:11:05.044] List of future strategies: [13:11:05.044] 1. mirai_multisession: [13:11:05.044] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:05.044] - tweaked: FALSE [13:11:05.044] - call: future::plan(future.mirai::mirai_multisession) [13:11:05.057] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:05.057] < mirai | $data > [13:11:05.062] getGlobalsAndPackages() ... [13:11:05.062] Not searching for globals [13:11:05.062] - globals: [0] [13:11:05.062] getGlobalsAndPackages() ... DONE [13:11:05.063] getGlobalsAndPackages() ... [13:11:05.063] [13:11:05.063] - globals: [0] [13:11:05.063] getGlobalsAndPackages() ... DONE [13:11:05.341] Packages needed by the future expression (n = 0): [13:11:05.342] Packages needed by future strategies (n = 0): [13:11:05.343] { [13:11:05.343] { [13:11:05.343] { [13:11:05.343] ...future.startTime <- base::Sys.time() [13:11:05.343] { [13:11:05.343] { [13:11:05.343] { [13:11:05.343] base::local({ [13:11:05.343] has_future <- base::requireNamespace("future", [13:11:05.343] quietly = TRUE) [13:11:05.343] if (has_future) { [13:11:05.343] ns <- base::getNamespace("future") [13:11:05.343] version <- ns[[".package"]][["version"]] [13:11:05.343] if (is.null(version)) [13:11:05.343] version <- utils::packageVersion("future") [13:11:05.343] } [13:11:05.343] else { [13:11:05.343] version <- NULL [13:11:05.343] } [13:11:05.343] if (!has_future || version < "1.8.0") { [13:11:05.343] info <- base::c(r_version = base::gsub("R version ", [13:11:05.343] "", base::R.version$version.string), [13:11:05.343] platform = base::sprintf("%s (%s-bit)", [13:11:05.343] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.343] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.343] "release", "version")], collapse = " "), [13:11:05.343] hostname = base::Sys.info()[["nodename"]]) [13:11:05.343] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.343] info) [13:11:05.343] info <- base::paste(info, collapse = "; ") [13:11:05.343] if (!has_future) { [13:11:05.343] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.343] info) [13:11:05.343] } [13:11:05.343] else { [13:11:05.343] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.343] info, version) [13:11:05.343] } [13:11:05.343] base::stop(msg) [13:11:05.343] } [13:11:05.343] }) [13:11:05.343] } [13:11:05.343] ...future.strategy.old <- future::plan("list") [13:11:05.343] options(future.plan = NULL) [13:11:05.343] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.343] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.343] } [13:11:05.343] ...future.workdir <- getwd() [13:11:05.343] } [13:11:05.343] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.343] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.343] } [13:11:05.343] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.343] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.343] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.343] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.343] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.343] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.343] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.343] base::names(...future.oldOptions)) [13:11:05.343] } [13:11:05.343] if (FALSE) { [13:11:05.343] } [13:11:05.343] else { [13:11:05.343] if (TRUE) { [13:11:05.343] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.343] open = "w") [13:11:05.343] } [13:11:05.343] else { [13:11:05.343] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.343] windows = "NUL", "/dev/null"), open = "w") [13:11:05.343] } [13:11:05.343] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.343] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.343] base::sink(type = "output", split = FALSE) [13:11:05.343] base::close(...future.stdout) [13:11:05.343] }, add = TRUE) [13:11:05.343] } [13:11:05.343] ...future.frame <- base::sys.nframe() [13:11:05.343] ...future.conditions <- base::list() [13:11:05.343] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.343] if (FALSE) { [13:11:05.343] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.343] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.343] } [13:11:05.343] ...future.result <- base::tryCatch({ [13:11:05.343] base::withCallingHandlers({ [13:11:05.343] ...future.value <- base::withVisible(base::local(NA)) [13:11:05.343] future::FutureResult(value = ...future.value$value, [13:11:05.343] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.343] ...future.rng), globalenv = if (FALSE) [13:11:05.343] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.343] ...future.globalenv.names)) [13:11:05.343] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.343] }, condition = base::local({ [13:11:05.343] c <- base::c [13:11:05.343] inherits <- base::inherits [13:11:05.343] invokeRestart <- base::invokeRestart [13:11:05.343] length <- base::length [13:11:05.343] list <- base::list [13:11:05.343] seq.int <- base::seq.int [13:11:05.343] signalCondition <- base::signalCondition [13:11:05.343] sys.calls <- base::sys.calls [13:11:05.343] `[[` <- base::`[[` [13:11:05.343] `+` <- base::`+` [13:11:05.343] `<<-` <- base::`<<-` [13:11:05.343] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.343] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.343] 3L)] [13:11:05.343] } [13:11:05.343] function(cond) { [13:11:05.343] is_error <- inherits(cond, "error") [13:11:05.343] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.343] NULL) [13:11:05.343] if (is_error) { [13:11:05.343] sessionInformation <- function() { [13:11:05.343] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.343] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.343] search = base::search(), system = base::Sys.info()) [13:11:05.343] } [13:11:05.343] ...future.conditions[[length(...future.conditions) + [13:11:05.343] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.343] cond$call), session = sessionInformation(), [13:11:05.343] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.343] signalCondition(cond) [13:11:05.343] } [13:11:05.343] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.343] signal <- FALSE && inherits(cond, character(0)) [13:11:05.343] ...future.conditions[[length(...future.conditions) + [13:11:05.343] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.343] if (FALSE && !signal) { [13:11:05.343] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.343] { [13:11:05.343] inherits <- base::inherits [13:11:05.343] invokeRestart <- base::invokeRestart [13:11:05.343] is.null <- base::is.null [13:11:05.343] muffled <- FALSE [13:11:05.343] if (inherits(cond, "message")) { [13:11:05.343] muffled <- grepl(pattern, "muffleMessage") [13:11:05.343] if (muffled) [13:11:05.343] invokeRestart("muffleMessage") [13:11:05.343] } [13:11:05.343] else if (inherits(cond, "warning")) { [13:11:05.343] muffled <- grepl(pattern, "muffleWarning") [13:11:05.343] if (muffled) [13:11:05.343] invokeRestart("muffleWarning") [13:11:05.343] } [13:11:05.343] else if (inherits(cond, "condition")) { [13:11:05.343] if (!is.null(pattern)) { [13:11:05.343] computeRestarts <- base::computeRestarts [13:11:05.343] grepl <- base::grepl [13:11:05.343] restarts <- computeRestarts(cond) [13:11:05.343] for (restart in restarts) { [13:11:05.343] name <- restart$name [13:11:05.343] if (is.null(name)) [13:11:05.343] next [13:11:05.343] if (!grepl(pattern, name)) [13:11:05.343] next [13:11:05.343] invokeRestart(restart) [13:11:05.343] muffled <- TRUE [13:11:05.343] break [13:11:05.343] } [13:11:05.343] } [13:11:05.343] } [13:11:05.343] invisible(muffled) [13:11:05.343] } [13:11:05.343] muffleCondition(cond, pattern = "^muffle") [13:11:05.343] } [13:11:05.343] } [13:11:05.343] else { [13:11:05.343] if (TRUE) { [13:11:05.343] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.343] { [13:11:05.343] inherits <- base::inherits [13:11:05.343] invokeRestart <- base::invokeRestart [13:11:05.343] is.null <- base::is.null [13:11:05.343] muffled <- FALSE [13:11:05.343] if (inherits(cond, "message")) { [13:11:05.343] muffled <- grepl(pattern, "muffleMessage") [13:11:05.343] if (muffled) [13:11:05.343] invokeRestart("muffleMessage") [13:11:05.343] } [13:11:05.343] else if (inherits(cond, "warning")) { [13:11:05.343] muffled <- grepl(pattern, "muffleWarning") [13:11:05.343] if (muffled) [13:11:05.343] invokeRestart("muffleWarning") [13:11:05.343] } [13:11:05.343] else if (inherits(cond, "condition")) { [13:11:05.343] if (!is.null(pattern)) { [13:11:05.343] computeRestarts <- base::computeRestarts [13:11:05.343] grepl <- base::grepl [13:11:05.343] restarts <- computeRestarts(cond) [13:11:05.343] for (restart in restarts) { [13:11:05.343] name <- restart$name [13:11:05.343] if (is.null(name)) [13:11:05.343] next [13:11:05.343] if (!grepl(pattern, name)) [13:11:05.343] next [13:11:05.343] invokeRestart(restart) [13:11:05.343] muffled <- TRUE [13:11:05.343] break [13:11:05.343] } [13:11:05.343] } [13:11:05.343] } [13:11:05.343] invisible(muffled) [13:11:05.343] } [13:11:05.343] muffleCondition(cond, pattern = "^muffle") [13:11:05.343] } [13:11:05.343] } [13:11:05.343] } [13:11:05.343] })) [13:11:05.343] }, error = function(ex) { [13:11:05.343] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.343] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.343] ...future.rng), started = ...future.startTime, [13:11:05.343] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.343] version = "1.8"), class = "FutureResult") [13:11:05.343] }, finally = { [13:11:05.343] if (!identical(...future.workdir, getwd())) [13:11:05.343] setwd(...future.workdir) [13:11:05.343] { [13:11:05.343] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.343] ...future.oldOptions$nwarnings <- NULL [13:11:05.343] } [13:11:05.343] base::options(...future.oldOptions) [13:11:05.343] if (.Platform$OS.type == "windows") { [13:11:05.343] old_names <- names(...future.oldEnvVars) [13:11:05.343] envs <- base::Sys.getenv() [13:11:05.343] names <- names(envs) [13:11:05.343] common <- intersect(names, old_names) [13:11:05.343] added <- setdiff(names, old_names) [13:11:05.343] removed <- setdiff(old_names, names) [13:11:05.343] changed <- common[...future.oldEnvVars[common] != [13:11:05.343] envs[common]] [13:11:05.343] NAMES <- toupper(changed) [13:11:05.343] args <- list() [13:11:05.343] for (kk in seq_along(NAMES)) { [13:11:05.343] name <- changed[[kk]] [13:11:05.343] NAME <- NAMES[[kk]] [13:11:05.343] if (name != NAME && is.element(NAME, old_names)) [13:11:05.343] next [13:11:05.343] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.343] } [13:11:05.343] NAMES <- toupper(added) [13:11:05.343] for (kk in seq_along(NAMES)) { [13:11:05.343] name <- added[[kk]] [13:11:05.343] NAME <- NAMES[[kk]] [13:11:05.343] if (name != NAME && is.element(NAME, old_names)) [13:11:05.343] next [13:11:05.343] args[[name]] <- "" [13:11:05.343] } [13:11:05.343] NAMES <- toupper(removed) [13:11:05.343] for (kk in seq_along(NAMES)) { [13:11:05.343] name <- removed[[kk]] [13:11:05.343] NAME <- NAMES[[kk]] [13:11:05.343] if (name != NAME && is.element(NAME, old_names)) [13:11:05.343] next [13:11:05.343] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.343] } [13:11:05.343] if (length(args) > 0) [13:11:05.343] base::do.call(base::Sys.setenv, args = args) [13:11:05.343] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.343] } [13:11:05.343] else { [13:11:05.343] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.343] } [13:11:05.343] { [13:11:05.343] if (base::length(...future.futureOptionsAdded) > [13:11:05.343] 0L) { [13:11:05.343] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.343] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.343] base::options(opts) [13:11:05.343] } [13:11:05.343] { [13:11:05.343] NULL [13:11:05.343] options(future.plan = NULL) [13:11:05.343] if (is.na(NA_character_)) [13:11:05.343] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.343] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.343] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.343] .init = FALSE) [13:11:05.343] } [13:11:05.343] } [13:11:05.343] } [13:11:05.343] }) [13:11:05.343] if (TRUE) { [13:11:05.343] base::sink(type = "output", split = FALSE) [13:11:05.343] if (TRUE) { [13:11:05.343] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.343] } [13:11:05.343] else { [13:11:05.343] ...future.result["stdout"] <- base::list(NULL) [13:11:05.343] } [13:11:05.343] base::close(...future.stdout) [13:11:05.343] ...future.stdout <- NULL [13:11:05.343] } [13:11:05.343] ...future.result$conditions <- ...future.conditions [13:11:05.343] ...future.result$finished <- base::Sys.time() [13:11:05.343] ...future.result [13:11:05.343] } [13:11:05.445] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:05.445] plan(): nbrOfWorkers() = 2 > > plan(mirai_multisession) [13:11:05.446] plan(): Setting new future strategy stack: [13:11:05.446] List of future strategies: [13:11:05.446] 1. mirai_multisession: [13:11:05.446] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:05.446] - tweaked: FALSE [13:11:05.446] - call: plan(mirai_multisession) [13:11:05.460] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:05.460] < mirai | $data > [13:11:05.462] getGlobalsAndPackages() ... [13:11:05.463] Not searching for globals [13:11:05.463] - globals: [0] [13:11:05.463] getGlobalsAndPackages() ... DONE [13:11:05.463] getGlobalsAndPackages() ... [13:11:05.463] [13:11:05.463] - globals: [0] [13:11:05.464] getGlobalsAndPackages() ... DONE [13:11:05.464] Packages needed by the future expression (n = 0): [13:11:05.464] Packages needed by future strategies (n = 0): [13:11:05.465] { [13:11:05.465] { [13:11:05.465] { [13:11:05.465] ...future.startTime <- base::Sys.time() [13:11:05.465] { [13:11:05.465] { [13:11:05.465] { [13:11:05.465] base::local({ [13:11:05.465] has_future <- base::requireNamespace("future", [13:11:05.465] quietly = TRUE) [13:11:05.465] if (has_future) { [13:11:05.465] ns <- base::getNamespace("future") [13:11:05.465] version <- ns[[".package"]][["version"]] [13:11:05.465] if (is.null(version)) [13:11:05.465] version <- utils::packageVersion("future") [13:11:05.465] } [13:11:05.465] else { [13:11:05.465] version <- NULL [13:11:05.465] } [13:11:05.465] if (!has_future || version < "1.8.0") { [13:11:05.465] info <- base::c(r_version = base::gsub("R version ", [13:11:05.465] "", base::R.version$version.string), [13:11:05.465] platform = base::sprintf("%s (%s-bit)", [13:11:05.465] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.465] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.465] "release", "version")], collapse = " "), [13:11:05.465] hostname = base::Sys.info()[["nodename"]]) [13:11:05.465] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.465] info) [13:11:05.465] info <- base::paste(info, collapse = "; ") [13:11:05.465] if (!has_future) { [13:11:05.465] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.465] info) [13:11:05.465] } [13:11:05.465] else { [13:11:05.465] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.465] info, version) [13:11:05.465] } [13:11:05.465] base::stop(msg) [13:11:05.465] } [13:11:05.465] }) [13:11:05.465] } [13:11:05.465] ...future.strategy.old <- future::plan("list") [13:11:05.465] options(future.plan = NULL) [13:11:05.465] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.465] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.465] } [13:11:05.465] ...future.workdir <- getwd() [13:11:05.465] } [13:11:05.465] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.465] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.465] } [13:11:05.465] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.465] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.465] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.465] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.465] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.465] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.465] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.465] base::names(...future.oldOptions)) [13:11:05.465] } [13:11:05.465] if (FALSE) { [13:11:05.465] } [13:11:05.465] else { [13:11:05.465] if (TRUE) { [13:11:05.465] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.465] open = "w") [13:11:05.465] } [13:11:05.465] else { [13:11:05.465] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.465] windows = "NUL", "/dev/null"), open = "w") [13:11:05.465] } [13:11:05.465] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.465] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.465] base::sink(type = "output", split = FALSE) [13:11:05.465] base::close(...future.stdout) [13:11:05.465] }, add = TRUE) [13:11:05.465] } [13:11:05.465] ...future.frame <- base::sys.nframe() [13:11:05.465] ...future.conditions <- base::list() [13:11:05.465] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.465] if (FALSE) { [13:11:05.465] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.465] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.465] } [13:11:05.465] ...future.result <- base::tryCatch({ [13:11:05.465] base::withCallingHandlers({ [13:11:05.465] ...future.value <- base::withVisible(base::local(NA)) [13:11:05.465] future::FutureResult(value = ...future.value$value, [13:11:05.465] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.465] ...future.rng), globalenv = if (FALSE) [13:11:05.465] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.465] ...future.globalenv.names)) [13:11:05.465] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.465] }, condition = base::local({ [13:11:05.465] c <- base::c [13:11:05.465] inherits <- base::inherits [13:11:05.465] invokeRestart <- base::invokeRestart [13:11:05.465] length <- base::length [13:11:05.465] list <- base::list [13:11:05.465] seq.int <- base::seq.int [13:11:05.465] signalCondition <- base::signalCondition [13:11:05.465] sys.calls <- base::sys.calls [13:11:05.465] `[[` <- base::`[[` [13:11:05.465] `+` <- base::`+` [13:11:05.465] `<<-` <- base::`<<-` [13:11:05.465] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.465] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.465] 3L)] [13:11:05.465] } [13:11:05.465] function(cond) { [13:11:05.465] is_error <- inherits(cond, "error") [13:11:05.465] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.465] NULL) [13:11:05.465] if (is_error) { [13:11:05.465] sessionInformation <- function() { [13:11:05.465] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.465] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.465] search = base::search(), system = base::Sys.info()) [13:11:05.465] } [13:11:05.465] ...future.conditions[[length(...future.conditions) + [13:11:05.465] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.465] cond$call), session = sessionInformation(), [13:11:05.465] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.465] signalCondition(cond) [13:11:05.465] } [13:11:05.465] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.465] signal <- FALSE && inherits(cond, character(0)) [13:11:05.465] ...future.conditions[[length(...future.conditions) + [13:11:05.465] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.465] if (FALSE && !signal) { [13:11:05.465] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.465] { [13:11:05.465] inherits <- base::inherits [13:11:05.465] invokeRestart <- base::invokeRestart [13:11:05.465] is.null <- base::is.null [13:11:05.465] muffled <- FALSE [13:11:05.465] if (inherits(cond, "message")) { [13:11:05.465] muffled <- grepl(pattern, "muffleMessage") [13:11:05.465] if (muffled) [13:11:05.465] invokeRestart("muffleMessage") [13:11:05.465] } [13:11:05.465] else if (inherits(cond, "warning")) { [13:11:05.465] muffled <- grepl(pattern, "muffleWarning") [13:11:05.465] if (muffled) [13:11:05.465] invokeRestart("muffleWarning") [13:11:05.465] } [13:11:05.465] else if (inherits(cond, "condition")) { [13:11:05.465] if (!is.null(pattern)) { [13:11:05.465] computeRestarts <- base::computeRestarts [13:11:05.465] grepl <- base::grepl [13:11:05.465] restarts <- computeRestarts(cond) [13:11:05.465] for (restart in restarts) { [13:11:05.465] name <- restart$name [13:11:05.465] if (is.null(name)) [13:11:05.465] next [13:11:05.465] if (!grepl(pattern, name)) [13:11:05.465] next [13:11:05.465] invokeRestart(restart) [13:11:05.465] muffled <- TRUE [13:11:05.465] break [13:11:05.465] } [13:11:05.465] } [13:11:05.465] } [13:11:05.465] invisible(muffled) [13:11:05.465] } [13:11:05.465] muffleCondition(cond, pattern = "^muffle") [13:11:05.465] } [13:11:05.465] } [13:11:05.465] else { [13:11:05.465] if (TRUE) { [13:11:05.465] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.465] { [13:11:05.465] inherits <- base::inherits [13:11:05.465] invokeRestart <- base::invokeRestart [13:11:05.465] is.null <- base::is.null [13:11:05.465] muffled <- FALSE [13:11:05.465] if (inherits(cond, "message")) { [13:11:05.465] muffled <- grepl(pattern, "muffleMessage") [13:11:05.465] if (muffled) [13:11:05.465] invokeRestart("muffleMessage") [13:11:05.465] } [13:11:05.465] else if (inherits(cond, "warning")) { [13:11:05.465] muffled <- grepl(pattern, "muffleWarning") [13:11:05.465] if (muffled) [13:11:05.465] invokeRestart("muffleWarning") [13:11:05.465] } [13:11:05.465] else if (inherits(cond, "condition")) { [13:11:05.465] if (!is.null(pattern)) { [13:11:05.465] computeRestarts <- base::computeRestarts [13:11:05.465] grepl <- base::grepl [13:11:05.465] restarts <- computeRestarts(cond) [13:11:05.465] for (restart in restarts) { [13:11:05.465] name <- restart$name [13:11:05.465] if (is.null(name)) [13:11:05.465] next [13:11:05.465] if (!grepl(pattern, name)) [13:11:05.465] next [13:11:05.465] invokeRestart(restart) [13:11:05.465] muffled <- TRUE [13:11:05.465] break [13:11:05.465] } [13:11:05.465] } [13:11:05.465] } [13:11:05.465] invisible(muffled) [13:11:05.465] } [13:11:05.465] muffleCondition(cond, pattern = "^muffle") [13:11:05.465] } [13:11:05.465] } [13:11:05.465] } [13:11:05.465] })) [13:11:05.465] }, error = function(ex) { [13:11:05.465] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.465] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.465] ...future.rng), started = ...future.startTime, [13:11:05.465] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.465] version = "1.8"), class = "FutureResult") [13:11:05.465] }, finally = { [13:11:05.465] if (!identical(...future.workdir, getwd())) [13:11:05.465] setwd(...future.workdir) [13:11:05.465] { [13:11:05.465] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.465] ...future.oldOptions$nwarnings <- NULL [13:11:05.465] } [13:11:05.465] base::options(...future.oldOptions) [13:11:05.465] if (.Platform$OS.type == "windows") { [13:11:05.465] old_names <- names(...future.oldEnvVars) [13:11:05.465] envs <- base::Sys.getenv() [13:11:05.465] names <- names(envs) [13:11:05.465] common <- intersect(names, old_names) [13:11:05.465] added <- setdiff(names, old_names) [13:11:05.465] removed <- setdiff(old_names, names) [13:11:05.465] changed <- common[...future.oldEnvVars[common] != [13:11:05.465] envs[common]] [13:11:05.465] NAMES <- toupper(changed) [13:11:05.465] args <- list() [13:11:05.465] for (kk in seq_along(NAMES)) { [13:11:05.465] name <- changed[[kk]] [13:11:05.465] NAME <- NAMES[[kk]] [13:11:05.465] if (name != NAME && is.element(NAME, old_names)) [13:11:05.465] next [13:11:05.465] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.465] } [13:11:05.465] NAMES <- toupper(added) [13:11:05.465] for (kk in seq_along(NAMES)) { [13:11:05.465] name <- added[[kk]] [13:11:05.465] NAME <- NAMES[[kk]] [13:11:05.465] if (name != NAME && is.element(NAME, old_names)) [13:11:05.465] next [13:11:05.465] args[[name]] <- "" [13:11:05.465] } [13:11:05.465] NAMES <- toupper(removed) [13:11:05.465] for (kk in seq_along(NAMES)) { [13:11:05.465] name <- removed[[kk]] [13:11:05.465] NAME <- NAMES[[kk]] [13:11:05.465] if (name != NAME && is.element(NAME, old_names)) [13:11:05.465] next [13:11:05.465] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.465] } [13:11:05.465] if (length(args) > 0) [13:11:05.465] base::do.call(base::Sys.setenv, args = args) [13:11:05.465] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.465] } [13:11:05.465] else { [13:11:05.465] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.465] } [13:11:05.465] { [13:11:05.465] if (base::length(...future.futureOptionsAdded) > [13:11:05.465] 0L) { [13:11:05.465] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.465] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.465] base::options(opts) [13:11:05.465] } [13:11:05.465] { [13:11:05.465] NULL [13:11:05.465] options(future.plan = NULL) [13:11:05.465] if (is.na(NA_character_)) [13:11:05.465] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.465] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.465] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.465] .init = FALSE) [13:11:05.465] } [13:11:05.465] } [13:11:05.465] } [13:11:05.465] }) [13:11:05.465] if (TRUE) { [13:11:05.465] base::sink(type = "output", split = FALSE) [13:11:05.465] if (TRUE) { [13:11:05.465] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.465] } [13:11:05.465] else { [13:11:05.465] ...future.result["stdout"] <- base::list(NULL) [13:11:05.465] } [13:11:05.465] base::close(...future.stdout) [13:11:05.465] ...future.stdout <- NULL [13:11:05.465] } [13:11:05.465] ...future.result$conditions <- ...future.conditions [13:11:05.465] ...future.result$finished <- base::Sys.time() [13:11:05.465] ...future.result [13:11:05.465] } [13:11:05.568] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:05.569] 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) [13:11:05.572] getGlobalsAndPackages() ... [13:11:05.572] Searching for globals... [13:11:05.584] - globals found: [9] '{', '<-', ':', 'sumtwo', '+', 'a', '*', 'b', '[' [13:11:05.584] Searching for globals ... DONE [13:11:05.584] Resolving globals: FALSE [13:11:05.586] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:11:05.586] 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') [13:11:05.587] - globals: [3] 'sumtwo', 'a', 'b' [13:11:05.587] [13:11:05.587] getGlobalsAndPackages() ... DONE [13:11:05.587] run() for 'Future' ... [13:11:05.588] - state: 'created' [13:11:05.588] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.590] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.591] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.591] - Field: 'label' [13:11:05.591] - Field: 'local' [13:11:05.591] - Field: 'owner' [13:11:05.591] - Field: 'envir' [13:11:05.591] - Field: 'packages' [13:11:05.592] - Field: 'gc' [13:11:05.592] - Field: 'conditions' [13:11:05.592] - Field: 'expr' [13:11:05.592] - Field: 'uuid' [13:11:05.592] - Field: 'seed' [13:11:05.592] - Field: 'version' [13:11:05.593] - Field: 'result' [13:11:05.593] - Field: 'asynchronous' [13:11:05.593] - Field: 'calls' [13:11:05.593] - Field: 'globals' [13:11:05.593] - Field: 'stdout' [13:11:05.593] - Field: 'earlySignal' [13:11:05.594] - Field: 'lazy' [13:11:05.594] - Field: 'state' [13:11:05.594] - Field: '.cluster' [13:11:05.594] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.594] - Launch lazy future ... [13:11:05.595] Packages needed by the future expression (n = 0): [13:11:05.595] Packages needed by future strategies (n = 0): [13:11:05.595] { [13:11:05.595] { [13:11:05.595] { [13:11:05.595] ...future.startTime <- base::Sys.time() [13:11:05.595] { [13:11:05.595] { [13:11:05.595] { [13:11:05.595] base::local({ [13:11:05.595] has_future <- base::requireNamespace("future", [13:11:05.595] quietly = TRUE) [13:11:05.595] if (has_future) { [13:11:05.595] ns <- base::getNamespace("future") [13:11:05.595] version <- ns[[".package"]][["version"]] [13:11:05.595] if (is.null(version)) [13:11:05.595] version <- utils::packageVersion("future") [13:11:05.595] } [13:11:05.595] else { [13:11:05.595] version <- NULL [13:11:05.595] } [13:11:05.595] if (!has_future || version < "1.8.0") { [13:11:05.595] info <- base::c(r_version = base::gsub("R version ", [13:11:05.595] "", base::R.version$version.string), [13:11:05.595] platform = base::sprintf("%s (%s-bit)", [13:11:05.595] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.595] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.595] "release", "version")], collapse = " "), [13:11:05.595] hostname = base::Sys.info()[["nodename"]]) [13:11:05.595] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.595] info) [13:11:05.595] info <- base::paste(info, collapse = "; ") [13:11:05.595] if (!has_future) { [13:11:05.595] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.595] info) [13:11:05.595] } [13:11:05.595] else { [13:11:05.595] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.595] info, version) [13:11:05.595] } [13:11:05.595] base::stop(msg) [13:11:05.595] } [13:11:05.595] }) [13:11:05.595] } [13:11:05.595] ...future.strategy.old <- future::plan("list") [13:11:05.595] options(future.plan = NULL) [13:11:05.595] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.595] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.595] } [13:11:05.595] ...future.workdir <- getwd() [13:11:05.595] } [13:11:05.595] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.595] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.595] } [13:11:05.595] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.595] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.595] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.595] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.595] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.595] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.595] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.595] base::names(...future.oldOptions)) [13:11:05.595] } [13:11:05.595] if (FALSE) { [13:11:05.595] } [13:11:05.595] else { [13:11:05.595] if (TRUE) { [13:11:05.595] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.595] open = "w") [13:11:05.595] } [13:11:05.595] else { [13:11:05.595] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.595] windows = "NUL", "/dev/null"), open = "w") [13:11:05.595] } [13:11:05.595] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.595] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.595] base::sink(type = "output", split = FALSE) [13:11:05.595] base::close(...future.stdout) [13:11:05.595] }, add = TRUE) [13:11:05.595] } [13:11:05.595] ...future.frame <- base::sys.nframe() [13:11:05.595] ...future.conditions <- base::list() [13:11:05.595] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.595] if (FALSE) { [13:11:05.595] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.595] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.595] } [13:11:05.595] ...future.result <- base::tryCatch({ [13:11:05.595] base::withCallingHandlers({ [13:11:05.595] ...future.value <- base::withVisible(base::local({ [13:11:05.595] x <- 1:10 [13:11:05.595] sumtwo(a + b * x) [13:11:05.595] })) [13:11:05.595] future::FutureResult(value = ...future.value$value, [13:11:05.595] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.595] ...future.rng), globalenv = if (FALSE) [13:11:05.595] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.595] ...future.globalenv.names)) [13:11:05.595] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.595] }, condition = base::local({ [13:11:05.595] c <- base::c [13:11:05.595] inherits <- base::inherits [13:11:05.595] invokeRestart <- base::invokeRestart [13:11:05.595] length <- base::length [13:11:05.595] list <- base::list [13:11:05.595] seq.int <- base::seq.int [13:11:05.595] signalCondition <- base::signalCondition [13:11:05.595] sys.calls <- base::sys.calls [13:11:05.595] `[[` <- base::`[[` [13:11:05.595] `+` <- base::`+` [13:11:05.595] `<<-` <- base::`<<-` [13:11:05.595] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.595] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.595] 3L)] [13:11:05.595] } [13:11:05.595] function(cond) { [13:11:05.595] is_error <- inherits(cond, "error") [13:11:05.595] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.595] NULL) [13:11:05.595] if (is_error) { [13:11:05.595] sessionInformation <- function() { [13:11:05.595] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.595] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.595] search = base::search(), system = base::Sys.info()) [13:11:05.595] } [13:11:05.595] ...future.conditions[[length(...future.conditions) + [13:11:05.595] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.595] cond$call), session = sessionInformation(), [13:11:05.595] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.595] signalCondition(cond) [13:11:05.595] } [13:11:05.595] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.595] signal <- FALSE && inherits(cond, character(0)) [13:11:05.595] ...future.conditions[[length(...future.conditions) + [13:11:05.595] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.595] if (FALSE && !signal) { [13:11:05.595] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.595] { [13:11:05.595] inherits <- base::inherits [13:11:05.595] invokeRestart <- base::invokeRestart [13:11:05.595] is.null <- base::is.null [13:11:05.595] muffled <- FALSE [13:11:05.595] if (inherits(cond, "message")) { [13:11:05.595] muffled <- grepl(pattern, "muffleMessage") [13:11:05.595] if (muffled) [13:11:05.595] invokeRestart("muffleMessage") [13:11:05.595] } [13:11:05.595] else if (inherits(cond, "warning")) { [13:11:05.595] muffled <- grepl(pattern, "muffleWarning") [13:11:05.595] if (muffled) [13:11:05.595] invokeRestart("muffleWarning") [13:11:05.595] } [13:11:05.595] else if (inherits(cond, "condition")) { [13:11:05.595] if (!is.null(pattern)) { [13:11:05.595] computeRestarts <- base::computeRestarts [13:11:05.595] grepl <- base::grepl [13:11:05.595] restarts <- computeRestarts(cond) [13:11:05.595] for (restart in restarts) { [13:11:05.595] name <- restart$name [13:11:05.595] if (is.null(name)) [13:11:05.595] next [13:11:05.595] if (!grepl(pattern, name)) [13:11:05.595] next [13:11:05.595] invokeRestart(restart) [13:11:05.595] muffled <- TRUE [13:11:05.595] break [13:11:05.595] } [13:11:05.595] } [13:11:05.595] } [13:11:05.595] invisible(muffled) [13:11:05.595] } [13:11:05.595] muffleCondition(cond, pattern = "^muffle") [13:11:05.595] } [13:11:05.595] } [13:11:05.595] else { [13:11:05.595] if (TRUE) { [13:11:05.595] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.595] { [13:11:05.595] inherits <- base::inherits [13:11:05.595] invokeRestart <- base::invokeRestart [13:11:05.595] is.null <- base::is.null [13:11:05.595] muffled <- FALSE [13:11:05.595] if (inherits(cond, "message")) { [13:11:05.595] muffled <- grepl(pattern, "muffleMessage") [13:11:05.595] if (muffled) [13:11:05.595] invokeRestart("muffleMessage") [13:11:05.595] } [13:11:05.595] else if (inherits(cond, "warning")) { [13:11:05.595] muffled <- grepl(pattern, "muffleWarning") [13:11:05.595] if (muffled) [13:11:05.595] invokeRestart("muffleWarning") [13:11:05.595] } [13:11:05.595] else if (inherits(cond, "condition")) { [13:11:05.595] if (!is.null(pattern)) { [13:11:05.595] computeRestarts <- base::computeRestarts [13:11:05.595] grepl <- base::grepl [13:11:05.595] restarts <- computeRestarts(cond) [13:11:05.595] for (restart in restarts) { [13:11:05.595] name <- restart$name [13:11:05.595] if (is.null(name)) [13:11:05.595] next [13:11:05.595] if (!grepl(pattern, name)) [13:11:05.595] next [13:11:05.595] invokeRestart(restart) [13:11:05.595] muffled <- TRUE [13:11:05.595] break [13:11:05.595] } [13:11:05.595] } [13:11:05.595] } [13:11:05.595] invisible(muffled) [13:11:05.595] } [13:11:05.595] muffleCondition(cond, pattern = "^muffle") [13:11:05.595] } [13:11:05.595] } [13:11:05.595] } [13:11:05.595] })) [13:11:05.595] }, error = function(ex) { [13:11:05.595] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.595] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.595] ...future.rng), started = ...future.startTime, [13:11:05.595] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.595] version = "1.8"), class = "FutureResult") [13:11:05.595] }, finally = { [13:11:05.595] if (!identical(...future.workdir, getwd())) [13:11:05.595] setwd(...future.workdir) [13:11:05.595] { [13:11:05.595] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.595] ...future.oldOptions$nwarnings <- NULL [13:11:05.595] } [13:11:05.595] base::options(...future.oldOptions) [13:11:05.595] if (.Platform$OS.type == "windows") { [13:11:05.595] old_names <- names(...future.oldEnvVars) [13:11:05.595] envs <- base::Sys.getenv() [13:11:05.595] names <- names(envs) [13:11:05.595] common <- intersect(names, old_names) [13:11:05.595] added <- setdiff(names, old_names) [13:11:05.595] removed <- setdiff(old_names, names) [13:11:05.595] changed <- common[...future.oldEnvVars[common] != [13:11:05.595] envs[common]] [13:11:05.595] NAMES <- toupper(changed) [13:11:05.595] args <- list() [13:11:05.595] for (kk in seq_along(NAMES)) { [13:11:05.595] name <- changed[[kk]] [13:11:05.595] NAME <- NAMES[[kk]] [13:11:05.595] if (name != NAME && is.element(NAME, old_names)) [13:11:05.595] next [13:11:05.595] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.595] } [13:11:05.595] NAMES <- toupper(added) [13:11:05.595] for (kk in seq_along(NAMES)) { [13:11:05.595] name <- added[[kk]] [13:11:05.595] NAME <- NAMES[[kk]] [13:11:05.595] if (name != NAME && is.element(NAME, old_names)) [13:11:05.595] next [13:11:05.595] args[[name]] <- "" [13:11:05.595] } [13:11:05.595] NAMES <- toupper(removed) [13:11:05.595] for (kk in seq_along(NAMES)) { [13:11:05.595] name <- removed[[kk]] [13:11:05.595] NAME <- NAMES[[kk]] [13:11:05.595] if (name != NAME && is.element(NAME, old_names)) [13:11:05.595] next [13:11:05.595] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.595] } [13:11:05.595] if (length(args) > 0) [13:11:05.595] base::do.call(base::Sys.setenv, args = args) [13:11:05.595] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.595] } [13:11:05.595] else { [13:11:05.595] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.595] } [13:11:05.595] { [13:11:05.595] if (base::length(...future.futureOptionsAdded) > [13:11:05.595] 0L) { [13:11:05.595] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.595] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.595] base::options(opts) [13:11:05.595] } [13:11:05.595] { [13:11:05.595] NULL [13:11:05.595] options(future.plan = NULL) [13:11:05.595] if (is.na(NA_character_)) [13:11:05.595] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.595] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.595] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.595] .init = FALSE) [13:11:05.595] } [13:11:05.595] } [13:11:05.595] } [13:11:05.595] }) [13:11:05.595] if (TRUE) { [13:11:05.595] base::sink(type = "output", split = FALSE) [13:11:05.595] if (TRUE) { [13:11:05.595] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.595] } [13:11:05.595] else { [13:11:05.595] ...future.result["stdout"] <- base::list(NULL) [13:11:05.595] } [13:11:05.595] base::close(...future.stdout) [13:11:05.595] ...future.stdout <- NULL [13:11:05.595] } [13:11:05.595] ...future.result$conditions <- ...future.conditions [13:11:05.595] ...future.result$finished <- base::Sys.time() [13:11:05.595] ...future.result [13:11:05.595] } [13:11:05.599] - Launch lazy future ... done [13:11:05.599] 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) [13:11:05.601] resolved() for 'MiraiFuture' ... [13:11:05.601] - state: 'running' [13:11:05.601] - run: TRUE [13:11:05.602] - result: 'NULL' [13:11:05.602] - resolved: FALSE [13:11:05.602] resolved() for 'MiraiFuture' ... done Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: d756c7fe-fe6e-e289-cc6f-6bb173826481 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 [13:11:05.605] getGlobalsAndPackages() ... [13:11:05.605] Searching for globals... [13:11:05.608] - globals found: [9] '{', '<-', ':', 'sumtwo', '+', 'a', '*', 'b', '[' [13:11:05.608] Searching for globals ... DONE [13:11:05.608] Resolving globals: FALSE [13:11:05.609] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:11:05.610] 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') [13:11:05.610] - globals: [3] 'sumtwo', 'a', 'b' [13:11:05.610] [13:11:05.610] getGlobalsAndPackages() ... DONE [13:11:05.610] run() for 'Future' ... [13:11:05.611] - state: 'created' [13:11:05.611] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.613] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.613] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.614] - Field: 'label' [13:11:05.616] - Field: 'local' [13:11:05.616] - Field: 'owner' [13:11:05.616] - Field: 'envir' [13:11:05.616] - Field: 'packages' [13:11:05.617] - Field: 'gc' [13:11:05.617] - Field: 'conditions' [13:11:05.617] - Field: 'expr' [13:11:05.617] - Field: 'uuid' [13:11:05.617] - Field: 'seed' [13:11:05.617] - Field: 'version' [13:11:05.618] - Field: 'result' [13:11:05.618] - Field: 'asynchronous' [13:11:05.618] - Field: 'calls' [13:11:05.618] - Field: 'globals' [13:11:05.618] - Field: 'stdout' [13:11:05.619] - Field: 'earlySignal' [13:11:05.619] - Field: 'lazy' [13:11:05.619] - Field: 'state' [13:11:05.619] - Field: '.cluster' [13:11:05.619] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.619] - Launch lazy future ... [13:11:05.620] Packages needed by the future expression (n = 0): [13:11:05.620] Packages needed by future strategies (n = 0): [13:11:05.620] { [13:11:05.620] { [13:11:05.620] { [13:11:05.620] ...future.startTime <- base::Sys.time() [13:11:05.620] { [13:11:05.620] { [13:11:05.620] { [13:11:05.620] base::local({ [13:11:05.620] has_future <- base::requireNamespace("future", [13:11:05.620] quietly = TRUE) [13:11:05.620] if (has_future) { [13:11:05.620] ns <- base::getNamespace("future") [13:11:05.620] version <- ns[[".package"]][["version"]] [13:11:05.620] if (is.null(version)) [13:11:05.620] version <- utils::packageVersion("future") [13:11:05.620] } [13:11:05.620] else { [13:11:05.620] version <- NULL [13:11:05.620] } [13:11:05.620] if (!has_future || version < "1.8.0") { [13:11:05.620] info <- base::c(r_version = base::gsub("R version ", [13:11:05.620] "", base::R.version$version.string), [13:11:05.620] platform = base::sprintf("%s (%s-bit)", [13:11:05.620] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.620] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.620] "release", "version")], collapse = " "), [13:11:05.620] hostname = base::Sys.info()[["nodename"]]) [13:11:05.620] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.620] info) [13:11:05.620] info <- base::paste(info, collapse = "; ") [13:11:05.620] if (!has_future) { [13:11:05.620] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.620] info) [13:11:05.620] } [13:11:05.620] else { [13:11:05.620] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.620] info, version) [13:11:05.620] } [13:11:05.620] base::stop(msg) [13:11:05.620] } [13:11:05.620] }) [13:11:05.620] } [13:11:05.620] ...future.strategy.old <- future::plan("list") [13:11:05.620] options(future.plan = NULL) [13:11:05.620] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.620] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.620] } [13:11:05.620] ...future.workdir <- getwd() [13:11:05.620] } [13:11:05.620] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.620] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.620] } [13:11:05.620] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.620] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.620] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.620] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.620] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.620] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.620] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.620] base::names(...future.oldOptions)) [13:11:05.620] } [13:11:05.620] if (FALSE) { [13:11:05.620] } [13:11:05.620] else { [13:11:05.620] if (TRUE) { [13:11:05.620] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.620] open = "w") [13:11:05.620] } [13:11:05.620] else { [13:11:05.620] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.620] windows = "NUL", "/dev/null"), open = "w") [13:11:05.620] } [13:11:05.620] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.620] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.620] base::sink(type = "output", split = FALSE) [13:11:05.620] base::close(...future.stdout) [13:11:05.620] }, add = TRUE) [13:11:05.620] } [13:11:05.620] ...future.frame <- base::sys.nframe() [13:11:05.620] ...future.conditions <- base::list() [13:11:05.620] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.620] if (FALSE) { [13:11:05.620] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.620] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.620] } [13:11:05.620] ...future.result <- base::tryCatch({ [13:11:05.620] base::withCallingHandlers({ [13:11:05.620] ...future.value <- base::withVisible(base::local({ [13:11:05.620] x <- 1:10 [13:11:05.620] sumtwo(a + b * x) [13:11:05.620] })) [13:11:05.620] future::FutureResult(value = ...future.value$value, [13:11:05.620] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.620] ...future.rng), globalenv = if (FALSE) [13:11:05.620] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.620] ...future.globalenv.names)) [13:11:05.620] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.620] }, condition = base::local({ [13:11:05.620] c <- base::c [13:11:05.620] inherits <- base::inherits [13:11:05.620] invokeRestart <- base::invokeRestart [13:11:05.620] length <- base::length [13:11:05.620] list <- base::list [13:11:05.620] seq.int <- base::seq.int [13:11:05.620] signalCondition <- base::signalCondition [13:11:05.620] sys.calls <- base::sys.calls [13:11:05.620] `[[` <- base::`[[` [13:11:05.620] `+` <- base::`+` [13:11:05.620] `<<-` <- base::`<<-` [13:11:05.620] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.620] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.620] 3L)] [13:11:05.620] } [13:11:05.620] function(cond) { [13:11:05.620] is_error <- inherits(cond, "error") [13:11:05.620] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.620] NULL) [13:11:05.620] if (is_error) { [13:11:05.620] sessionInformation <- function() { [13:11:05.620] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.620] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.620] search = base::search(), system = base::Sys.info()) [13:11:05.620] } [13:11:05.620] ...future.conditions[[length(...future.conditions) + [13:11:05.620] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.620] cond$call), session = sessionInformation(), [13:11:05.620] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.620] signalCondition(cond) [13:11:05.620] } [13:11:05.620] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.620] signal <- FALSE && inherits(cond, character(0)) [13:11:05.620] ...future.conditions[[length(...future.conditions) + [13:11:05.620] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.620] if (FALSE && !signal) { [13:11:05.620] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.620] { [13:11:05.620] inherits <- base::inherits [13:11:05.620] invokeRestart <- base::invokeRestart [13:11:05.620] is.null <- base::is.null [13:11:05.620] muffled <- FALSE [13:11:05.620] if (inherits(cond, "message")) { [13:11:05.620] muffled <- grepl(pattern, "muffleMessage") [13:11:05.620] if (muffled) [13:11:05.620] invokeRestart("muffleMessage") [13:11:05.620] } [13:11:05.620] else if (inherits(cond, "warning")) { [13:11:05.620] muffled <- grepl(pattern, "muffleWarning") [13:11:05.620] if (muffled) [13:11:05.620] invokeRestart("muffleWarning") [13:11:05.620] } [13:11:05.620] else if (inherits(cond, "condition")) { [13:11:05.620] if (!is.null(pattern)) { [13:11:05.620] computeRestarts <- base::computeRestarts [13:11:05.620] grepl <- base::grepl [13:11:05.620] restarts <- computeRestarts(cond) [13:11:05.620] for (restart in restarts) { [13:11:05.620] name <- restart$name [13:11:05.620] if (is.null(name)) [13:11:05.620] next [13:11:05.620] if (!grepl(pattern, name)) [13:11:05.620] next [13:11:05.620] invokeRestart(restart) [13:11:05.620] muffled <- TRUE [13:11:05.620] break [13:11:05.620] } [13:11:05.620] } [13:11:05.620] } [13:11:05.620] invisible(muffled) [13:11:05.620] } [13:11:05.620] muffleCondition(cond, pattern = "^muffle") [13:11:05.620] } [13:11:05.620] } [13:11:05.620] else { [13:11:05.620] if (TRUE) { [13:11:05.620] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.620] { [13:11:05.620] inherits <- base::inherits [13:11:05.620] invokeRestart <- base::invokeRestart [13:11:05.620] is.null <- base::is.null [13:11:05.620] muffled <- FALSE [13:11:05.620] if (inherits(cond, "message")) { [13:11:05.620] muffled <- grepl(pattern, "muffleMessage") [13:11:05.620] if (muffled) [13:11:05.620] invokeRestart("muffleMessage") [13:11:05.620] } [13:11:05.620] else if (inherits(cond, "warning")) { [13:11:05.620] muffled <- grepl(pattern, "muffleWarning") [13:11:05.620] if (muffled) [13:11:05.620] invokeRestart("muffleWarning") [13:11:05.620] } [13:11:05.620] else if (inherits(cond, "condition")) { [13:11:05.620] if (!is.null(pattern)) { [13:11:05.620] computeRestarts <- base::computeRestarts [13:11:05.620] grepl <- base::grepl [13:11:05.620] restarts <- computeRestarts(cond) [13:11:05.620] for (restart in restarts) { [13:11:05.620] name <- restart$name [13:11:05.620] if (is.null(name)) [13:11:05.620] next [13:11:05.620] if (!grepl(pattern, name)) [13:11:05.620] next [13:11:05.620] invokeRestart(restart) [13:11:05.620] muffled <- TRUE [13:11:05.620] break [13:11:05.620] } [13:11:05.620] } [13:11:05.620] } [13:11:05.620] invisible(muffled) [13:11:05.620] } [13:11:05.620] muffleCondition(cond, pattern = "^muffle") [13:11:05.620] } [13:11:05.620] } [13:11:05.620] } [13:11:05.620] })) [13:11:05.620] }, error = function(ex) { [13:11:05.620] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.620] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.620] ...future.rng), started = ...future.startTime, [13:11:05.620] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.620] version = "1.8"), class = "FutureResult") [13:11:05.620] }, finally = { [13:11:05.620] if (!identical(...future.workdir, getwd())) [13:11:05.620] setwd(...future.workdir) [13:11:05.620] { [13:11:05.620] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.620] ...future.oldOptions$nwarnings <- NULL [13:11:05.620] } [13:11:05.620] base::options(...future.oldOptions) [13:11:05.620] if (.Platform$OS.type == "windows") { [13:11:05.620] old_names <- names(...future.oldEnvVars) [13:11:05.620] envs <- base::Sys.getenv() [13:11:05.620] names <- names(envs) [13:11:05.620] common <- intersect(names, old_names) [13:11:05.620] added <- setdiff(names, old_names) [13:11:05.620] removed <- setdiff(old_names, names) [13:11:05.620] changed <- common[...future.oldEnvVars[common] != [13:11:05.620] envs[common]] [13:11:05.620] NAMES <- toupper(changed) [13:11:05.620] args <- list() [13:11:05.620] for (kk in seq_along(NAMES)) { [13:11:05.620] name <- changed[[kk]] [13:11:05.620] NAME <- NAMES[[kk]] [13:11:05.620] if (name != NAME && is.element(NAME, old_names)) [13:11:05.620] next [13:11:05.620] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.620] } [13:11:05.620] NAMES <- toupper(added) [13:11:05.620] for (kk in seq_along(NAMES)) { [13:11:05.620] name <- added[[kk]] [13:11:05.620] NAME <- NAMES[[kk]] [13:11:05.620] if (name != NAME && is.element(NAME, old_names)) [13:11:05.620] next [13:11:05.620] args[[name]] <- "" [13:11:05.620] } [13:11:05.620] NAMES <- toupper(removed) [13:11:05.620] for (kk in seq_along(NAMES)) { [13:11:05.620] name <- removed[[kk]] [13:11:05.620] NAME <- NAMES[[kk]] [13:11:05.620] if (name != NAME && is.element(NAME, old_names)) [13:11:05.620] next [13:11:05.620] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.620] } [13:11:05.620] if (length(args) > 0) [13:11:05.620] base::do.call(base::Sys.setenv, args = args) [13:11:05.620] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.620] } [13:11:05.620] else { [13:11:05.620] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.620] } [13:11:05.620] { [13:11:05.620] if (base::length(...future.futureOptionsAdded) > [13:11:05.620] 0L) { [13:11:05.620] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.620] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.620] base::options(opts) [13:11:05.620] } [13:11:05.620] { [13:11:05.620] NULL [13:11:05.620] options(future.plan = NULL) [13:11:05.620] if (is.na(NA_character_)) [13:11:05.620] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.620] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.620] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.620] .init = FALSE) [13:11:05.620] } [13:11:05.620] } [13:11:05.620] } [13:11:05.620] }) [13:11:05.620] if (TRUE) { [13:11:05.620] base::sink(type = "output", split = FALSE) [13:11:05.620] if (TRUE) { [13:11:05.620] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.620] } [13:11:05.620] else { [13:11:05.620] ...future.result["stdout"] <- base::list(NULL) [13:11:05.620] } [13:11:05.620] base::close(...future.stdout) [13:11:05.620] ...future.stdout <- NULL [13:11:05.620] } [13:11:05.620] ...future.result$conditions <- ...future.conditions [13:11:05.620] ...future.result$finished <- base::Sys.time() [13:11:05.620] ...future.result [13:11:05.620] } [13:11:05.624] - Launch lazy future ... done [13:11:05.624] 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 [13:11:05.628] getGlobalsAndPackages() ... [13:11:05.628] Not searching for globals [13:11:05.628] - globals: [0] [13:11:05.628] getGlobalsAndPackages() ... DONE [13:11:05.629] run() for 'Future' ... [13:11:05.629] - state: 'created' [13:11:05.629] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.631] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.632] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.632] - Field: 'label' [13:11:05.632] - Field: 'local' [13:11:05.632] - Field: 'owner' [13:11:05.632] - Field: 'envir' [13:11:05.633] - Field: 'packages' [13:11:05.633] - Field: 'gc' [13:11:05.633] - Field: 'conditions' [13:11:05.633] - Field: 'expr' [13:11:05.633] - Field: 'uuid' [13:11:05.633] - Field: 'seed' [13:11:05.634] - Field: 'version' [13:11:05.634] - Field: 'result' [13:11:05.634] - Field: 'asynchronous' [13:11:05.634] - Field: 'calls' [13:11:05.634] - Field: 'globals' [13:11:05.634] - Field: 'stdout' [13:11:05.635] - Field: 'earlySignal' [13:11:05.635] - Field: 'lazy' [13:11:05.635] - Field: 'state' [13:11:05.635] - Field: '.cluster' [13:11:05.635] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.635] - Launch lazy future ... [13:11:05.636] Packages needed by the future expression (n = 0): [13:11:05.636] Packages needed by future strategies (n = 0): [13:11:05.636] { [13:11:05.636] { [13:11:05.636] { [13:11:05.636] ...future.startTime <- base::Sys.time() [13:11:05.636] { [13:11:05.636] { [13:11:05.636] { [13:11:05.636] base::local({ [13:11:05.636] has_future <- base::requireNamespace("future", [13:11:05.636] quietly = TRUE) [13:11:05.636] if (has_future) { [13:11:05.636] ns <- base::getNamespace("future") [13:11:05.636] version <- ns[[".package"]][["version"]] [13:11:05.636] if (is.null(version)) [13:11:05.636] version <- utils::packageVersion("future") [13:11:05.636] } [13:11:05.636] else { [13:11:05.636] version <- NULL [13:11:05.636] } [13:11:05.636] if (!has_future || version < "1.8.0") { [13:11:05.636] info <- base::c(r_version = base::gsub("R version ", [13:11:05.636] "", base::R.version$version.string), [13:11:05.636] platform = base::sprintf("%s (%s-bit)", [13:11:05.636] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.636] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.636] "release", "version")], collapse = " "), [13:11:05.636] hostname = base::Sys.info()[["nodename"]]) [13:11:05.636] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.636] info) [13:11:05.636] info <- base::paste(info, collapse = "; ") [13:11:05.636] if (!has_future) { [13:11:05.636] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.636] info) [13:11:05.636] } [13:11:05.636] else { [13:11:05.636] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.636] info, version) [13:11:05.636] } [13:11:05.636] base::stop(msg) [13:11:05.636] } [13:11:05.636] }) [13:11:05.636] } [13:11:05.636] ...future.strategy.old <- future::plan("list") [13:11:05.636] options(future.plan = NULL) [13:11:05.636] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.636] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.636] } [13:11:05.636] ...future.workdir <- getwd() [13:11:05.636] } [13:11:05.636] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.636] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.636] } [13:11:05.636] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.636] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.636] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.636] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.636] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.636] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.636] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.636] base::names(...future.oldOptions)) [13:11:05.636] } [13:11:05.636] if (FALSE) { [13:11:05.636] } [13:11:05.636] else { [13:11:05.636] if (TRUE) { [13:11:05.636] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.636] open = "w") [13:11:05.636] } [13:11:05.636] else { [13:11:05.636] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.636] windows = "NUL", "/dev/null"), open = "w") [13:11:05.636] } [13:11:05.636] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.636] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.636] base::sink(type = "output", split = FALSE) [13:11:05.636] base::close(...future.stdout) [13:11:05.636] }, add = TRUE) [13:11:05.636] } [13:11:05.636] ...future.frame <- base::sys.nframe() [13:11:05.636] ...future.conditions <- base::list() [13:11:05.636] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.636] if (FALSE) { [13:11:05.636] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.636] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.636] } [13:11:05.636] ...future.result <- base::tryCatch({ [13:11:05.636] base::withCallingHandlers({ [13:11:05.636] ...future.value <- base::withVisible(base::local({ [13:11:05.636] 1 [13:11:05.636] })) [13:11:05.636] future::FutureResult(value = ...future.value$value, [13:11:05.636] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.636] ...future.rng), globalenv = if (FALSE) [13:11:05.636] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.636] ...future.globalenv.names)) [13:11:05.636] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.636] }, condition = base::local({ [13:11:05.636] c <- base::c [13:11:05.636] inherits <- base::inherits [13:11:05.636] invokeRestart <- base::invokeRestart [13:11:05.636] length <- base::length [13:11:05.636] list <- base::list [13:11:05.636] seq.int <- base::seq.int [13:11:05.636] signalCondition <- base::signalCondition [13:11:05.636] sys.calls <- base::sys.calls [13:11:05.636] `[[` <- base::`[[` [13:11:05.636] `+` <- base::`+` [13:11:05.636] `<<-` <- base::`<<-` [13:11:05.636] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.636] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.636] 3L)] [13:11:05.636] } [13:11:05.636] function(cond) { [13:11:05.636] is_error <- inherits(cond, "error") [13:11:05.636] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.636] NULL) [13:11:05.636] if (is_error) { [13:11:05.636] sessionInformation <- function() { [13:11:05.636] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.636] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.636] search = base::search(), system = base::Sys.info()) [13:11:05.636] } [13:11:05.636] ...future.conditions[[length(...future.conditions) + [13:11:05.636] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.636] cond$call), session = sessionInformation(), [13:11:05.636] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.636] signalCondition(cond) [13:11:05.636] } [13:11:05.636] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.636] signal <- FALSE && inherits(cond, character(0)) [13:11:05.636] ...future.conditions[[length(...future.conditions) + [13:11:05.636] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.636] if (FALSE && !signal) { [13:11:05.636] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.636] { [13:11:05.636] inherits <- base::inherits [13:11:05.636] invokeRestart <- base::invokeRestart [13:11:05.636] is.null <- base::is.null [13:11:05.636] muffled <- FALSE [13:11:05.636] if (inherits(cond, "message")) { [13:11:05.636] muffled <- grepl(pattern, "muffleMessage") [13:11:05.636] if (muffled) [13:11:05.636] invokeRestart("muffleMessage") [13:11:05.636] } [13:11:05.636] else if (inherits(cond, "warning")) { [13:11:05.636] muffled <- grepl(pattern, "muffleWarning") [13:11:05.636] if (muffled) [13:11:05.636] invokeRestart("muffleWarning") [13:11:05.636] } [13:11:05.636] else if (inherits(cond, "condition")) { [13:11:05.636] if (!is.null(pattern)) { [13:11:05.636] computeRestarts <- base::computeRestarts [13:11:05.636] grepl <- base::grepl [13:11:05.636] restarts <- computeRestarts(cond) [13:11:05.636] for (restart in restarts) { [13:11:05.636] name <- restart$name [13:11:05.636] if (is.null(name)) [13:11:05.636] next [13:11:05.636] if (!grepl(pattern, name)) [13:11:05.636] next [13:11:05.636] invokeRestart(restart) [13:11:05.636] muffled <- TRUE [13:11:05.636] break [13:11:05.636] } [13:11:05.636] } [13:11:05.636] } [13:11:05.636] invisible(muffled) [13:11:05.636] } [13:11:05.636] muffleCondition(cond, pattern = "^muffle") [13:11:05.636] } [13:11:05.636] } [13:11:05.636] else { [13:11:05.636] if (TRUE) { [13:11:05.636] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.636] { [13:11:05.636] inherits <- base::inherits [13:11:05.636] invokeRestart <- base::invokeRestart [13:11:05.636] is.null <- base::is.null [13:11:05.636] muffled <- FALSE [13:11:05.636] if (inherits(cond, "message")) { [13:11:05.636] muffled <- grepl(pattern, "muffleMessage") [13:11:05.636] if (muffled) [13:11:05.636] invokeRestart("muffleMessage") [13:11:05.636] } [13:11:05.636] else if (inherits(cond, "warning")) { [13:11:05.636] muffled <- grepl(pattern, "muffleWarning") [13:11:05.636] if (muffled) [13:11:05.636] invokeRestart("muffleWarning") [13:11:05.636] } [13:11:05.636] else if (inherits(cond, "condition")) { [13:11:05.636] if (!is.null(pattern)) { [13:11:05.636] computeRestarts <- base::computeRestarts [13:11:05.636] grepl <- base::grepl [13:11:05.636] restarts <- computeRestarts(cond) [13:11:05.636] for (restart in restarts) { [13:11:05.636] name <- restart$name [13:11:05.636] if (is.null(name)) [13:11:05.636] next [13:11:05.636] if (!grepl(pattern, name)) [13:11:05.636] next [13:11:05.636] invokeRestart(restart) [13:11:05.636] muffled <- TRUE [13:11:05.636] break [13:11:05.636] } [13:11:05.636] } [13:11:05.636] } [13:11:05.636] invisible(muffled) [13:11:05.636] } [13:11:05.636] muffleCondition(cond, pattern = "^muffle") [13:11:05.636] } [13:11:05.636] } [13:11:05.636] } [13:11:05.636] })) [13:11:05.636] }, error = function(ex) { [13:11:05.636] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.636] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.636] ...future.rng), started = ...future.startTime, [13:11:05.636] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.636] version = "1.8"), class = "FutureResult") [13:11:05.636] }, finally = { [13:11:05.636] if (!identical(...future.workdir, getwd())) [13:11:05.636] setwd(...future.workdir) [13:11:05.636] { [13:11:05.636] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.636] ...future.oldOptions$nwarnings <- NULL [13:11:05.636] } [13:11:05.636] base::options(...future.oldOptions) [13:11:05.636] if (.Platform$OS.type == "windows") { [13:11:05.636] old_names <- names(...future.oldEnvVars) [13:11:05.636] envs <- base::Sys.getenv() [13:11:05.636] names <- names(envs) [13:11:05.636] common <- intersect(names, old_names) [13:11:05.636] added <- setdiff(names, old_names) [13:11:05.636] removed <- setdiff(old_names, names) [13:11:05.636] changed <- common[...future.oldEnvVars[common] != [13:11:05.636] envs[common]] [13:11:05.636] NAMES <- toupper(changed) [13:11:05.636] args <- list() [13:11:05.636] for (kk in seq_along(NAMES)) { [13:11:05.636] name <- changed[[kk]] [13:11:05.636] NAME <- NAMES[[kk]] [13:11:05.636] if (name != NAME && is.element(NAME, old_names)) [13:11:05.636] next [13:11:05.636] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.636] } [13:11:05.636] NAMES <- toupper(added) [13:11:05.636] for (kk in seq_along(NAMES)) { [13:11:05.636] name <- added[[kk]] [13:11:05.636] NAME <- NAMES[[kk]] [13:11:05.636] if (name != NAME && is.element(NAME, old_names)) [13:11:05.636] next [13:11:05.636] args[[name]] <- "" [13:11:05.636] } [13:11:05.636] NAMES <- toupper(removed) [13:11:05.636] for (kk in seq_along(NAMES)) { [13:11:05.636] name <- removed[[kk]] [13:11:05.636] NAME <- NAMES[[kk]] [13:11:05.636] if (name != NAME && is.element(NAME, old_names)) [13:11:05.636] next [13:11:05.636] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.636] } [13:11:05.636] if (length(args) > 0) [13:11:05.636] base::do.call(base::Sys.setenv, args = args) [13:11:05.636] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.636] } [13:11:05.636] else { [13:11:05.636] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.636] } [13:11:05.636] { [13:11:05.636] if (base::length(...future.futureOptionsAdded) > [13:11:05.636] 0L) { [13:11:05.636] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.636] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.636] base::options(opts) [13:11:05.636] } [13:11:05.636] { [13:11:05.636] NULL [13:11:05.636] options(future.plan = NULL) [13:11:05.636] if (is.na(NA_character_)) [13:11:05.636] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.636] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.636] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.636] .init = FALSE) [13:11:05.636] } [13:11:05.636] } [13:11:05.636] } [13:11:05.636] }) [13:11:05.636] if (TRUE) { [13:11:05.636] base::sink(type = "output", split = FALSE) [13:11:05.636] if (TRUE) { [13:11:05.636] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.636] } [13:11:05.636] else { [13:11:05.636] ...future.result["stdout"] <- base::list(NULL) [13:11:05.636] } [13:11:05.636] base::close(...future.stdout) [13:11:05.636] ...future.stdout <- NULL [13:11:05.636] } [13:11:05.636] ...future.result$conditions <- ...future.conditions [13:11:05.636] ...future.result$finished <- base::Sys.time() [13:11:05.636] ...future.result [13:11:05.636] } [13:11:05.640] - Launch lazy future ... done [13:11:05.640] 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) [13:11:05.642] getGlobalsAndPackages() ... [13:11:05.643] Not searching for globals [13:11:05.643] - globals: [0] [13:11:05.643] getGlobalsAndPackages() ... DONE [13:11:05.643] run() for 'Future' ... [13:11:05.643] - state: 'created' [13:11:05.644] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.646] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.646] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.646] - Field: 'label' [13:11:05.646] - Field: 'local' [13:11:05.647] - Field: 'owner' [13:11:05.647] - Field: 'envir' [13:11:05.647] - Field: 'packages' [13:11:05.647] - Field: 'gc' [13:11:05.647] - Field: 'conditions' [13:11:05.648] - Field: 'expr' [13:11:05.648] - Field: 'uuid' [13:11:05.648] - Field: 'seed' [13:11:05.648] - Field: 'version' [13:11:05.648] - Field: 'result' [13:11:05.648] - Field: 'asynchronous' [13:11:05.649] - Field: 'calls' [13:11:05.649] - Field: 'globals' [13:11:05.649] - Field: 'stdout' [13:11:05.649] - Field: 'earlySignal' [13:11:05.649] - Field: 'lazy' [13:11:05.649] - Field: 'state' [13:11:05.650] - Field: '.cluster' [13:11:05.650] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.650] - Launch lazy future ... [13:11:05.650] Packages needed by the future expression (n = 0): [13:11:05.650] Packages needed by future strategies (n = 0): [13:11:05.651] { [13:11:05.651] { [13:11:05.651] { [13:11:05.651] ...future.startTime <- base::Sys.time() [13:11:05.651] { [13:11:05.651] { [13:11:05.651] { [13:11:05.651] base::local({ [13:11:05.651] has_future <- base::requireNamespace("future", [13:11:05.651] quietly = TRUE) [13:11:05.651] if (has_future) { [13:11:05.651] ns <- base::getNamespace("future") [13:11:05.651] version <- ns[[".package"]][["version"]] [13:11:05.651] if (is.null(version)) [13:11:05.651] version <- utils::packageVersion("future") [13:11:05.651] } [13:11:05.651] else { [13:11:05.651] version <- NULL [13:11:05.651] } [13:11:05.651] if (!has_future || version < "1.8.0") { [13:11:05.651] info <- base::c(r_version = base::gsub("R version ", [13:11:05.651] "", base::R.version$version.string), [13:11:05.651] platform = base::sprintf("%s (%s-bit)", [13:11:05.651] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.651] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.651] "release", "version")], collapse = " "), [13:11:05.651] hostname = base::Sys.info()[["nodename"]]) [13:11:05.651] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.651] info) [13:11:05.651] info <- base::paste(info, collapse = "; ") [13:11:05.651] if (!has_future) { [13:11:05.651] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.651] info) [13:11:05.651] } [13:11:05.651] else { [13:11:05.651] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.651] info, version) [13:11:05.651] } [13:11:05.651] base::stop(msg) [13:11:05.651] } [13:11:05.651] }) [13:11:05.651] } [13:11:05.651] ...future.strategy.old <- future::plan("list") [13:11:05.651] options(future.plan = NULL) [13:11:05.651] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.651] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.651] } [13:11:05.651] ...future.workdir <- getwd() [13:11:05.651] } [13:11:05.651] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.651] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.651] } [13:11:05.651] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.651] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.651] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.651] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.651] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.651] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.651] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.651] base::names(...future.oldOptions)) [13:11:05.651] } [13:11:05.651] if (FALSE) { [13:11:05.651] } [13:11:05.651] else { [13:11:05.651] if (TRUE) { [13:11:05.651] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.651] open = "w") [13:11:05.651] } [13:11:05.651] else { [13:11:05.651] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.651] windows = "NUL", "/dev/null"), open = "w") [13:11:05.651] } [13:11:05.651] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.651] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.651] base::sink(type = "output", split = FALSE) [13:11:05.651] base::close(...future.stdout) [13:11:05.651] }, add = TRUE) [13:11:05.651] } [13:11:05.651] ...future.frame <- base::sys.nframe() [13:11:05.651] ...future.conditions <- base::list() [13:11:05.651] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.651] if (FALSE) { [13:11:05.651] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.651] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.651] } [13:11:05.651] ...future.result <- base::tryCatch({ [13:11:05.651] base::withCallingHandlers({ [13:11:05.651] ...future.value <- base::withVisible(base::local({ [13:11:05.651] x <- 1:10 [13:11:05.651] sumtwo(a + b * x) [13:11:05.651] })) [13:11:05.651] future::FutureResult(value = ...future.value$value, [13:11:05.651] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.651] ...future.rng), globalenv = if (FALSE) [13:11:05.651] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.651] ...future.globalenv.names)) [13:11:05.651] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.651] }, condition = base::local({ [13:11:05.651] c <- base::c [13:11:05.651] inherits <- base::inherits [13:11:05.651] invokeRestart <- base::invokeRestart [13:11:05.651] length <- base::length [13:11:05.651] list <- base::list [13:11:05.651] seq.int <- base::seq.int [13:11:05.651] signalCondition <- base::signalCondition [13:11:05.651] sys.calls <- base::sys.calls [13:11:05.651] `[[` <- base::`[[` [13:11:05.651] `+` <- base::`+` [13:11:05.651] `<<-` <- base::`<<-` [13:11:05.651] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.651] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.651] 3L)] [13:11:05.651] } [13:11:05.651] function(cond) { [13:11:05.651] is_error <- inherits(cond, "error") [13:11:05.651] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.651] NULL) [13:11:05.651] if (is_error) { [13:11:05.651] sessionInformation <- function() { [13:11:05.651] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.651] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.651] search = base::search(), system = base::Sys.info()) [13:11:05.651] } [13:11:05.651] ...future.conditions[[length(...future.conditions) + [13:11:05.651] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.651] cond$call), session = sessionInformation(), [13:11:05.651] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.651] signalCondition(cond) [13:11:05.651] } [13:11:05.651] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.651] signal <- FALSE && inherits(cond, character(0)) [13:11:05.651] ...future.conditions[[length(...future.conditions) + [13:11:05.651] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.651] if (FALSE && !signal) { [13:11:05.651] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.651] { [13:11:05.651] inherits <- base::inherits [13:11:05.651] invokeRestart <- base::invokeRestart [13:11:05.651] is.null <- base::is.null [13:11:05.651] muffled <- FALSE [13:11:05.651] if (inherits(cond, "message")) { [13:11:05.651] muffled <- grepl(pattern, "muffleMessage") [13:11:05.651] if (muffled) [13:11:05.651] invokeRestart("muffleMessage") [13:11:05.651] } [13:11:05.651] else if (inherits(cond, "warning")) { [13:11:05.651] muffled <- grepl(pattern, "muffleWarning") [13:11:05.651] if (muffled) [13:11:05.651] invokeRestart("muffleWarning") [13:11:05.651] } [13:11:05.651] else if (inherits(cond, "condition")) { [13:11:05.651] if (!is.null(pattern)) { [13:11:05.651] computeRestarts <- base::computeRestarts [13:11:05.651] grepl <- base::grepl [13:11:05.651] restarts <- computeRestarts(cond) [13:11:05.651] for (restart in restarts) { [13:11:05.651] name <- restart$name [13:11:05.651] if (is.null(name)) [13:11:05.651] next [13:11:05.651] if (!grepl(pattern, name)) [13:11:05.651] next [13:11:05.651] invokeRestart(restart) [13:11:05.651] muffled <- TRUE [13:11:05.651] break [13:11:05.651] } [13:11:05.651] } [13:11:05.651] } [13:11:05.651] invisible(muffled) [13:11:05.651] } [13:11:05.651] muffleCondition(cond, pattern = "^muffle") [13:11:05.651] } [13:11:05.651] } [13:11:05.651] else { [13:11:05.651] if (TRUE) { [13:11:05.651] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.651] { [13:11:05.651] inherits <- base::inherits [13:11:05.651] invokeRestart <- base::invokeRestart [13:11:05.651] is.null <- base::is.null [13:11:05.651] muffled <- FALSE [13:11:05.651] if (inherits(cond, "message")) { [13:11:05.651] muffled <- grepl(pattern, "muffleMessage") [13:11:05.651] if (muffled) [13:11:05.651] invokeRestart("muffleMessage") [13:11:05.651] } [13:11:05.651] else if (inherits(cond, "warning")) { [13:11:05.651] muffled <- grepl(pattern, "muffleWarning") [13:11:05.651] if (muffled) [13:11:05.651] invokeRestart("muffleWarning") [13:11:05.651] } [13:11:05.651] else if (inherits(cond, "condition")) { [13:11:05.651] if (!is.null(pattern)) { [13:11:05.651] computeRestarts <- base::computeRestarts [13:11:05.651] grepl <- base::grepl [13:11:05.651] restarts <- computeRestarts(cond) [13:11:05.651] for (restart in restarts) { [13:11:05.651] name <- restart$name [13:11:05.651] if (is.null(name)) [13:11:05.651] next [13:11:05.651] if (!grepl(pattern, name)) [13:11:05.651] next [13:11:05.651] invokeRestart(restart) [13:11:05.651] muffled <- TRUE [13:11:05.651] break [13:11:05.651] } [13:11:05.651] } [13:11:05.651] } [13:11:05.651] invisible(muffled) [13:11:05.651] } [13:11:05.651] muffleCondition(cond, pattern = "^muffle") [13:11:05.651] } [13:11:05.651] } [13:11:05.651] } [13:11:05.651] })) [13:11:05.651] }, error = function(ex) { [13:11:05.651] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.651] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.651] ...future.rng), started = ...future.startTime, [13:11:05.651] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.651] version = "1.8"), class = "FutureResult") [13:11:05.651] }, finally = { [13:11:05.651] if (!identical(...future.workdir, getwd())) [13:11:05.651] setwd(...future.workdir) [13:11:05.651] { [13:11:05.651] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.651] ...future.oldOptions$nwarnings <- NULL [13:11:05.651] } [13:11:05.651] base::options(...future.oldOptions) [13:11:05.651] if (.Platform$OS.type == "windows") { [13:11:05.651] old_names <- names(...future.oldEnvVars) [13:11:05.651] envs <- base::Sys.getenv() [13:11:05.651] names <- names(envs) [13:11:05.651] common <- intersect(names, old_names) [13:11:05.651] added <- setdiff(names, old_names) [13:11:05.651] removed <- setdiff(old_names, names) [13:11:05.651] changed <- common[...future.oldEnvVars[common] != [13:11:05.651] envs[common]] [13:11:05.651] NAMES <- toupper(changed) [13:11:05.651] args <- list() [13:11:05.651] for (kk in seq_along(NAMES)) { [13:11:05.651] name <- changed[[kk]] [13:11:05.651] NAME <- NAMES[[kk]] [13:11:05.651] if (name != NAME && is.element(NAME, old_names)) [13:11:05.651] next [13:11:05.651] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.651] } [13:11:05.651] NAMES <- toupper(added) [13:11:05.651] for (kk in seq_along(NAMES)) { [13:11:05.651] name <- added[[kk]] [13:11:05.651] NAME <- NAMES[[kk]] [13:11:05.651] if (name != NAME && is.element(NAME, old_names)) [13:11:05.651] next [13:11:05.651] args[[name]] <- "" [13:11:05.651] } [13:11:05.651] NAMES <- toupper(removed) [13:11:05.651] for (kk in seq_along(NAMES)) { [13:11:05.651] name <- removed[[kk]] [13:11:05.651] NAME <- NAMES[[kk]] [13:11:05.651] if (name != NAME && is.element(NAME, old_names)) [13:11:05.651] next [13:11:05.651] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.651] } [13:11:05.651] if (length(args) > 0) [13:11:05.651] base::do.call(base::Sys.setenv, args = args) [13:11:05.651] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.651] } [13:11:05.651] else { [13:11:05.651] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.651] } [13:11:05.651] { [13:11:05.651] if (base::length(...future.futureOptionsAdded) > [13:11:05.651] 0L) { [13:11:05.651] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.651] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.651] base::options(opts) [13:11:05.651] } [13:11:05.651] { [13:11:05.651] NULL [13:11:05.651] options(future.plan = NULL) [13:11:05.651] if (is.na(NA_character_)) [13:11:05.651] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.651] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.651] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.651] .init = FALSE) [13:11:05.651] } [13:11:05.651] } [13:11:05.651] } [13:11:05.651] }) [13:11:05.651] if (TRUE) { [13:11:05.651] base::sink(type = "output", split = FALSE) [13:11:05.651] if (TRUE) { [13:11:05.651] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.651] } [13:11:05.651] else { [13:11:05.651] ...future.result["stdout"] <- base::list(NULL) [13:11:05.651] } [13:11:05.651] base::close(...future.stdout) [13:11:05.651] ...future.stdout <- NULL [13:11:05.651] } [13:11:05.651] ...future.result$conditions <- ...future.conditions [13:11:05.651] ...future.result$finished <- base::Sys.time() [13:11:05.651] ...future.result [13:11:05.651] } [13:11:05.655] - Launch lazy future ... done [13:11:05.655] 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) [13:11:05.655] resolved() for 'MiraiFuture' ... [13:11:05.656] - state: 'running' [13:11:05.656] - run: TRUE [13:11:05.656] - result: 'NULL' [13:11:05.656] - resolved: FALSE [13:11:05.656] resolved() for 'MiraiFuture' ... done Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: d756c7fe-fe6e-e289-cc6f-6bb173826481 Class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' > rm(list = names(globals)) > y <- tryCatch(value(f), error = identity) [13:11:05.657] signalConditions() ... [13:11:05.657] - include = 'immediateCondition' [13:11:05.657] - exclude = [13:11:05.658] - resignal = FALSE [13:11:05.658] - Number of conditions: 1 [13:11:05.658] signalConditions() ... done [13:11:05.658] Future state: 'finished' [13:11:05.658] signalConditions() ... [13:11:05.659] - include = 'condition' [13:11:05.659] - exclude = 'immediateCondition' [13:11:05.659] - resignal = TRUE [13:11:05.659] - Number of conditions: 1 [13:11:05.659] - Condition #1: 'simpleError', 'error', 'condition' [13:11:05.659] 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) [13:11:05.660] getGlobalsAndPackages() ... [13:11:05.661] - globals passed as-list: [3] 'a', 'b', 'sumtwo' [13:11:05.661] Resolving globals: FALSE [13:11:05.661] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:11:05.662] 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') [13:11:05.662] - globals: [3] 'a', 'b', 'sumtwo' [13:11:05.662] [13:11:05.663] getGlobalsAndPackages() ... DONE [13:11:05.663] run() for 'Future' ... [13:11:05.663] - state: 'created' [13:11:05.663] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.667] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.667] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.668] - Field: 'label' [13:11:05.668] - Field: 'local' [13:11:05.668] - Field: 'owner' [13:11:05.668] - Field: 'envir' [13:11:05.668] - Field: 'packages' [13:11:05.668] - Field: 'gc' [13:11:05.669] - Field: 'conditions' [13:11:05.669] - Field: 'expr' [13:11:05.669] - Field: 'uuid' [13:11:05.669] - Field: 'seed' [13:11:05.669] - Field: 'version' [13:11:05.670] - Field: 'result' [13:11:05.670] - Field: 'asynchronous' [13:11:05.670] - Field: 'calls' [13:11:05.670] - Field: 'globals' [13:11:05.670] - Field: 'stdout' [13:11:05.670] - Field: 'earlySignal' [13:11:05.671] - Field: 'lazy' [13:11:05.671] - Field: 'state' [13:11:05.671] - Field: '.cluster' [13:11:05.671] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.671] - Launch lazy future ... [13:11:05.671] Packages needed by the future expression (n = 0): [13:11:05.672] Packages needed by future strategies (n = 0): [13:11:05.672] { [13:11:05.672] { [13:11:05.672] { [13:11:05.672] ...future.startTime <- base::Sys.time() [13:11:05.672] { [13:11:05.672] { [13:11:05.672] { [13:11:05.672] base::local({ [13:11:05.672] has_future <- base::requireNamespace("future", [13:11:05.672] quietly = TRUE) [13:11:05.672] if (has_future) { [13:11:05.672] ns <- base::getNamespace("future") [13:11:05.672] version <- ns[[".package"]][["version"]] [13:11:05.672] if (is.null(version)) [13:11:05.672] version <- utils::packageVersion("future") [13:11:05.672] } [13:11:05.672] else { [13:11:05.672] version <- NULL [13:11:05.672] } [13:11:05.672] if (!has_future || version < "1.8.0") { [13:11:05.672] info <- base::c(r_version = base::gsub("R version ", [13:11:05.672] "", base::R.version$version.string), [13:11:05.672] platform = base::sprintf("%s (%s-bit)", [13:11:05.672] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.672] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.672] "release", "version")], collapse = " "), [13:11:05.672] hostname = base::Sys.info()[["nodename"]]) [13:11:05.672] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.672] info) [13:11:05.672] info <- base::paste(info, collapse = "; ") [13:11:05.672] if (!has_future) { [13:11:05.672] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.672] info) [13:11:05.672] } [13:11:05.672] else { [13:11:05.672] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.672] info, version) [13:11:05.672] } [13:11:05.672] base::stop(msg) [13:11:05.672] } [13:11:05.672] }) [13:11:05.672] } [13:11:05.672] ...future.strategy.old <- future::plan("list") [13:11:05.672] options(future.plan = NULL) [13:11:05.672] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.672] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.672] } [13:11:05.672] ...future.workdir <- getwd() [13:11:05.672] } [13:11:05.672] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.672] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.672] } [13:11:05.672] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.672] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.672] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.672] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.672] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.672] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.672] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.672] base::names(...future.oldOptions)) [13:11:05.672] } [13:11:05.672] if (FALSE) { [13:11:05.672] } [13:11:05.672] else { [13:11:05.672] if (TRUE) { [13:11:05.672] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.672] open = "w") [13:11:05.672] } [13:11:05.672] else { [13:11:05.672] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.672] windows = "NUL", "/dev/null"), open = "w") [13:11:05.672] } [13:11:05.672] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.672] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.672] base::sink(type = "output", split = FALSE) [13:11:05.672] base::close(...future.stdout) [13:11:05.672] }, add = TRUE) [13:11:05.672] } [13:11:05.672] ...future.frame <- base::sys.nframe() [13:11:05.672] ...future.conditions <- base::list() [13:11:05.672] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.672] if (FALSE) { [13:11:05.672] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.672] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.672] } [13:11:05.672] ...future.result <- base::tryCatch({ [13:11:05.672] base::withCallingHandlers({ [13:11:05.672] ...future.value <- base::withVisible(base::local({ [13:11:05.672] x <- 1:10 [13:11:05.672] sumtwo(a + b * x) [13:11:05.672] })) [13:11:05.672] future::FutureResult(value = ...future.value$value, [13:11:05.672] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.672] ...future.rng), globalenv = if (FALSE) [13:11:05.672] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.672] ...future.globalenv.names)) [13:11:05.672] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.672] }, condition = base::local({ [13:11:05.672] c <- base::c [13:11:05.672] inherits <- base::inherits [13:11:05.672] invokeRestart <- base::invokeRestart [13:11:05.672] length <- base::length [13:11:05.672] list <- base::list [13:11:05.672] seq.int <- base::seq.int [13:11:05.672] signalCondition <- base::signalCondition [13:11:05.672] sys.calls <- base::sys.calls [13:11:05.672] `[[` <- base::`[[` [13:11:05.672] `+` <- base::`+` [13:11:05.672] `<<-` <- base::`<<-` [13:11:05.672] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.672] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.672] 3L)] [13:11:05.672] } [13:11:05.672] function(cond) { [13:11:05.672] is_error <- inherits(cond, "error") [13:11:05.672] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.672] NULL) [13:11:05.672] if (is_error) { [13:11:05.672] sessionInformation <- function() { [13:11:05.672] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.672] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.672] search = base::search(), system = base::Sys.info()) [13:11:05.672] } [13:11:05.672] ...future.conditions[[length(...future.conditions) + [13:11:05.672] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.672] cond$call), session = sessionInformation(), [13:11:05.672] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.672] signalCondition(cond) [13:11:05.672] } [13:11:05.672] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.672] signal <- FALSE && inherits(cond, character(0)) [13:11:05.672] ...future.conditions[[length(...future.conditions) + [13:11:05.672] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.672] if (FALSE && !signal) { [13:11:05.672] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.672] { [13:11:05.672] inherits <- base::inherits [13:11:05.672] invokeRestart <- base::invokeRestart [13:11:05.672] is.null <- base::is.null [13:11:05.672] muffled <- FALSE [13:11:05.672] if (inherits(cond, "message")) { [13:11:05.672] muffled <- grepl(pattern, "muffleMessage") [13:11:05.672] if (muffled) [13:11:05.672] invokeRestart("muffleMessage") [13:11:05.672] } [13:11:05.672] else if (inherits(cond, "warning")) { [13:11:05.672] muffled <- grepl(pattern, "muffleWarning") [13:11:05.672] if (muffled) [13:11:05.672] invokeRestart("muffleWarning") [13:11:05.672] } [13:11:05.672] else if (inherits(cond, "condition")) { [13:11:05.672] if (!is.null(pattern)) { [13:11:05.672] computeRestarts <- base::computeRestarts [13:11:05.672] grepl <- base::grepl [13:11:05.672] restarts <- computeRestarts(cond) [13:11:05.672] for (restart in restarts) { [13:11:05.672] name <- restart$name [13:11:05.672] if (is.null(name)) [13:11:05.672] next [13:11:05.672] if (!grepl(pattern, name)) [13:11:05.672] next [13:11:05.672] invokeRestart(restart) [13:11:05.672] muffled <- TRUE [13:11:05.672] break [13:11:05.672] } [13:11:05.672] } [13:11:05.672] } [13:11:05.672] invisible(muffled) [13:11:05.672] } [13:11:05.672] muffleCondition(cond, pattern = "^muffle") [13:11:05.672] } [13:11:05.672] } [13:11:05.672] else { [13:11:05.672] if (TRUE) { [13:11:05.672] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.672] { [13:11:05.672] inherits <- base::inherits [13:11:05.672] invokeRestart <- base::invokeRestart [13:11:05.672] is.null <- base::is.null [13:11:05.672] muffled <- FALSE [13:11:05.672] if (inherits(cond, "message")) { [13:11:05.672] muffled <- grepl(pattern, "muffleMessage") [13:11:05.672] if (muffled) [13:11:05.672] invokeRestart("muffleMessage") [13:11:05.672] } [13:11:05.672] else if (inherits(cond, "warning")) { [13:11:05.672] muffled <- grepl(pattern, "muffleWarning") [13:11:05.672] if (muffled) [13:11:05.672] invokeRestart("muffleWarning") [13:11:05.672] } [13:11:05.672] else if (inherits(cond, "condition")) { [13:11:05.672] if (!is.null(pattern)) { [13:11:05.672] computeRestarts <- base::computeRestarts [13:11:05.672] grepl <- base::grepl [13:11:05.672] restarts <- computeRestarts(cond) [13:11:05.672] for (restart in restarts) { [13:11:05.672] name <- restart$name [13:11:05.672] if (is.null(name)) [13:11:05.672] next [13:11:05.672] if (!grepl(pattern, name)) [13:11:05.672] next [13:11:05.672] invokeRestart(restart) [13:11:05.672] muffled <- TRUE [13:11:05.672] break [13:11:05.672] } [13:11:05.672] } [13:11:05.672] } [13:11:05.672] invisible(muffled) [13:11:05.672] } [13:11:05.672] muffleCondition(cond, pattern = "^muffle") [13:11:05.672] } [13:11:05.672] } [13:11:05.672] } [13:11:05.672] })) [13:11:05.672] }, error = function(ex) { [13:11:05.672] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.672] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.672] ...future.rng), started = ...future.startTime, [13:11:05.672] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.672] version = "1.8"), class = "FutureResult") [13:11:05.672] }, finally = { [13:11:05.672] if (!identical(...future.workdir, getwd())) [13:11:05.672] setwd(...future.workdir) [13:11:05.672] { [13:11:05.672] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.672] ...future.oldOptions$nwarnings <- NULL [13:11:05.672] } [13:11:05.672] base::options(...future.oldOptions) [13:11:05.672] if (.Platform$OS.type == "windows") { [13:11:05.672] old_names <- names(...future.oldEnvVars) [13:11:05.672] envs <- base::Sys.getenv() [13:11:05.672] names <- names(envs) [13:11:05.672] common <- intersect(names, old_names) [13:11:05.672] added <- setdiff(names, old_names) [13:11:05.672] removed <- setdiff(old_names, names) [13:11:05.672] changed <- common[...future.oldEnvVars[common] != [13:11:05.672] envs[common]] [13:11:05.672] NAMES <- toupper(changed) [13:11:05.672] args <- list() [13:11:05.672] for (kk in seq_along(NAMES)) { [13:11:05.672] name <- changed[[kk]] [13:11:05.672] NAME <- NAMES[[kk]] [13:11:05.672] if (name != NAME && is.element(NAME, old_names)) [13:11:05.672] next [13:11:05.672] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.672] } [13:11:05.672] NAMES <- toupper(added) [13:11:05.672] for (kk in seq_along(NAMES)) { [13:11:05.672] name <- added[[kk]] [13:11:05.672] NAME <- NAMES[[kk]] [13:11:05.672] if (name != NAME && is.element(NAME, old_names)) [13:11:05.672] next [13:11:05.672] args[[name]] <- "" [13:11:05.672] } [13:11:05.672] NAMES <- toupper(removed) [13:11:05.672] for (kk in seq_along(NAMES)) { [13:11:05.672] name <- removed[[kk]] [13:11:05.672] NAME <- NAMES[[kk]] [13:11:05.672] if (name != NAME && is.element(NAME, old_names)) [13:11:05.672] next [13:11:05.672] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.672] } [13:11:05.672] if (length(args) > 0) [13:11:05.672] base::do.call(base::Sys.setenv, args = args) [13:11:05.672] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.672] } [13:11:05.672] else { [13:11:05.672] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.672] } [13:11:05.672] { [13:11:05.672] if (base::length(...future.futureOptionsAdded) > [13:11:05.672] 0L) { [13:11:05.672] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.672] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.672] base::options(opts) [13:11:05.672] } [13:11:05.672] { [13:11:05.672] NULL [13:11:05.672] options(future.plan = NULL) [13:11:05.672] if (is.na(NA_character_)) [13:11:05.672] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.672] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.672] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.672] .init = FALSE) [13:11:05.672] } [13:11:05.672] } [13:11:05.672] } [13:11:05.672] }) [13:11:05.672] if (TRUE) { [13:11:05.672] base::sink(type = "output", split = FALSE) [13:11:05.672] if (TRUE) { [13:11:05.672] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.672] } [13:11:05.672] else { [13:11:05.672] ...future.result["stdout"] <- base::list(NULL) [13:11:05.672] } [13:11:05.672] base::close(...future.stdout) [13:11:05.672] ...future.stdout <- NULL [13:11:05.672] } [13:11:05.672] ...future.result$conditions <- ...future.conditions [13:11:05.672] ...future.result$finished <- base::Sys.time() [13:11:05.672] ...future.result [13:11:05.672] } [13:11:05.677] - Launch lazy future ... done [13:11:05.677] 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) [13:11:05.678] resolved() for 'MiraiFuture' ... [13:11:05.678] - state: 'running' [13:11:05.678] - run: TRUE [13:11:05.678] - result: 'NULL' [13:11:05.678] - resolved: FALSE [13:11:05.679] resolved() for 'MiraiFuture' ... done Resolved: TRUE Value: Conditions captured: Early signaling: FALSE Owner process: d756c7fe-fe6e-e289-cc6f-6bb173826481 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 [13:11:05.679] getGlobalsAndPackages() ... [13:11:05.680] - globals passed as-list: [3] 'a', 'b', 'sumtwo' [13:11:05.680] Resolving globals: FALSE [13:11:05.680] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:11:05.681] 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') [13:11:05.681] - globals: [3] 'a', 'b', 'sumtwo' [13:11:05.681] [13:11:05.681] getGlobalsAndPackages() ... DONE [13:11:05.682] run() for 'Future' ... [13:11:05.682] - state: 'created' [13:11:05.682] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.684] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.684] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.685] - Field: 'label' [13:11:05.685] - Field: 'local' [13:11:05.685] - Field: 'owner' [13:11:05.685] - Field: 'envir' [13:11:05.685] - Field: 'packages' [13:11:05.686] - Field: 'gc' [13:11:05.686] - Field: 'conditions' [13:11:05.686] - Field: 'expr' [13:11:05.686] - Field: 'uuid' [13:11:05.686] - Field: 'seed' [13:11:05.686] - Field: 'version' [13:11:05.687] - Field: 'result' [13:11:05.687] - Field: 'asynchronous' [13:11:05.687] - Field: 'calls' [13:11:05.687] - Field: 'globals' [13:11:05.687] - Field: 'stdout' [13:11:05.687] - Field: 'earlySignal' [13:11:05.688] - Field: 'lazy' [13:11:05.688] - Field: 'state' [13:11:05.688] - Field: '.cluster' [13:11:05.688] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.688] - Launch lazy future ... [13:11:05.688] Packages needed by the future expression (n = 0): [13:11:05.689] Packages needed by future strategies (n = 0): [13:11:05.689] { [13:11:05.689] { [13:11:05.689] { [13:11:05.689] ...future.startTime <- base::Sys.time() [13:11:05.689] { [13:11:05.689] { [13:11:05.689] { [13:11:05.689] base::local({ [13:11:05.689] has_future <- base::requireNamespace("future", [13:11:05.689] quietly = TRUE) [13:11:05.689] if (has_future) { [13:11:05.689] ns <- base::getNamespace("future") [13:11:05.689] version <- ns[[".package"]][["version"]] [13:11:05.689] if (is.null(version)) [13:11:05.689] version <- utils::packageVersion("future") [13:11:05.689] } [13:11:05.689] else { [13:11:05.689] version <- NULL [13:11:05.689] } [13:11:05.689] if (!has_future || version < "1.8.0") { [13:11:05.689] info <- base::c(r_version = base::gsub("R version ", [13:11:05.689] "", base::R.version$version.string), [13:11:05.689] platform = base::sprintf("%s (%s-bit)", [13:11:05.689] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.689] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.689] "release", "version")], collapse = " "), [13:11:05.689] hostname = base::Sys.info()[["nodename"]]) [13:11:05.689] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.689] info) [13:11:05.689] info <- base::paste(info, collapse = "; ") [13:11:05.689] if (!has_future) { [13:11:05.689] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.689] info) [13:11:05.689] } [13:11:05.689] else { [13:11:05.689] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.689] info, version) [13:11:05.689] } [13:11:05.689] base::stop(msg) [13:11:05.689] } [13:11:05.689] }) [13:11:05.689] } [13:11:05.689] ...future.strategy.old <- future::plan("list") [13:11:05.689] options(future.plan = NULL) [13:11:05.689] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.689] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.689] } [13:11:05.689] ...future.workdir <- getwd() [13:11:05.689] } [13:11:05.689] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.689] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.689] } [13:11:05.689] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.689] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.689] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.689] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.689] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.689] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.689] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.689] base::names(...future.oldOptions)) [13:11:05.689] } [13:11:05.689] if (FALSE) { [13:11:05.689] } [13:11:05.689] else { [13:11:05.689] if (TRUE) { [13:11:05.689] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.689] open = "w") [13:11:05.689] } [13:11:05.689] else { [13:11:05.689] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.689] windows = "NUL", "/dev/null"), open = "w") [13:11:05.689] } [13:11:05.689] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.689] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.689] base::sink(type = "output", split = FALSE) [13:11:05.689] base::close(...future.stdout) [13:11:05.689] }, add = TRUE) [13:11:05.689] } [13:11:05.689] ...future.frame <- base::sys.nframe() [13:11:05.689] ...future.conditions <- base::list() [13:11:05.689] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.689] if (FALSE) { [13:11:05.689] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.689] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.689] } [13:11:05.689] ...future.result <- base::tryCatch({ [13:11:05.689] base::withCallingHandlers({ [13:11:05.689] ...future.value <- base::withVisible(base::local({ [13:11:05.689] x <- 1:10 [13:11:05.689] sumtwo(a + b * x) [13:11:05.689] })) [13:11:05.689] future::FutureResult(value = ...future.value$value, [13:11:05.689] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.689] ...future.rng), globalenv = if (FALSE) [13:11:05.689] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.689] ...future.globalenv.names)) [13:11:05.689] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.689] }, condition = base::local({ [13:11:05.689] c <- base::c [13:11:05.689] inherits <- base::inherits [13:11:05.689] invokeRestart <- base::invokeRestart [13:11:05.689] length <- base::length [13:11:05.689] list <- base::list [13:11:05.689] seq.int <- base::seq.int [13:11:05.689] signalCondition <- base::signalCondition [13:11:05.689] sys.calls <- base::sys.calls [13:11:05.689] `[[` <- base::`[[` [13:11:05.689] `+` <- base::`+` [13:11:05.689] `<<-` <- base::`<<-` [13:11:05.689] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.689] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.689] 3L)] [13:11:05.689] } [13:11:05.689] function(cond) { [13:11:05.689] is_error <- inherits(cond, "error") [13:11:05.689] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.689] NULL) [13:11:05.689] if (is_error) { [13:11:05.689] sessionInformation <- function() { [13:11:05.689] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.689] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.689] search = base::search(), system = base::Sys.info()) [13:11:05.689] } [13:11:05.689] ...future.conditions[[length(...future.conditions) + [13:11:05.689] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.689] cond$call), session = sessionInformation(), [13:11:05.689] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.689] signalCondition(cond) [13:11:05.689] } [13:11:05.689] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.689] signal <- FALSE && inherits(cond, character(0)) [13:11:05.689] ...future.conditions[[length(...future.conditions) + [13:11:05.689] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.689] if (FALSE && !signal) { [13:11:05.689] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.689] { [13:11:05.689] inherits <- base::inherits [13:11:05.689] invokeRestart <- base::invokeRestart [13:11:05.689] is.null <- base::is.null [13:11:05.689] muffled <- FALSE [13:11:05.689] if (inherits(cond, "message")) { [13:11:05.689] muffled <- grepl(pattern, "muffleMessage") [13:11:05.689] if (muffled) [13:11:05.689] invokeRestart("muffleMessage") [13:11:05.689] } [13:11:05.689] else if (inherits(cond, "warning")) { [13:11:05.689] muffled <- grepl(pattern, "muffleWarning") [13:11:05.689] if (muffled) [13:11:05.689] invokeRestart("muffleWarning") [13:11:05.689] } [13:11:05.689] else if (inherits(cond, "condition")) { [13:11:05.689] if (!is.null(pattern)) { [13:11:05.689] computeRestarts <- base::computeRestarts [13:11:05.689] grepl <- base::grepl [13:11:05.689] restarts <- computeRestarts(cond) [13:11:05.689] for (restart in restarts) { [13:11:05.689] name <- restart$name [13:11:05.689] if (is.null(name)) [13:11:05.689] next [13:11:05.689] if (!grepl(pattern, name)) [13:11:05.689] next [13:11:05.689] invokeRestart(restart) [13:11:05.689] muffled <- TRUE [13:11:05.689] break [13:11:05.689] } [13:11:05.689] } [13:11:05.689] } [13:11:05.689] invisible(muffled) [13:11:05.689] } [13:11:05.689] muffleCondition(cond, pattern = "^muffle") [13:11:05.689] } [13:11:05.689] } [13:11:05.689] else { [13:11:05.689] if (TRUE) { [13:11:05.689] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.689] { [13:11:05.689] inherits <- base::inherits [13:11:05.689] invokeRestart <- base::invokeRestart [13:11:05.689] is.null <- base::is.null [13:11:05.689] muffled <- FALSE [13:11:05.689] if (inherits(cond, "message")) { [13:11:05.689] muffled <- grepl(pattern, "muffleMessage") [13:11:05.689] if (muffled) [13:11:05.689] invokeRestart("muffleMessage") [13:11:05.689] } [13:11:05.689] else if (inherits(cond, "warning")) { [13:11:05.689] muffled <- grepl(pattern, "muffleWarning") [13:11:05.689] if (muffled) [13:11:05.689] invokeRestart("muffleWarning") [13:11:05.689] } [13:11:05.689] else if (inherits(cond, "condition")) { [13:11:05.689] if (!is.null(pattern)) { [13:11:05.689] computeRestarts <- base::computeRestarts [13:11:05.689] grepl <- base::grepl [13:11:05.689] restarts <- computeRestarts(cond) [13:11:05.689] for (restart in restarts) { [13:11:05.689] name <- restart$name [13:11:05.689] if (is.null(name)) [13:11:05.689] next [13:11:05.689] if (!grepl(pattern, name)) [13:11:05.689] next [13:11:05.689] invokeRestart(restart) [13:11:05.689] muffled <- TRUE [13:11:05.689] break [13:11:05.689] } [13:11:05.689] } [13:11:05.689] } [13:11:05.689] invisible(muffled) [13:11:05.689] } [13:11:05.689] muffleCondition(cond, pattern = "^muffle") [13:11:05.689] } [13:11:05.689] } [13:11:05.689] } [13:11:05.689] })) [13:11:05.689] }, error = function(ex) { [13:11:05.689] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.689] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.689] ...future.rng), started = ...future.startTime, [13:11:05.689] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.689] version = "1.8"), class = "FutureResult") [13:11:05.689] }, finally = { [13:11:05.689] if (!identical(...future.workdir, getwd())) [13:11:05.689] setwd(...future.workdir) [13:11:05.689] { [13:11:05.689] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.689] ...future.oldOptions$nwarnings <- NULL [13:11:05.689] } [13:11:05.689] base::options(...future.oldOptions) [13:11:05.689] if (.Platform$OS.type == "windows") { [13:11:05.689] old_names <- names(...future.oldEnvVars) [13:11:05.689] envs <- base::Sys.getenv() [13:11:05.689] names <- names(envs) [13:11:05.689] common <- intersect(names, old_names) [13:11:05.689] added <- setdiff(names, old_names) [13:11:05.689] removed <- setdiff(old_names, names) [13:11:05.689] changed <- common[...future.oldEnvVars[common] != [13:11:05.689] envs[common]] [13:11:05.689] NAMES <- toupper(changed) [13:11:05.689] args <- list() [13:11:05.689] for (kk in seq_along(NAMES)) { [13:11:05.689] name <- changed[[kk]] [13:11:05.689] NAME <- NAMES[[kk]] [13:11:05.689] if (name != NAME && is.element(NAME, old_names)) [13:11:05.689] next [13:11:05.689] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.689] } [13:11:05.689] NAMES <- toupper(added) [13:11:05.689] for (kk in seq_along(NAMES)) { [13:11:05.689] name <- added[[kk]] [13:11:05.689] NAME <- NAMES[[kk]] [13:11:05.689] if (name != NAME && is.element(NAME, old_names)) [13:11:05.689] next [13:11:05.689] args[[name]] <- "" [13:11:05.689] } [13:11:05.689] NAMES <- toupper(removed) [13:11:05.689] for (kk in seq_along(NAMES)) { [13:11:05.689] name <- removed[[kk]] [13:11:05.689] NAME <- NAMES[[kk]] [13:11:05.689] if (name != NAME && is.element(NAME, old_names)) [13:11:05.689] next [13:11:05.689] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.689] } [13:11:05.689] if (length(args) > 0) [13:11:05.689] base::do.call(base::Sys.setenv, args = args) [13:11:05.689] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.689] } [13:11:05.689] else { [13:11:05.689] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.689] } [13:11:05.689] { [13:11:05.689] if (base::length(...future.futureOptionsAdded) > [13:11:05.689] 0L) { [13:11:05.689] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.689] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.689] base::options(opts) [13:11:05.689] } [13:11:05.689] { [13:11:05.689] NULL [13:11:05.689] options(future.plan = NULL) [13:11:05.689] if (is.na(NA_character_)) [13:11:05.689] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.689] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.689] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.689] .init = FALSE) [13:11:05.689] } [13:11:05.689] } [13:11:05.689] } [13:11:05.689] }) [13:11:05.689] if (TRUE) { [13:11:05.689] base::sink(type = "output", split = FALSE) [13:11:05.689] if (TRUE) { [13:11:05.689] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.689] } [13:11:05.689] else { [13:11:05.689] ...future.result["stdout"] <- base::list(NULL) [13:11:05.689] } [13:11:05.689] base::close(...future.stdout) [13:11:05.689] ...future.stdout <- NULL [13:11:05.689] } [13:11:05.689] ...future.result$conditions <- ...future.conditions [13:11:05.689] ...future.result$finished <- base::Sys.time() [13:11:05.689] ...future.result [13:11:05.689] } [13:11:05.693] - Launch lazy future ... done [13:11:05.693] 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")) [13:11:05.695] getGlobalsAndPackages() ... [13:11:05.696] Retrieving globals ... [13:11:05.696] - globals retrieved: [3] 'a', 'b', 'sumtwo' [13:11:05.696] Retrieving globals ... DONE [13:11:05.696] Resolving globals: FALSE [13:11:05.697] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:11:05.697] 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') [13:11:05.697] - globals: [3] 'a', 'b', 'sumtwo' [13:11:05.698] [13:11:05.698] getGlobalsAndPackages() ... DONE [13:11:05.698] run() for 'Future' ... [13:11:05.698] - state: 'created' [13:11:05.698] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.701] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.701] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.701] - Field: 'label' [13:11:05.701] - Field: 'local' [13:11:05.701] - Field: 'owner' [13:11:05.702] - Field: 'envir' [13:11:05.702] - Field: 'packages' [13:11:05.702] - Field: 'gc' [13:11:05.702] - Field: 'conditions' [13:11:05.702] - Field: 'expr' [13:11:05.702] - Field: 'uuid' [13:11:05.703] - Field: 'seed' [13:11:05.703] - Field: 'version' [13:11:05.703] - Field: 'result' [13:11:05.703] - Field: 'asynchronous' [13:11:05.703] - Field: 'calls' [13:11:05.703] - Field: 'globals' [13:11:05.704] - Field: 'stdout' [13:11:05.704] - Field: 'earlySignal' [13:11:05.704] - Field: 'lazy' [13:11:05.704] - Field: 'state' [13:11:05.704] - Field: '.cluster' [13:11:05.704] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.705] - Launch lazy future ... [13:11:05.705] Packages needed by the future expression (n = 0): [13:11:05.705] Packages needed by future strategies (n = 0): [13:11:05.706] { [13:11:05.706] { [13:11:05.706] { [13:11:05.706] ...future.startTime <- base::Sys.time() [13:11:05.706] { [13:11:05.706] { [13:11:05.706] { [13:11:05.706] base::local({ [13:11:05.706] has_future <- base::requireNamespace("future", [13:11:05.706] quietly = TRUE) [13:11:05.706] if (has_future) { [13:11:05.706] ns <- base::getNamespace("future") [13:11:05.706] version <- ns[[".package"]][["version"]] [13:11:05.706] if (is.null(version)) [13:11:05.706] version <- utils::packageVersion("future") [13:11:05.706] } [13:11:05.706] else { [13:11:05.706] version <- NULL [13:11:05.706] } [13:11:05.706] if (!has_future || version < "1.8.0") { [13:11:05.706] info <- base::c(r_version = base::gsub("R version ", [13:11:05.706] "", base::R.version$version.string), [13:11:05.706] platform = base::sprintf("%s (%s-bit)", [13:11:05.706] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.706] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.706] "release", "version")], collapse = " "), [13:11:05.706] hostname = base::Sys.info()[["nodename"]]) [13:11:05.706] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.706] info) [13:11:05.706] info <- base::paste(info, collapse = "; ") [13:11:05.706] if (!has_future) { [13:11:05.706] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.706] info) [13:11:05.706] } [13:11:05.706] else { [13:11:05.706] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.706] info, version) [13:11:05.706] } [13:11:05.706] base::stop(msg) [13:11:05.706] } [13:11:05.706] }) [13:11:05.706] } [13:11:05.706] ...future.strategy.old <- future::plan("list") [13:11:05.706] options(future.plan = NULL) [13:11:05.706] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.706] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.706] } [13:11:05.706] ...future.workdir <- getwd() [13:11:05.706] } [13:11:05.706] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.706] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.706] } [13:11:05.706] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.706] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.706] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.706] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.706] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.706] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.706] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.706] base::names(...future.oldOptions)) [13:11:05.706] } [13:11:05.706] if (FALSE) { [13:11:05.706] } [13:11:05.706] else { [13:11:05.706] if (TRUE) { [13:11:05.706] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.706] open = "w") [13:11:05.706] } [13:11:05.706] else { [13:11:05.706] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.706] windows = "NUL", "/dev/null"), open = "w") [13:11:05.706] } [13:11:05.706] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.706] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.706] base::sink(type = "output", split = FALSE) [13:11:05.706] base::close(...future.stdout) [13:11:05.706] }, add = TRUE) [13:11:05.706] } [13:11:05.706] ...future.frame <- base::sys.nframe() [13:11:05.706] ...future.conditions <- base::list() [13:11:05.706] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.706] if (FALSE) { [13:11:05.706] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.706] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.706] } [13:11:05.706] ...future.result <- base::tryCatch({ [13:11:05.706] base::withCallingHandlers({ [13:11:05.706] ...future.value <- base::withVisible(base::local({ [13:11:05.706] x <- 1:10 [13:11:05.706] sumtwo(a + b * x) [13:11:05.706] })) [13:11:05.706] future::FutureResult(value = ...future.value$value, [13:11:05.706] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.706] ...future.rng), globalenv = if (FALSE) [13:11:05.706] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.706] ...future.globalenv.names)) [13:11:05.706] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.706] }, condition = base::local({ [13:11:05.706] c <- base::c [13:11:05.706] inherits <- base::inherits [13:11:05.706] invokeRestart <- base::invokeRestart [13:11:05.706] length <- base::length [13:11:05.706] list <- base::list [13:11:05.706] seq.int <- base::seq.int [13:11:05.706] signalCondition <- base::signalCondition [13:11:05.706] sys.calls <- base::sys.calls [13:11:05.706] `[[` <- base::`[[` [13:11:05.706] `+` <- base::`+` [13:11:05.706] `<<-` <- base::`<<-` [13:11:05.706] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.706] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.706] 3L)] [13:11:05.706] } [13:11:05.706] function(cond) { [13:11:05.706] is_error <- inherits(cond, "error") [13:11:05.706] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.706] NULL) [13:11:05.706] if (is_error) { [13:11:05.706] sessionInformation <- function() { [13:11:05.706] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.706] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.706] search = base::search(), system = base::Sys.info()) [13:11:05.706] } [13:11:05.706] ...future.conditions[[length(...future.conditions) + [13:11:05.706] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.706] cond$call), session = sessionInformation(), [13:11:05.706] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.706] signalCondition(cond) [13:11:05.706] } [13:11:05.706] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.706] signal <- FALSE && inherits(cond, character(0)) [13:11:05.706] ...future.conditions[[length(...future.conditions) + [13:11:05.706] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.706] if (FALSE && !signal) { [13:11:05.706] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.706] { [13:11:05.706] inherits <- base::inherits [13:11:05.706] invokeRestart <- base::invokeRestart [13:11:05.706] is.null <- base::is.null [13:11:05.706] muffled <- FALSE [13:11:05.706] if (inherits(cond, "message")) { [13:11:05.706] muffled <- grepl(pattern, "muffleMessage") [13:11:05.706] if (muffled) [13:11:05.706] invokeRestart("muffleMessage") [13:11:05.706] } [13:11:05.706] else if (inherits(cond, "warning")) { [13:11:05.706] muffled <- grepl(pattern, "muffleWarning") [13:11:05.706] if (muffled) [13:11:05.706] invokeRestart("muffleWarning") [13:11:05.706] } [13:11:05.706] else if (inherits(cond, "condition")) { [13:11:05.706] if (!is.null(pattern)) { [13:11:05.706] computeRestarts <- base::computeRestarts [13:11:05.706] grepl <- base::grepl [13:11:05.706] restarts <- computeRestarts(cond) [13:11:05.706] for (restart in restarts) { [13:11:05.706] name <- restart$name [13:11:05.706] if (is.null(name)) [13:11:05.706] next [13:11:05.706] if (!grepl(pattern, name)) [13:11:05.706] next [13:11:05.706] invokeRestart(restart) [13:11:05.706] muffled <- TRUE [13:11:05.706] break [13:11:05.706] } [13:11:05.706] } [13:11:05.706] } [13:11:05.706] invisible(muffled) [13:11:05.706] } [13:11:05.706] muffleCondition(cond, pattern = "^muffle") [13:11:05.706] } [13:11:05.706] } [13:11:05.706] else { [13:11:05.706] if (TRUE) { [13:11:05.706] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.706] { [13:11:05.706] inherits <- base::inherits [13:11:05.706] invokeRestart <- base::invokeRestart [13:11:05.706] is.null <- base::is.null [13:11:05.706] muffled <- FALSE [13:11:05.706] if (inherits(cond, "message")) { [13:11:05.706] muffled <- grepl(pattern, "muffleMessage") [13:11:05.706] if (muffled) [13:11:05.706] invokeRestart("muffleMessage") [13:11:05.706] } [13:11:05.706] else if (inherits(cond, "warning")) { [13:11:05.706] muffled <- grepl(pattern, "muffleWarning") [13:11:05.706] if (muffled) [13:11:05.706] invokeRestart("muffleWarning") [13:11:05.706] } [13:11:05.706] else if (inherits(cond, "condition")) { [13:11:05.706] if (!is.null(pattern)) { [13:11:05.706] computeRestarts <- base::computeRestarts [13:11:05.706] grepl <- base::grepl [13:11:05.706] restarts <- computeRestarts(cond) [13:11:05.706] for (restart in restarts) { [13:11:05.706] name <- restart$name [13:11:05.706] if (is.null(name)) [13:11:05.706] next [13:11:05.706] if (!grepl(pattern, name)) [13:11:05.706] next [13:11:05.706] invokeRestart(restart) [13:11:05.706] muffled <- TRUE [13:11:05.706] break [13:11:05.706] } [13:11:05.706] } [13:11:05.706] } [13:11:05.706] invisible(muffled) [13:11:05.706] } [13:11:05.706] muffleCondition(cond, pattern = "^muffle") [13:11:05.706] } [13:11:05.706] } [13:11:05.706] } [13:11:05.706] })) [13:11:05.706] }, error = function(ex) { [13:11:05.706] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.706] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.706] ...future.rng), started = ...future.startTime, [13:11:05.706] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.706] version = "1.8"), class = "FutureResult") [13:11:05.706] }, finally = { [13:11:05.706] if (!identical(...future.workdir, getwd())) [13:11:05.706] setwd(...future.workdir) [13:11:05.706] { [13:11:05.706] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.706] ...future.oldOptions$nwarnings <- NULL [13:11:05.706] } [13:11:05.706] base::options(...future.oldOptions) [13:11:05.706] if (.Platform$OS.type == "windows") { [13:11:05.706] old_names <- names(...future.oldEnvVars) [13:11:05.706] envs <- base::Sys.getenv() [13:11:05.706] names <- names(envs) [13:11:05.706] common <- intersect(names, old_names) [13:11:05.706] added <- setdiff(names, old_names) [13:11:05.706] removed <- setdiff(old_names, names) [13:11:05.706] changed <- common[...future.oldEnvVars[common] != [13:11:05.706] envs[common]] [13:11:05.706] NAMES <- toupper(changed) [13:11:05.706] args <- list() [13:11:05.706] for (kk in seq_along(NAMES)) { [13:11:05.706] name <- changed[[kk]] [13:11:05.706] NAME <- NAMES[[kk]] [13:11:05.706] if (name != NAME && is.element(NAME, old_names)) [13:11:05.706] next [13:11:05.706] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.706] } [13:11:05.706] NAMES <- toupper(added) [13:11:05.706] for (kk in seq_along(NAMES)) { [13:11:05.706] name <- added[[kk]] [13:11:05.706] NAME <- NAMES[[kk]] [13:11:05.706] if (name != NAME && is.element(NAME, old_names)) [13:11:05.706] next [13:11:05.706] args[[name]] <- "" [13:11:05.706] } [13:11:05.706] NAMES <- toupper(removed) [13:11:05.706] for (kk in seq_along(NAMES)) { [13:11:05.706] name <- removed[[kk]] [13:11:05.706] NAME <- NAMES[[kk]] [13:11:05.706] if (name != NAME && is.element(NAME, old_names)) [13:11:05.706] next [13:11:05.706] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.706] } [13:11:05.706] if (length(args) > 0) [13:11:05.706] base::do.call(base::Sys.setenv, args = args) [13:11:05.706] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.706] } [13:11:05.706] else { [13:11:05.706] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.706] } [13:11:05.706] { [13:11:05.706] if (base::length(...future.futureOptionsAdded) > [13:11:05.706] 0L) { [13:11:05.706] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.706] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.706] base::options(opts) [13:11:05.706] } [13:11:05.706] { [13:11:05.706] NULL [13:11:05.706] options(future.plan = NULL) [13:11:05.706] if (is.na(NA_character_)) [13:11:05.706] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.706] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.706] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.706] .init = FALSE) [13:11:05.706] } [13:11:05.706] } [13:11:05.706] } [13:11:05.706] }) [13:11:05.706] if (TRUE) { [13:11:05.706] base::sink(type = "output", split = FALSE) [13:11:05.706] if (TRUE) { [13:11:05.706] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.706] } [13:11:05.706] else { [13:11:05.706] ...future.result["stdout"] <- base::list(NULL) [13:11:05.706] } [13:11:05.706] base::close(...future.stdout) [13:11:05.706] ...future.stdout <- NULL [13:11:05.706] } [13:11:05.706] ...future.result$conditions <- ...future.conditions [13:11:05.706] ...future.result$finished <- base::Sys.time() [13:11:05.706] ...future.result [13:11:05.706] } [13:11:05.710] - Launch lazy future ... done [13:11:05.710] 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) [13:11:05.711] resolved() for 'MiraiFuture' ... [13:11:05.711] - state: 'running' [13:11:05.711] - run: TRUE [13:11:05.712] - result: 'NULL' [13:11:05.713] - resolved: FALSE [13:11:05.713] resolved() for 'MiraiFuture' ... done Resolved: TRUE Value: Conditions captured: Early signaling: FALSE Owner process: d756c7fe-fe6e-e289-cc6f-6bb173826481 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") [13:11:05.714] getGlobalsAndPackages() ... [13:11:05.714] Retrieving globals ... [13:11:05.714] - globals retrieved: [3] 'a', 'b', 'sumtwo' [13:11:05.714] Retrieving globals ... DONE [13:11:05.715] Resolving globals: FALSE [13:11:05.715] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:11:05.716] 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') [13:11:05.716] - globals: [3] 'a', 'b', 'sumtwo' [13:11:05.716] [13:11:05.716] getGlobalsAndPackages() ... DONE [13:11:05.716] run() for 'Future' ... [13:11:05.717] - state: 'created' [13:11:05.717] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:05.719] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:05.719] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:05.719] - Field: 'label' [13:11:05.720] - Field: 'local' [13:11:05.720] - Field: 'owner' [13:11:05.720] - Field: 'envir' [13:11:05.720] - Field: 'packages' [13:11:05.720] - Field: 'gc' [13:11:05.720] - Field: 'conditions' [13:11:05.721] - Field: 'expr' [13:11:05.721] - Field: 'uuid' [13:11:05.721] - Field: 'seed' [13:11:05.721] - Field: 'version' [13:11:05.721] - Field: 'result' [13:11:05.722] - Field: 'asynchronous' [13:11:05.722] - Field: 'calls' [13:11:05.722] - Field: 'globals' [13:11:05.722] - Field: 'stdout' [13:11:05.722] - Field: 'earlySignal' [13:11:05.722] - Field: 'lazy' [13:11:05.723] - Field: 'state' [13:11:05.723] - Field: '.cluster' [13:11:05.723] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:05.723] - Launch lazy future ... [13:11:05.723] Packages needed by the future expression (n = 0): [13:11:05.723] Packages needed by future strategies (n = 0): [13:11:05.724] { [13:11:05.724] { [13:11:05.724] { [13:11:05.724] ...future.startTime <- base::Sys.time() [13:11:05.724] { [13:11:05.724] { [13:11:05.724] { [13:11:05.724] base::local({ [13:11:05.724] has_future <- base::requireNamespace("future", [13:11:05.724] quietly = TRUE) [13:11:05.724] if (has_future) { [13:11:05.724] ns <- base::getNamespace("future") [13:11:05.724] version <- ns[[".package"]][["version"]] [13:11:05.724] if (is.null(version)) [13:11:05.724] version <- utils::packageVersion("future") [13:11:05.724] } [13:11:05.724] else { [13:11:05.724] version <- NULL [13:11:05.724] } [13:11:05.724] if (!has_future || version < "1.8.0") { [13:11:05.724] info <- base::c(r_version = base::gsub("R version ", [13:11:05.724] "", base::R.version$version.string), [13:11:05.724] platform = base::sprintf("%s (%s-bit)", [13:11:05.724] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:05.724] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:05.724] "release", "version")], collapse = " "), [13:11:05.724] hostname = base::Sys.info()[["nodename"]]) [13:11:05.724] info <- base::sprintf("%s: %s", base::names(info), [13:11:05.724] info) [13:11:05.724] info <- base::paste(info, collapse = "; ") [13:11:05.724] if (!has_future) { [13:11:05.724] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:05.724] info) [13:11:05.724] } [13:11:05.724] else { [13:11:05.724] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:05.724] info, version) [13:11:05.724] } [13:11:05.724] base::stop(msg) [13:11:05.724] } [13:11:05.724] }) [13:11:05.724] } [13:11:05.724] ...future.strategy.old <- future::plan("list") [13:11:05.724] options(future.plan = NULL) [13:11:05.724] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.724] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:05.724] } [13:11:05.724] ...future.workdir <- getwd() [13:11:05.724] } [13:11:05.724] ...future.oldOptions <- base::as.list(base::.Options) [13:11:05.724] ...future.oldEnvVars <- base::Sys.getenv() [13:11:05.724] } [13:11:05.724] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:05.724] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:05.724] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:05.724] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:05.724] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:05.724] future.stdout.windows.reencode = NULL, width = 80L) [13:11:05.724] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:05.724] base::names(...future.oldOptions)) [13:11:05.724] } [13:11:05.724] if (FALSE) { [13:11:05.724] } [13:11:05.724] else { [13:11:05.724] if (TRUE) { [13:11:05.724] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:05.724] open = "w") [13:11:05.724] } [13:11:05.724] else { [13:11:05.724] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:05.724] windows = "NUL", "/dev/null"), open = "w") [13:11:05.724] } [13:11:05.724] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:05.724] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:05.724] base::sink(type = "output", split = FALSE) [13:11:05.724] base::close(...future.stdout) [13:11:05.724] }, add = TRUE) [13:11:05.724] } [13:11:05.724] ...future.frame <- base::sys.nframe() [13:11:05.724] ...future.conditions <- base::list() [13:11:05.724] ...future.rng <- base::globalenv()$.Random.seed [13:11:05.724] if (FALSE) { [13:11:05.724] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:05.724] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:05.724] } [13:11:05.724] ...future.result <- base::tryCatch({ [13:11:05.724] base::withCallingHandlers({ [13:11:05.724] ...future.value <- base::withVisible(base::local({ [13:11:05.724] x <- 1:10 [13:11:05.724] sumtwo(a + b * x) [13:11:05.724] })) [13:11:05.724] future::FutureResult(value = ...future.value$value, [13:11:05.724] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.724] ...future.rng), globalenv = if (FALSE) [13:11:05.724] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:05.724] ...future.globalenv.names)) [13:11:05.724] else NULL, started = ...future.startTime, version = "1.8") [13:11:05.724] }, condition = base::local({ [13:11:05.724] c <- base::c [13:11:05.724] inherits <- base::inherits [13:11:05.724] invokeRestart <- base::invokeRestart [13:11:05.724] length <- base::length [13:11:05.724] list <- base::list [13:11:05.724] seq.int <- base::seq.int [13:11:05.724] signalCondition <- base::signalCondition [13:11:05.724] sys.calls <- base::sys.calls [13:11:05.724] `[[` <- base::`[[` [13:11:05.724] `+` <- base::`+` [13:11:05.724] `<<-` <- base::`<<-` [13:11:05.724] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:05.724] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:05.724] 3L)] [13:11:05.724] } [13:11:05.724] function(cond) { [13:11:05.724] is_error <- inherits(cond, "error") [13:11:05.724] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:05.724] NULL) [13:11:05.724] if (is_error) { [13:11:05.724] sessionInformation <- function() { [13:11:05.724] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:05.724] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:05.724] search = base::search(), system = base::Sys.info()) [13:11:05.724] } [13:11:05.724] ...future.conditions[[length(...future.conditions) + [13:11:05.724] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:05.724] cond$call), session = sessionInformation(), [13:11:05.724] timestamp = base::Sys.time(), signaled = 0L) [13:11:05.724] signalCondition(cond) [13:11:05.724] } [13:11:05.724] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:05.724] signal <- FALSE && inherits(cond, character(0)) [13:11:05.724] ...future.conditions[[length(...future.conditions) + [13:11:05.724] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:05.724] if (FALSE && !signal) { [13:11:05.724] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.724] { [13:11:05.724] inherits <- base::inherits [13:11:05.724] invokeRestart <- base::invokeRestart [13:11:05.724] is.null <- base::is.null [13:11:05.724] muffled <- FALSE [13:11:05.724] if (inherits(cond, "message")) { [13:11:05.724] muffled <- grepl(pattern, "muffleMessage") [13:11:05.724] if (muffled) [13:11:05.724] invokeRestart("muffleMessage") [13:11:05.724] } [13:11:05.724] else if (inherits(cond, "warning")) { [13:11:05.724] muffled <- grepl(pattern, "muffleWarning") [13:11:05.724] if (muffled) [13:11:05.724] invokeRestart("muffleWarning") [13:11:05.724] } [13:11:05.724] else if (inherits(cond, "condition")) { [13:11:05.724] if (!is.null(pattern)) { [13:11:05.724] computeRestarts <- base::computeRestarts [13:11:05.724] grepl <- base::grepl [13:11:05.724] restarts <- computeRestarts(cond) [13:11:05.724] for (restart in restarts) { [13:11:05.724] name <- restart$name [13:11:05.724] if (is.null(name)) [13:11:05.724] next [13:11:05.724] if (!grepl(pattern, name)) [13:11:05.724] next [13:11:05.724] invokeRestart(restart) [13:11:05.724] muffled <- TRUE [13:11:05.724] break [13:11:05.724] } [13:11:05.724] } [13:11:05.724] } [13:11:05.724] invisible(muffled) [13:11:05.724] } [13:11:05.724] muffleCondition(cond, pattern = "^muffle") [13:11:05.724] } [13:11:05.724] } [13:11:05.724] else { [13:11:05.724] if (TRUE) { [13:11:05.724] muffleCondition <- function (cond, pattern = "^muffle") [13:11:05.724] { [13:11:05.724] inherits <- base::inherits [13:11:05.724] invokeRestart <- base::invokeRestart [13:11:05.724] is.null <- base::is.null [13:11:05.724] muffled <- FALSE [13:11:05.724] if (inherits(cond, "message")) { [13:11:05.724] muffled <- grepl(pattern, "muffleMessage") [13:11:05.724] if (muffled) [13:11:05.724] invokeRestart("muffleMessage") [13:11:05.724] } [13:11:05.724] else if (inherits(cond, "warning")) { [13:11:05.724] muffled <- grepl(pattern, "muffleWarning") [13:11:05.724] if (muffled) [13:11:05.724] invokeRestart("muffleWarning") [13:11:05.724] } [13:11:05.724] else if (inherits(cond, "condition")) { [13:11:05.724] if (!is.null(pattern)) { [13:11:05.724] computeRestarts <- base::computeRestarts [13:11:05.724] grepl <- base::grepl [13:11:05.724] restarts <- computeRestarts(cond) [13:11:05.724] for (restart in restarts) { [13:11:05.724] name <- restart$name [13:11:05.724] if (is.null(name)) [13:11:05.724] next [13:11:05.724] if (!grepl(pattern, name)) [13:11:05.724] next [13:11:05.724] invokeRestart(restart) [13:11:05.724] muffled <- TRUE [13:11:05.724] break [13:11:05.724] } [13:11:05.724] } [13:11:05.724] } [13:11:05.724] invisible(muffled) [13:11:05.724] } [13:11:05.724] muffleCondition(cond, pattern = "^muffle") [13:11:05.724] } [13:11:05.724] } [13:11:05.724] } [13:11:05.724] })) [13:11:05.724] }, error = function(ex) { [13:11:05.724] base::structure(base::list(value = NULL, visible = NULL, [13:11:05.724] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:05.724] ...future.rng), started = ...future.startTime, [13:11:05.724] finished = Sys.time(), session_uuid = NA_character_, [13:11:05.724] version = "1.8"), class = "FutureResult") [13:11:05.724] }, finally = { [13:11:05.724] if (!identical(...future.workdir, getwd())) [13:11:05.724] setwd(...future.workdir) [13:11:05.724] { [13:11:05.724] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:05.724] ...future.oldOptions$nwarnings <- NULL [13:11:05.724] } [13:11:05.724] base::options(...future.oldOptions) [13:11:05.724] if (.Platform$OS.type == "windows") { [13:11:05.724] old_names <- names(...future.oldEnvVars) [13:11:05.724] envs <- base::Sys.getenv() [13:11:05.724] names <- names(envs) [13:11:05.724] common <- intersect(names, old_names) [13:11:05.724] added <- setdiff(names, old_names) [13:11:05.724] removed <- setdiff(old_names, names) [13:11:05.724] changed <- common[...future.oldEnvVars[common] != [13:11:05.724] envs[common]] [13:11:05.724] NAMES <- toupper(changed) [13:11:05.724] args <- list() [13:11:05.724] for (kk in seq_along(NAMES)) { [13:11:05.724] name <- changed[[kk]] [13:11:05.724] NAME <- NAMES[[kk]] [13:11:05.724] if (name != NAME && is.element(NAME, old_names)) [13:11:05.724] next [13:11:05.724] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.724] } [13:11:05.724] NAMES <- toupper(added) [13:11:05.724] for (kk in seq_along(NAMES)) { [13:11:05.724] name <- added[[kk]] [13:11:05.724] NAME <- NAMES[[kk]] [13:11:05.724] if (name != NAME && is.element(NAME, old_names)) [13:11:05.724] next [13:11:05.724] args[[name]] <- "" [13:11:05.724] } [13:11:05.724] NAMES <- toupper(removed) [13:11:05.724] for (kk in seq_along(NAMES)) { [13:11:05.724] name <- removed[[kk]] [13:11:05.724] NAME <- NAMES[[kk]] [13:11:05.724] if (name != NAME && is.element(NAME, old_names)) [13:11:05.724] next [13:11:05.724] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:05.724] } [13:11:05.724] if (length(args) > 0) [13:11:05.724] base::do.call(base::Sys.setenv, args = args) [13:11:05.724] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:05.724] } [13:11:05.724] else { [13:11:05.724] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:05.724] } [13:11:05.724] { [13:11:05.724] if (base::length(...future.futureOptionsAdded) > [13:11:05.724] 0L) { [13:11:05.724] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:05.724] base::names(opts) <- ...future.futureOptionsAdded [13:11:05.724] base::options(opts) [13:11:05.724] } [13:11:05.724] { [13:11:05.724] NULL [13:11:05.724] options(future.plan = NULL) [13:11:05.724] if (is.na(NA_character_)) [13:11:05.724] Sys.unsetenv("R_FUTURE_PLAN") [13:11:05.724] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:05.724] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:05.724] .init = FALSE) [13:11:05.724] } [13:11:05.724] } [13:11:05.724] } [13:11:05.724] }) [13:11:05.724] if (TRUE) { [13:11:05.724] base::sink(type = "output", split = FALSE) [13:11:05.724] if (TRUE) { [13:11:05.724] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:05.724] } [13:11:05.724] else { [13:11:05.724] ...future.result["stdout"] <- base::list(NULL) [13:11:05.724] } [13:11:05.724] base::close(...future.stdout) [13:11:05.724] ...future.stdout <- NULL [13:11:05.724] } [13:11:05.724] ...future.result$conditions <- ...future.conditions [13:11:05.724] ...future.result$finished <- base::Sys.time() [13:11:05.724] ...future.result [13:11:05.724] } [13:11:05.728] - Launch lazy future ... done [13:11:05.728] 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.43 0.09 0.96