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:31:06.148] plan(): Setting new future strategy stack: [13:31:06.149] List of future strategies: [13:31:06.149] 1. mirai_multisession: [13:31:06.149] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:06.149] - tweaked: FALSE [13:31:06.149] - call: future::plan(future.mirai::mirai_multisession) [13:31:06.161] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:06.162] < mirai | $data > [13:31:06.167] getGlobalsAndPackages() ... [13:31:06.167] Not searching for globals [13:31:06.167] - globals: [0] [13:31:06.167] getGlobalsAndPackages() ... DONE [13:31:06.168] getGlobalsAndPackages() ... [13:31:06.168] [13:31:06.168] - globals: [0] [13:31:06.168] getGlobalsAndPackages() ... DONE [13:31:06.444] Packages needed by the future expression (n = 0): [13:31:06.445] Packages needed by future strategies (n = 0): [13:31:06.446] { [13:31:06.446] { [13:31:06.446] { [13:31:06.446] ...future.startTime <- base::Sys.time() [13:31:06.446] { [13:31:06.446] { [13:31:06.446] { [13:31:06.446] base::local({ [13:31:06.446] has_future <- base::requireNamespace("future", [13:31:06.446] quietly = TRUE) [13:31:06.446] if (has_future) { [13:31:06.446] ns <- base::getNamespace("future") [13:31:06.446] version <- ns[[".package"]][["version"]] [13:31:06.446] if (is.null(version)) [13:31:06.446] version <- utils::packageVersion("future") [13:31:06.446] } [13:31:06.446] else { [13:31:06.446] version <- NULL [13:31:06.446] } [13:31:06.446] if (!has_future || version < "1.8.0") { [13:31:06.446] info <- base::c(r_version = base::gsub("R version ", [13:31:06.446] "", base::R.version$version.string), [13:31:06.446] platform = base::sprintf("%s (%s-bit)", [13:31:06.446] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.446] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.446] "release", "version")], collapse = " "), [13:31:06.446] hostname = base::Sys.info()[["nodename"]]) [13:31:06.446] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.446] info) [13:31:06.446] info <- base::paste(info, collapse = "; ") [13:31:06.446] if (!has_future) { [13:31:06.446] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.446] info) [13:31:06.446] } [13:31:06.446] else { [13:31:06.446] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.446] info, version) [13:31:06.446] } [13:31:06.446] base::stop(msg) [13:31:06.446] } [13:31:06.446] }) [13:31:06.446] } [13:31:06.446] ...future.strategy.old <- future::plan("list") [13:31:06.446] options(future.plan = NULL) [13:31:06.446] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.446] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.446] } [13:31:06.446] ...future.workdir <- getwd() [13:31:06.446] } [13:31:06.446] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.446] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.446] } [13:31:06.446] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.446] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.446] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.446] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.446] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.446] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.446] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.446] base::names(...future.oldOptions)) [13:31:06.446] } [13:31:06.446] if (FALSE) { [13:31:06.446] } [13:31:06.446] else { [13:31:06.446] if (TRUE) { [13:31:06.446] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.446] open = "w") [13:31:06.446] } [13:31:06.446] else { [13:31:06.446] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.446] windows = "NUL", "/dev/null"), open = "w") [13:31:06.446] } [13:31:06.446] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.446] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.446] base::sink(type = "output", split = FALSE) [13:31:06.446] base::close(...future.stdout) [13:31:06.446] }, add = TRUE) [13:31:06.446] } [13:31:06.446] ...future.frame <- base::sys.nframe() [13:31:06.446] ...future.conditions <- base::list() [13:31:06.446] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.446] if (FALSE) { [13:31:06.446] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.446] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.446] } [13:31:06.446] ...future.result <- base::tryCatch({ [13:31:06.446] base::withCallingHandlers({ [13:31:06.446] ...future.value <- base::withVisible(base::local(NA)) [13:31:06.446] future::FutureResult(value = ...future.value$value, [13:31:06.446] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.446] ...future.rng), globalenv = if (FALSE) [13:31:06.446] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.446] ...future.globalenv.names)) [13:31:06.446] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.446] }, condition = base::local({ [13:31:06.446] c <- base::c [13:31:06.446] inherits <- base::inherits [13:31:06.446] invokeRestart <- base::invokeRestart [13:31:06.446] length <- base::length [13:31:06.446] list <- base::list [13:31:06.446] seq.int <- base::seq.int [13:31:06.446] signalCondition <- base::signalCondition [13:31:06.446] sys.calls <- base::sys.calls [13:31:06.446] `[[` <- base::`[[` [13:31:06.446] `+` <- base::`+` [13:31:06.446] `<<-` <- base::`<<-` [13:31:06.446] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.446] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.446] 3L)] [13:31:06.446] } [13:31:06.446] function(cond) { [13:31:06.446] is_error <- inherits(cond, "error") [13:31:06.446] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.446] NULL) [13:31:06.446] if (is_error) { [13:31:06.446] sessionInformation <- function() { [13:31:06.446] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.446] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.446] search = base::search(), system = base::Sys.info()) [13:31:06.446] } [13:31:06.446] ...future.conditions[[length(...future.conditions) + [13:31:06.446] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.446] cond$call), session = sessionInformation(), [13:31:06.446] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.446] signalCondition(cond) [13:31:06.446] } [13:31:06.446] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.446] signal <- FALSE && inherits(cond, character(0)) [13:31:06.446] ...future.conditions[[length(...future.conditions) + [13:31:06.446] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.446] if (FALSE && !signal) { [13:31:06.446] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.446] { [13:31:06.446] inherits <- base::inherits [13:31:06.446] invokeRestart <- base::invokeRestart [13:31:06.446] is.null <- base::is.null [13:31:06.446] muffled <- FALSE [13:31:06.446] if (inherits(cond, "message")) { [13:31:06.446] muffled <- grepl(pattern, "muffleMessage") [13:31:06.446] if (muffled) [13:31:06.446] invokeRestart("muffleMessage") [13:31:06.446] } [13:31:06.446] else if (inherits(cond, "warning")) { [13:31:06.446] muffled <- grepl(pattern, "muffleWarning") [13:31:06.446] if (muffled) [13:31:06.446] invokeRestart("muffleWarning") [13:31:06.446] } [13:31:06.446] else if (inherits(cond, "condition")) { [13:31:06.446] if (!is.null(pattern)) { [13:31:06.446] computeRestarts <- base::computeRestarts [13:31:06.446] grepl <- base::grepl [13:31:06.446] restarts <- computeRestarts(cond) [13:31:06.446] for (restart in restarts) { [13:31:06.446] name <- restart$name [13:31:06.446] if (is.null(name)) [13:31:06.446] next [13:31:06.446] if (!grepl(pattern, name)) [13:31:06.446] next [13:31:06.446] invokeRestart(restart) [13:31:06.446] muffled <- TRUE [13:31:06.446] break [13:31:06.446] } [13:31:06.446] } [13:31:06.446] } [13:31:06.446] invisible(muffled) [13:31:06.446] } [13:31:06.446] muffleCondition(cond, pattern = "^muffle") [13:31:06.446] } [13:31:06.446] } [13:31:06.446] else { [13:31:06.446] if (TRUE) { [13:31:06.446] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.446] { [13:31:06.446] inherits <- base::inherits [13:31:06.446] invokeRestart <- base::invokeRestart [13:31:06.446] is.null <- base::is.null [13:31:06.446] muffled <- FALSE [13:31:06.446] if (inherits(cond, "message")) { [13:31:06.446] muffled <- grepl(pattern, "muffleMessage") [13:31:06.446] if (muffled) [13:31:06.446] invokeRestart("muffleMessage") [13:31:06.446] } [13:31:06.446] else if (inherits(cond, "warning")) { [13:31:06.446] muffled <- grepl(pattern, "muffleWarning") [13:31:06.446] if (muffled) [13:31:06.446] invokeRestart("muffleWarning") [13:31:06.446] } [13:31:06.446] else if (inherits(cond, "condition")) { [13:31:06.446] if (!is.null(pattern)) { [13:31:06.446] computeRestarts <- base::computeRestarts [13:31:06.446] grepl <- base::grepl [13:31:06.446] restarts <- computeRestarts(cond) [13:31:06.446] for (restart in restarts) { [13:31:06.446] name <- restart$name [13:31:06.446] if (is.null(name)) [13:31:06.446] next [13:31:06.446] if (!grepl(pattern, name)) [13:31:06.446] next [13:31:06.446] invokeRestart(restart) [13:31:06.446] muffled <- TRUE [13:31:06.446] break [13:31:06.446] } [13:31:06.446] } [13:31:06.446] } [13:31:06.446] invisible(muffled) [13:31:06.446] } [13:31:06.446] muffleCondition(cond, pattern = "^muffle") [13:31:06.446] } [13:31:06.446] } [13:31:06.446] } [13:31:06.446] })) [13:31:06.446] }, error = function(ex) { [13:31:06.446] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.446] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.446] ...future.rng), started = ...future.startTime, [13:31:06.446] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.446] version = "1.8"), class = "FutureResult") [13:31:06.446] }, finally = { [13:31:06.446] if (!identical(...future.workdir, getwd())) [13:31:06.446] setwd(...future.workdir) [13:31:06.446] { [13:31:06.446] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.446] ...future.oldOptions$nwarnings <- NULL [13:31:06.446] } [13:31:06.446] base::options(...future.oldOptions) [13:31:06.446] if (.Platform$OS.type == "windows") { [13:31:06.446] old_names <- names(...future.oldEnvVars) [13:31:06.446] envs <- base::Sys.getenv() [13:31:06.446] names <- names(envs) [13:31:06.446] common <- intersect(names, old_names) [13:31:06.446] added <- setdiff(names, old_names) [13:31:06.446] removed <- setdiff(old_names, names) [13:31:06.446] changed <- common[...future.oldEnvVars[common] != [13:31:06.446] envs[common]] [13:31:06.446] NAMES <- toupper(changed) [13:31:06.446] args <- list() [13:31:06.446] for (kk in seq_along(NAMES)) { [13:31:06.446] name <- changed[[kk]] [13:31:06.446] NAME <- NAMES[[kk]] [13:31:06.446] if (name != NAME && is.element(NAME, old_names)) [13:31:06.446] next [13:31:06.446] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.446] } [13:31:06.446] NAMES <- toupper(added) [13:31:06.446] for (kk in seq_along(NAMES)) { [13:31:06.446] name <- added[[kk]] [13:31:06.446] NAME <- NAMES[[kk]] [13:31:06.446] if (name != NAME && is.element(NAME, old_names)) [13:31:06.446] next [13:31:06.446] args[[name]] <- "" [13:31:06.446] } [13:31:06.446] NAMES <- toupper(removed) [13:31:06.446] for (kk in seq_along(NAMES)) { [13:31:06.446] name <- removed[[kk]] [13:31:06.446] NAME <- NAMES[[kk]] [13:31:06.446] if (name != NAME && is.element(NAME, old_names)) [13:31:06.446] next [13:31:06.446] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.446] } [13:31:06.446] if (length(args) > 0) [13:31:06.446] base::do.call(base::Sys.setenv, args = args) [13:31:06.446] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.446] } [13:31:06.446] else { [13:31:06.446] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.446] } [13:31:06.446] { [13:31:06.446] if (base::length(...future.futureOptionsAdded) > [13:31:06.446] 0L) { [13:31:06.446] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.446] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.446] base::options(opts) [13:31:06.446] } [13:31:06.446] { [13:31:06.446] NULL [13:31:06.446] options(future.plan = NULL) [13:31:06.446] if (is.na(NA_character_)) [13:31:06.446] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.446] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.446] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.446] .init = FALSE) [13:31:06.446] } [13:31:06.446] } [13:31:06.446] } [13:31:06.446] }) [13:31:06.446] if (TRUE) { [13:31:06.446] base::sink(type = "output", split = FALSE) [13:31:06.446] if (TRUE) { [13:31:06.446] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.446] } [13:31:06.446] else { [13:31:06.446] ...future.result["stdout"] <- base::list(NULL) [13:31:06.446] } [13:31:06.446] base::close(...future.stdout) [13:31:06.446] ...future.stdout <- NULL [13:31:06.446] } [13:31:06.446] ...future.result$conditions <- ...future.conditions [13:31:06.446] ...future.result$finished <- base::Sys.time() [13:31:06.446] ...future.result [13:31:06.446] } [13:31:06.550] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:06.551] plan(): nbrOfWorkers() = 2 > > plan(mirai_multisession) [13:31:06.551] plan(): Setting new future strategy stack: [13:31:06.551] List of future strategies: [13:31:06.551] 1. mirai_multisession: [13:31:06.551] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:06.551] - tweaked: FALSE [13:31:06.551] - call: plan(mirai_multisession) [13:31:06.564] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:06.564] < mirai | $data > [13:31:06.567] getGlobalsAndPackages() ... [13:31:06.567] Not searching for globals [13:31:06.567] - globals: [0] [13:31:06.567] getGlobalsAndPackages() ... DONE [13:31:06.567] getGlobalsAndPackages() ... [13:31:06.568] [13:31:06.568] - globals: [0] [13:31:06.568] getGlobalsAndPackages() ... DONE [13:31:06.568] Packages needed by the future expression (n = 0): [13:31:06.568] Packages needed by future strategies (n = 0): [13:31:06.569] { [13:31:06.569] { [13:31:06.569] { [13:31:06.569] ...future.startTime <- base::Sys.time() [13:31:06.569] { [13:31:06.569] { [13:31:06.569] { [13:31:06.569] base::local({ [13:31:06.569] has_future <- base::requireNamespace("future", [13:31:06.569] quietly = TRUE) [13:31:06.569] if (has_future) { [13:31:06.569] ns <- base::getNamespace("future") [13:31:06.569] version <- ns[[".package"]][["version"]] [13:31:06.569] if (is.null(version)) [13:31:06.569] version <- utils::packageVersion("future") [13:31:06.569] } [13:31:06.569] else { [13:31:06.569] version <- NULL [13:31:06.569] } [13:31:06.569] if (!has_future || version < "1.8.0") { [13:31:06.569] info <- base::c(r_version = base::gsub("R version ", [13:31:06.569] "", base::R.version$version.string), [13:31:06.569] platform = base::sprintf("%s (%s-bit)", [13:31:06.569] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.569] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.569] "release", "version")], collapse = " "), [13:31:06.569] hostname = base::Sys.info()[["nodename"]]) [13:31:06.569] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.569] info) [13:31:06.569] info <- base::paste(info, collapse = "; ") [13:31:06.569] if (!has_future) { [13:31:06.569] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.569] info) [13:31:06.569] } [13:31:06.569] else { [13:31:06.569] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.569] info, version) [13:31:06.569] } [13:31:06.569] base::stop(msg) [13:31:06.569] } [13:31:06.569] }) [13:31:06.569] } [13:31:06.569] ...future.strategy.old <- future::plan("list") [13:31:06.569] options(future.plan = NULL) [13:31:06.569] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.569] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.569] } [13:31:06.569] ...future.workdir <- getwd() [13:31:06.569] } [13:31:06.569] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.569] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.569] } [13:31:06.569] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.569] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.569] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.569] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.569] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.569] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.569] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.569] base::names(...future.oldOptions)) [13:31:06.569] } [13:31:06.569] if (FALSE) { [13:31:06.569] } [13:31:06.569] else { [13:31:06.569] if (TRUE) { [13:31:06.569] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.569] open = "w") [13:31:06.569] } [13:31:06.569] else { [13:31:06.569] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.569] windows = "NUL", "/dev/null"), open = "w") [13:31:06.569] } [13:31:06.569] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.569] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.569] base::sink(type = "output", split = FALSE) [13:31:06.569] base::close(...future.stdout) [13:31:06.569] }, add = TRUE) [13:31:06.569] } [13:31:06.569] ...future.frame <- base::sys.nframe() [13:31:06.569] ...future.conditions <- base::list() [13:31:06.569] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.569] if (FALSE) { [13:31:06.569] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.569] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.569] } [13:31:06.569] ...future.result <- base::tryCatch({ [13:31:06.569] base::withCallingHandlers({ [13:31:06.569] ...future.value <- base::withVisible(base::local(NA)) [13:31:06.569] future::FutureResult(value = ...future.value$value, [13:31:06.569] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.569] ...future.rng), globalenv = if (FALSE) [13:31:06.569] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.569] ...future.globalenv.names)) [13:31:06.569] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.569] }, condition = base::local({ [13:31:06.569] c <- base::c [13:31:06.569] inherits <- base::inherits [13:31:06.569] invokeRestart <- base::invokeRestart [13:31:06.569] length <- base::length [13:31:06.569] list <- base::list [13:31:06.569] seq.int <- base::seq.int [13:31:06.569] signalCondition <- base::signalCondition [13:31:06.569] sys.calls <- base::sys.calls [13:31:06.569] `[[` <- base::`[[` [13:31:06.569] `+` <- base::`+` [13:31:06.569] `<<-` <- base::`<<-` [13:31:06.569] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.569] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.569] 3L)] [13:31:06.569] } [13:31:06.569] function(cond) { [13:31:06.569] is_error <- inherits(cond, "error") [13:31:06.569] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.569] NULL) [13:31:06.569] if (is_error) { [13:31:06.569] sessionInformation <- function() { [13:31:06.569] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.569] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.569] search = base::search(), system = base::Sys.info()) [13:31:06.569] } [13:31:06.569] ...future.conditions[[length(...future.conditions) + [13:31:06.569] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.569] cond$call), session = sessionInformation(), [13:31:06.569] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.569] signalCondition(cond) [13:31:06.569] } [13:31:06.569] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.569] signal <- FALSE && inherits(cond, character(0)) [13:31:06.569] ...future.conditions[[length(...future.conditions) + [13:31:06.569] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.569] if (FALSE && !signal) { [13:31:06.569] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.569] { [13:31:06.569] inherits <- base::inherits [13:31:06.569] invokeRestart <- base::invokeRestart [13:31:06.569] is.null <- base::is.null [13:31:06.569] muffled <- FALSE [13:31:06.569] if (inherits(cond, "message")) { [13:31:06.569] muffled <- grepl(pattern, "muffleMessage") [13:31:06.569] if (muffled) [13:31:06.569] invokeRestart("muffleMessage") [13:31:06.569] } [13:31:06.569] else if (inherits(cond, "warning")) { [13:31:06.569] muffled <- grepl(pattern, "muffleWarning") [13:31:06.569] if (muffled) [13:31:06.569] invokeRestart("muffleWarning") [13:31:06.569] } [13:31:06.569] else if (inherits(cond, "condition")) { [13:31:06.569] if (!is.null(pattern)) { [13:31:06.569] computeRestarts <- base::computeRestarts [13:31:06.569] grepl <- base::grepl [13:31:06.569] restarts <- computeRestarts(cond) [13:31:06.569] for (restart in restarts) { [13:31:06.569] name <- restart$name [13:31:06.569] if (is.null(name)) [13:31:06.569] next [13:31:06.569] if (!grepl(pattern, name)) [13:31:06.569] next [13:31:06.569] invokeRestart(restart) [13:31:06.569] muffled <- TRUE [13:31:06.569] break [13:31:06.569] } [13:31:06.569] } [13:31:06.569] } [13:31:06.569] invisible(muffled) [13:31:06.569] } [13:31:06.569] muffleCondition(cond, pattern = "^muffle") [13:31:06.569] } [13:31:06.569] } [13:31:06.569] else { [13:31:06.569] if (TRUE) { [13:31:06.569] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.569] { [13:31:06.569] inherits <- base::inherits [13:31:06.569] invokeRestart <- base::invokeRestart [13:31:06.569] is.null <- base::is.null [13:31:06.569] muffled <- FALSE [13:31:06.569] if (inherits(cond, "message")) { [13:31:06.569] muffled <- grepl(pattern, "muffleMessage") [13:31:06.569] if (muffled) [13:31:06.569] invokeRestart("muffleMessage") [13:31:06.569] } [13:31:06.569] else if (inherits(cond, "warning")) { [13:31:06.569] muffled <- grepl(pattern, "muffleWarning") [13:31:06.569] if (muffled) [13:31:06.569] invokeRestart("muffleWarning") [13:31:06.569] } [13:31:06.569] else if (inherits(cond, "condition")) { [13:31:06.569] if (!is.null(pattern)) { [13:31:06.569] computeRestarts <- base::computeRestarts [13:31:06.569] grepl <- base::grepl [13:31:06.569] restarts <- computeRestarts(cond) [13:31:06.569] for (restart in restarts) { [13:31:06.569] name <- restart$name [13:31:06.569] if (is.null(name)) [13:31:06.569] next [13:31:06.569] if (!grepl(pattern, name)) [13:31:06.569] next [13:31:06.569] invokeRestart(restart) [13:31:06.569] muffled <- TRUE [13:31:06.569] break [13:31:06.569] } [13:31:06.569] } [13:31:06.569] } [13:31:06.569] invisible(muffled) [13:31:06.569] } [13:31:06.569] muffleCondition(cond, pattern = "^muffle") [13:31:06.569] } [13:31:06.569] } [13:31:06.569] } [13:31:06.569] })) [13:31:06.569] }, error = function(ex) { [13:31:06.569] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.569] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.569] ...future.rng), started = ...future.startTime, [13:31:06.569] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.569] version = "1.8"), class = "FutureResult") [13:31:06.569] }, finally = { [13:31:06.569] if (!identical(...future.workdir, getwd())) [13:31:06.569] setwd(...future.workdir) [13:31:06.569] { [13:31:06.569] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.569] ...future.oldOptions$nwarnings <- NULL [13:31:06.569] } [13:31:06.569] base::options(...future.oldOptions) [13:31:06.569] if (.Platform$OS.type == "windows") { [13:31:06.569] old_names <- names(...future.oldEnvVars) [13:31:06.569] envs <- base::Sys.getenv() [13:31:06.569] names <- names(envs) [13:31:06.569] common <- intersect(names, old_names) [13:31:06.569] added <- setdiff(names, old_names) [13:31:06.569] removed <- setdiff(old_names, names) [13:31:06.569] changed <- common[...future.oldEnvVars[common] != [13:31:06.569] envs[common]] [13:31:06.569] NAMES <- toupper(changed) [13:31:06.569] args <- list() [13:31:06.569] for (kk in seq_along(NAMES)) { [13:31:06.569] name <- changed[[kk]] [13:31:06.569] NAME <- NAMES[[kk]] [13:31:06.569] if (name != NAME && is.element(NAME, old_names)) [13:31:06.569] next [13:31:06.569] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.569] } [13:31:06.569] NAMES <- toupper(added) [13:31:06.569] for (kk in seq_along(NAMES)) { [13:31:06.569] name <- added[[kk]] [13:31:06.569] NAME <- NAMES[[kk]] [13:31:06.569] if (name != NAME && is.element(NAME, old_names)) [13:31:06.569] next [13:31:06.569] args[[name]] <- "" [13:31:06.569] } [13:31:06.569] NAMES <- toupper(removed) [13:31:06.569] for (kk in seq_along(NAMES)) { [13:31:06.569] name <- removed[[kk]] [13:31:06.569] NAME <- NAMES[[kk]] [13:31:06.569] if (name != NAME && is.element(NAME, old_names)) [13:31:06.569] next [13:31:06.569] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.569] } [13:31:06.569] if (length(args) > 0) [13:31:06.569] base::do.call(base::Sys.setenv, args = args) [13:31:06.569] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.569] } [13:31:06.569] else { [13:31:06.569] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.569] } [13:31:06.569] { [13:31:06.569] if (base::length(...future.futureOptionsAdded) > [13:31:06.569] 0L) { [13:31:06.569] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.569] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.569] base::options(opts) [13:31:06.569] } [13:31:06.569] { [13:31:06.569] NULL [13:31:06.569] options(future.plan = NULL) [13:31:06.569] if (is.na(NA_character_)) [13:31:06.569] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.569] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.569] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.569] .init = FALSE) [13:31:06.569] } [13:31:06.569] } [13:31:06.569] } [13:31:06.569] }) [13:31:06.569] if (TRUE) { [13:31:06.569] base::sink(type = "output", split = FALSE) [13:31:06.569] if (TRUE) { [13:31:06.569] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.569] } [13:31:06.569] else { [13:31:06.569] ...future.result["stdout"] <- base::list(NULL) [13:31:06.569] } [13:31:06.569] base::close(...future.stdout) [13:31:06.569] ...future.stdout <- NULL [13:31:06.569] } [13:31:06.569] ...future.result$conditions <- ...future.conditions [13:31:06.569] ...future.result$finished <- base::Sys.time() [13:31:06.569] ...future.result [13:31:06.569] } [13:31:06.671] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:06.672] 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:31:06.675] getGlobalsAndPackages() ... [13:31:06.675] Searching for globals... [13:31:06.688] - globals found: [9] '{', '<-', ':', 'sumtwo', '+', 'a', '*', 'b', '[' [13:31:06.688] Searching for globals ... DONE [13:31:06.688] Resolving globals: FALSE [13:31:06.690] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:31:06.691] 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:31:06.691] - globals: [3] 'sumtwo', 'a', 'b' [13:31:06.691] [13:31:06.692] getGlobalsAndPackages() ... DONE [13:31:06.692] run() for 'Future' ... [13:31:06.693] - state: 'created' [13:31:06.693] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.695] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.696] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.696] - Field: 'label' [13:31:06.696] - Field: 'local' [13:31:06.696] - Field: 'owner' [13:31:06.696] - Field: 'envir' [13:31:06.697] - Field: 'packages' [13:31:06.697] - Field: 'gc' [13:31:06.697] - Field: 'conditions' [13:31:06.697] - Field: 'expr' [13:31:06.697] - Field: 'uuid' [13:31:06.698] - Field: 'seed' [13:31:06.698] - Field: 'version' [13:31:06.698] - Field: 'result' [13:31:06.698] - Field: 'asynchronous' [13:31:06.698] - Field: 'calls' [13:31:06.698] - Field: 'globals' [13:31:06.699] - Field: 'stdout' [13:31:06.699] - Field: 'earlySignal' [13:31:06.699] - Field: 'lazy' [13:31:06.699] - Field: 'state' [13:31:06.699] - Field: '.cluster' [13:31:06.700] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.700] - Launch lazy future ... [13:31:06.700] Packages needed by the future expression (n = 0): [13:31:06.700] Packages needed by future strategies (n = 0): [13:31:06.701] { [13:31:06.701] { [13:31:06.701] { [13:31:06.701] ...future.startTime <- base::Sys.time() [13:31:06.701] { [13:31:06.701] { [13:31:06.701] { [13:31:06.701] base::local({ [13:31:06.701] has_future <- base::requireNamespace("future", [13:31:06.701] quietly = TRUE) [13:31:06.701] if (has_future) { [13:31:06.701] ns <- base::getNamespace("future") [13:31:06.701] version <- ns[[".package"]][["version"]] [13:31:06.701] if (is.null(version)) [13:31:06.701] version <- utils::packageVersion("future") [13:31:06.701] } [13:31:06.701] else { [13:31:06.701] version <- NULL [13:31:06.701] } [13:31:06.701] if (!has_future || version < "1.8.0") { [13:31:06.701] info <- base::c(r_version = base::gsub("R version ", [13:31:06.701] "", base::R.version$version.string), [13:31:06.701] platform = base::sprintf("%s (%s-bit)", [13:31:06.701] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.701] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.701] "release", "version")], collapse = " "), [13:31:06.701] hostname = base::Sys.info()[["nodename"]]) [13:31:06.701] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.701] info) [13:31:06.701] info <- base::paste(info, collapse = "; ") [13:31:06.701] if (!has_future) { [13:31:06.701] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.701] info) [13:31:06.701] } [13:31:06.701] else { [13:31:06.701] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.701] info, version) [13:31:06.701] } [13:31:06.701] base::stop(msg) [13:31:06.701] } [13:31:06.701] }) [13:31:06.701] } [13:31:06.701] ...future.strategy.old <- future::plan("list") [13:31:06.701] options(future.plan = NULL) [13:31:06.701] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.701] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.701] } [13:31:06.701] ...future.workdir <- getwd() [13:31:06.701] } [13:31:06.701] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.701] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.701] } [13:31:06.701] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.701] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.701] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.701] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.701] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.701] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.701] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.701] base::names(...future.oldOptions)) [13:31:06.701] } [13:31:06.701] if (FALSE) { [13:31:06.701] } [13:31:06.701] else { [13:31:06.701] if (TRUE) { [13:31:06.701] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.701] open = "w") [13:31:06.701] } [13:31:06.701] else { [13:31:06.701] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.701] windows = "NUL", "/dev/null"), open = "w") [13:31:06.701] } [13:31:06.701] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.701] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.701] base::sink(type = "output", split = FALSE) [13:31:06.701] base::close(...future.stdout) [13:31:06.701] }, add = TRUE) [13:31:06.701] } [13:31:06.701] ...future.frame <- base::sys.nframe() [13:31:06.701] ...future.conditions <- base::list() [13:31:06.701] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.701] if (FALSE) { [13:31:06.701] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.701] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.701] } [13:31:06.701] ...future.result <- base::tryCatch({ [13:31:06.701] base::withCallingHandlers({ [13:31:06.701] ...future.value <- base::withVisible(base::local({ [13:31:06.701] x <- 1:10 [13:31:06.701] sumtwo(a + b * x) [13:31:06.701] })) [13:31:06.701] future::FutureResult(value = ...future.value$value, [13:31:06.701] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.701] ...future.rng), globalenv = if (FALSE) [13:31:06.701] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.701] ...future.globalenv.names)) [13:31:06.701] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.701] }, condition = base::local({ [13:31:06.701] c <- base::c [13:31:06.701] inherits <- base::inherits [13:31:06.701] invokeRestart <- base::invokeRestart [13:31:06.701] length <- base::length [13:31:06.701] list <- base::list [13:31:06.701] seq.int <- base::seq.int [13:31:06.701] signalCondition <- base::signalCondition [13:31:06.701] sys.calls <- base::sys.calls [13:31:06.701] `[[` <- base::`[[` [13:31:06.701] `+` <- base::`+` [13:31:06.701] `<<-` <- base::`<<-` [13:31:06.701] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.701] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.701] 3L)] [13:31:06.701] } [13:31:06.701] function(cond) { [13:31:06.701] is_error <- inherits(cond, "error") [13:31:06.701] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.701] NULL) [13:31:06.701] if (is_error) { [13:31:06.701] sessionInformation <- function() { [13:31:06.701] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.701] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.701] search = base::search(), system = base::Sys.info()) [13:31:06.701] } [13:31:06.701] ...future.conditions[[length(...future.conditions) + [13:31:06.701] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.701] cond$call), session = sessionInformation(), [13:31:06.701] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.701] signalCondition(cond) [13:31:06.701] } [13:31:06.701] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.701] signal <- FALSE && inherits(cond, character(0)) [13:31:06.701] ...future.conditions[[length(...future.conditions) + [13:31:06.701] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.701] if (FALSE && !signal) { [13:31:06.701] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.701] { [13:31:06.701] inherits <- base::inherits [13:31:06.701] invokeRestart <- base::invokeRestart [13:31:06.701] is.null <- base::is.null [13:31:06.701] muffled <- FALSE [13:31:06.701] if (inherits(cond, "message")) { [13:31:06.701] muffled <- grepl(pattern, "muffleMessage") [13:31:06.701] if (muffled) [13:31:06.701] invokeRestart("muffleMessage") [13:31:06.701] } [13:31:06.701] else if (inherits(cond, "warning")) { [13:31:06.701] muffled <- grepl(pattern, "muffleWarning") [13:31:06.701] if (muffled) [13:31:06.701] invokeRestart("muffleWarning") [13:31:06.701] } [13:31:06.701] else if (inherits(cond, "condition")) { [13:31:06.701] if (!is.null(pattern)) { [13:31:06.701] computeRestarts <- base::computeRestarts [13:31:06.701] grepl <- base::grepl [13:31:06.701] restarts <- computeRestarts(cond) [13:31:06.701] for (restart in restarts) { [13:31:06.701] name <- restart$name [13:31:06.701] if (is.null(name)) [13:31:06.701] next [13:31:06.701] if (!grepl(pattern, name)) [13:31:06.701] next [13:31:06.701] invokeRestart(restart) [13:31:06.701] muffled <- TRUE [13:31:06.701] break [13:31:06.701] } [13:31:06.701] } [13:31:06.701] } [13:31:06.701] invisible(muffled) [13:31:06.701] } [13:31:06.701] muffleCondition(cond, pattern = "^muffle") [13:31:06.701] } [13:31:06.701] } [13:31:06.701] else { [13:31:06.701] if (TRUE) { [13:31:06.701] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.701] { [13:31:06.701] inherits <- base::inherits [13:31:06.701] invokeRestart <- base::invokeRestart [13:31:06.701] is.null <- base::is.null [13:31:06.701] muffled <- FALSE [13:31:06.701] if (inherits(cond, "message")) { [13:31:06.701] muffled <- grepl(pattern, "muffleMessage") [13:31:06.701] if (muffled) [13:31:06.701] invokeRestart("muffleMessage") [13:31:06.701] } [13:31:06.701] else if (inherits(cond, "warning")) { [13:31:06.701] muffled <- grepl(pattern, "muffleWarning") [13:31:06.701] if (muffled) [13:31:06.701] invokeRestart("muffleWarning") [13:31:06.701] } [13:31:06.701] else if (inherits(cond, "condition")) { [13:31:06.701] if (!is.null(pattern)) { [13:31:06.701] computeRestarts <- base::computeRestarts [13:31:06.701] grepl <- base::grepl [13:31:06.701] restarts <- computeRestarts(cond) [13:31:06.701] for (restart in restarts) { [13:31:06.701] name <- restart$name [13:31:06.701] if (is.null(name)) [13:31:06.701] next [13:31:06.701] if (!grepl(pattern, name)) [13:31:06.701] next [13:31:06.701] invokeRestart(restart) [13:31:06.701] muffled <- TRUE [13:31:06.701] break [13:31:06.701] } [13:31:06.701] } [13:31:06.701] } [13:31:06.701] invisible(muffled) [13:31:06.701] } [13:31:06.701] muffleCondition(cond, pattern = "^muffle") [13:31:06.701] } [13:31:06.701] } [13:31:06.701] } [13:31:06.701] })) [13:31:06.701] }, error = function(ex) { [13:31:06.701] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.701] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.701] ...future.rng), started = ...future.startTime, [13:31:06.701] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.701] version = "1.8"), class = "FutureResult") [13:31:06.701] }, finally = { [13:31:06.701] if (!identical(...future.workdir, getwd())) [13:31:06.701] setwd(...future.workdir) [13:31:06.701] { [13:31:06.701] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.701] ...future.oldOptions$nwarnings <- NULL [13:31:06.701] } [13:31:06.701] base::options(...future.oldOptions) [13:31:06.701] if (.Platform$OS.type == "windows") { [13:31:06.701] old_names <- names(...future.oldEnvVars) [13:31:06.701] envs <- base::Sys.getenv() [13:31:06.701] names <- names(envs) [13:31:06.701] common <- intersect(names, old_names) [13:31:06.701] added <- setdiff(names, old_names) [13:31:06.701] removed <- setdiff(old_names, names) [13:31:06.701] changed <- common[...future.oldEnvVars[common] != [13:31:06.701] envs[common]] [13:31:06.701] NAMES <- toupper(changed) [13:31:06.701] args <- list() [13:31:06.701] for (kk in seq_along(NAMES)) { [13:31:06.701] name <- changed[[kk]] [13:31:06.701] NAME <- NAMES[[kk]] [13:31:06.701] if (name != NAME && is.element(NAME, old_names)) [13:31:06.701] next [13:31:06.701] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.701] } [13:31:06.701] NAMES <- toupper(added) [13:31:06.701] for (kk in seq_along(NAMES)) { [13:31:06.701] name <- added[[kk]] [13:31:06.701] NAME <- NAMES[[kk]] [13:31:06.701] if (name != NAME && is.element(NAME, old_names)) [13:31:06.701] next [13:31:06.701] args[[name]] <- "" [13:31:06.701] } [13:31:06.701] NAMES <- toupper(removed) [13:31:06.701] for (kk in seq_along(NAMES)) { [13:31:06.701] name <- removed[[kk]] [13:31:06.701] NAME <- NAMES[[kk]] [13:31:06.701] if (name != NAME && is.element(NAME, old_names)) [13:31:06.701] next [13:31:06.701] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.701] } [13:31:06.701] if (length(args) > 0) [13:31:06.701] base::do.call(base::Sys.setenv, args = args) [13:31:06.701] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.701] } [13:31:06.701] else { [13:31:06.701] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.701] } [13:31:06.701] { [13:31:06.701] if (base::length(...future.futureOptionsAdded) > [13:31:06.701] 0L) { [13:31:06.701] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.701] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.701] base::options(opts) [13:31:06.701] } [13:31:06.701] { [13:31:06.701] NULL [13:31:06.701] options(future.plan = NULL) [13:31:06.701] if (is.na(NA_character_)) [13:31:06.701] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.701] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.701] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.701] .init = FALSE) [13:31:06.701] } [13:31:06.701] } [13:31:06.701] } [13:31:06.701] }) [13:31:06.701] if (TRUE) { [13:31:06.701] base::sink(type = "output", split = FALSE) [13:31:06.701] if (TRUE) { [13:31:06.701] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.701] } [13:31:06.701] else { [13:31:06.701] ...future.result["stdout"] <- base::list(NULL) [13:31:06.701] } [13:31:06.701] base::close(...future.stdout) [13:31:06.701] ...future.stdout <- NULL [13:31:06.701] } [13:31:06.701] ...future.result$conditions <- ...future.conditions [13:31:06.701] ...future.result$finished <- base::Sys.time() [13:31:06.701] ...future.result [13:31:06.701] } [13:31:06.705] - Launch lazy future ... done [13:31:06.705] 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:31:06.706] resolved() for 'MiraiFuture' ... [13:31:06.707] - state: 'running' [13:31:06.707] - run: TRUE [13:31:06.707] - result: 'NULL' [13:31:06.707] - resolved: FALSE [13:31:06.707] resolved() for 'MiraiFuture' ... done Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: 163e8d1e-e196-0465-9142-1e3f4ea4101f 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:31:06.710] getGlobalsAndPackages() ... [13:31:06.710] Searching for globals... [13:31:06.713] - globals found: [9] '{', '<-', ':', 'sumtwo', '+', 'a', '*', 'b', '[' [13:31:06.713] Searching for globals ... DONE [13:31:06.713] Resolving globals: FALSE [13:31:06.714] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:31:06.715] 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:31:06.715] - globals: [3] 'sumtwo', 'a', 'b' [13:31:06.715] [13:31:06.715] getGlobalsAndPackages() ... DONE [13:31:06.715] run() for 'Future' ... [13:31:06.716] - state: 'created' [13:31:06.716] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.718] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.718] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.718] - Field: 'label' [13:31:06.720] - Field: 'local' [13:31:06.720] - Field: 'owner' [13:31:06.720] - Field: 'envir' [13:31:06.721] - Field: 'packages' [13:31:06.721] - Field: 'gc' [13:31:06.721] - Field: 'conditions' [13:31:06.721] - Field: 'expr' [13:31:06.721] - Field: 'uuid' [13:31:06.721] - Field: 'seed' [13:31:06.722] - Field: 'version' [13:31:06.722] - Field: 'result' [13:31:06.722] - Field: 'asynchronous' [13:31:06.722] - Field: 'calls' [13:31:06.722] - Field: 'globals' [13:31:06.722] - Field: 'stdout' [13:31:06.723] - Field: 'earlySignal' [13:31:06.723] - Field: 'lazy' [13:31:06.723] - Field: 'state' [13:31:06.723] - Field: '.cluster' [13:31:06.723] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.723] - Launch lazy future ... [13:31:06.724] Packages needed by the future expression (n = 0): [13:31:06.724] Packages needed by future strategies (n = 0): [13:31:06.724] { [13:31:06.724] { [13:31:06.724] { [13:31:06.724] ...future.startTime <- base::Sys.time() [13:31:06.724] { [13:31:06.724] { [13:31:06.724] { [13:31:06.724] base::local({ [13:31:06.724] has_future <- base::requireNamespace("future", [13:31:06.724] quietly = TRUE) [13:31:06.724] if (has_future) { [13:31:06.724] ns <- base::getNamespace("future") [13:31:06.724] version <- ns[[".package"]][["version"]] [13:31:06.724] if (is.null(version)) [13:31:06.724] version <- utils::packageVersion("future") [13:31:06.724] } [13:31:06.724] else { [13:31:06.724] version <- NULL [13:31:06.724] } [13:31:06.724] if (!has_future || version < "1.8.0") { [13:31:06.724] info <- base::c(r_version = base::gsub("R version ", [13:31:06.724] "", base::R.version$version.string), [13:31:06.724] platform = base::sprintf("%s (%s-bit)", [13:31:06.724] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.724] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.724] "release", "version")], collapse = " "), [13:31:06.724] hostname = base::Sys.info()[["nodename"]]) [13:31:06.724] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.724] info) [13:31:06.724] info <- base::paste(info, collapse = "; ") [13:31:06.724] if (!has_future) { [13:31:06.724] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.724] info) [13:31:06.724] } [13:31:06.724] else { [13:31:06.724] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.724] info, version) [13:31:06.724] } [13:31:06.724] base::stop(msg) [13:31:06.724] } [13:31:06.724] }) [13:31:06.724] } [13:31:06.724] ...future.strategy.old <- future::plan("list") [13:31:06.724] options(future.plan = NULL) [13:31:06.724] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.724] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.724] } [13:31:06.724] ...future.workdir <- getwd() [13:31:06.724] } [13:31:06.724] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.724] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.724] } [13:31:06.724] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.724] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.724] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.724] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.724] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.724] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.724] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.724] base::names(...future.oldOptions)) [13:31:06.724] } [13:31:06.724] if (FALSE) { [13:31:06.724] } [13:31:06.724] else { [13:31:06.724] if (TRUE) { [13:31:06.724] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.724] open = "w") [13:31:06.724] } [13:31:06.724] else { [13:31:06.724] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.724] windows = "NUL", "/dev/null"), open = "w") [13:31:06.724] } [13:31:06.724] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.724] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.724] base::sink(type = "output", split = FALSE) [13:31:06.724] base::close(...future.stdout) [13:31:06.724] }, add = TRUE) [13:31:06.724] } [13:31:06.724] ...future.frame <- base::sys.nframe() [13:31:06.724] ...future.conditions <- base::list() [13:31:06.724] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.724] if (FALSE) { [13:31:06.724] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.724] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.724] } [13:31:06.724] ...future.result <- base::tryCatch({ [13:31:06.724] base::withCallingHandlers({ [13:31:06.724] ...future.value <- base::withVisible(base::local({ [13:31:06.724] x <- 1:10 [13:31:06.724] sumtwo(a + b * x) [13:31:06.724] })) [13:31:06.724] future::FutureResult(value = ...future.value$value, [13:31:06.724] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.724] ...future.rng), globalenv = if (FALSE) [13:31:06.724] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.724] ...future.globalenv.names)) [13:31:06.724] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.724] }, condition = base::local({ [13:31:06.724] c <- base::c [13:31:06.724] inherits <- base::inherits [13:31:06.724] invokeRestart <- base::invokeRestart [13:31:06.724] length <- base::length [13:31:06.724] list <- base::list [13:31:06.724] seq.int <- base::seq.int [13:31:06.724] signalCondition <- base::signalCondition [13:31:06.724] sys.calls <- base::sys.calls [13:31:06.724] `[[` <- base::`[[` [13:31:06.724] `+` <- base::`+` [13:31:06.724] `<<-` <- base::`<<-` [13:31:06.724] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.724] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.724] 3L)] [13:31:06.724] } [13:31:06.724] function(cond) { [13:31:06.724] is_error <- inherits(cond, "error") [13:31:06.724] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.724] NULL) [13:31:06.724] if (is_error) { [13:31:06.724] sessionInformation <- function() { [13:31:06.724] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.724] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.724] search = base::search(), system = base::Sys.info()) [13:31:06.724] } [13:31:06.724] ...future.conditions[[length(...future.conditions) + [13:31:06.724] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.724] cond$call), session = sessionInformation(), [13:31:06.724] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.724] signalCondition(cond) [13:31:06.724] } [13:31:06.724] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.724] signal <- FALSE && inherits(cond, character(0)) [13:31:06.724] ...future.conditions[[length(...future.conditions) + [13:31:06.724] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.724] if (FALSE && !signal) { [13:31:06.724] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.724] { [13:31:06.724] inherits <- base::inherits [13:31:06.724] invokeRestart <- base::invokeRestart [13:31:06.724] is.null <- base::is.null [13:31:06.724] muffled <- FALSE [13:31:06.724] if (inherits(cond, "message")) { [13:31:06.724] muffled <- grepl(pattern, "muffleMessage") [13:31:06.724] if (muffled) [13:31:06.724] invokeRestart("muffleMessage") [13:31:06.724] } [13:31:06.724] else if (inherits(cond, "warning")) { [13:31:06.724] muffled <- grepl(pattern, "muffleWarning") [13:31:06.724] if (muffled) [13:31:06.724] invokeRestart("muffleWarning") [13:31:06.724] } [13:31:06.724] else if (inherits(cond, "condition")) { [13:31:06.724] if (!is.null(pattern)) { [13:31:06.724] computeRestarts <- base::computeRestarts [13:31:06.724] grepl <- base::grepl [13:31:06.724] restarts <- computeRestarts(cond) [13:31:06.724] for (restart in restarts) { [13:31:06.724] name <- restart$name [13:31:06.724] if (is.null(name)) [13:31:06.724] next [13:31:06.724] if (!grepl(pattern, name)) [13:31:06.724] next [13:31:06.724] invokeRestart(restart) [13:31:06.724] muffled <- TRUE [13:31:06.724] break [13:31:06.724] } [13:31:06.724] } [13:31:06.724] } [13:31:06.724] invisible(muffled) [13:31:06.724] } [13:31:06.724] muffleCondition(cond, pattern = "^muffle") [13:31:06.724] } [13:31:06.724] } [13:31:06.724] else { [13:31:06.724] if (TRUE) { [13:31:06.724] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.724] { [13:31:06.724] inherits <- base::inherits [13:31:06.724] invokeRestart <- base::invokeRestart [13:31:06.724] is.null <- base::is.null [13:31:06.724] muffled <- FALSE [13:31:06.724] if (inherits(cond, "message")) { [13:31:06.724] muffled <- grepl(pattern, "muffleMessage") [13:31:06.724] if (muffled) [13:31:06.724] invokeRestart("muffleMessage") [13:31:06.724] } [13:31:06.724] else if (inherits(cond, "warning")) { [13:31:06.724] muffled <- grepl(pattern, "muffleWarning") [13:31:06.724] if (muffled) [13:31:06.724] invokeRestart("muffleWarning") [13:31:06.724] } [13:31:06.724] else if (inherits(cond, "condition")) { [13:31:06.724] if (!is.null(pattern)) { [13:31:06.724] computeRestarts <- base::computeRestarts [13:31:06.724] grepl <- base::grepl [13:31:06.724] restarts <- computeRestarts(cond) [13:31:06.724] for (restart in restarts) { [13:31:06.724] name <- restart$name [13:31:06.724] if (is.null(name)) [13:31:06.724] next [13:31:06.724] if (!grepl(pattern, name)) [13:31:06.724] next [13:31:06.724] invokeRestart(restart) [13:31:06.724] muffled <- TRUE [13:31:06.724] break [13:31:06.724] } [13:31:06.724] } [13:31:06.724] } [13:31:06.724] invisible(muffled) [13:31:06.724] } [13:31:06.724] muffleCondition(cond, pattern = "^muffle") [13:31:06.724] } [13:31:06.724] } [13:31:06.724] } [13:31:06.724] })) [13:31:06.724] }, error = function(ex) { [13:31:06.724] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.724] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.724] ...future.rng), started = ...future.startTime, [13:31:06.724] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.724] version = "1.8"), class = "FutureResult") [13:31:06.724] }, finally = { [13:31:06.724] if (!identical(...future.workdir, getwd())) [13:31:06.724] setwd(...future.workdir) [13:31:06.724] { [13:31:06.724] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.724] ...future.oldOptions$nwarnings <- NULL [13:31:06.724] } [13:31:06.724] base::options(...future.oldOptions) [13:31:06.724] if (.Platform$OS.type == "windows") { [13:31:06.724] old_names <- names(...future.oldEnvVars) [13:31:06.724] envs <- base::Sys.getenv() [13:31:06.724] names <- names(envs) [13:31:06.724] common <- intersect(names, old_names) [13:31:06.724] added <- setdiff(names, old_names) [13:31:06.724] removed <- setdiff(old_names, names) [13:31:06.724] changed <- common[...future.oldEnvVars[common] != [13:31:06.724] envs[common]] [13:31:06.724] NAMES <- toupper(changed) [13:31:06.724] args <- list() [13:31:06.724] for (kk in seq_along(NAMES)) { [13:31:06.724] name <- changed[[kk]] [13:31:06.724] NAME <- NAMES[[kk]] [13:31:06.724] if (name != NAME && is.element(NAME, old_names)) [13:31:06.724] next [13:31:06.724] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.724] } [13:31:06.724] NAMES <- toupper(added) [13:31:06.724] for (kk in seq_along(NAMES)) { [13:31:06.724] name <- added[[kk]] [13:31:06.724] NAME <- NAMES[[kk]] [13:31:06.724] if (name != NAME && is.element(NAME, old_names)) [13:31:06.724] next [13:31:06.724] args[[name]] <- "" [13:31:06.724] } [13:31:06.724] NAMES <- toupper(removed) [13:31:06.724] for (kk in seq_along(NAMES)) { [13:31:06.724] name <- removed[[kk]] [13:31:06.724] NAME <- NAMES[[kk]] [13:31:06.724] if (name != NAME && is.element(NAME, old_names)) [13:31:06.724] next [13:31:06.724] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.724] } [13:31:06.724] if (length(args) > 0) [13:31:06.724] base::do.call(base::Sys.setenv, args = args) [13:31:06.724] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.724] } [13:31:06.724] else { [13:31:06.724] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.724] } [13:31:06.724] { [13:31:06.724] if (base::length(...future.futureOptionsAdded) > [13:31:06.724] 0L) { [13:31:06.724] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.724] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.724] base::options(opts) [13:31:06.724] } [13:31:06.724] { [13:31:06.724] NULL [13:31:06.724] options(future.plan = NULL) [13:31:06.724] if (is.na(NA_character_)) [13:31:06.724] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.724] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.724] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.724] .init = FALSE) [13:31:06.724] } [13:31:06.724] } [13:31:06.724] } [13:31:06.724] }) [13:31:06.724] if (TRUE) { [13:31:06.724] base::sink(type = "output", split = FALSE) [13:31:06.724] if (TRUE) { [13:31:06.724] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.724] } [13:31:06.724] else { [13:31:06.724] ...future.result["stdout"] <- base::list(NULL) [13:31:06.724] } [13:31:06.724] base::close(...future.stdout) [13:31:06.724] ...future.stdout <- NULL [13:31:06.724] } [13:31:06.724] ...future.result$conditions <- ...future.conditions [13:31:06.724] ...future.result$finished <- base::Sys.time() [13:31:06.724] ...future.result [13:31:06.724] } [13:31:06.728] - Launch lazy future ... done [13:31:06.728] 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:31:06.732] getGlobalsAndPackages() ... [13:31:06.733] Not searching for globals [13:31:06.733] - globals: [0] [13:31:06.733] getGlobalsAndPackages() ... DONE [13:31:06.733] run() for 'Future' ... [13:31:06.734] - state: 'created' [13:31:06.734] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.736] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.737] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.737] - Field: 'label' [13:31:06.737] - Field: 'local' [13:31:06.737] - Field: 'owner' [13:31:06.737] - Field: 'envir' [13:31:06.738] - Field: 'packages' [13:31:06.738] - Field: 'gc' [13:31:06.738] - Field: 'conditions' [13:31:06.738] - Field: 'expr' [13:31:06.738] - Field: 'uuid' [13:31:06.739] - Field: 'seed' [13:31:06.739] - Field: 'version' [13:31:06.739] - Field: 'result' [13:31:06.739] - Field: 'asynchronous' [13:31:06.739] - Field: 'calls' [13:31:06.739] - Field: 'globals' [13:31:06.740] - Field: 'stdout' [13:31:06.740] - Field: 'earlySignal' [13:31:06.740] - Field: 'lazy' [13:31:06.740] - Field: 'state' [13:31:06.740] - Field: '.cluster' [13:31:06.741] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.741] - Launch lazy future ... [13:31:06.741] Packages needed by the future expression (n = 0): [13:31:06.741] Packages needed by future strategies (n = 0): [13:31:06.742] { [13:31:06.742] { [13:31:06.742] { [13:31:06.742] ...future.startTime <- base::Sys.time() [13:31:06.742] { [13:31:06.742] { [13:31:06.742] { [13:31:06.742] base::local({ [13:31:06.742] has_future <- base::requireNamespace("future", [13:31:06.742] quietly = TRUE) [13:31:06.742] if (has_future) { [13:31:06.742] ns <- base::getNamespace("future") [13:31:06.742] version <- ns[[".package"]][["version"]] [13:31:06.742] if (is.null(version)) [13:31:06.742] version <- utils::packageVersion("future") [13:31:06.742] } [13:31:06.742] else { [13:31:06.742] version <- NULL [13:31:06.742] } [13:31:06.742] if (!has_future || version < "1.8.0") { [13:31:06.742] info <- base::c(r_version = base::gsub("R version ", [13:31:06.742] "", base::R.version$version.string), [13:31:06.742] platform = base::sprintf("%s (%s-bit)", [13:31:06.742] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.742] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.742] "release", "version")], collapse = " "), [13:31:06.742] hostname = base::Sys.info()[["nodename"]]) [13:31:06.742] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.742] info) [13:31:06.742] info <- base::paste(info, collapse = "; ") [13:31:06.742] if (!has_future) { [13:31:06.742] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.742] info) [13:31:06.742] } [13:31:06.742] else { [13:31:06.742] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.742] info, version) [13:31:06.742] } [13:31:06.742] base::stop(msg) [13:31:06.742] } [13:31:06.742] }) [13:31:06.742] } [13:31:06.742] ...future.strategy.old <- future::plan("list") [13:31:06.742] options(future.plan = NULL) [13:31:06.742] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.742] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.742] } [13:31:06.742] ...future.workdir <- getwd() [13:31:06.742] } [13:31:06.742] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.742] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.742] } [13:31:06.742] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.742] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.742] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.742] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.742] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.742] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.742] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.742] base::names(...future.oldOptions)) [13:31:06.742] } [13:31:06.742] if (FALSE) { [13:31:06.742] } [13:31:06.742] else { [13:31:06.742] if (TRUE) { [13:31:06.742] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.742] open = "w") [13:31:06.742] } [13:31:06.742] else { [13:31:06.742] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.742] windows = "NUL", "/dev/null"), open = "w") [13:31:06.742] } [13:31:06.742] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.742] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.742] base::sink(type = "output", split = FALSE) [13:31:06.742] base::close(...future.stdout) [13:31:06.742] }, add = TRUE) [13:31:06.742] } [13:31:06.742] ...future.frame <- base::sys.nframe() [13:31:06.742] ...future.conditions <- base::list() [13:31:06.742] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.742] if (FALSE) { [13:31:06.742] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.742] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.742] } [13:31:06.742] ...future.result <- base::tryCatch({ [13:31:06.742] base::withCallingHandlers({ [13:31:06.742] ...future.value <- base::withVisible(base::local({ [13:31:06.742] 1 [13:31:06.742] })) [13:31:06.742] future::FutureResult(value = ...future.value$value, [13:31:06.742] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.742] ...future.rng), globalenv = if (FALSE) [13:31:06.742] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.742] ...future.globalenv.names)) [13:31:06.742] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.742] }, condition = base::local({ [13:31:06.742] c <- base::c [13:31:06.742] inherits <- base::inherits [13:31:06.742] invokeRestart <- base::invokeRestart [13:31:06.742] length <- base::length [13:31:06.742] list <- base::list [13:31:06.742] seq.int <- base::seq.int [13:31:06.742] signalCondition <- base::signalCondition [13:31:06.742] sys.calls <- base::sys.calls [13:31:06.742] `[[` <- base::`[[` [13:31:06.742] `+` <- base::`+` [13:31:06.742] `<<-` <- base::`<<-` [13:31:06.742] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.742] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.742] 3L)] [13:31:06.742] } [13:31:06.742] function(cond) { [13:31:06.742] is_error <- inherits(cond, "error") [13:31:06.742] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.742] NULL) [13:31:06.742] if (is_error) { [13:31:06.742] sessionInformation <- function() { [13:31:06.742] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.742] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.742] search = base::search(), system = base::Sys.info()) [13:31:06.742] } [13:31:06.742] ...future.conditions[[length(...future.conditions) + [13:31:06.742] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.742] cond$call), session = sessionInformation(), [13:31:06.742] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.742] signalCondition(cond) [13:31:06.742] } [13:31:06.742] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.742] signal <- FALSE && inherits(cond, character(0)) [13:31:06.742] ...future.conditions[[length(...future.conditions) + [13:31:06.742] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.742] if (FALSE && !signal) { [13:31:06.742] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.742] { [13:31:06.742] inherits <- base::inherits [13:31:06.742] invokeRestart <- base::invokeRestart [13:31:06.742] is.null <- base::is.null [13:31:06.742] muffled <- FALSE [13:31:06.742] if (inherits(cond, "message")) { [13:31:06.742] muffled <- grepl(pattern, "muffleMessage") [13:31:06.742] if (muffled) [13:31:06.742] invokeRestart("muffleMessage") [13:31:06.742] } [13:31:06.742] else if (inherits(cond, "warning")) { [13:31:06.742] muffled <- grepl(pattern, "muffleWarning") [13:31:06.742] if (muffled) [13:31:06.742] invokeRestart("muffleWarning") [13:31:06.742] } [13:31:06.742] else if (inherits(cond, "condition")) { [13:31:06.742] if (!is.null(pattern)) { [13:31:06.742] computeRestarts <- base::computeRestarts [13:31:06.742] grepl <- base::grepl [13:31:06.742] restarts <- computeRestarts(cond) [13:31:06.742] for (restart in restarts) { [13:31:06.742] name <- restart$name [13:31:06.742] if (is.null(name)) [13:31:06.742] next [13:31:06.742] if (!grepl(pattern, name)) [13:31:06.742] next [13:31:06.742] invokeRestart(restart) [13:31:06.742] muffled <- TRUE [13:31:06.742] break [13:31:06.742] } [13:31:06.742] } [13:31:06.742] } [13:31:06.742] invisible(muffled) [13:31:06.742] } [13:31:06.742] muffleCondition(cond, pattern = "^muffle") [13:31:06.742] } [13:31:06.742] } [13:31:06.742] else { [13:31:06.742] if (TRUE) { [13:31:06.742] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.742] { [13:31:06.742] inherits <- base::inherits [13:31:06.742] invokeRestart <- base::invokeRestart [13:31:06.742] is.null <- base::is.null [13:31:06.742] muffled <- FALSE [13:31:06.742] if (inherits(cond, "message")) { [13:31:06.742] muffled <- grepl(pattern, "muffleMessage") [13:31:06.742] if (muffled) [13:31:06.742] invokeRestart("muffleMessage") [13:31:06.742] } [13:31:06.742] else if (inherits(cond, "warning")) { [13:31:06.742] muffled <- grepl(pattern, "muffleWarning") [13:31:06.742] if (muffled) [13:31:06.742] invokeRestart("muffleWarning") [13:31:06.742] } [13:31:06.742] else if (inherits(cond, "condition")) { [13:31:06.742] if (!is.null(pattern)) { [13:31:06.742] computeRestarts <- base::computeRestarts [13:31:06.742] grepl <- base::grepl [13:31:06.742] restarts <- computeRestarts(cond) [13:31:06.742] for (restart in restarts) { [13:31:06.742] name <- restart$name [13:31:06.742] if (is.null(name)) [13:31:06.742] next [13:31:06.742] if (!grepl(pattern, name)) [13:31:06.742] next [13:31:06.742] invokeRestart(restart) [13:31:06.742] muffled <- TRUE [13:31:06.742] break [13:31:06.742] } [13:31:06.742] } [13:31:06.742] } [13:31:06.742] invisible(muffled) [13:31:06.742] } [13:31:06.742] muffleCondition(cond, pattern = "^muffle") [13:31:06.742] } [13:31:06.742] } [13:31:06.742] } [13:31:06.742] })) [13:31:06.742] }, error = function(ex) { [13:31:06.742] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.742] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.742] ...future.rng), started = ...future.startTime, [13:31:06.742] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.742] version = "1.8"), class = "FutureResult") [13:31:06.742] }, finally = { [13:31:06.742] if (!identical(...future.workdir, getwd())) [13:31:06.742] setwd(...future.workdir) [13:31:06.742] { [13:31:06.742] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.742] ...future.oldOptions$nwarnings <- NULL [13:31:06.742] } [13:31:06.742] base::options(...future.oldOptions) [13:31:06.742] if (.Platform$OS.type == "windows") { [13:31:06.742] old_names <- names(...future.oldEnvVars) [13:31:06.742] envs <- base::Sys.getenv() [13:31:06.742] names <- names(envs) [13:31:06.742] common <- intersect(names, old_names) [13:31:06.742] added <- setdiff(names, old_names) [13:31:06.742] removed <- setdiff(old_names, names) [13:31:06.742] changed <- common[...future.oldEnvVars[common] != [13:31:06.742] envs[common]] [13:31:06.742] NAMES <- toupper(changed) [13:31:06.742] args <- list() [13:31:06.742] for (kk in seq_along(NAMES)) { [13:31:06.742] name <- changed[[kk]] [13:31:06.742] NAME <- NAMES[[kk]] [13:31:06.742] if (name != NAME && is.element(NAME, old_names)) [13:31:06.742] next [13:31:06.742] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.742] } [13:31:06.742] NAMES <- toupper(added) [13:31:06.742] for (kk in seq_along(NAMES)) { [13:31:06.742] name <- added[[kk]] [13:31:06.742] NAME <- NAMES[[kk]] [13:31:06.742] if (name != NAME && is.element(NAME, old_names)) [13:31:06.742] next [13:31:06.742] args[[name]] <- "" [13:31:06.742] } [13:31:06.742] NAMES <- toupper(removed) [13:31:06.742] for (kk in seq_along(NAMES)) { [13:31:06.742] name <- removed[[kk]] [13:31:06.742] NAME <- NAMES[[kk]] [13:31:06.742] if (name != NAME && is.element(NAME, old_names)) [13:31:06.742] next [13:31:06.742] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.742] } [13:31:06.742] if (length(args) > 0) [13:31:06.742] base::do.call(base::Sys.setenv, args = args) [13:31:06.742] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.742] } [13:31:06.742] else { [13:31:06.742] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.742] } [13:31:06.742] { [13:31:06.742] if (base::length(...future.futureOptionsAdded) > [13:31:06.742] 0L) { [13:31:06.742] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.742] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.742] base::options(opts) [13:31:06.742] } [13:31:06.742] { [13:31:06.742] NULL [13:31:06.742] options(future.plan = NULL) [13:31:06.742] if (is.na(NA_character_)) [13:31:06.742] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.742] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.742] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.742] .init = FALSE) [13:31:06.742] } [13:31:06.742] } [13:31:06.742] } [13:31:06.742] }) [13:31:06.742] if (TRUE) { [13:31:06.742] base::sink(type = "output", split = FALSE) [13:31:06.742] if (TRUE) { [13:31:06.742] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.742] } [13:31:06.742] else { [13:31:06.742] ...future.result["stdout"] <- base::list(NULL) [13:31:06.742] } [13:31:06.742] base::close(...future.stdout) [13:31:06.742] ...future.stdout <- NULL [13:31:06.742] } [13:31:06.742] ...future.result$conditions <- ...future.conditions [13:31:06.742] ...future.result$finished <- base::Sys.time() [13:31:06.742] ...future.result [13:31:06.742] } [13:31:06.746] - Launch lazy future ... done [13:31:06.746] 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:31:06.748] getGlobalsAndPackages() ... [13:31:06.748] Not searching for globals [13:31:06.748] - globals: [0] [13:31:06.749] getGlobalsAndPackages() ... DONE [13:31:06.749] run() for 'Future' ... [13:31:06.749] - state: 'created' [13:31:06.749] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.752] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.752] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.752] - Field: 'label' [13:31:06.752] - Field: 'local' [13:31:06.752] - Field: 'owner' [13:31:06.753] - Field: 'envir' [13:31:06.753] - Field: 'packages' [13:31:06.753] - Field: 'gc' [13:31:06.753] - Field: 'conditions' [13:31:06.753] - Field: 'expr' [13:31:06.754] - Field: 'uuid' [13:31:06.754] - Field: 'seed' [13:31:06.754] - Field: 'version' [13:31:06.754] - Field: 'result' [13:31:06.754] - Field: 'asynchronous' [13:31:06.754] - Field: 'calls' [13:31:06.755] - Field: 'globals' [13:31:06.755] - Field: 'stdout' [13:31:06.755] - Field: 'earlySignal' [13:31:06.755] - Field: 'lazy' [13:31:06.755] - Field: 'state' [13:31:06.755] - Field: '.cluster' [13:31:06.756] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.756] - Launch lazy future ... [13:31:06.756] Packages needed by the future expression (n = 0): [13:31:06.756] Packages needed by future strategies (n = 0): [13:31:06.757] { [13:31:06.757] { [13:31:06.757] { [13:31:06.757] ...future.startTime <- base::Sys.time() [13:31:06.757] { [13:31:06.757] { [13:31:06.757] { [13:31:06.757] base::local({ [13:31:06.757] has_future <- base::requireNamespace("future", [13:31:06.757] quietly = TRUE) [13:31:06.757] if (has_future) { [13:31:06.757] ns <- base::getNamespace("future") [13:31:06.757] version <- ns[[".package"]][["version"]] [13:31:06.757] if (is.null(version)) [13:31:06.757] version <- utils::packageVersion("future") [13:31:06.757] } [13:31:06.757] else { [13:31:06.757] version <- NULL [13:31:06.757] } [13:31:06.757] if (!has_future || version < "1.8.0") { [13:31:06.757] info <- base::c(r_version = base::gsub("R version ", [13:31:06.757] "", base::R.version$version.string), [13:31:06.757] platform = base::sprintf("%s (%s-bit)", [13:31:06.757] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.757] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.757] "release", "version")], collapse = " "), [13:31:06.757] hostname = base::Sys.info()[["nodename"]]) [13:31:06.757] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.757] info) [13:31:06.757] info <- base::paste(info, collapse = "; ") [13:31:06.757] if (!has_future) { [13:31:06.757] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.757] info) [13:31:06.757] } [13:31:06.757] else { [13:31:06.757] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.757] info, version) [13:31:06.757] } [13:31:06.757] base::stop(msg) [13:31:06.757] } [13:31:06.757] }) [13:31:06.757] } [13:31:06.757] ...future.strategy.old <- future::plan("list") [13:31:06.757] options(future.plan = NULL) [13:31:06.757] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.757] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.757] } [13:31:06.757] ...future.workdir <- getwd() [13:31:06.757] } [13:31:06.757] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.757] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.757] } [13:31:06.757] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.757] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.757] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.757] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.757] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.757] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.757] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.757] base::names(...future.oldOptions)) [13:31:06.757] } [13:31:06.757] if (FALSE) { [13:31:06.757] } [13:31:06.757] else { [13:31:06.757] if (TRUE) { [13:31:06.757] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.757] open = "w") [13:31:06.757] } [13:31:06.757] else { [13:31:06.757] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.757] windows = "NUL", "/dev/null"), open = "w") [13:31:06.757] } [13:31:06.757] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.757] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.757] base::sink(type = "output", split = FALSE) [13:31:06.757] base::close(...future.stdout) [13:31:06.757] }, add = TRUE) [13:31:06.757] } [13:31:06.757] ...future.frame <- base::sys.nframe() [13:31:06.757] ...future.conditions <- base::list() [13:31:06.757] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.757] if (FALSE) { [13:31:06.757] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.757] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.757] } [13:31:06.757] ...future.result <- base::tryCatch({ [13:31:06.757] base::withCallingHandlers({ [13:31:06.757] ...future.value <- base::withVisible(base::local({ [13:31:06.757] x <- 1:10 [13:31:06.757] sumtwo(a + b * x) [13:31:06.757] })) [13:31:06.757] future::FutureResult(value = ...future.value$value, [13:31:06.757] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.757] ...future.rng), globalenv = if (FALSE) [13:31:06.757] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.757] ...future.globalenv.names)) [13:31:06.757] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.757] }, condition = base::local({ [13:31:06.757] c <- base::c [13:31:06.757] inherits <- base::inherits [13:31:06.757] invokeRestart <- base::invokeRestart [13:31:06.757] length <- base::length [13:31:06.757] list <- base::list [13:31:06.757] seq.int <- base::seq.int [13:31:06.757] signalCondition <- base::signalCondition [13:31:06.757] sys.calls <- base::sys.calls [13:31:06.757] `[[` <- base::`[[` [13:31:06.757] `+` <- base::`+` [13:31:06.757] `<<-` <- base::`<<-` [13:31:06.757] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.757] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.757] 3L)] [13:31:06.757] } [13:31:06.757] function(cond) { [13:31:06.757] is_error <- inherits(cond, "error") [13:31:06.757] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.757] NULL) [13:31:06.757] if (is_error) { [13:31:06.757] sessionInformation <- function() { [13:31:06.757] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.757] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.757] search = base::search(), system = base::Sys.info()) [13:31:06.757] } [13:31:06.757] ...future.conditions[[length(...future.conditions) + [13:31:06.757] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.757] cond$call), session = sessionInformation(), [13:31:06.757] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.757] signalCondition(cond) [13:31:06.757] } [13:31:06.757] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.757] signal <- FALSE && inherits(cond, character(0)) [13:31:06.757] ...future.conditions[[length(...future.conditions) + [13:31:06.757] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.757] if (FALSE && !signal) { [13:31:06.757] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.757] { [13:31:06.757] inherits <- base::inherits [13:31:06.757] invokeRestart <- base::invokeRestart [13:31:06.757] is.null <- base::is.null [13:31:06.757] muffled <- FALSE [13:31:06.757] if (inherits(cond, "message")) { [13:31:06.757] muffled <- grepl(pattern, "muffleMessage") [13:31:06.757] if (muffled) [13:31:06.757] invokeRestart("muffleMessage") [13:31:06.757] } [13:31:06.757] else if (inherits(cond, "warning")) { [13:31:06.757] muffled <- grepl(pattern, "muffleWarning") [13:31:06.757] if (muffled) [13:31:06.757] invokeRestart("muffleWarning") [13:31:06.757] } [13:31:06.757] else if (inherits(cond, "condition")) { [13:31:06.757] if (!is.null(pattern)) { [13:31:06.757] computeRestarts <- base::computeRestarts [13:31:06.757] grepl <- base::grepl [13:31:06.757] restarts <- computeRestarts(cond) [13:31:06.757] for (restart in restarts) { [13:31:06.757] name <- restart$name [13:31:06.757] if (is.null(name)) [13:31:06.757] next [13:31:06.757] if (!grepl(pattern, name)) [13:31:06.757] next [13:31:06.757] invokeRestart(restart) [13:31:06.757] muffled <- TRUE [13:31:06.757] break [13:31:06.757] } [13:31:06.757] } [13:31:06.757] } [13:31:06.757] invisible(muffled) [13:31:06.757] } [13:31:06.757] muffleCondition(cond, pattern = "^muffle") [13:31:06.757] } [13:31:06.757] } [13:31:06.757] else { [13:31:06.757] if (TRUE) { [13:31:06.757] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.757] { [13:31:06.757] inherits <- base::inherits [13:31:06.757] invokeRestart <- base::invokeRestart [13:31:06.757] is.null <- base::is.null [13:31:06.757] muffled <- FALSE [13:31:06.757] if (inherits(cond, "message")) { [13:31:06.757] muffled <- grepl(pattern, "muffleMessage") [13:31:06.757] if (muffled) [13:31:06.757] invokeRestart("muffleMessage") [13:31:06.757] } [13:31:06.757] else if (inherits(cond, "warning")) { [13:31:06.757] muffled <- grepl(pattern, "muffleWarning") [13:31:06.757] if (muffled) [13:31:06.757] invokeRestart("muffleWarning") [13:31:06.757] } [13:31:06.757] else if (inherits(cond, "condition")) { [13:31:06.757] if (!is.null(pattern)) { [13:31:06.757] computeRestarts <- base::computeRestarts [13:31:06.757] grepl <- base::grepl [13:31:06.757] restarts <- computeRestarts(cond) [13:31:06.757] for (restart in restarts) { [13:31:06.757] name <- restart$name [13:31:06.757] if (is.null(name)) [13:31:06.757] next [13:31:06.757] if (!grepl(pattern, name)) [13:31:06.757] next [13:31:06.757] invokeRestart(restart) [13:31:06.757] muffled <- TRUE [13:31:06.757] break [13:31:06.757] } [13:31:06.757] } [13:31:06.757] } [13:31:06.757] invisible(muffled) [13:31:06.757] } [13:31:06.757] muffleCondition(cond, pattern = "^muffle") [13:31:06.757] } [13:31:06.757] } [13:31:06.757] } [13:31:06.757] })) [13:31:06.757] }, error = function(ex) { [13:31:06.757] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.757] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.757] ...future.rng), started = ...future.startTime, [13:31:06.757] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.757] version = "1.8"), class = "FutureResult") [13:31:06.757] }, finally = { [13:31:06.757] if (!identical(...future.workdir, getwd())) [13:31:06.757] setwd(...future.workdir) [13:31:06.757] { [13:31:06.757] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.757] ...future.oldOptions$nwarnings <- NULL [13:31:06.757] } [13:31:06.757] base::options(...future.oldOptions) [13:31:06.757] if (.Platform$OS.type == "windows") { [13:31:06.757] old_names <- names(...future.oldEnvVars) [13:31:06.757] envs <- base::Sys.getenv() [13:31:06.757] names <- names(envs) [13:31:06.757] common <- intersect(names, old_names) [13:31:06.757] added <- setdiff(names, old_names) [13:31:06.757] removed <- setdiff(old_names, names) [13:31:06.757] changed <- common[...future.oldEnvVars[common] != [13:31:06.757] envs[common]] [13:31:06.757] NAMES <- toupper(changed) [13:31:06.757] args <- list() [13:31:06.757] for (kk in seq_along(NAMES)) { [13:31:06.757] name <- changed[[kk]] [13:31:06.757] NAME <- NAMES[[kk]] [13:31:06.757] if (name != NAME && is.element(NAME, old_names)) [13:31:06.757] next [13:31:06.757] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.757] } [13:31:06.757] NAMES <- toupper(added) [13:31:06.757] for (kk in seq_along(NAMES)) { [13:31:06.757] name <- added[[kk]] [13:31:06.757] NAME <- NAMES[[kk]] [13:31:06.757] if (name != NAME && is.element(NAME, old_names)) [13:31:06.757] next [13:31:06.757] args[[name]] <- "" [13:31:06.757] } [13:31:06.757] NAMES <- toupper(removed) [13:31:06.757] for (kk in seq_along(NAMES)) { [13:31:06.757] name <- removed[[kk]] [13:31:06.757] NAME <- NAMES[[kk]] [13:31:06.757] if (name != NAME && is.element(NAME, old_names)) [13:31:06.757] next [13:31:06.757] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.757] } [13:31:06.757] if (length(args) > 0) [13:31:06.757] base::do.call(base::Sys.setenv, args = args) [13:31:06.757] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.757] } [13:31:06.757] else { [13:31:06.757] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.757] } [13:31:06.757] { [13:31:06.757] if (base::length(...future.futureOptionsAdded) > [13:31:06.757] 0L) { [13:31:06.757] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.757] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.757] base::options(opts) [13:31:06.757] } [13:31:06.757] { [13:31:06.757] NULL [13:31:06.757] options(future.plan = NULL) [13:31:06.757] if (is.na(NA_character_)) [13:31:06.757] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.757] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.757] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.757] .init = FALSE) [13:31:06.757] } [13:31:06.757] } [13:31:06.757] } [13:31:06.757] }) [13:31:06.757] if (TRUE) { [13:31:06.757] base::sink(type = "output", split = FALSE) [13:31:06.757] if (TRUE) { [13:31:06.757] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.757] } [13:31:06.757] else { [13:31:06.757] ...future.result["stdout"] <- base::list(NULL) [13:31:06.757] } [13:31:06.757] base::close(...future.stdout) [13:31:06.757] ...future.stdout <- NULL [13:31:06.757] } [13:31:06.757] ...future.result$conditions <- ...future.conditions [13:31:06.757] ...future.result$finished <- base::Sys.time() [13:31:06.757] ...future.result [13:31:06.757] } [13:31:06.761] - Launch lazy future ... done [13:31:06.761] 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:31:06.762] resolved() for 'MiraiFuture' ... [13:31:06.762] - state: 'running' [13:31:06.762] - run: TRUE [13:31:06.762] - result: 'NULL' [13:31:06.762] - resolved: FALSE [13:31:06.763] resolved() for 'MiraiFuture' ... done Resolved: FALSE Value: Conditions captured: Early signaling: FALSE Owner process: 163e8d1e-e196-0465-9142-1e3f4ea4101f Class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' > rm(list = names(globals)) > y <- tryCatch(value(f), error = identity) [13:31:06.763] signalConditions() ... [13:31:06.763] - include = 'immediateCondition' [13:31:06.764] - exclude = [13:31:06.764] - resignal = FALSE [13:31:06.764] - Number of conditions: 1 [13:31:06.764] signalConditions() ... done [13:31:06.764] Future state: 'finished' [13:31:06.764] signalConditions() ... [13:31:06.765] - include = 'condition' [13:31:06.765] - exclude = 'immediateCondition' [13:31:06.765] - resignal = TRUE [13:31:06.765] - Number of conditions: 1 [13:31:06.765] - Condition #1: 'simpleError', 'error', 'condition' [13:31:06.766] 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:31:06.766] getGlobalsAndPackages() ... [13:31:06.767] - globals passed as-list: [3] 'a', 'b', 'sumtwo' [13:31:06.767] Resolving globals: FALSE [13:31:06.768] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:31:06.768] 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:31:06.768] - globals: [3] 'a', 'b', 'sumtwo' [13:31:06.769] [13:31:06.769] getGlobalsAndPackages() ... DONE [13:31:06.769] run() for 'Future' ... [13:31:06.769] - state: 'created' [13:31:06.769] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.774] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.774] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.774] - Field: 'label' [13:31:06.774] - Field: 'local' [13:31:06.774] - Field: 'owner' [13:31:06.775] - Field: 'envir' [13:31:06.775] - Field: 'packages' [13:31:06.775] - Field: 'gc' [13:31:06.775] - Field: 'conditions' [13:31:06.775] - Field: 'expr' [13:31:06.776] - Field: 'uuid' [13:31:06.776] - Field: 'seed' [13:31:06.776] - Field: 'version' [13:31:06.776] - Field: 'result' [13:31:06.776] - Field: 'asynchronous' [13:31:06.776] - Field: 'calls' [13:31:06.777] - Field: 'globals' [13:31:06.777] - Field: 'stdout' [13:31:06.777] - Field: 'earlySignal' [13:31:06.777] - Field: 'lazy' [13:31:06.777] - Field: 'state' [13:31:06.777] - Field: '.cluster' [13:31:06.778] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.778] - Launch lazy future ... [13:31:06.778] Packages needed by the future expression (n = 0): [13:31:06.778] Packages needed by future strategies (n = 0): [13:31:06.779] { [13:31:06.779] { [13:31:06.779] { [13:31:06.779] ...future.startTime <- base::Sys.time() [13:31:06.779] { [13:31:06.779] { [13:31:06.779] { [13:31:06.779] base::local({ [13:31:06.779] has_future <- base::requireNamespace("future", [13:31:06.779] quietly = TRUE) [13:31:06.779] if (has_future) { [13:31:06.779] ns <- base::getNamespace("future") [13:31:06.779] version <- ns[[".package"]][["version"]] [13:31:06.779] if (is.null(version)) [13:31:06.779] version <- utils::packageVersion("future") [13:31:06.779] } [13:31:06.779] else { [13:31:06.779] version <- NULL [13:31:06.779] } [13:31:06.779] if (!has_future || version < "1.8.0") { [13:31:06.779] info <- base::c(r_version = base::gsub("R version ", [13:31:06.779] "", base::R.version$version.string), [13:31:06.779] platform = base::sprintf("%s (%s-bit)", [13:31:06.779] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.779] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.779] "release", "version")], collapse = " "), [13:31:06.779] hostname = base::Sys.info()[["nodename"]]) [13:31:06.779] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.779] info) [13:31:06.779] info <- base::paste(info, collapse = "; ") [13:31:06.779] if (!has_future) { [13:31:06.779] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.779] info) [13:31:06.779] } [13:31:06.779] else { [13:31:06.779] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.779] info, version) [13:31:06.779] } [13:31:06.779] base::stop(msg) [13:31:06.779] } [13:31:06.779] }) [13:31:06.779] } [13:31:06.779] ...future.strategy.old <- future::plan("list") [13:31:06.779] options(future.plan = NULL) [13:31:06.779] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.779] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.779] } [13:31:06.779] ...future.workdir <- getwd() [13:31:06.779] } [13:31:06.779] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.779] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.779] } [13:31:06.779] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.779] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.779] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.779] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.779] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.779] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.779] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.779] base::names(...future.oldOptions)) [13:31:06.779] } [13:31:06.779] if (FALSE) { [13:31:06.779] } [13:31:06.779] else { [13:31:06.779] if (TRUE) { [13:31:06.779] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.779] open = "w") [13:31:06.779] } [13:31:06.779] else { [13:31:06.779] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.779] windows = "NUL", "/dev/null"), open = "w") [13:31:06.779] } [13:31:06.779] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.779] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.779] base::sink(type = "output", split = FALSE) [13:31:06.779] base::close(...future.stdout) [13:31:06.779] }, add = TRUE) [13:31:06.779] } [13:31:06.779] ...future.frame <- base::sys.nframe() [13:31:06.779] ...future.conditions <- base::list() [13:31:06.779] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.779] if (FALSE) { [13:31:06.779] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.779] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.779] } [13:31:06.779] ...future.result <- base::tryCatch({ [13:31:06.779] base::withCallingHandlers({ [13:31:06.779] ...future.value <- base::withVisible(base::local({ [13:31:06.779] x <- 1:10 [13:31:06.779] sumtwo(a + b * x) [13:31:06.779] })) [13:31:06.779] future::FutureResult(value = ...future.value$value, [13:31:06.779] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.779] ...future.rng), globalenv = if (FALSE) [13:31:06.779] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.779] ...future.globalenv.names)) [13:31:06.779] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.779] }, condition = base::local({ [13:31:06.779] c <- base::c [13:31:06.779] inherits <- base::inherits [13:31:06.779] invokeRestart <- base::invokeRestart [13:31:06.779] length <- base::length [13:31:06.779] list <- base::list [13:31:06.779] seq.int <- base::seq.int [13:31:06.779] signalCondition <- base::signalCondition [13:31:06.779] sys.calls <- base::sys.calls [13:31:06.779] `[[` <- base::`[[` [13:31:06.779] `+` <- base::`+` [13:31:06.779] `<<-` <- base::`<<-` [13:31:06.779] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.779] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.779] 3L)] [13:31:06.779] } [13:31:06.779] function(cond) { [13:31:06.779] is_error <- inherits(cond, "error") [13:31:06.779] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.779] NULL) [13:31:06.779] if (is_error) { [13:31:06.779] sessionInformation <- function() { [13:31:06.779] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.779] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.779] search = base::search(), system = base::Sys.info()) [13:31:06.779] } [13:31:06.779] ...future.conditions[[length(...future.conditions) + [13:31:06.779] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.779] cond$call), session = sessionInformation(), [13:31:06.779] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.779] signalCondition(cond) [13:31:06.779] } [13:31:06.779] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.779] signal <- FALSE && inherits(cond, character(0)) [13:31:06.779] ...future.conditions[[length(...future.conditions) + [13:31:06.779] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.779] if (FALSE && !signal) { [13:31:06.779] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.779] { [13:31:06.779] inherits <- base::inherits [13:31:06.779] invokeRestart <- base::invokeRestart [13:31:06.779] is.null <- base::is.null [13:31:06.779] muffled <- FALSE [13:31:06.779] if (inherits(cond, "message")) { [13:31:06.779] muffled <- grepl(pattern, "muffleMessage") [13:31:06.779] if (muffled) [13:31:06.779] invokeRestart("muffleMessage") [13:31:06.779] } [13:31:06.779] else if (inherits(cond, "warning")) { [13:31:06.779] muffled <- grepl(pattern, "muffleWarning") [13:31:06.779] if (muffled) [13:31:06.779] invokeRestart("muffleWarning") [13:31:06.779] } [13:31:06.779] else if (inherits(cond, "condition")) { [13:31:06.779] if (!is.null(pattern)) { [13:31:06.779] computeRestarts <- base::computeRestarts [13:31:06.779] grepl <- base::grepl [13:31:06.779] restarts <- computeRestarts(cond) [13:31:06.779] for (restart in restarts) { [13:31:06.779] name <- restart$name [13:31:06.779] if (is.null(name)) [13:31:06.779] next [13:31:06.779] if (!grepl(pattern, name)) [13:31:06.779] next [13:31:06.779] invokeRestart(restart) [13:31:06.779] muffled <- TRUE [13:31:06.779] break [13:31:06.779] } [13:31:06.779] } [13:31:06.779] } [13:31:06.779] invisible(muffled) [13:31:06.779] } [13:31:06.779] muffleCondition(cond, pattern = "^muffle") [13:31:06.779] } [13:31:06.779] } [13:31:06.779] else { [13:31:06.779] if (TRUE) { [13:31:06.779] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.779] { [13:31:06.779] inherits <- base::inherits [13:31:06.779] invokeRestart <- base::invokeRestart [13:31:06.779] is.null <- base::is.null [13:31:06.779] muffled <- FALSE [13:31:06.779] if (inherits(cond, "message")) { [13:31:06.779] muffled <- grepl(pattern, "muffleMessage") [13:31:06.779] if (muffled) [13:31:06.779] invokeRestart("muffleMessage") [13:31:06.779] } [13:31:06.779] else if (inherits(cond, "warning")) { [13:31:06.779] muffled <- grepl(pattern, "muffleWarning") [13:31:06.779] if (muffled) [13:31:06.779] invokeRestart("muffleWarning") [13:31:06.779] } [13:31:06.779] else if (inherits(cond, "condition")) { [13:31:06.779] if (!is.null(pattern)) { [13:31:06.779] computeRestarts <- base::computeRestarts [13:31:06.779] grepl <- base::grepl [13:31:06.779] restarts <- computeRestarts(cond) [13:31:06.779] for (restart in restarts) { [13:31:06.779] name <- restart$name [13:31:06.779] if (is.null(name)) [13:31:06.779] next [13:31:06.779] if (!grepl(pattern, name)) [13:31:06.779] next [13:31:06.779] invokeRestart(restart) [13:31:06.779] muffled <- TRUE [13:31:06.779] break [13:31:06.779] } [13:31:06.779] } [13:31:06.779] } [13:31:06.779] invisible(muffled) [13:31:06.779] } [13:31:06.779] muffleCondition(cond, pattern = "^muffle") [13:31:06.779] } [13:31:06.779] } [13:31:06.779] } [13:31:06.779] })) [13:31:06.779] }, error = function(ex) { [13:31:06.779] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.779] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.779] ...future.rng), started = ...future.startTime, [13:31:06.779] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.779] version = "1.8"), class = "FutureResult") [13:31:06.779] }, finally = { [13:31:06.779] if (!identical(...future.workdir, getwd())) [13:31:06.779] setwd(...future.workdir) [13:31:06.779] { [13:31:06.779] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.779] ...future.oldOptions$nwarnings <- NULL [13:31:06.779] } [13:31:06.779] base::options(...future.oldOptions) [13:31:06.779] if (.Platform$OS.type == "windows") { [13:31:06.779] old_names <- names(...future.oldEnvVars) [13:31:06.779] envs <- base::Sys.getenv() [13:31:06.779] names <- names(envs) [13:31:06.779] common <- intersect(names, old_names) [13:31:06.779] added <- setdiff(names, old_names) [13:31:06.779] removed <- setdiff(old_names, names) [13:31:06.779] changed <- common[...future.oldEnvVars[common] != [13:31:06.779] envs[common]] [13:31:06.779] NAMES <- toupper(changed) [13:31:06.779] args <- list() [13:31:06.779] for (kk in seq_along(NAMES)) { [13:31:06.779] name <- changed[[kk]] [13:31:06.779] NAME <- NAMES[[kk]] [13:31:06.779] if (name != NAME && is.element(NAME, old_names)) [13:31:06.779] next [13:31:06.779] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.779] } [13:31:06.779] NAMES <- toupper(added) [13:31:06.779] for (kk in seq_along(NAMES)) { [13:31:06.779] name <- added[[kk]] [13:31:06.779] NAME <- NAMES[[kk]] [13:31:06.779] if (name != NAME && is.element(NAME, old_names)) [13:31:06.779] next [13:31:06.779] args[[name]] <- "" [13:31:06.779] } [13:31:06.779] NAMES <- toupper(removed) [13:31:06.779] for (kk in seq_along(NAMES)) { [13:31:06.779] name <- removed[[kk]] [13:31:06.779] NAME <- NAMES[[kk]] [13:31:06.779] if (name != NAME && is.element(NAME, old_names)) [13:31:06.779] next [13:31:06.779] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.779] } [13:31:06.779] if (length(args) > 0) [13:31:06.779] base::do.call(base::Sys.setenv, args = args) [13:31:06.779] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.779] } [13:31:06.779] else { [13:31:06.779] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.779] } [13:31:06.779] { [13:31:06.779] if (base::length(...future.futureOptionsAdded) > [13:31:06.779] 0L) { [13:31:06.779] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.779] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.779] base::options(opts) [13:31:06.779] } [13:31:06.779] { [13:31:06.779] NULL [13:31:06.779] options(future.plan = NULL) [13:31:06.779] if (is.na(NA_character_)) [13:31:06.779] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.779] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.779] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.779] .init = FALSE) [13:31:06.779] } [13:31:06.779] } [13:31:06.779] } [13:31:06.779] }) [13:31:06.779] if (TRUE) { [13:31:06.779] base::sink(type = "output", split = FALSE) [13:31:06.779] if (TRUE) { [13:31:06.779] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.779] } [13:31:06.779] else { [13:31:06.779] ...future.result["stdout"] <- base::list(NULL) [13:31:06.779] } [13:31:06.779] base::close(...future.stdout) [13:31:06.779] ...future.stdout <- NULL [13:31:06.779] } [13:31:06.779] ...future.result$conditions <- ...future.conditions [13:31:06.779] ...future.result$finished <- base::Sys.time() [13:31:06.779] ...future.result [13:31:06.779] } [13:31:06.783] - Launch lazy future ... done [13:31:06.783] 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:31:06.784] resolved() for 'MiraiFuture' ... [13:31:06.784] - state: 'running' [13:31:06.784] - run: TRUE [13:31:06.785] - result: 'NULL' [13:31:06.785] - resolved: FALSE [13:31:06.785] resolved() for 'MiraiFuture' ... done Resolved: TRUE Value: Conditions captured: Early signaling: FALSE Owner process: 163e8d1e-e196-0465-9142-1e3f4ea4101f 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:31:06.786] getGlobalsAndPackages() ... [13:31:06.786] - globals passed as-list: [3] 'a', 'b', 'sumtwo' [13:31:06.786] Resolving globals: FALSE [13:31:06.787] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:31:06.787] 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:31:06.787] - globals: [3] 'a', 'b', 'sumtwo' [13:31:06.787] [13:31:06.788] getGlobalsAndPackages() ... DONE [13:31:06.788] run() for 'Future' ... [13:31:06.788] - state: 'created' [13:31:06.788] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.791] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.791] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.791] - Field: 'label' [13:31:06.791] - Field: 'local' [13:31:06.791] - Field: 'owner' [13:31:06.791] - Field: 'envir' [13:31:06.792] - Field: 'packages' [13:31:06.792] - Field: 'gc' [13:31:06.792] - Field: 'conditions' [13:31:06.792] - Field: 'expr' [13:31:06.792] - Field: 'uuid' [13:31:06.792] - Field: 'seed' [13:31:06.793] - Field: 'version' [13:31:06.793] - Field: 'result' [13:31:06.793] - Field: 'asynchronous' [13:31:06.793] - Field: 'calls' [13:31:06.793] - Field: 'globals' [13:31:06.793] - Field: 'stdout' [13:31:06.794] - Field: 'earlySignal' [13:31:06.794] - Field: 'lazy' [13:31:06.794] - Field: 'state' [13:31:06.794] - Field: '.cluster' [13:31:06.794] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.794] - Launch lazy future ... [13:31:06.795] Packages needed by the future expression (n = 0): [13:31:06.795] Packages needed by future strategies (n = 0): [13:31:06.795] { [13:31:06.795] { [13:31:06.795] { [13:31:06.795] ...future.startTime <- base::Sys.time() [13:31:06.795] { [13:31:06.795] { [13:31:06.795] { [13:31:06.795] base::local({ [13:31:06.795] has_future <- base::requireNamespace("future", [13:31:06.795] quietly = TRUE) [13:31:06.795] if (has_future) { [13:31:06.795] ns <- base::getNamespace("future") [13:31:06.795] version <- ns[[".package"]][["version"]] [13:31:06.795] if (is.null(version)) [13:31:06.795] version <- utils::packageVersion("future") [13:31:06.795] } [13:31:06.795] else { [13:31:06.795] version <- NULL [13:31:06.795] } [13:31:06.795] if (!has_future || version < "1.8.0") { [13:31:06.795] info <- base::c(r_version = base::gsub("R version ", [13:31:06.795] "", base::R.version$version.string), [13:31:06.795] platform = base::sprintf("%s (%s-bit)", [13:31:06.795] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.795] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.795] "release", "version")], collapse = " "), [13:31:06.795] hostname = base::Sys.info()[["nodename"]]) [13:31:06.795] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.795] info) [13:31:06.795] info <- base::paste(info, collapse = "; ") [13:31:06.795] if (!has_future) { [13:31:06.795] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.795] info) [13:31:06.795] } [13:31:06.795] else { [13:31:06.795] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.795] info, version) [13:31:06.795] } [13:31:06.795] base::stop(msg) [13:31:06.795] } [13:31:06.795] }) [13:31:06.795] } [13:31:06.795] ...future.strategy.old <- future::plan("list") [13:31:06.795] options(future.plan = NULL) [13:31:06.795] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.795] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.795] } [13:31:06.795] ...future.workdir <- getwd() [13:31:06.795] } [13:31:06.795] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.795] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.795] } [13:31:06.795] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.795] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.795] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.795] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.795] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.795] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.795] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.795] base::names(...future.oldOptions)) [13:31:06.795] } [13:31:06.795] if (FALSE) { [13:31:06.795] } [13:31:06.795] else { [13:31:06.795] if (TRUE) { [13:31:06.795] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.795] open = "w") [13:31:06.795] } [13:31:06.795] else { [13:31:06.795] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.795] windows = "NUL", "/dev/null"), open = "w") [13:31:06.795] } [13:31:06.795] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.795] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.795] base::sink(type = "output", split = FALSE) [13:31:06.795] base::close(...future.stdout) [13:31:06.795] }, add = TRUE) [13:31:06.795] } [13:31:06.795] ...future.frame <- base::sys.nframe() [13:31:06.795] ...future.conditions <- base::list() [13:31:06.795] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.795] if (FALSE) { [13:31:06.795] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.795] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.795] } [13:31:06.795] ...future.result <- base::tryCatch({ [13:31:06.795] base::withCallingHandlers({ [13:31:06.795] ...future.value <- base::withVisible(base::local({ [13:31:06.795] x <- 1:10 [13:31:06.795] sumtwo(a + b * x) [13:31:06.795] })) [13:31:06.795] future::FutureResult(value = ...future.value$value, [13:31:06.795] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.795] ...future.rng), globalenv = if (FALSE) [13:31:06.795] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.795] ...future.globalenv.names)) [13:31:06.795] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.795] }, condition = base::local({ [13:31:06.795] c <- base::c [13:31:06.795] inherits <- base::inherits [13:31:06.795] invokeRestart <- base::invokeRestart [13:31:06.795] length <- base::length [13:31:06.795] list <- base::list [13:31:06.795] seq.int <- base::seq.int [13:31:06.795] signalCondition <- base::signalCondition [13:31:06.795] sys.calls <- base::sys.calls [13:31:06.795] `[[` <- base::`[[` [13:31:06.795] `+` <- base::`+` [13:31:06.795] `<<-` <- base::`<<-` [13:31:06.795] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.795] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.795] 3L)] [13:31:06.795] } [13:31:06.795] function(cond) { [13:31:06.795] is_error <- inherits(cond, "error") [13:31:06.795] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.795] NULL) [13:31:06.795] if (is_error) { [13:31:06.795] sessionInformation <- function() { [13:31:06.795] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.795] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.795] search = base::search(), system = base::Sys.info()) [13:31:06.795] } [13:31:06.795] ...future.conditions[[length(...future.conditions) + [13:31:06.795] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.795] cond$call), session = sessionInformation(), [13:31:06.795] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.795] signalCondition(cond) [13:31:06.795] } [13:31:06.795] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.795] signal <- FALSE && inherits(cond, character(0)) [13:31:06.795] ...future.conditions[[length(...future.conditions) + [13:31:06.795] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.795] if (FALSE && !signal) { [13:31:06.795] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.795] { [13:31:06.795] inherits <- base::inherits [13:31:06.795] invokeRestart <- base::invokeRestart [13:31:06.795] is.null <- base::is.null [13:31:06.795] muffled <- FALSE [13:31:06.795] if (inherits(cond, "message")) { [13:31:06.795] muffled <- grepl(pattern, "muffleMessage") [13:31:06.795] if (muffled) [13:31:06.795] invokeRestart("muffleMessage") [13:31:06.795] } [13:31:06.795] else if (inherits(cond, "warning")) { [13:31:06.795] muffled <- grepl(pattern, "muffleWarning") [13:31:06.795] if (muffled) [13:31:06.795] invokeRestart("muffleWarning") [13:31:06.795] } [13:31:06.795] else if (inherits(cond, "condition")) { [13:31:06.795] if (!is.null(pattern)) { [13:31:06.795] computeRestarts <- base::computeRestarts [13:31:06.795] grepl <- base::grepl [13:31:06.795] restarts <- computeRestarts(cond) [13:31:06.795] for (restart in restarts) { [13:31:06.795] name <- restart$name [13:31:06.795] if (is.null(name)) [13:31:06.795] next [13:31:06.795] if (!grepl(pattern, name)) [13:31:06.795] next [13:31:06.795] invokeRestart(restart) [13:31:06.795] muffled <- TRUE [13:31:06.795] break [13:31:06.795] } [13:31:06.795] } [13:31:06.795] } [13:31:06.795] invisible(muffled) [13:31:06.795] } [13:31:06.795] muffleCondition(cond, pattern = "^muffle") [13:31:06.795] } [13:31:06.795] } [13:31:06.795] else { [13:31:06.795] if (TRUE) { [13:31:06.795] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.795] { [13:31:06.795] inherits <- base::inherits [13:31:06.795] invokeRestart <- base::invokeRestart [13:31:06.795] is.null <- base::is.null [13:31:06.795] muffled <- FALSE [13:31:06.795] if (inherits(cond, "message")) { [13:31:06.795] muffled <- grepl(pattern, "muffleMessage") [13:31:06.795] if (muffled) [13:31:06.795] invokeRestart("muffleMessage") [13:31:06.795] } [13:31:06.795] else if (inherits(cond, "warning")) { [13:31:06.795] muffled <- grepl(pattern, "muffleWarning") [13:31:06.795] if (muffled) [13:31:06.795] invokeRestart("muffleWarning") [13:31:06.795] } [13:31:06.795] else if (inherits(cond, "condition")) { [13:31:06.795] if (!is.null(pattern)) { [13:31:06.795] computeRestarts <- base::computeRestarts [13:31:06.795] grepl <- base::grepl [13:31:06.795] restarts <- computeRestarts(cond) [13:31:06.795] for (restart in restarts) { [13:31:06.795] name <- restart$name [13:31:06.795] if (is.null(name)) [13:31:06.795] next [13:31:06.795] if (!grepl(pattern, name)) [13:31:06.795] next [13:31:06.795] invokeRestart(restart) [13:31:06.795] muffled <- TRUE [13:31:06.795] break [13:31:06.795] } [13:31:06.795] } [13:31:06.795] } [13:31:06.795] invisible(muffled) [13:31:06.795] } [13:31:06.795] muffleCondition(cond, pattern = "^muffle") [13:31:06.795] } [13:31:06.795] } [13:31:06.795] } [13:31:06.795] })) [13:31:06.795] }, error = function(ex) { [13:31:06.795] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.795] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.795] ...future.rng), started = ...future.startTime, [13:31:06.795] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.795] version = "1.8"), class = "FutureResult") [13:31:06.795] }, finally = { [13:31:06.795] if (!identical(...future.workdir, getwd())) [13:31:06.795] setwd(...future.workdir) [13:31:06.795] { [13:31:06.795] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.795] ...future.oldOptions$nwarnings <- NULL [13:31:06.795] } [13:31:06.795] base::options(...future.oldOptions) [13:31:06.795] if (.Platform$OS.type == "windows") { [13:31:06.795] old_names <- names(...future.oldEnvVars) [13:31:06.795] envs <- base::Sys.getenv() [13:31:06.795] names <- names(envs) [13:31:06.795] common <- intersect(names, old_names) [13:31:06.795] added <- setdiff(names, old_names) [13:31:06.795] removed <- setdiff(old_names, names) [13:31:06.795] changed <- common[...future.oldEnvVars[common] != [13:31:06.795] envs[common]] [13:31:06.795] NAMES <- toupper(changed) [13:31:06.795] args <- list() [13:31:06.795] for (kk in seq_along(NAMES)) { [13:31:06.795] name <- changed[[kk]] [13:31:06.795] NAME <- NAMES[[kk]] [13:31:06.795] if (name != NAME && is.element(NAME, old_names)) [13:31:06.795] next [13:31:06.795] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.795] } [13:31:06.795] NAMES <- toupper(added) [13:31:06.795] for (kk in seq_along(NAMES)) { [13:31:06.795] name <- added[[kk]] [13:31:06.795] NAME <- NAMES[[kk]] [13:31:06.795] if (name != NAME && is.element(NAME, old_names)) [13:31:06.795] next [13:31:06.795] args[[name]] <- "" [13:31:06.795] } [13:31:06.795] NAMES <- toupper(removed) [13:31:06.795] for (kk in seq_along(NAMES)) { [13:31:06.795] name <- removed[[kk]] [13:31:06.795] NAME <- NAMES[[kk]] [13:31:06.795] if (name != NAME && is.element(NAME, old_names)) [13:31:06.795] next [13:31:06.795] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.795] } [13:31:06.795] if (length(args) > 0) [13:31:06.795] base::do.call(base::Sys.setenv, args = args) [13:31:06.795] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.795] } [13:31:06.795] else { [13:31:06.795] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.795] } [13:31:06.795] { [13:31:06.795] if (base::length(...future.futureOptionsAdded) > [13:31:06.795] 0L) { [13:31:06.795] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.795] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.795] base::options(opts) [13:31:06.795] } [13:31:06.795] { [13:31:06.795] NULL [13:31:06.795] options(future.plan = NULL) [13:31:06.795] if (is.na(NA_character_)) [13:31:06.795] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.795] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.795] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.795] .init = FALSE) [13:31:06.795] } [13:31:06.795] } [13:31:06.795] } [13:31:06.795] }) [13:31:06.795] if (TRUE) { [13:31:06.795] base::sink(type = "output", split = FALSE) [13:31:06.795] if (TRUE) { [13:31:06.795] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.795] } [13:31:06.795] else { [13:31:06.795] ...future.result["stdout"] <- base::list(NULL) [13:31:06.795] } [13:31:06.795] base::close(...future.stdout) [13:31:06.795] ...future.stdout <- NULL [13:31:06.795] } [13:31:06.795] ...future.result$conditions <- ...future.conditions [13:31:06.795] ...future.result$finished <- base::Sys.time() [13:31:06.795] ...future.result [13:31:06.795] } [13:31:06.799] - Launch lazy future ... done [13:31:06.799] 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:31:06.802] getGlobalsAndPackages() ... [13:31:06.802] Retrieving globals ... [13:31:06.802] - globals retrieved: [3] 'a', 'b', 'sumtwo' [13:31:06.802] Retrieving globals ... DONE [13:31:06.803] Resolving globals: FALSE [13:31:06.803] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:31:06.804] 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:31:06.804] - globals: [3] 'a', 'b', 'sumtwo' [13:31:06.804] [13:31:06.804] getGlobalsAndPackages() ... DONE [13:31:06.805] run() for 'Future' ... [13:31:06.805] - state: 'created' [13:31:06.805] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.808] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.808] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.808] - Field: 'label' [13:31:06.808] - Field: 'local' [13:31:06.808] - Field: 'owner' [13:31:06.809] - Field: 'envir' [13:31:06.809] - Field: 'packages' [13:31:06.809] - Field: 'gc' [13:31:06.809] - Field: 'conditions' [13:31:06.809] - Field: 'expr' [13:31:06.810] - Field: 'uuid' [13:31:06.810] - Field: 'seed' [13:31:06.810] - Field: 'version' [13:31:06.810] - Field: 'result' [13:31:06.810] - Field: 'asynchronous' [13:31:06.810] - Field: 'calls' [13:31:06.811] - Field: 'globals' [13:31:06.811] - Field: 'stdout' [13:31:06.811] - Field: 'earlySignal' [13:31:06.811] - Field: 'lazy' [13:31:06.811] - Field: 'state' [13:31:06.812] - Field: '.cluster' [13:31:06.812] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.812] - Launch lazy future ... [13:31:06.812] Packages needed by the future expression (n = 0): [13:31:06.812] Packages needed by future strategies (n = 0): [13:31:06.813] { [13:31:06.813] { [13:31:06.813] { [13:31:06.813] ...future.startTime <- base::Sys.time() [13:31:06.813] { [13:31:06.813] { [13:31:06.813] { [13:31:06.813] base::local({ [13:31:06.813] has_future <- base::requireNamespace("future", [13:31:06.813] quietly = TRUE) [13:31:06.813] if (has_future) { [13:31:06.813] ns <- base::getNamespace("future") [13:31:06.813] version <- ns[[".package"]][["version"]] [13:31:06.813] if (is.null(version)) [13:31:06.813] version <- utils::packageVersion("future") [13:31:06.813] } [13:31:06.813] else { [13:31:06.813] version <- NULL [13:31:06.813] } [13:31:06.813] if (!has_future || version < "1.8.0") { [13:31:06.813] info <- base::c(r_version = base::gsub("R version ", [13:31:06.813] "", base::R.version$version.string), [13:31:06.813] platform = base::sprintf("%s (%s-bit)", [13:31:06.813] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.813] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.813] "release", "version")], collapse = " "), [13:31:06.813] hostname = base::Sys.info()[["nodename"]]) [13:31:06.813] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.813] info) [13:31:06.813] info <- base::paste(info, collapse = "; ") [13:31:06.813] if (!has_future) { [13:31:06.813] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.813] info) [13:31:06.813] } [13:31:06.813] else { [13:31:06.813] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.813] info, version) [13:31:06.813] } [13:31:06.813] base::stop(msg) [13:31:06.813] } [13:31:06.813] }) [13:31:06.813] } [13:31:06.813] ...future.strategy.old <- future::plan("list") [13:31:06.813] options(future.plan = NULL) [13:31:06.813] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.813] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.813] } [13:31:06.813] ...future.workdir <- getwd() [13:31:06.813] } [13:31:06.813] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.813] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.813] } [13:31:06.813] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.813] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.813] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.813] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.813] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.813] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.813] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.813] base::names(...future.oldOptions)) [13:31:06.813] } [13:31:06.813] if (FALSE) { [13:31:06.813] } [13:31:06.813] else { [13:31:06.813] if (TRUE) { [13:31:06.813] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.813] open = "w") [13:31:06.813] } [13:31:06.813] else { [13:31:06.813] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.813] windows = "NUL", "/dev/null"), open = "w") [13:31:06.813] } [13:31:06.813] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.813] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.813] base::sink(type = "output", split = FALSE) [13:31:06.813] base::close(...future.stdout) [13:31:06.813] }, add = TRUE) [13:31:06.813] } [13:31:06.813] ...future.frame <- base::sys.nframe() [13:31:06.813] ...future.conditions <- base::list() [13:31:06.813] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.813] if (FALSE) { [13:31:06.813] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.813] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.813] } [13:31:06.813] ...future.result <- base::tryCatch({ [13:31:06.813] base::withCallingHandlers({ [13:31:06.813] ...future.value <- base::withVisible(base::local({ [13:31:06.813] x <- 1:10 [13:31:06.813] sumtwo(a + b * x) [13:31:06.813] })) [13:31:06.813] future::FutureResult(value = ...future.value$value, [13:31:06.813] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.813] ...future.rng), globalenv = if (FALSE) [13:31:06.813] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.813] ...future.globalenv.names)) [13:31:06.813] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.813] }, condition = base::local({ [13:31:06.813] c <- base::c [13:31:06.813] inherits <- base::inherits [13:31:06.813] invokeRestart <- base::invokeRestart [13:31:06.813] length <- base::length [13:31:06.813] list <- base::list [13:31:06.813] seq.int <- base::seq.int [13:31:06.813] signalCondition <- base::signalCondition [13:31:06.813] sys.calls <- base::sys.calls [13:31:06.813] `[[` <- base::`[[` [13:31:06.813] `+` <- base::`+` [13:31:06.813] `<<-` <- base::`<<-` [13:31:06.813] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.813] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.813] 3L)] [13:31:06.813] } [13:31:06.813] function(cond) { [13:31:06.813] is_error <- inherits(cond, "error") [13:31:06.813] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.813] NULL) [13:31:06.813] if (is_error) { [13:31:06.813] sessionInformation <- function() { [13:31:06.813] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.813] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.813] search = base::search(), system = base::Sys.info()) [13:31:06.813] } [13:31:06.813] ...future.conditions[[length(...future.conditions) + [13:31:06.813] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.813] cond$call), session = sessionInformation(), [13:31:06.813] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.813] signalCondition(cond) [13:31:06.813] } [13:31:06.813] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.813] signal <- FALSE && inherits(cond, character(0)) [13:31:06.813] ...future.conditions[[length(...future.conditions) + [13:31:06.813] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.813] if (FALSE && !signal) { [13:31:06.813] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.813] { [13:31:06.813] inherits <- base::inherits [13:31:06.813] invokeRestart <- base::invokeRestart [13:31:06.813] is.null <- base::is.null [13:31:06.813] muffled <- FALSE [13:31:06.813] if (inherits(cond, "message")) { [13:31:06.813] muffled <- grepl(pattern, "muffleMessage") [13:31:06.813] if (muffled) [13:31:06.813] invokeRestart("muffleMessage") [13:31:06.813] } [13:31:06.813] else if (inherits(cond, "warning")) { [13:31:06.813] muffled <- grepl(pattern, "muffleWarning") [13:31:06.813] if (muffled) [13:31:06.813] invokeRestart("muffleWarning") [13:31:06.813] } [13:31:06.813] else if (inherits(cond, "condition")) { [13:31:06.813] if (!is.null(pattern)) { [13:31:06.813] computeRestarts <- base::computeRestarts [13:31:06.813] grepl <- base::grepl [13:31:06.813] restarts <- computeRestarts(cond) [13:31:06.813] for (restart in restarts) { [13:31:06.813] name <- restart$name [13:31:06.813] if (is.null(name)) [13:31:06.813] next [13:31:06.813] if (!grepl(pattern, name)) [13:31:06.813] next [13:31:06.813] invokeRestart(restart) [13:31:06.813] muffled <- TRUE [13:31:06.813] break [13:31:06.813] } [13:31:06.813] } [13:31:06.813] } [13:31:06.813] invisible(muffled) [13:31:06.813] } [13:31:06.813] muffleCondition(cond, pattern = "^muffle") [13:31:06.813] } [13:31:06.813] } [13:31:06.813] else { [13:31:06.813] if (TRUE) { [13:31:06.813] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.813] { [13:31:06.813] inherits <- base::inherits [13:31:06.813] invokeRestart <- base::invokeRestart [13:31:06.813] is.null <- base::is.null [13:31:06.813] muffled <- FALSE [13:31:06.813] if (inherits(cond, "message")) { [13:31:06.813] muffled <- grepl(pattern, "muffleMessage") [13:31:06.813] if (muffled) [13:31:06.813] invokeRestart("muffleMessage") [13:31:06.813] } [13:31:06.813] else if (inherits(cond, "warning")) { [13:31:06.813] muffled <- grepl(pattern, "muffleWarning") [13:31:06.813] if (muffled) [13:31:06.813] invokeRestart("muffleWarning") [13:31:06.813] } [13:31:06.813] else if (inherits(cond, "condition")) { [13:31:06.813] if (!is.null(pattern)) { [13:31:06.813] computeRestarts <- base::computeRestarts [13:31:06.813] grepl <- base::grepl [13:31:06.813] restarts <- computeRestarts(cond) [13:31:06.813] for (restart in restarts) { [13:31:06.813] name <- restart$name [13:31:06.813] if (is.null(name)) [13:31:06.813] next [13:31:06.813] if (!grepl(pattern, name)) [13:31:06.813] next [13:31:06.813] invokeRestart(restart) [13:31:06.813] muffled <- TRUE [13:31:06.813] break [13:31:06.813] } [13:31:06.813] } [13:31:06.813] } [13:31:06.813] invisible(muffled) [13:31:06.813] } [13:31:06.813] muffleCondition(cond, pattern = "^muffle") [13:31:06.813] } [13:31:06.813] } [13:31:06.813] } [13:31:06.813] })) [13:31:06.813] }, error = function(ex) { [13:31:06.813] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.813] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.813] ...future.rng), started = ...future.startTime, [13:31:06.813] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.813] version = "1.8"), class = "FutureResult") [13:31:06.813] }, finally = { [13:31:06.813] if (!identical(...future.workdir, getwd())) [13:31:06.813] setwd(...future.workdir) [13:31:06.813] { [13:31:06.813] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.813] ...future.oldOptions$nwarnings <- NULL [13:31:06.813] } [13:31:06.813] base::options(...future.oldOptions) [13:31:06.813] if (.Platform$OS.type == "windows") { [13:31:06.813] old_names <- names(...future.oldEnvVars) [13:31:06.813] envs <- base::Sys.getenv() [13:31:06.813] names <- names(envs) [13:31:06.813] common <- intersect(names, old_names) [13:31:06.813] added <- setdiff(names, old_names) [13:31:06.813] removed <- setdiff(old_names, names) [13:31:06.813] changed <- common[...future.oldEnvVars[common] != [13:31:06.813] envs[common]] [13:31:06.813] NAMES <- toupper(changed) [13:31:06.813] args <- list() [13:31:06.813] for (kk in seq_along(NAMES)) { [13:31:06.813] name <- changed[[kk]] [13:31:06.813] NAME <- NAMES[[kk]] [13:31:06.813] if (name != NAME && is.element(NAME, old_names)) [13:31:06.813] next [13:31:06.813] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.813] } [13:31:06.813] NAMES <- toupper(added) [13:31:06.813] for (kk in seq_along(NAMES)) { [13:31:06.813] name <- added[[kk]] [13:31:06.813] NAME <- NAMES[[kk]] [13:31:06.813] if (name != NAME && is.element(NAME, old_names)) [13:31:06.813] next [13:31:06.813] args[[name]] <- "" [13:31:06.813] } [13:31:06.813] NAMES <- toupper(removed) [13:31:06.813] for (kk in seq_along(NAMES)) { [13:31:06.813] name <- removed[[kk]] [13:31:06.813] NAME <- NAMES[[kk]] [13:31:06.813] if (name != NAME && is.element(NAME, old_names)) [13:31:06.813] next [13:31:06.813] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.813] } [13:31:06.813] if (length(args) > 0) [13:31:06.813] base::do.call(base::Sys.setenv, args = args) [13:31:06.813] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.813] } [13:31:06.813] else { [13:31:06.813] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.813] } [13:31:06.813] { [13:31:06.813] if (base::length(...future.futureOptionsAdded) > [13:31:06.813] 0L) { [13:31:06.813] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.813] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.813] base::options(opts) [13:31:06.813] } [13:31:06.813] { [13:31:06.813] NULL [13:31:06.813] options(future.plan = NULL) [13:31:06.813] if (is.na(NA_character_)) [13:31:06.813] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.813] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.813] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.813] .init = FALSE) [13:31:06.813] } [13:31:06.813] } [13:31:06.813] } [13:31:06.813] }) [13:31:06.813] if (TRUE) { [13:31:06.813] base::sink(type = "output", split = FALSE) [13:31:06.813] if (TRUE) { [13:31:06.813] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.813] } [13:31:06.813] else { [13:31:06.813] ...future.result["stdout"] <- base::list(NULL) [13:31:06.813] } [13:31:06.813] base::close(...future.stdout) [13:31:06.813] ...future.stdout <- NULL [13:31:06.813] } [13:31:06.813] ...future.result$conditions <- ...future.conditions [13:31:06.813] ...future.result$finished <- base::Sys.time() [13:31:06.813] ...future.result [13:31:06.813] } [13:31:06.817] - Launch lazy future ... done [13:31:06.817] 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:31:06.818] resolved() for 'MiraiFuture' ... [13:31:06.818] - state: 'running' [13:31:06.818] - run: TRUE [13:31:06.820] - result: 'NULL' [13:31:06.820] - resolved: FALSE [13:31:06.820] resolved() for 'MiraiFuture' ... done Resolved: TRUE Value: Conditions captured: Early signaling: FALSE Owner process: 163e8d1e-e196-0465-9142-1e3f4ea4101f 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:31:06.821] getGlobalsAndPackages() ... [13:31:06.822] Retrieving globals ... [13:31:06.822] - globals retrieved: [3] 'a', 'b', 'sumtwo' [13:31:06.822] Retrieving globals ... DONE [13:31:06.822] Resolving globals: FALSE [13:31:06.823] The total size of the 3 globals is 1.20 KiB (1232 bytes) [13:31:06.823] 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:31:06.823] - globals: [3] 'a', 'b', 'sumtwo' [13:31:06.824] [13:31:06.824] getGlobalsAndPackages() ... DONE [13:31:06.824] run() for 'Future' ... [13:31:06.824] - state: 'created' [13:31:06.825] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:06.827] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:06.827] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:06.827] - Field: 'label' [13:31:06.828] - Field: 'local' [13:31:06.828] - Field: 'owner' [13:31:06.828] - Field: 'envir' [13:31:06.828] - Field: 'packages' [13:31:06.828] - Field: 'gc' [13:31:06.828] - Field: 'conditions' [13:31:06.829] - Field: 'expr' [13:31:06.829] - Field: 'uuid' [13:31:06.829] - Field: 'seed' [13:31:06.829] - Field: 'version' [13:31:06.829] - Field: 'result' [13:31:06.830] - Field: 'asynchronous' [13:31:06.830] - Field: 'calls' [13:31:06.830] - Field: 'globals' [13:31:06.830] - Field: 'stdout' [13:31:06.830] - Field: 'earlySignal' [13:31:06.830] - Field: 'lazy' [13:31:06.831] - Field: 'state' [13:31:06.831] - Field: '.cluster' [13:31:06.831] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:06.831] - Launch lazy future ... [13:31:06.831] Packages needed by the future expression (n = 0): [13:31:06.832] Packages needed by future strategies (n = 0): [13:31:06.832] { [13:31:06.832] { [13:31:06.832] { [13:31:06.832] ...future.startTime <- base::Sys.time() [13:31:06.832] { [13:31:06.832] { [13:31:06.832] { [13:31:06.832] base::local({ [13:31:06.832] has_future <- base::requireNamespace("future", [13:31:06.832] quietly = TRUE) [13:31:06.832] if (has_future) { [13:31:06.832] ns <- base::getNamespace("future") [13:31:06.832] version <- ns[[".package"]][["version"]] [13:31:06.832] if (is.null(version)) [13:31:06.832] version <- utils::packageVersion("future") [13:31:06.832] } [13:31:06.832] else { [13:31:06.832] version <- NULL [13:31:06.832] } [13:31:06.832] if (!has_future || version < "1.8.0") { [13:31:06.832] info <- base::c(r_version = base::gsub("R version ", [13:31:06.832] "", base::R.version$version.string), [13:31:06.832] platform = base::sprintf("%s (%s-bit)", [13:31:06.832] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:06.832] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:06.832] "release", "version")], collapse = " "), [13:31:06.832] hostname = base::Sys.info()[["nodename"]]) [13:31:06.832] info <- base::sprintf("%s: %s", base::names(info), [13:31:06.832] info) [13:31:06.832] info <- base::paste(info, collapse = "; ") [13:31:06.832] if (!has_future) { [13:31:06.832] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:06.832] info) [13:31:06.832] } [13:31:06.832] else { [13:31:06.832] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:06.832] info, version) [13:31:06.832] } [13:31:06.832] base::stop(msg) [13:31:06.832] } [13:31:06.832] }) [13:31:06.832] } [13:31:06.832] ...future.strategy.old <- future::plan("list") [13:31:06.832] options(future.plan = NULL) [13:31:06.832] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.832] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:06.832] } [13:31:06.832] ...future.workdir <- getwd() [13:31:06.832] } [13:31:06.832] ...future.oldOptions <- base::as.list(base::.Options) [13:31:06.832] ...future.oldEnvVars <- base::Sys.getenv() [13:31:06.832] } [13:31:06.832] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:06.832] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:06.832] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:06.832] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:06.832] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:06.832] future.stdout.windows.reencode = NULL, width = 80L) [13:31:06.832] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:06.832] base::names(...future.oldOptions)) [13:31:06.832] } [13:31:06.832] if (FALSE) { [13:31:06.832] } [13:31:06.832] else { [13:31:06.832] if (TRUE) { [13:31:06.832] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:06.832] open = "w") [13:31:06.832] } [13:31:06.832] else { [13:31:06.832] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:06.832] windows = "NUL", "/dev/null"), open = "w") [13:31:06.832] } [13:31:06.832] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:06.832] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:06.832] base::sink(type = "output", split = FALSE) [13:31:06.832] base::close(...future.stdout) [13:31:06.832] }, add = TRUE) [13:31:06.832] } [13:31:06.832] ...future.frame <- base::sys.nframe() [13:31:06.832] ...future.conditions <- base::list() [13:31:06.832] ...future.rng <- base::globalenv()$.Random.seed [13:31:06.832] if (FALSE) { [13:31:06.832] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:06.832] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:06.832] } [13:31:06.832] ...future.result <- base::tryCatch({ [13:31:06.832] base::withCallingHandlers({ [13:31:06.832] ...future.value <- base::withVisible(base::local({ [13:31:06.832] x <- 1:10 [13:31:06.832] sumtwo(a + b * x) [13:31:06.832] })) [13:31:06.832] future::FutureResult(value = ...future.value$value, [13:31:06.832] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.832] ...future.rng), globalenv = if (FALSE) [13:31:06.832] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:06.832] ...future.globalenv.names)) [13:31:06.832] else NULL, started = ...future.startTime, version = "1.8") [13:31:06.832] }, condition = base::local({ [13:31:06.832] c <- base::c [13:31:06.832] inherits <- base::inherits [13:31:06.832] invokeRestart <- base::invokeRestart [13:31:06.832] length <- base::length [13:31:06.832] list <- base::list [13:31:06.832] seq.int <- base::seq.int [13:31:06.832] signalCondition <- base::signalCondition [13:31:06.832] sys.calls <- base::sys.calls [13:31:06.832] `[[` <- base::`[[` [13:31:06.832] `+` <- base::`+` [13:31:06.832] `<<-` <- base::`<<-` [13:31:06.832] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:06.832] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:06.832] 3L)] [13:31:06.832] } [13:31:06.832] function(cond) { [13:31:06.832] is_error <- inherits(cond, "error") [13:31:06.832] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:06.832] NULL) [13:31:06.832] if (is_error) { [13:31:06.832] sessionInformation <- function() { [13:31:06.832] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:06.832] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:06.832] search = base::search(), system = base::Sys.info()) [13:31:06.832] } [13:31:06.832] ...future.conditions[[length(...future.conditions) + [13:31:06.832] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:06.832] cond$call), session = sessionInformation(), [13:31:06.832] timestamp = base::Sys.time(), signaled = 0L) [13:31:06.832] signalCondition(cond) [13:31:06.832] } [13:31:06.832] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:06.832] signal <- FALSE && inherits(cond, character(0)) [13:31:06.832] ...future.conditions[[length(...future.conditions) + [13:31:06.832] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:06.832] if (FALSE && !signal) { [13:31:06.832] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.832] { [13:31:06.832] inherits <- base::inherits [13:31:06.832] invokeRestart <- base::invokeRestart [13:31:06.832] is.null <- base::is.null [13:31:06.832] muffled <- FALSE [13:31:06.832] if (inherits(cond, "message")) { [13:31:06.832] muffled <- grepl(pattern, "muffleMessage") [13:31:06.832] if (muffled) [13:31:06.832] invokeRestart("muffleMessage") [13:31:06.832] } [13:31:06.832] else if (inherits(cond, "warning")) { [13:31:06.832] muffled <- grepl(pattern, "muffleWarning") [13:31:06.832] if (muffled) [13:31:06.832] invokeRestart("muffleWarning") [13:31:06.832] } [13:31:06.832] else if (inherits(cond, "condition")) { [13:31:06.832] if (!is.null(pattern)) { [13:31:06.832] computeRestarts <- base::computeRestarts [13:31:06.832] grepl <- base::grepl [13:31:06.832] restarts <- computeRestarts(cond) [13:31:06.832] for (restart in restarts) { [13:31:06.832] name <- restart$name [13:31:06.832] if (is.null(name)) [13:31:06.832] next [13:31:06.832] if (!grepl(pattern, name)) [13:31:06.832] next [13:31:06.832] invokeRestart(restart) [13:31:06.832] muffled <- TRUE [13:31:06.832] break [13:31:06.832] } [13:31:06.832] } [13:31:06.832] } [13:31:06.832] invisible(muffled) [13:31:06.832] } [13:31:06.832] muffleCondition(cond, pattern = "^muffle") [13:31:06.832] } [13:31:06.832] } [13:31:06.832] else { [13:31:06.832] if (TRUE) { [13:31:06.832] muffleCondition <- function (cond, pattern = "^muffle") [13:31:06.832] { [13:31:06.832] inherits <- base::inherits [13:31:06.832] invokeRestart <- base::invokeRestart [13:31:06.832] is.null <- base::is.null [13:31:06.832] muffled <- FALSE [13:31:06.832] if (inherits(cond, "message")) { [13:31:06.832] muffled <- grepl(pattern, "muffleMessage") [13:31:06.832] if (muffled) [13:31:06.832] invokeRestart("muffleMessage") [13:31:06.832] } [13:31:06.832] else if (inherits(cond, "warning")) { [13:31:06.832] muffled <- grepl(pattern, "muffleWarning") [13:31:06.832] if (muffled) [13:31:06.832] invokeRestart("muffleWarning") [13:31:06.832] } [13:31:06.832] else if (inherits(cond, "condition")) { [13:31:06.832] if (!is.null(pattern)) { [13:31:06.832] computeRestarts <- base::computeRestarts [13:31:06.832] grepl <- base::grepl [13:31:06.832] restarts <- computeRestarts(cond) [13:31:06.832] for (restart in restarts) { [13:31:06.832] name <- restart$name [13:31:06.832] if (is.null(name)) [13:31:06.832] next [13:31:06.832] if (!grepl(pattern, name)) [13:31:06.832] next [13:31:06.832] invokeRestart(restart) [13:31:06.832] muffled <- TRUE [13:31:06.832] break [13:31:06.832] } [13:31:06.832] } [13:31:06.832] } [13:31:06.832] invisible(muffled) [13:31:06.832] } [13:31:06.832] muffleCondition(cond, pattern = "^muffle") [13:31:06.832] } [13:31:06.832] } [13:31:06.832] } [13:31:06.832] })) [13:31:06.832] }, error = function(ex) { [13:31:06.832] base::structure(base::list(value = NULL, visible = NULL, [13:31:06.832] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:06.832] ...future.rng), started = ...future.startTime, [13:31:06.832] finished = Sys.time(), session_uuid = NA_character_, [13:31:06.832] version = "1.8"), class = "FutureResult") [13:31:06.832] }, finally = { [13:31:06.832] if (!identical(...future.workdir, getwd())) [13:31:06.832] setwd(...future.workdir) [13:31:06.832] { [13:31:06.832] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:06.832] ...future.oldOptions$nwarnings <- NULL [13:31:06.832] } [13:31:06.832] base::options(...future.oldOptions) [13:31:06.832] if (.Platform$OS.type == "windows") { [13:31:06.832] old_names <- names(...future.oldEnvVars) [13:31:06.832] envs <- base::Sys.getenv() [13:31:06.832] names <- names(envs) [13:31:06.832] common <- intersect(names, old_names) [13:31:06.832] added <- setdiff(names, old_names) [13:31:06.832] removed <- setdiff(old_names, names) [13:31:06.832] changed <- common[...future.oldEnvVars[common] != [13:31:06.832] envs[common]] [13:31:06.832] NAMES <- toupper(changed) [13:31:06.832] args <- list() [13:31:06.832] for (kk in seq_along(NAMES)) { [13:31:06.832] name <- changed[[kk]] [13:31:06.832] NAME <- NAMES[[kk]] [13:31:06.832] if (name != NAME && is.element(NAME, old_names)) [13:31:06.832] next [13:31:06.832] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.832] } [13:31:06.832] NAMES <- toupper(added) [13:31:06.832] for (kk in seq_along(NAMES)) { [13:31:06.832] name <- added[[kk]] [13:31:06.832] NAME <- NAMES[[kk]] [13:31:06.832] if (name != NAME && is.element(NAME, old_names)) [13:31:06.832] next [13:31:06.832] args[[name]] <- "" [13:31:06.832] } [13:31:06.832] NAMES <- toupper(removed) [13:31:06.832] for (kk in seq_along(NAMES)) { [13:31:06.832] name <- removed[[kk]] [13:31:06.832] NAME <- NAMES[[kk]] [13:31:06.832] if (name != NAME && is.element(NAME, old_names)) [13:31:06.832] next [13:31:06.832] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:06.832] } [13:31:06.832] if (length(args) > 0) [13:31:06.832] base::do.call(base::Sys.setenv, args = args) [13:31:06.832] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:06.832] } [13:31:06.832] else { [13:31:06.832] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:06.832] } [13:31:06.832] { [13:31:06.832] if (base::length(...future.futureOptionsAdded) > [13:31:06.832] 0L) { [13:31:06.832] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:06.832] base::names(opts) <- ...future.futureOptionsAdded [13:31:06.832] base::options(opts) [13:31:06.832] } [13:31:06.832] { [13:31:06.832] NULL [13:31:06.832] options(future.plan = NULL) [13:31:06.832] if (is.na(NA_character_)) [13:31:06.832] Sys.unsetenv("R_FUTURE_PLAN") [13:31:06.832] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:06.832] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:06.832] .init = FALSE) [13:31:06.832] } [13:31:06.832] } [13:31:06.832] } [13:31:06.832] }) [13:31:06.832] if (TRUE) { [13:31:06.832] base::sink(type = "output", split = FALSE) [13:31:06.832] if (TRUE) { [13:31:06.832] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:06.832] } [13:31:06.832] else { [13:31:06.832] ...future.result["stdout"] <- base::list(NULL) [13:31:06.832] } [13:31:06.832] base::close(...future.stdout) [13:31:06.832] ...future.stdout <- NULL [13:31:06.832] } [13:31:06.832] ...future.result$conditions <- ...future.conditions [13:31:06.832] ...future.result$finished <- base::Sys.time() [13:31:06.832] ...future.result [13:31:06.832] } [13:31:06.836] - Launch lazy future ... done [13:31:06.836] 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.48 0.06 0.98