R Under development (unstable) (2024-05-14 r86553 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [10:55:39.618] plan(): Setting new future strategy stack: [10:55:39.619] List of future strategies: [10:55:39.619] 1. mirai_multisession: [10:55:39.619] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:55:39.619] - tweaked: FALSE [10:55:39.619] - call: future::plan(future.mirai::mirai_multisession) [10:55:39.633] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:55:39.633] < mirai | $data > [10:55:39.639] getGlobalsAndPackages() ... [10:55:39.639] Not searching for globals [10:55:39.639] - globals: [0] [10:55:39.640] getGlobalsAndPackages() ... DONE [10:55:39.640] getGlobalsAndPackages() ... [10:55:39.640] [10:55:39.641] - globals: [0] [10:55:39.641] getGlobalsAndPackages() ... DONE [10:55:39.972] Packages needed by the future expression (n = 0): [10:55:39.972] Packages needed by future strategies (n = 0): [10:55:39.973] { [10:55:39.973] { [10:55:39.973] { [10:55:39.973] ...future.startTime <- base::Sys.time() [10:55:39.973] { [10:55:39.973] { [10:55:39.973] { [10:55:39.973] base::local({ [10:55:39.973] has_future <- base::requireNamespace("future", [10:55:39.973] quietly = TRUE) [10:55:39.973] if (has_future) { [10:55:39.973] ns <- base::getNamespace("future") [10:55:39.973] version <- ns[[".package"]][["version"]] [10:55:39.973] if (is.null(version)) [10:55:39.973] version <- utils::packageVersion("future") [10:55:39.973] } [10:55:39.973] else { [10:55:39.973] version <- NULL [10:55:39.973] } [10:55:39.973] if (!has_future || version < "1.8.0") { [10:55:39.973] info <- base::c(r_version = base::gsub("R version ", [10:55:39.973] "", base::R.version$version.string), [10:55:39.973] platform = base::sprintf("%s (%s-bit)", [10:55:39.973] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:55:39.973] os = base::paste(base::Sys.info()[base::c("sysname", [10:55:39.973] "release", "version")], collapse = " "), [10:55:39.973] hostname = base::Sys.info()[["nodename"]]) [10:55:39.973] info <- base::sprintf("%s: %s", base::names(info), [10:55:39.973] info) [10:55:39.973] info <- base::paste(info, collapse = "; ") [10:55:39.973] if (!has_future) { [10:55:39.973] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:55:39.973] info) [10:55:39.973] } [10:55:39.973] else { [10:55:39.973] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:55:39.973] info, version) [10:55:39.973] } [10:55:39.973] base::stop(msg) [10:55:39.973] } [10:55:39.973] }) [10:55:39.973] } [10:55:39.973] ...future.strategy.old <- future::plan("list") [10:55:39.973] options(future.plan = NULL) [10:55:39.973] Sys.unsetenv("R_FUTURE_PLAN") [10:55:39.973] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:55:39.973] } [10:55:39.973] ...future.workdir <- getwd() [10:55:39.973] } [10:55:39.973] ...future.oldOptions <- base::as.list(base::.Options) [10:55:39.973] ...future.oldEnvVars <- base::Sys.getenv() [10:55:39.973] } [10:55:39.973] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:55:39.973] future.globals.maxSize = NULL, future.globals.method = NULL, [10:55:39.973] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:55:39.973] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:55:39.973] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:55:39.973] future.stdout.windows.reencode = NULL, width = 80L) [10:55:39.973] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:55:39.973] base::names(...future.oldOptions)) [10:55:39.973] } [10:55:39.973] if (FALSE) { [10:55:39.973] } [10:55:39.973] else { [10:55:39.973] if (TRUE) { [10:55:39.973] ...future.stdout <- base::rawConnection(base::raw(0L), [10:55:39.973] open = "w") [10:55:39.973] } [10:55:39.973] else { [10:55:39.973] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:55:39.973] windows = "NUL", "/dev/null"), open = "w") [10:55:39.973] } [10:55:39.973] base::sink(...future.stdout, type = "output", split = FALSE) [10:55:39.973] base::on.exit(if (!base::is.null(...future.stdout)) { [10:55:39.973] base::sink(type = "output", split = FALSE) [10:55:39.973] base::close(...future.stdout) [10:55:39.973] }, add = TRUE) [10:55:39.973] } [10:55:39.973] ...future.frame <- base::sys.nframe() [10:55:39.973] ...future.conditions <- base::list() [10:55:39.973] ...future.rng <- base::globalenv()$.Random.seed [10:55:39.973] if (FALSE) { [10:55:39.973] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:55:39.973] "...future.value", "...future.globalenv.names", ".Random.seed") [10:55:39.973] } [10:55:39.973] ...future.result <- base::tryCatch({ [10:55:39.973] base::withCallingHandlers({ [10:55:39.973] ...future.value <- base::withVisible(base::local(NA)) [10:55:39.973] future::FutureResult(value = ...future.value$value, [10:55:39.973] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:55:39.973] ...future.rng), globalenv = if (FALSE) [10:55:39.973] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:55:39.973] ...future.globalenv.names)) [10:55:39.973] else NULL, started = ...future.startTime, version = "1.8") [10:55:39.973] }, condition = base::local({ [10:55:39.973] c <- base::c [10:55:39.973] inherits <- base::inherits [10:55:39.973] invokeRestart <- base::invokeRestart [10:55:39.973] length <- base::length [10:55:39.973] list <- base::list [10:55:39.973] seq.int <- base::seq.int [10:55:39.973] signalCondition <- base::signalCondition [10:55:39.973] sys.calls <- base::sys.calls [10:55:39.973] `[[` <- base::`[[` [10:55:39.973] `+` <- base::`+` [10:55:39.973] `<<-` <- base::`<<-` [10:55:39.973] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:55:39.973] calls[seq.int(from = from + 12L, to = length(calls) - [10:55:39.973] 3L)] [10:55:39.973] } [10:55:39.973] function(cond) { [10:55:39.973] is_error <- inherits(cond, "error") [10:55:39.973] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:55:39.973] NULL) [10:55:39.973] if (is_error) { [10:55:39.973] sessionInformation <- function() { [10:55:39.973] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:55:39.973] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:55:39.973] search = base::search(), system = base::Sys.info()) [10:55:39.973] } [10:55:39.973] ...future.conditions[[length(...future.conditions) + [10:55:39.973] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:55:39.973] cond$call), session = sessionInformation(), [10:55:39.973] timestamp = base::Sys.time(), signaled = 0L) [10:55:39.973] signalCondition(cond) [10:55:39.973] } [10:55:39.973] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:55:39.973] signal <- FALSE && inherits(cond, character(0)) [10:55:39.973] ...future.conditions[[length(...future.conditions) + [10:55:39.973] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:55:39.973] if (FALSE && !signal) { [10:55:39.973] muffleCondition <- function (cond, pattern = "^muffle") [10:55:39.973] { [10:55:39.973] inherits <- base::inherits [10:55:39.973] invokeRestart <- base::invokeRestart [10:55:39.973] is.null <- base::is.null [10:55:39.973] muffled <- FALSE [10:55:39.973] if (inherits(cond, "message")) { [10:55:39.973] muffled <- grepl(pattern, "muffleMessage") [10:55:39.973] if (muffled) [10:55:39.973] invokeRestart("muffleMessage") [10:55:39.973] } [10:55:39.973] else if (inherits(cond, "warning")) { [10:55:39.973] muffled <- grepl(pattern, "muffleWarning") [10:55:39.973] if (muffled) [10:55:39.973] invokeRestart("muffleWarning") [10:55:39.973] } [10:55:39.973] else if (inherits(cond, "condition")) { [10:55:39.973] if (!is.null(pattern)) { [10:55:39.973] computeRestarts <- base::computeRestarts [10:55:39.973] grepl <- base::grepl [10:55:39.973] restarts <- computeRestarts(cond) [10:55:39.973] for (restart in restarts) { [10:55:39.973] name <- restart$name [10:55:39.973] if (is.null(name)) [10:55:39.973] next [10:55:39.973] if (!grepl(pattern, name)) [10:55:39.973] next [10:55:39.973] invokeRestart(restart) [10:55:39.973] muffled <- TRUE [10:55:39.973] break [10:55:39.973] } [10:55:39.973] } [10:55:39.973] } [10:55:39.973] invisible(muffled) [10:55:39.973] } [10:55:39.973] muffleCondition(cond, pattern = "^muffle") [10:55:39.973] } [10:55:39.973] } [10:55:39.973] else { [10:55:39.973] if (TRUE) { [10:55:39.973] muffleCondition <- function (cond, pattern = "^muffle") [10:55:39.973] { [10:55:39.973] inherits <- base::inherits [10:55:39.973] invokeRestart <- base::invokeRestart [10:55:39.973] is.null <- base::is.null [10:55:39.973] muffled <- FALSE [10:55:39.973] if (inherits(cond, "message")) { [10:55:39.973] muffled <- grepl(pattern, "muffleMessage") [10:55:39.973] if (muffled) [10:55:39.973] invokeRestart("muffleMessage") [10:55:39.973] } [10:55:39.973] else if (inherits(cond, "warning")) { [10:55:39.973] muffled <- grepl(pattern, "muffleWarning") [10:55:39.973] if (muffled) [10:55:39.973] invokeRestart("muffleWarning") [10:55:39.973] } [10:55:39.973] else if (inherits(cond, "condition")) { [10:55:39.973] if (!is.null(pattern)) { [10:55:39.973] computeRestarts <- base::computeRestarts [10:55:39.973] grepl <- base::grepl [10:55:39.973] restarts <- computeRestarts(cond) [10:55:39.973] for (restart in restarts) { [10:55:39.973] name <- restart$name [10:55:39.973] if (is.null(name)) [10:55:39.973] next [10:55:39.973] if (!grepl(pattern, name)) [10:55:39.973] next [10:55:39.973] invokeRestart(restart) [10:55:39.973] muffled <- TRUE [10:55:39.973] break [10:55:39.973] } [10:55:39.973] } [10:55:39.973] } [10:55:39.973] invisible(muffled) [10:55:39.973] } [10:55:39.973] muffleCondition(cond, pattern = "^muffle") [10:55:39.973] } [10:55:39.973] } [10:55:39.973] } [10:55:39.973] })) [10:55:39.973] }, error = function(ex) { [10:55:39.973] base::structure(base::list(value = NULL, visible = NULL, [10:55:39.973] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:55:39.973] ...future.rng), started = ...future.startTime, [10:55:39.973] finished = Sys.time(), session_uuid = NA_character_, [10:55:39.973] version = "1.8"), class = "FutureResult") [10:55:39.973] }, finally = { [10:55:39.973] if (!identical(...future.workdir, getwd())) [10:55:39.973] setwd(...future.workdir) [10:55:39.973] { [10:55:39.973] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:55:39.973] ...future.oldOptions$nwarnings <- NULL [10:55:39.973] } [10:55:39.973] base::options(...future.oldOptions) [10:55:39.973] if (.Platform$OS.type == "windows") { [10:55:39.973] old_names <- names(...future.oldEnvVars) [10:55:39.973] envs <- base::Sys.getenv() [10:55:39.973] names <- names(envs) [10:55:39.973] common <- intersect(names, old_names) [10:55:39.973] added <- setdiff(names, old_names) [10:55:39.973] removed <- setdiff(old_names, names) [10:55:39.973] changed <- common[...future.oldEnvVars[common] != [10:55:39.973] envs[common]] [10:55:39.973] NAMES <- toupper(changed) [10:55:39.973] args <- list() [10:55:39.973] for (kk in seq_along(NAMES)) { [10:55:39.973] name <- changed[[kk]] [10:55:39.973] NAME <- NAMES[[kk]] [10:55:39.973] if (name != NAME && is.element(NAME, old_names)) [10:55:39.973] next [10:55:39.973] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:39.973] } [10:55:39.973] NAMES <- toupper(added) [10:55:39.973] for (kk in seq_along(NAMES)) { [10:55:39.973] name <- added[[kk]] [10:55:39.973] NAME <- NAMES[[kk]] [10:55:39.973] if (name != NAME && is.element(NAME, old_names)) [10:55:39.973] next [10:55:39.973] args[[name]] <- "" [10:55:39.973] } [10:55:39.973] NAMES <- toupper(removed) [10:55:39.973] for (kk in seq_along(NAMES)) { [10:55:39.973] name <- removed[[kk]] [10:55:39.973] NAME <- NAMES[[kk]] [10:55:39.973] if (name != NAME && is.element(NAME, old_names)) [10:55:39.973] next [10:55:39.973] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:39.973] } [10:55:39.973] if (length(args) > 0) [10:55:39.973] base::do.call(base::Sys.setenv, args = args) [10:55:39.973] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:55:39.973] } [10:55:39.973] else { [10:55:39.973] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:55:39.973] } [10:55:39.973] { [10:55:39.973] if (base::length(...future.futureOptionsAdded) > [10:55:39.973] 0L) { [10:55:39.973] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:55:39.973] base::names(opts) <- ...future.futureOptionsAdded [10:55:39.973] base::options(opts) [10:55:39.973] } [10:55:39.973] { [10:55:39.973] NULL [10:55:39.973] options(future.plan = NULL) [10:55:39.973] if (is.na(NA_character_)) [10:55:39.973] Sys.unsetenv("R_FUTURE_PLAN") [10:55:39.973] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:55:39.973] future::plan(...future.strategy.old, .cleanup = FALSE, [10:55:39.973] .init = FALSE) [10:55:39.973] } [10:55:39.973] } [10:55:39.973] } [10:55:39.973] }) [10:55:39.973] if (TRUE) { [10:55:39.973] base::sink(type = "output", split = FALSE) [10:55:39.973] if (TRUE) { [10:55:39.973] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:55:39.973] } [10:55:39.973] else { [10:55:39.973] ...future.result["stdout"] <- base::list(NULL) [10:55:39.973] } [10:55:39.973] base::close(...future.stdout) [10:55:39.973] ...future.stdout <- NULL [10:55:39.973] } [10:55:39.973] ...future.result$conditions <- ...future.conditions [10:55:39.973] ...future.result$finished <- base::Sys.time() [10:55:39.973] ...future.result [10:55:39.973] } [10:55:40.109] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:55:40.109] plan(): nbrOfWorkers() = 2 > > options(future.demo.mandelbrot.nrow = 2L) > options(future.demo.mandelbrot.resolution = 50L) > options(future.demo.mandelbrot.delay = FALSE) > > message("*** Demos ...") *** Demos ... > > message("*** Mandelbrot demo of the 'future' package ...") *** Mandelbrot demo of the 'future' package ... > > plan(mirai_multisession, workers = 2) [10:55:40.111] plan(): Setting new future strategy stack: [10:55:40.111] List of future strategies: [10:55:40.111] 1. mirai_multisession: [10:55:40.111] - args: function (..., workers = 2, envir = parent.frame()) [10:55:40.111] - tweaked: TRUE [10:55:40.111] - call: plan(mirai_multisession, workers = 2) [10:55:40.124] plan(): plan_init() of 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:55:40.125] < mirai | $data > [10:55:40.125] getGlobalsAndPackages() ... [10:55:40.125] Not searching for globals [10:55:40.125] - globals: [0] [10:55:40.126] getGlobalsAndPackages() ... DONE [10:55:40.126] getGlobalsAndPackages() ... [10:55:40.126] [10:55:40.126] - globals: [0] [10:55:40.126] getGlobalsAndPackages() ... DONE [10:55:40.127] Packages needed by the future expression (n = 0): [10:55:40.127] Packages needed by future strategies (n = 0): [10:55:40.127] { [10:55:40.127] { [10:55:40.127] { [10:55:40.127] ...future.startTime <- base::Sys.time() [10:55:40.127] { [10:55:40.127] { [10:55:40.127] { [10:55:40.127] base::local({ [10:55:40.127] has_future <- base::requireNamespace("future", [10:55:40.127] quietly = TRUE) [10:55:40.127] if (has_future) { [10:55:40.127] ns <- base::getNamespace("future") [10:55:40.127] version <- ns[[".package"]][["version"]] [10:55:40.127] if (is.null(version)) [10:55:40.127] version <- utils::packageVersion("future") [10:55:40.127] } [10:55:40.127] else { [10:55:40.127] version <- NULL [10:55:40.127] } [10:55:40.127] if (!has_future || version < "1.8.0") { [10:55:40.127] info <- base::c(r_version = base::gsub("R version ", [10:55:40.127] "", base::R.version$version.string), [10:55:40.127] platform = base::sprintf("%s (%s-bit)", [10:55:40.127] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:55:40.127] os = base::paste(base::Sys.info()[base::c("sysname", [10:55:40.127] "release", "version")], collapse = " "), [10:55:40.127] hostname = base::Sys.info()[["nodename"]]) [10:55:40.127] info <- base::sprintf("%s: %s", base::names(info), [10:55:40.127] info) [10:55:40.127] info <- base::paste(info, collapse = "; ") [10:55:40.127] if (!has_future) { [10:55:40.127] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:55:40.127] info) [10:55:40.127] } [10:55:40.127] else { [10:55:40.127] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:55:40.127] info, version) [10:55:40.127] } [10:55:40.127] base::stop(msg) [10:55:40.127] } [10:55:40.127] }) [10:55:40.127] } [10:55:40.127] ...future.strategy.old <- future::plan("list") [10:55:40.127] options(future.plan = NULL) [10:55:40.127] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.127] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:55:40.127] } [10:55:40.127] ...future.workdir <- getwd() [10:55:40.127] } [10:55:40.127] ...future.oldOptions <- base::as.list(base::.Options) [10:55:40.127] ...future.oldEnvVars <- base::Sys.getenv() [10:55:40.127] } [10:55:40.127] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:55:40.127] future.globals.maxSize = NULL, future.globals.method = NULL, [10:55:40.127] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:55:40.127] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:55:40.127] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:55:40.127] future.stdout.windows.reencode = NULL, width = 80L) [10:55:40.127] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:55:40.127] base::names(...future.oldOptions)) [10:55:40.127] } [10:55:40.127] if (FALSE) { [10:55:40.127] } [10:55:40.127] else { [10:55:40.127] if (TRUE) { [10:55:40.127] ...future.stdout <- base::rawConnection(base::raw(0L), [10:55:40.127] open = "w") [10:55:40.127] } [10:55:40.127] else { [10:55:40.127] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:55:40.127] windows = "NUL", "/dev/null"), open = "w") [10:55:40.127] } [10:55:40.127] base::sink(...future.stdout, type = "output", split = FALSE) [10:55:40.127] base::on.exit(if (!base::is.null(...future.stdout)) { [10:55:40.127] base::sink(type = "output", split = FALSE) [10:55:40.127] base::close(...future.stdout) [10:55:40.127] }, add = TRUE) [10:55:40.127] } [10:55:40.127] ...future.frame <- base::sys.nframe() [10:55:40.127] ...future.conditions <- base::list() [10:55:40.127] ...future.rng <- base::globalenv()$.Random.seed [10:55:40.127] if (FALSE) { [10:55:40.127] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:55:40.127] "...future.value", "...future.globalenv.names", ".Random.seed") [10:55:40.127] } [10:55:40.127] ...future.result <- base::tryCatch({ [10:55:40.127] base::withCallingHandlers({ [10:55:40.127] ...future.value <- base::withVisible(base::local(NA)) [10:55:40.127] future::FutureResult(value = ...future.value$value, [10:55:40.127] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.127] ...future.rng), globalenv = if (FALSE) [10:55:40.127] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:55:40.127] ...future.globalenv.names)) [10:55:40.127] else NULL, started = ...future.startTime, version = "1.8") [10:55:40.127] }, condition = base::local({ [10:55:40.127] c <- base::c [10:55:40.127] inherits <- base::inherits [10:55:40.127] invokeRestart <- base::invokeRestart [10:55:40.127] length <- base::length [10:55:40.127] list <- base::list [10:55:40.127] seq.int <- base::seq.int [10:55:40.127] signalCondition <- base::signalCondition [10:55:40.127] sys.calls <- base::sys.calls [10:55:40.127] `[[` <- base::`[[` [10:55:40.127] `+` <- base::`+` [10:55:40.127] `<<-` <- base::`<<-` [10:55:40.127] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:55:40.127] calls[seq.int(from = from + 12L, to = length(calls) - [10:55:40.127] 3L)] [10:55:40.127] } [10:55:40.127] function(cond) { [10:55:40.127] is_error <- inherits(cond, "error") [10:55:40.127] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:55:40.127] NULL) [10:55:40.127] if (is_error) { [10:55:40.127] sessionInformation <- function() { [10:55:40.127] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:55:40.127] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:55:40.127] search = base::search(), system = base::Sys.info()) [10:55:40.127] } [10:55:40.127] ...future.conditions[[length(...future.conditions) + [10:55:40.127] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:55:40.127] cond$call), session = sessionInformation(), [10:55:40.127] timestamp = base::Sys.time(), signaled = 0L) [10:55:40.127] signalCondition(cond) [10:55:40.127] } [10:55:40.127] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:55:40.127] signal <- FALSE && inherits(cond, character(0)) [10:55:40.127] ...future.conditions[[length(...future.conditions) + [10:55:40.127] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:55:40.127] if (FALSE && !signal) { [10:55:40.127] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.127] { [10:55:40.127] inherits <- base::inherits [10:55:40.127] invokeRestart <- base::invokeRestart [10:55:40.127] is.null <- base::is.null [10:55:40.127] muffled <- FALSE [10:55:40.127] if (inherits(cond, "message")) { [10:55:40.127] muffled <- grepl(pattern, "muffleMessage") [10:55:40.127] if (muffled) [10:55:40.127] invokeRestart("muffleMessage") [10:55:40.127] } [10:55:40.127] else if (inherits(cond, "warning")) { [10:55:40.127] muffled <- grepl(pattern, "muffleWarning") [10:55:40.127] if (muffled) [10:55:40.127] invokeRestart("muffleWarning") [10:55:40.127] } [10:55:40.127] else if (inherits(cond, "condition")) { [10:55:40.127] if (!is.null(pattern)) { [10:55:40.127] computeRestarts <- base::computeRestarts [10:55:40.127] grepl <- base::grepl [10:55:40.127] restarts <- computeRestarts(cond) [10:55:40.127] for (restart in restarts) { [10:55:40.127] name <- restart$name [10:55:40.127] if (is.null(name)) [10:55:40.127] next [10:55:40.127] if (!grepl(pattern, name)) [10:55:40.127] next [10:55:40.127] invokeRestart(restart) [10:55:40.127] muffled <- TRUE [10:55:40.127] break [10:55:40.127] } [10:55:40.127] } [10:55:40.127] } [10:55:40.127] invisible(muffled) [10:55:40.127] } [10:55:40.127] muffleCondition(cond, pattern = "^muffle") [10:55:40.127] } [10:55:40.127] } [10:55:40.127] else { [10:55:40.127] if (TRUE) { [10:55:40.127] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.127] { [10:55:40.127] inherits <- base::inherits [10:55:40.127] invokeRestart <- base::invokeRestart [10:55:40.127] is.null <- base::is.null [10:55:40.127] muffled <- FALSE [10:55:40.127] if (inherits(cond, "message")) { [10:55:40.127] muffled <- grepl(pattern, "muffleMessage") [10:55:40.127] if (muffled) [10:55:40.127] invokeRestart("muffleMessage") [10:55:40.127] } [10:55:40.127] else if (inherits(cond, "warning")) { [10:55:40.127] muffled <- grepl(pattern, "muffleWarning") [10:55:40.127] if (muffled) [10:55:40.127] invokeRestart("muffleWarning") [10:55:40.127] } [10:55:40.127] else if (inherits(cond, "condition")) { [10:55:40.127] if (!is.null(pattern)) { [10:55:40.127] computeRestarts <- base::computeRestarts [10:55:40.127] grepl <- base::grepl [10:55:40.127] restarts <- computeRestarts(cond) [10:55:40.127] for (restart in restarts) { [10:55:40.127] name <- restart$name [10:55:40.127] if (is.null(name)) [10:55:40.127] next [10:55:40.127] if (!grepl(pattern, name)) [10:55:40.127] next [10:55:40.127] invokeRestart(restart) [10:55:40.127] muffled <- TRUE [10:55:40.127] break [10:55:40.127] } [10:55:40.127] } [10:55:40.127] } [10:55:40.127] invisible(muffled) [10:55:40.127] } [10:55:40.127] muffleCondition(cond, pattern = "^muffle") [10:55:40.127] } [10:55:40.127] } [10:55:40.127] } [10:55:40.127] })) [10:55:40.127] }, error = function(ex) { [10:55:40.127] base::structure(base::list(value = NULL, visible = NULL, [10:55:40.127] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.127] ...future.rng), started = ...future.startTime, [10:55:40.127] finished = Sys.time(), session_uuid = NA_character_, [10:55:40.127] version = "1.8"), class = "FutureResult") [10:55:40.127] }, finally = { [10:55:40.127] if (!identical(...future.workdir, getwd())) [10:55:40.127] setwd(...future.workdir) [10:55:40.127] { [10:55:40.127] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:55:40.127] ...future.oldOptions$nwarnings <- NULL [10:55:40.127] } [10:55:40.127] base::options(...future.oldOptions) [10:55:40.127] if (.Platform$OS.type == "windows") { [10:55:40.127] old_names <- names(...future.oldEnvVars) [10:55:40.127] envs <- base::Sys.getenv() [10:55:40.127] names <- names(envs) [10:55:40.127] common <- intersect(names, old_names) [10:55:40.127] added <- setdiff(names, old_names) [10:55:40.127] removed <- setdiff(old_names, names) [10:55:40.127] changed <- common[...future.oldEnvVars[common] != [10:55:40.127] envs[common]] [10:55:40.127] NAMES <- toupper(changed) [10:55:40.127] args <- list() [10:55:40.127] for (kk in seq_along(NAMES)) { [10:55:40.127] name <- changed[[kk]] [10:55:40.127] NAME <- NAMES[[kk]] [10:55:40.127] if (name != NAME && is.element(NAME, old_names)) [10:55:40.127] next [10:55:40.127] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.127] } [10:55:40.127] NAMES <- toupper(added) [10:55:40.127] for (kk in seq_along(NAMES)) { [10:55:40.127] name <- added[[kk]] [10:55:40.127] NAME <- NAMES[[kk]] [10:55:40.127] if (name != NAME && is.element(NAME, old_names)) [10:55:40.127] next [10:55:40.127] args[[name]] <- "" [10:55:40.127] } [10:55:40.127] NAMES <- toupper(removed) [10:55:40.127] for (kk in seq_along(NAMES)) { [10:55:40.127] name <- removed[[kk]] [10:55:40.127] NAME <- NAMES[[kk]] [10:55:40.127] if (name != NAME && is.element(NAME, old_names)) [10:55:40.127] next [10:55:40.127] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.127] } [10:55:40.127] if (length(args) > 0) [10:55:40.127] base::do.call(base::Sys.setenv, args = args) [10:55:40.127] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:55:40.127] } [10:55:40.127] else { [10:55:40.127] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:55:40.127] } [10:55:40.127] { [10:55:40.127] if (base::length(...future.futureOptionsAdded) > [10:55:40.127] 0L) { [10:55:40.127] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:55:40.127] base::names(opts) <- ...future.futureOptionsAdded [10:55:40.127] base::options(opts) [10:55:40.127] } [10:55:40.127] { [10:55:40.127] NULL [10:55:40.127] options(future.plan = NULL) [10:55:40.127] if (is.na(NA_character_)) [10:55:40.127] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.127] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:55:40.127] future::plan(...future.strategy.old, .cleanup = FALSE, [10:55:40.127] .init = FALSE) [10:55:40.127] } [10:55:40.127] } [10:55:40.127] } [10:55:40.127] }) [10:55:40.127] if (TRUE) { [10:55:40.127] base::sink(type = "output", split = FALSE) [10:55:40.127] if (TRUE) { [10:55:40.127] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:55:40.127] } [10:55:40.127] else { [10:55:40.127] ...future.result["stdout"] <- base::list(NULL) [10:55:40.127] } [10:55:40.127] base::close(...future.stdout) [10:55:40.127] ...future.stdout <- NULL [10:55:40.127] } [10:55:40.127] ...future.result$conditions <- ...future.conditions [10:55:40.127] ...future.result$finished <- base::Sys.time() [10:55:40.127] ...future.result [10:55:40.127] } [10:55:40.282] plan(): plan_init() of 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:55:40.283] plan(): nbrOfWorkers() = 2 > demo("mandelbrot", package = "future", ask = FALSE) demo(mandelbrot) ---- ~~~~~~~~~~ > library("future") > library("graphics") > plot_what_is_done <- function(counts) { + for (kk in seq_along(counts)) { + f <- counts[[kk]] + + ## Already plotted? + if (!inherits(f, "Future")) next + + ## Not resolved? + if (!resolved(f)) next + + message(sprintf("Plotting tile #%d of %d ...", kk, n)) + counts[[kk]] <- value(f) + screen(kk) + plot(counts[[kk]]) + } + + counts + } > ## Options > region <- getOption("future.demo.mandelbrot.region", 1L) > if (!is.list(region)) { + if (region == 1L) { + region <- list(xmid = -0.75, ymid = 0.0, side = 3.0) + } else if (region == 2L) { + region <- list(xmid = 0.283, ymid = -0.0095, side = 0.00026) + } else if (region == 3L) { + region <- list(xmid = 0.282989, ymid = -0.01, side = 3e-8) + } + } > nrow <- getOption("future.demo.mandelbrot.nrow", 3L) > resolution <- getOption("future.demo.mandelbrot.resolution", 400L) > delay <- getOption("future.demo.mandelbrot.delay", interactive()) > if (isTRUE(delay)) { + delay <- function(counts) Sys.sleep(1.0) + } else if (!is.function(delay)) { + delay <- function(counts) {} + } > ## Generate Mandelbrot tiles to be computed > Cs <- mandelbrot_tiles(xmid = region$xmid, ymid = region$ymid, + side = region$side, nrow = nrow, + resolution = resolution) > if (interactive()) { + dev.new() + plot.new() + split.screen(dim(Cs)) + for (ii in seq_along(Cs)) { + screen(ii) + par(mar = c(0, 0, 0, 0)) + text(x = 1 / 2, y = 1 / 2, sprintf("Future #%d\nunresolved", ii), cex = 2) + } + } else { + split.screen(dim(Cs)) + } [1] 1 2 3 4 > ## Create all Mandelbrot tiles via lazy futures > n <- length(Cs) > message(sprintf("Creating %d Mandelbrot tiles:", n), appendLF = FALSE) Creating 4 Mandelbrot tiles: > counts <- lapply(seq_along(Cs), FUN=function(ii) { + message(" ", ii, appendLF = FALSE) + C <- Cs[[ii]] + future({ + message(sprintf("Calculating tile #%d of %d ...", ii, n), appendLF = FALSE) + fit <- mandelbrot(C) + + ## Emulate slowness + delay(fit) + + message(" done") + fit + }, lazy = TRUE) + }) 1[10:55:40.382] getGlobalsAndPackages() ... [10:55:40.382] Searching for globals... [10:55:40.399] - globals found: [9] '{', 'message', 'sprintf', 'ii', 'n', '<-', 'mandelbrot', 'C', 'delay' [10:55:40.399] Searching for globals ... DONE [10:55:40.400] Resolving globals: FALSE [10:55:40.402] The total size of the 4 globals is 14.24 KiB (14584 bytes) [10:55:40.403] The total size of the 4 globals exported for future expression ('{; message(sprintf("Calculating tile #%d of %d ...", ii, n),; appendLF = FALSE); fit <- mandelbrot(C); delay(fit); message(" done"); fit; }') is 14.24 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'C' (10.72 KiB of class 'complex'), 'delay' (3.41 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [10:55:40.403] - globals: [4] 'ii', 'n', 'C', 'delay' [10:55:40.404] - packages: [1] 'future' [10:55:40.404] getGlobalsAndPackages() ... DONE 2[10:55:40.411] getGlobalsAndPackages() ... [10:55:40.412] Searching for globals... [10:55:40.422] - globals found: [9] '{', 'message', 'sprintf', 'ii', 'n', '<-', 'mandelbrot', 'C', 'delay' [10:55:40.422] Searching for globals ... DONE [10:55:40.422] Resolving globals: FALSE [10:55:40.423] The total size of the 4 globals is 14.24 KiB (14584 bytes) [10:55:40.424] The total size of the 4 globals exported for future expression ('{; message(sprintf("Calculating tile #%d of %d ...", ii, n),; appendLF = FALSE); fit <- mandelbrot(C); delay(fit); message(" done"); fit; }') is 14.24 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'C' (10.72 KiB of class 'complex'), 'delay' (3.41 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [10:55:40.424] - globals: [4] 'ii', 'n', 'C', 'delay' [10:55:40.425] - packages: [1] 'future' [10:55:40.425] getGlobalsAndPackages() ... DONE 3[10:55:40.426] getGlobalsAndPackages() ... [10:55:40.426] Searching for globals... [10:55:40.433] - globals found: [9] '{', 'message', 'sprintf', 'ii', 'n', '<-', 'mandelbrot', 'C', 'delay' [10:55:40.433] Searching for globals ... DONE [10:55:40.433] Resolving globals: FALSE [10:55:40.434] The total size of the 4 globals is 14.24 KiB (14584 bytes) [10:55:40.435] The total size of the 4 globals exported for future expression ('{; message(sprintf("Calculating tile #%d of %d ...", ii, n),; appendLF = FALSE); fit <- mandelbrot(C); delay(fit); message(" done"); fit; }') is 14.24 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'C' (10.72 KiB of class 'complex'), 'delay' (3.41 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [10:55:40.436] - globals: [4] 'ii', 'n', 'C', 'delay' [10:55:40.436] - packages: [1] 'future' [10:55:40.436] getGlobalsAndPackages() ... DONE 4[10:55:40.437] getGlobalsAndPackages() ... [10:55:40.437] Searching for globals... [10:55:40.444] - globals found: [9] '{', 'message', 'sprintf', 'ii', 'n', '<-', 'mandelbrot', 'C', 'delay' [10:55:40.444] Searching for globals ... DONE [10:55:40.444] Resolving globals: FALSE [10:55:40.445] The total size of the 4 globals is 14.24 KiB (14584 bytes) [10:55:40.446] The total size of the 4 globals exported for future expression ('{; message(sprintf("Calculating tile #%d of %d ...", ii, n),; appendLF = FALSE); fit <- mandelbrot(C); delay(fit); message(" done"); fit; }') is 14.24 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'C' (10.72 KiB of class 'complex'), 'delay' (3.41 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [10:55:40.447] - globals: [4] 'ii', 'n', 'C', 'delay' [10:55:40.447] - packages: [1] 'future' [10:55:40.447] getGlobalsAndPackages() ... DONE > message(".") . > ## Calculate and plot tiles > repeat { + counts <- plot_what_is_done(counts) + if (!any(sapply(counts, FUN = inherits, "Future"))) break + } [10:55:40.468] resolved() for 'Future' ... [10:55:40.468] - state: 'created' [10:55:40.468] - run: TRUE [10:55:40.469] - run() ... [10:55:40.469] run() for 'Future' ... [10:55:40.469] - state: 'created' [10:55:40.470] - Future backend: 'FutureStrategy', 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:55:40.471] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:55:40.471] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:55:40.471] - Field: 'label' [10:55:40.472] - Field: 'local' [10:55:40.472] - Field: 'owner' [10:55:40.472] - Field: 'envir' [10:55:40.473] - Field: 'packages' [10:55:40.473] - Field: 'gc' [10:55:40.473] - Field: 'conditions' [10:55:40.473] - Field: 'expr' [10:55:40.474] - Field: 'uuid' [10:55:40.474] - Field: 'seed' [10:55:40.474] - Field: 'version' [10:55:40.475] - Field: 'result' [10:55:40.475] - Field: 'asynchronous' [10:55:40.475] - Field: 'calls' [10:55:40.475] - Field: 'globals' [10:55:40.476] - Field: 'stdout' [10:55:40.476] - Field: 'earlySignal' [10:55:40.476] - Field: 'lazy' [10:55:40.476] - Field: 'state' [10:55:40.477] - Field: '.cluster' [10:55:40.477] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:55:40.477] - Launch lazy future ... [10:55:40.478] Packages needed by the future expression (n = 1): 'future' [10:55:40.478] Packages needed by future strategies (n = 0): [10:55:40.479] { [10:55:40.479] { [10:55:40.479] { [10:55:40.479] ...future.startTime <- base::Sys.time() [10:55:40.479] { [10:55:40.479] { [10:55:40.479] { [10:55:40.479] { [10:55:40.479] base::local({ [10:55:40.479] has_future <- base::requireNamespace("future", [10:55:40.479] quietly = TRUE) [10:55:40.479] if (has_future) { [10:55:40.479] ns <- base::getNamespace("future") [10:55:40.479] version <- ns[[".package"]][["version"]] [10:55:40.479] if (is.null(version)) [10:55:40.479] version <- utils::packageVersion("future") [10:55:40.479] } [10:55:40.479] else { [10:55:40.479] version <- NULL [10:55:40.479] } [10:55:40.479] if (!has_future || version < "1.8.0") { [10:55:40.479] info <- base::c(r_version = base::gsub("R version ", [10:55:40.479] "", base::R.version$version.string), [10:55:40.479] platform = base::sprintf("%s (%s-bit)", [10:55:40.479] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:55:40.479] os = base::paste(base::Sys.info()[base::c("sysname", [10:55:40.479] "release", "version")], collapse = " "), [10:55:40.479] hostname = base::Sys.info()[["nodename"]]) [10:55:40.479] info <- base::sprintf("%s: %s", base::names(info), [10:55:40.479] info) [10:55:40.479] info <- base::paste(info, collapse = "; ") [10:55:40.479] if (!has_future) { [10:55:40.479] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:55:40.479] info) [10:55:40.479] } [10:55:40.479] else { [10:55:40.479] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:55:40.479] info, version) [10:55:40.479] } [10:55:40.479] base::stop(msg) [10:55:40.479] } [10:55:40.479] }) [10:55:40.479] } [10:55:40.479] base::local({ [10:55:40.479] for (pkg in "future") { [10:55:40.479] base::loadNamespace(pkg) [10:55:40.479] base::library(pkg, character.only = TRUE) [10:55:40.479] } [10:55:40.479] }) [10:55:40.479] } [10:55:40.479] ...future.strategy.old <- future::plan("list") [10:55:40.479] options(future.plan = NULL) [10:55:40.479] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.479] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:55:40.479] } [10:55:40.479] ...future.workdir <- getwd() [10:55:40.479] } [10:55:40.479] ...future.oldOptions <- base::as.list(base::.Options) [10:55:40.479] ...future.oldEnvVars <- base::Sys.getenv() [10:55:40.479] } [10:55:40.479] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:55:40.479] future.globals.maxSize = NULL, future.globals.method = NULL, [10:55:40.479] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:55:40.479] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:55:40.479] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:55:40.479] future.stdout.windows.reencode = NULL, width = 80L) [10:55:40.479] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:55:40.479] base::names(...future.oldOptions)) [10:55:40.479] } [10:55:40.479] if (FALSE) { [10:55:40.479] } [10:55:40.479] else { [10:55:40.479] if (TRUE) { [10:55:40.479] ...future.stdout <- base::rawConnection(base::raw(0L), [10:55:40.479] open = "w") [10:55:40.479] } [10:55:40.479] else { [10:55:40.479] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:55:40.479] windows = "NUL", "/dev/null"), open = "w") [10:55:40.479] } [10:55:40.479] base::sink(...future.stdout, type = "output", split = FALSE) [10:55:40.479] base::on.exit(if (!base::is.null(...future.stdout)) { [10:55:40.479] base::sink(type = "output", split = FALSE) [10:55:40.479] base::close(...future.stdout) [10:55:40.479] }, add = TRUE) [10:55:40.479] } [10:55:40.479] ...future.frame <- base::sys.nframe() [10:55:40.479] ...future.conditions <- base::list() [10:55:40.479] ...future.rng <- base::globalenv()$.Random.seed [10:55:40.479] if (FALSE) { [10:55:40.479] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:55:40.479] "...future.value", "...future.globalenv.names", ".Random.seed") [10:55:40.479] } [10:55:40.479] ...future.result <- base::tryCatch({ [10:55:40.479] base::withCallingHandlers({ [10:55:40.479] ...future.value <- base::withVisible(base::local({ [10:55:40.479] message(sprintf("Calculating tile #%d of %d ...", [10:55:40.479] ii, n), appendLF = FALSE) [10:55:40.479] fit <- mandelbrot(C) [10:55:40.479] delay(fit) [10:55:40.479] message(" done") [10:55:40.479] fit [10:55:40.479] })) [10:55:40.479] future::FutureResult(value = ...future.value$value, [10:55:40.479] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.479] ...future.rng), globalenv = if (FALSE) [10:55:40.479] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:55:40.479] ...future.globalenv.names)) [10:55:40.479] else NULL, started = ...future.startTime, version = "1.8") [10:55:40.479] }, condition = base::local({ [10:55:40.479] c <- base::c [10:55:40.479] inherits <- base::inherits [10:55:40.479] invokeRestart <- base::invokeRestart [10:55:40.479] length <- base::length [10:55:40.479] list <- base::list [10:55:40.479] seq.int <- base::seq.int [10:55:40.479] signalCondition <- base::signalCondition [10:55:40.479] sys.calls <- base::sys.calls [10:55:40.479] `[[` <- base::`[[` [10:55:40.479] `+` <- base::`+` [10:55:40.479] `<<-` <- base::`<<-` [10:55:40.479] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:55:40.479] calls[seq.int(from = from + 12L, to = length(calls) - [10:55:40.479] 3L)] [10:55:40.479] } [10:55:40.479] function(cond) { [10:55:40.479] is_error <- inherits(cond, "error") [10:55:40.479] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:55:40.479] NULL) [10:55:40.479] if (is_error) { [10:55:40.479] sessionInformation <- function() { [10:55:40.479] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:55:40.479] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:55:40.479] search = base::search(), system = base::Sys.info()) [10:55:40.479] } [10:55:40.479] ...future.conditions[[length(...future.conditions) + [10:55:40.479] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:55:40.479] cond$call), session = sessionInformation(), [10:55:40.479] timestamp = base::Sys.time(), signaled = 0L) [10:55:40.479] signalCondition(cond) [10:55:40.479] } [10:55:40.479] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:55:40.479] signal <- FALSE && inherits(cond, character(0)) [10:55:40.479] ...future.conditions[[length(...future.conditions) + [10:55:40.479] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:55:40.479] if (FALSE && !signal) { [10:55:40.479] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.479] { [10:55:40.479] inherits <- base::inherits [10:55:40.479] invokeRestart <- base::invokeRestart [10:55:40.479] is.null <- base::is.null [10:55:40.479] muffled <- FALSE [10:55:40.479] if (inherits(cond, "message")) { [10:55:40.479] muffled <- grepl(pattern, "muffleMessage") [10:55:40.479] if (muffled) [10:55:40.479] invokeRestart("muffleMessage") [10:55:40.479] } [10:55:40.479] else if (inherits(cond, "warning")) { [10:55:40.479] muffled <- grepl(pattern, "muffleWarning") [10:55:40.479] if (muffled) [10:55:40.479] invokeRestart("muffleWarning") [10:55:40.479] } [10:55:40.479] else if (inherits(cond, "condition")) { [10:55:40.479] if (!is.null(pattern)) { [10:55:40.479] computeRestarts <- base::computeRestarts [10:55:40.479] grepl <- base::grepl [10:55:40.479] restarts <- computeRestarts(cond) [10:55:40.479] for (restart in restarts) { [10:55:40.479] name <- restart$name [10:55:40.479] if (is.null(name)) [10:55:40.479] next [10:55:40.479] if (!grepl(pattern, name)) [10:55:40.479] next [10:55:40.479] invokeRestart(restart) [10:55:40.479] muffled <- TRUE [10:55:40.479] break [10:55:40.479] } [10:55:40.479] } [10:55:40.479] } [10:55:40.479] invisible(muffled) [10:55:40.479] } [10:55:40.479] muffleCondition(cond, pattern = "^muffle") [10:55:40.479] } [10:55:40.479] } [10:55:40.479] else { [10:55:40.479] if (TRUE) { [10:55:40.479] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.479] { [10:55:40.479] inherits <- base::inherits [10:55:40.479] invokeRestart <- base::invokeRestart [10:55:40.479] is.null <- base::is.null [10:55:40.479] muffled <- FALSE [10:55:40.479] if (inherits(cond, "message")) { [10:55:40.479] muffled <- grepl(pattern, "muffleMessage") [10:55:40.479] if (muffled) [10:55:40.479] invokeRestart("muffleMessage") [10:55:40.479] } [10:55:40.479] else if (inherits(cond, "warning")) { [10:55:40.479] muffled <- grepl(pattern, "muffleWarning") [10:55:40.479] if (muffled) [10:55:40.479] invokeRestart("muffleWarning") [10:55:40.479] } [10:55:40.479] else if (inherits(cond, "condition")) { [10:55:40.479] if (!is.null(pattern)) { [10:55:40.479] computeRestarts <- base::computeRestarts [10:55:40.479] grepl <- base::grepl [10:55:40.479] restarts <- computeRestarts(cond) [10:55:40.479] for (restart in restarts) { [10:55:40.479] name <- restart$name [10:55:40.479] if (is.null(name)) [10:55:40.479] next [10:55:40.479] if (!grepl(pattern, name)) [10:55:40.479] next [10:55:40.479] invokeRestart(restart) [10:55:40.479] muffled <- TRUE [10:55:40.479] break [10:55:40.479] } [10:55:40.479] } [10:55:40.479] } [10:55:40.479] invisible(muffled) [10:55:40.479] } [10:55:40.479] muffleCondition(cond, pattern = "^muffle") [10:55:40.479] } [10:55:40.479] } [10:55:40.479] } [10:55:40.479] })) [10:55:40.479] }, error = function(ex) { [10:55:40.479] base::structure(base::list(value = NULL, visible = NULL, [10:55:40.479] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.479] ...future.rng), started = ...future.startTime, [10:55:40.479] finished = Sys.time(), session_uuid = NA_character_, [10:55:40.479] version = "1.8"), class = "FutureResult") [10:55:40.479] }, finally = { [10:55:40.479] if (!identical(...future.workdir, getwd())) [10:55:40.479] setwd(...future.workdir) [10:55:40.479] { [10:55:40.479] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:55:40.479] ...future.oldOptions$nwarnings <- NULL [10:55:40.479] } [10:55:40.479] base::options(...future.oldOptions) [10:55:40.479] if (.Platform$OS.type == "windows") { [10:55:40.479] old_names <- names(...future.oldEnvVars) [10:55:40.479] envs <- base::Sys.getenv() [10:55:40.479] names <- names(envs) [10:55:40.479] common <- intersect(names, old_names) [10:55:40.479] added <- setdiff(names, old_names) [10:55:40.479] removed <- setdiff(old_names, names) [10:55:40.479] changed <- common[...future.oldEnvVars[common] != [10:55:40.479] envs[common]] [10:55:40.479] NAMES <- toupper(changed) [10:55:40.479] args <- list() [10:55:40.479] for (kk in seq_along(NAMES)) { [10:55:40.479] name <- changed[[kk]] [10:55:40.479] NAME <- NAMES[[kk]] [10:55:40.479] if (name != NAME && is.element(NAME, old_names)) [10:55:40.479] next [10:55:40.479] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.479] } [10:55:40.479] NAMES <- toupper(added) [10:55:40.479] for (kk in seq_along(NAMES)) { [10:55:40.479] name <- added[[kk]] [10:55:40.479] NAME <- NAMES[[kk]] [10:55:40.479] if (name != NAME && is.element(NAME, old_names)) [10:55:40.479] next [10:55:40.479] args[[name]] <- "" [10:55:40.479] } [10:55:40.479] NAMES <- toupper(removed) [10:55:40.479] for (kk in seq_along(NAMES)) { [10:55:40.479] name <- removed[[kk]] [10:55:40.479] NAME <- NAMES[[kk]] [10:55:40.479] if (name != NAME && is.element(NAME, old_names)) [10:55:40.479] next [10:55:40.479] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.479] } [10:55:40.479] if (length(args) > 0) [10:55:40.479] base::do.call(base::Sys.setenv, args = args) [10:55:40.479] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:55:40.479] } [10:55:40.479] else { [10:55:40.479] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:55:40.479] } [10:55:40.479] { [10:55:40.479] if (base::length(...future.futureOptionsAdded) > [10:55:40.479] 0L) { [10:55:40.479] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:55:40.479] base::names(opts) <- ...future.futureOptionsAdded [10:55:40.479] base::options(opts) [10:55:40.479] } [10:55:40.479] { [10:55:40.479] NULL [10:55:40.479] options(future.plan = NULL) [10:55:40.479] if (is.na(NA_character_)) [10:55:40.479] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.479] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:55:40.479] future::plan(...future.strategy.old, .cleanup = FALSE, [10:55:40.479] .init = FALSE) [10:55:40.479] } [10:55:40.479] } [10:55:40.479] } [10:55:40.479] }) [10:55:40.479] if (TRUE) { [10:55:40.479] base::sink(type = "output", split = FALSE) [10:55:40.479] if (TRUE) { [10:55:40.479] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:55:40.479] } [10:55:40.479] else { [10:55:40.479] ...future.result["stdout"] <- base::list(NULL) [10:55:40.479] } [10:55:40.479] base::close(...future.stdout) [10:55:40.479] ...future.stdout <- NULL [10:55:40.479] } [10:55:40.479] ...future.result$conditions <- ...future.conditions [10:55:40.479] ...future.result$finished <- base::Sys.time() [10:55:40.479] ...future.result [10:55:40.479] } [10:55:40.486] - Launch lazy future ... done [10:55:40.487] run() for 'MiraiFuture' ... done [10:55:40.487] - run() ... done [10:55:40.487] - resolved() ... [10:55:40.488] resolved() for 'MiraiFuture' ... [10:55:40.488] - state: 'running' [10:55:40.488] - run: TRUE [10:55:40.489] - result: 'NULL' [10:55:40.489] - resolved: FALSE [10:55:40.489] resolved() for 'MiraiFuture' ... done [10:55:40.490] - resolved: FALSE [10:55:40.490] - resolved() ... done [10:55:40.490] resolved() for 'MiraiFuture' ... done [10:55:40.491] resolved() for 'Future' ... [10:55:40.491] - state: 'created' [10:55:40.491] - run: TRUE [10:55:40.492] - run() ... [10:55:40.492] run() for 'Future' ... [10:55:40.492] - state: 'created' [10:55:40.492] - Future backend: 'FutureStrategy', 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:55:40.493] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:55:40.494] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:55:40.494] - Field: 'label' [10:55:40.494] - Field: 'local' [10:55:40.494] - Field: 'owner' [10:55:40.495] - Field: 'envir' [10:55:40.495] - Field: 'packages' [10:55:40.495] - Field: 'gc' [10:55:40.496] - Field: 'conditions' [10:55:40.496] - Field: 'expr' [10:55:40.496] - Field: 'uuid' [10:55:40.496] - Field: 'seed' [10:55:40.497] - Field: 'version' [10:55:40.497] - Field: 'result' [10:55:40.497] - Field: 'asynchronous' [10:55:40.498] - Field: 'calls' [10:55:40.498] - Field: 'globals' [10:55:40.498] - Field: 'stdout' [10:55:40.498] - Field: 'earlySignal' [10:55:40.499] - Field: 'lazy' [10:55:40.499] - Field: 'state' [10:55:40.499] - Field: '.cluster' [10:55:40.500] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:55:40.503] - Launch lazy future ... [10:55:40.503] Packages needed by the future expression (n = 1): 'future' [10:55:40.503] Packages needed by future strategies (n = 0): [10:55:40.505] { [10:55:40.505] { [10:55:40.505] { [10:55:40.505] ...future.startTime <- base::Sys.time() [10:55:40.505] { [10:55:40.505] { [10:55:40.505] { [10:55:40.505] { [10:55:40.505] base::local({ [10:55:40.505] has_future <- base::requireNamespace("future", [10:55:40.505] quietly = TRUE) [10:55:40.505] if (has_future) { [10:55:40.505] ns <- base::getNamespace("future") [10:55:40.505] version <- ns[[".package"]][["version"]] [10:55:40.505] if (is.null(version)) [10:55:40.505] version <- utils::packageVersion("future") [10:55:40.505] } [10:55:40.505] else { [10:55:40.505] version <- NULL [10:55:40.505] } [10:55:40.505] if (!has_future || version < "1.8.0") { [10:55:40.505] info <- base::c(r_version = base::gsub("R version ", [10:55:40.505] "", base::R.version$version.string), [10:55:40.505] platform = base::sprintf("%s (%s-bit)", [10:55:40.505] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:55:40.505] os = base::paste(base::Sys.info()[base::c("sysname", [10:55:40.505] "release", "version")], collapse = " "), [10:55:40.505] hostname = base::Sys.info()[["nodename"]]) [10:55:40.505] info <- base::sprintf("%s: %s", base::names(info), [10:55:40.505] info) [10:55:40.505] info <- base::paste(info, collapse = "; ") [10:55:40.505] if (!has_future) { [10:55:40.505] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:55:40.505] info) [10:55:40.505] } [10:55:40.505] else { [10:55:40.505] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:55:40.505] info, version) [10:55:40.505] } [10:55:40.505] base::stop(msg) [10:55:40.505] } [10:55:40.505] }) [10:55:40.505] } [10:55:40.505] base::local({ [10:55:40.505] for (pkg in "future") { [10:55:40.505] base::loadNamespace(pkg) [10:55:40.505] base::library(pkg, character.only = TRUE) [10:55:40.505] } [10:55:40.505] }) [10:55:40.505] } [10:55:40.505] ...future.strategy.old <- future::plan("list") [10:55:40.505] options(future.plan = NULL) [10:55:40.505] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.505] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:55:40.505] } [10:55:40.505] ...future.workdir <- getwd() [10:55:40.505] } [10:55:40.505] ...future.oldOptions <- base::as.list(base::.Options) [10:55:40.505] ...future.oldEnvVars <- base::Sys.getenv() [10:55:40.505] } [10:55:40.505] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:55:40.505] future.globals.maxSize = NULL, future.globals.method = NULL, [10:55:40.505] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:55:40.505] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:55:40.505] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:55:40.505] future.stdout.windows.reencode = NULL, width = 80L) [10:55:40.505] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:55:40.505] base::names(...future.oldOptions)) [10:55:40.505] } [10:55:40.505] if (FALSE) { [10:55:40.505] } [10:55:40.505] else { [10:55:40.505] if (TRUE) { [10:55:40.505] ...future.stdout <- base::rawConnection(base::raw(0L), [10:55:40.505] open = "w") [10:55:40.505] } [10:55:40.505] else { [10:55:40.505] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:55:40.505] windows = "NUL", "/dev/null"), open = "w") [10:55:40.505] } [10:55:40.505] base::sink(...future.stdout, type = "output", split = FALSE) [10:55:40.505] base::on.exit(if (!base::is.null(...future.stdout)) { [10:55:40.505] base::sink(type = "output", split = FALSE) [10:55:40.505] base::close(...future.stdout) [10:55:40.505] }, add = TRUE) [10:55:40.505] } [10:55:40.505] ...future.frame <- base::sys.nframe() [10:55:40.505] ...future.conditions <- base::list() [10:55:40.505] ...future.rng <- base::globalenv()$.Random.seed [10:55:40.505] if (FALSE) { [10:55:40.505] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:55:40.505] "...future.value", "...future.globalenv.names", ".Random.seed") [10:55:40.505] } [10:55:40.505] ...future.result <- base::tryCatch({ [10:55:40.505] base::withCallingHandlers({ [10:55:40.505] ...future.value <- base::withVisible(base::local({ [10:55:40.505] message(sprintf("Calculating tile #%d of %d ...", [10:55:40.505] ii, n), appendLF = FALSE) [10:55:40.505] fit <- mandelbrot(C) [10:55:40.505] delay(fit) [10:55:40.505] message(" done") [10:55:40.505] fit [10:55:40.505] })) [10:55:40.505] future::FutureResult(value = ...future.value$value, [10:55:40.505] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.505] ...future.rng), globalenv = if (FALSE) [10:55:40.505] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:55:40.505] ...future.globalenv.names)) [10:55:40.505] else NULL, started = ...future.startTime, version = "1.8") [10:55:40.505] }, condition = base::local({ [10:55:40.505] c <- base::c [10:55:40.505] inherits <- base::inherits [10:55:40.505] invokeRestart <- base::invokeRestart [10:55:40.505] length <- base::length [10:55:40.505] list <- base::list [10:55:40.505] seq.int <- base::seq.int [10:55:40.505] signalCondition <- base::signalCondition [10:55:40.505] sys.calls <- base::sys.calls [10:55:40.505] `[[` <- base::`[[` [10:55:40.505] `+` <- base::`+` [10:55:40.505] `<<-` <- base::`<<-` [10:55:40.505] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:55:40.505] calls[seq.int(from = from + 12L, to = length(calls) - [10:55:40.505] 3L)] [10:55:40.505] } [10:55:40.505] function(cond) { [10:55:40.505] is_error <- inherits(cond, "error") [10:55:40.505] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:55:40.505] NULL) [10:55:40.505] if (is_error) { [10:55:40.505] sessionInformation <- function() { [10:55:40.505] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:55:40.505] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:55:40.505] search = base::search(), system = base::Sys.info()) [10:55:40.505] } [10:55:40.505] ...future.conditions[[length(...future.conditions) + [10:55:40.505] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:55:40.505] cond$call), session = sessionInformation(), [10:55:40.505] timestamp = base::Sys.time(), signaled = 0L) [10:55:40.505] signalCondition(cond) [10:55:40.505] } [10:55:40.505] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:55:40.505] signal <- FALSE && inherits(cond, character(0)) [10:55:40.505] ...future.conditions[[length(...future.conditions) + [10:55:40.505] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:55:40.505] if (FALSE && !signal) { [10:55:40.505] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.505] { [10:55:40.505] inherits <- base::inherits [10:55:40.505] invokeRestart <- base::invokeRestart [10:55:40.505] is.null <- base::is.null [10:55:40.505] muffled <- FALSE [10:55:40.505] if (inherits(cond, "message")) { [10:55:40.505] muffled <- grepl(pattern, "muffleMessage") [10:55:40.505] if (muffled) [10:55:40.505] invokeRestart("muffleMessage") [10:55:40.505] } [10:55:40.505] else if (inherits(cond, "warning")) { [10:55:40.505] muffled <- grepl(pattern, "muffleWarning") [10:55:40.505] if (muffled) [10:55:40.505] invokeRestart("muffleWarning") [10:55:40.505] } [10:55:40.505] else if (inherits(cond, "condition")) { [10:55:40.505] if (!is.null(pattern)) { [10:55:40.505] computeRestarts <- base::computeRestarts [10:55:40.505] grepl <- base::grepl [10:55:40.505] restarts <- computeRestarts(cond) [10:55:40.505] for (restart in restarts) { [10:55:40.505] name <- restart$name [10:55:40.505] if (is.null(name)) [10:55:40.505] next [10:55:40.505] if (!grepl(pattern, name)) [10:55:40.505] next [10:55:40.505] invokeRestart(restart) [10:55:40.505] muffled <- TRUE [10:55:40.505] break [10:55:40.505] } [10:55:40.505] } [10:55:40.505] } [10:55:40.505] invisible(muffled) [10:55:40.505] } [10:55:40.505] muffleCondition(cond, pattern = "^muffle") [10:55:40.505] } [10:55:40.505] } [10:55:40.505] else { [10:55:40.505] if (TRUE) { [10:55:40.505] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.505] { [10:55:40.505] inherits <- base::inherits [10:55:40.505] invokeRestart <- base::invokeRestart [10:55:40.505] is.null <- base::is.null [10:55:40.505] muffled <- FALSE [10:55:40.505] if (inherits(cond, "message")) { [10:55:40.505] muffled <- grepl(pattern, "muffleMessage") [10:55:40.505] if (muffled) [10:55:40.505] invokeRestart("muffleMessage") [10:55:40.505] } [10:55:40.505] else if (inherits(cond, "warning")) { [10:55:40.505] muffled <- grepl(pattern, "muffleWarning") [10:55:40.505] if (muffled) [10:55:40.505] invokeRestart("muffleWarning") [10:55:40.505] } [10:55:40.505] else if (inherits(cond, "condition")) { [10:55:40.505] if (!is.null(pattern)) { [10:55:40.505] computeRestarts <- base::computeRestarts [10:55:40.505] grepl <- base::grepl [10:55:40.505] restarts <- computeRestarts(cond) [10:55:40.505] for (restart in restarts) { [10:55:40.505] name <- restart$name [10:55:40.505] if (is.null(name)) [10:55:40.505] next [10:55:40.505] if (!grepl(pattern, name)) [10:55:40.505] next [10:55:40.505] invokeRestart(restart) [10:55:40.505] muffled <- TRUE [10:55:40.505] break [10:55:40.505] } [10:55:40.505] } [10:55:40.505] } [10:55:40.505] invisible(muffled) [10:55:40.505] } [10:55:40.505] muffleCondition(cond, pattern = "^muffle") [10:55:40.505] } [10:55:40.505] } [10:55:40.505] } [10:55:40.505] })) [10:55:40.505] }, error = function(ex) { [10:55:40.505] base::structure(base::list(value = NULL, visible = NULL, [10:55:40.505] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.505] ...future.rng), started = ...future.startTime, [10:55:40.505] finished = Sys.time(), session_uuid = NA_character_, [10:55:40.505] version = "1.8"), class = "FutureResult") [10:55:40.505] }, finally = { [10:55:40.505] if (!identical(...future.workdir, getwd())) [10:55:40.505] setwd(...future.workdir) [10:55:40.505] { [10:55:40.505] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:55:40.505] ...future.oldOptions$nwarnings <- NULL [10:55:40.505] } [10:55:40.505] base::options(...future.oldOptions) [10:55:40.505] if (.Platform$OS.type == "windows") { [10:55:40.505] old_names <- names(...future.oldEnvVars) [10:55:40.505] envs <- base::Sys.getenv() [10:55:40.505] names <- names(envs) [10:55:40.505] common <- intersect(names, old_names) [10:55:40.505] added <- setdiff(names, old_names) [10:55:40.505] removed <- setdiff(old_names, names) [10:55:40.505] changed <- common[...future.oldEnvVars[common] != [10:55:40.505] envs[common]] [10:55:40.505] NAMES <- toupper(changed) [10:55:40.505] args <- list() [10:55:40.505] for (kk in seq_along(NAMES)) { [10:55:40.505] name <- changed[[kk]] [10:55:40.505] NAME <- NAMES[[kk]] [10:55:40.505] if (name != NAME && is.element(NAME, old_names)) [10:55:40.505] next [10:55:40.505] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.505] } [10:55:40.505] NAMES <- toupper(added) [10:55:40.505] for (kk in seq_along(NAMES)) { [10:55:40.505] name <- added[[kk]] [10:55:40.505] NAME <- NAMES[[kk]] [10:55:40.505] if (name != NAME && is.element(NAME, old_names)) [10:55:40.505] next [10:55:40.505] args[[name]] <- "" [10:55:40.505] } [10:55:40.505] NAMES <- toupper(removed) [10:55:40.505] for (kk in seq_along(NAMES)) { [10:55:40.505] name <- removed[[kk]] [10:55:40.505] NAME <- NAMES[[kk]] [10:55:40.505] if (name != NAME && is.element(NAME, old_names)) [10:55:40.505] next [10:55:40.505] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.505] } [10:55:40.505] if (length(args) > 0) [10:55:40.505] base::do.call(base::Sys.setenv, args = args) [10:55:40.505] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:55:40.505] } [10:55:40.505] else { [10:55:40.505] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:55:40.505] } [10:55:40.505] { [10:55:40.505] if (base::length(...future.futureOptionsAdded) > [10:55:40.505] 0L) { [10:55:40.505] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:55:40.505] base::names(opts) <- ...future.futureOptionsAdded [10:55:40.505] base::options(opts) [10:55:40.505] } [10:55:40.505] { [10:55:40.505] NULL [10:55:40.505] options(future.plan = NULL) [10:55:40.505] if (is.na(NA_character_)) [10:55:40.505] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.505] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:55:40.505] future::plan(...future.strategy.old, .cleanup = FALSE, [10:55:40.505] .init = FALSE) [10:55:40.505] } [10:55:40.505] } [10:55:40.505] } [10:55:40.505] }) [10:55:40.505] if (TRUE) { [10:55:40.505] base::sink(type = "output", split = FALSE) [10:55:40.505] if (TRUE) { [10:55:40.505] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:55:40.505] } [10:55:40.505] else { [10:55:40.505] ...future.result["stdout"] <- base::list(NULL) [10:55:40.505] } [10:55:40.505] base::close(...future.stdout) [10:55:40.505] ...future.stdout <- NULL [10:55:40.505] } [10:55:40.505] ...future.result$conditions <- ...future.conditions [10:55:40.505] ...future.result$finished <- base::Sys.time() [10:55:40.505] ...future.result [10:55:40.505] } [10:55:40.512] - Launch lazy future ... done [10:55:40.512] run() for 'MiraiFuture' ... done [10:55:40.512] - run() ... done [10:55:40.513] - resolved() ... [10:55:40.513] resolved() for 'MiraiFuture' ... [10:55:40.513] - state: 'running' [10:55:40.514] - run: TRUE [10:55:40.514] - result: 'NULL' [10:55:40.514] - resolved: FALSE [10:55:40.514] resolved() for 'MiraiFuture' ... done [10:55:40.515] - resolved: FALSE [10:55:40.515] - resolved() ... done [10:55:40.515] resolved() for 'MiraiFuture' ... done [10:55:40.516] resolved() for 'Future' ... [10:55:40.516] - state: 'created' [10:55:40.516] - run: TRUE [10:55:40.516] - run() ... [10:55:40.517] run() for 'Future' ... [10:55:40.517] - state: 'created' [10:55:40.517] - Future backend: 'FutureStrategy', 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:55:40.518] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:55:40.518] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:55:40.519] - Field: 'label' [10:55:40.519] - Field: 'local' [10:55:40.520] - Field: 'owner' [10:55:40.520] - Field: 'envir' [10:55:40.520] - Field: 'packages' [10:55:40.520] - Field: 'gc' [10:55:40.521] - Field: 'conditions' [10:55:40.521] - Field: 'expr' [10:55:40.521] - Field: 'uuid' [10:55:40.522] - Field: 'seed' [10:55:40.522] - Field: 'version' [10:55:40.522] - Field: 'result' [10:55:40.522] - Field: 'asynchronous' [10:55:40.523] - Field: 'calls' [10:55:40.523] - Field: 'globals' [10:55:40.523] - Field: 'stdout' [10:55:40.524] - Field: 'earlySignal' [10:55:40.524] - Field: 'lazy' [10:55:40.524] - Field: 'state' [10:55:40.525] - Field: '.cluster' [10:55:40.525] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:55:40.525] - Launch lazy future ... [10:55:40.525] Packages needed by the future expression (n = 1): 'future' [10:55:40.526] Packages needed by future strategies (n = 0): [10:55:40.527] { [10:55:40.527] { [10:55:40.527] { [10:55:40.527] ...future.startTime <- base::Sys.time() [10:55:40.527] { [10:55:40.527] { [10:55:40.527] { [10:55:40.527] { [10:55:40.527] base::local({ [10:55:40.527] has_future <- base::requireNamespace("future", [10:55:40.527] quietly = TRUE) [10:55:40.527] if (has_future) { [10:55:40.527] ns <- base::getNamespace("future") [10:55:40.527] version <- ns[[".package"]][["version"]] [10:55:40.527] if (is.null(version)) [10:55:40.527] version <- utils::packageVersion("future") [10:55:40.527] } [10:55:40.527] else { [10:55:40.527] version <- NULL [10:55:40.527] } [10:55:40.527] if (!has_future || version < "1.8.0") { [10:55:40.527] info <- base::c(r_version = base::gsub("R version ", [10:55:40.527] "", base::R.version$version.string), [10:55:40.527] platform = base::sprintf("%s (%s-bit)", [10:55:40.527] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:55:40.527] os = base::paste(base::Sys.info()[base::c("sysname", [10:55:40.527] "release", "version")], collapse = " "), [10:55:40.527] hostname = base::Sys.info()[["nodename"]]) [10:55:40.527] info <- base::sprintf("%s: %s", base::names(info), [10:55:40.527] info) [10:55:40.527] info <- base::paste(info, collapse = "; ") [10:55:40.527] if (!has_future) { [10:55:40.527] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:55:40.527] info) [10:55:40.527] } [10:55:40.527] else { [10:55:40.527] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:55:40.527] info, version) [10:55:40.527] } [10:55:40.527] base::stop(msg) [10:55:40.527] } [10:55:40.527] }) [10:55:40.527] } [10:55:40.527] base::local({ [10:55:40.527] for (pkg in "future") { [10:55:40.527] base::loadNamespace(pkg) [10:55:40.527] base::library(pkg, character.only = TRUE) [10:55:40.527] } [10:55:40.527] }) [10:55:40.527] } [10:55:40.527] ...future.strategy.old <- future::plan("list") [10:55:40.527] options(future.plan = NULL) [10:55:40.527] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.527] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:55:40.527] } [10:55:40.527] ...future.workdir <- getwd() [10:55:40.527] } [10:55:40.527] ...future.oldOptions <- base::as.list(base::.Options) [10:55:40.527] ...future.oldEnvVars <- base::Sys.getenv() [10:55:40.527] } [10:55:40.527] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:55:40.527] future.globals.maxSize = NULL, future.globals.method = NULL, [10:55:40.527] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:55:40.527] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:55:40.527] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:55:40.527] future.stdout.windows.reencode = NULL, width = 80L) [10:55:40.527] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:55:40.527] base::names(...future.oldOptions)) [10:55:40.527] } [10:55:40.527] if (FALSE) { [10:55:40.527] } [10:55:40.527] else { [10:55:40.527] if (TRUE) { [10:55:40.527] ...future.stdout <- base::rawConnection(base::raw(0L), [10:55:40.527] open = "w") [10:55:40.527] } [10:55:40.527] else { [10:55:40.527] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:55:40.527] windows = "NUL", "/dev/null"), open = "w") [10:55:40.527] } [10:55:40.527] base::sink(...future.stdout, type = "output", split = FALSE) [10:55:40.527] base::on.exit(if (!base::is.null(...future.stdout)) { [10:55:40.527] base::sink(type = "output", split = FALSE) [10:55:40.527] base::close(...future.stdout) [10:55:40.527] }, add = TRUE) [10:55:40.527] } [10:55:40.527] ...future.frame <- base::sys.nframe() [10:55:40.527] ...future.conditions <- base::list() [10:55:40.527] ...future.rng <- base::globalenv()$.Random.seed [10:55:40.527] if (FALSE) { [10:55:40.527] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:55:40.527] "...future.value", "...future.globalenv.names", ".Random.seed") [10:55:40.527] } [10:55:40.527] ...future.result <- base::tryCatch({ [10:55:40.527] base::withCallingHandlers({ [10:55:40.527] ...future.value <- base::withVisible(base::local({ [10:55:40.527] message(sprintf("Calculating tile #%d of %d ...", [10:55:40.527] ii, n), appendLF = FALSE) [10:55:40.527] fit <- mandelbrot(C) [10:55:40.527] delay(fit) [10:55:40.527] message(" done") [10:55:40.527] fit [10:55:40.527] })) [10:55:40.527] future::FutureResult(value = ...future.value$value, [10:55:40.527] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.527] ...future.rng), globalenv = if (FALSE) [10:55:40.527] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:55:40.527] ...future.globalenv.names)) [10:55:40.527] else NULL, started = ...future.startTime, version = "1.8") [10:55:40.527] }, condition = base::local({ [10:55:40.527] c <- base::c [10:55:40.527] inherits <- base::inherits [10:55:40.527] invokeRestart <- base::invokeRestart [10:55:40.527] length <- base::length [10:55:40.527] list <- base::list [10:55:40.527] seq.int <- base::seq.int [10:55:40.527] signalCondition <- base::signalCondition [10:55:40.527] sys.calls <- base::sys.calls [10:55:40.527] `[[` <- base::`[[` [10:55:40.527] `+` <- base::`+` [10:55:40.527] `<<-` <- base::`<<-` [10:55:40.527] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:55:40.527] calls[seq.int(from = from + 12L, to = length(calls) - [10:55:40.527] 3L)] [10:55:40.527] } [10:55:40.527] function(cond) { [10:55:40.527] is_error <- inherits(cond, "error") [10:55:40.527] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:55:40.527] NULL) [10:55:40.527] if (is_error) { [10:55:40.527] sessionInformation <- function() { [10:55:40.527] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:55:40.527] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:55:40.527] search = base::search(), system = base::Sys.info()) [10:55:40.527] } [10:55:40.527] ...future.conditions[[length(...future.conditions) + [10:55:40.527] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:55:40.527] cond$call), session = sessionInformation(), [10:55:40.527] timestamp = base::Sys.time(), signaled = 0L) [10:55:40.527] signalCondition(cond) [10:55:40.527] } [10:55:40.527] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:55:40.527] signal <- FALSE && inherits(cond, character(0)) [10:55:40.527] ...future.conditions[[length(...future.conditions) + [10:55:40.527] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:55:40.527] if (FALSE && !signal) { [10:55:40.527] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.527] { [10:55:40.527] inherits <- base::inherits [10:55:40.527] invokeRestart <- base::invokeRestart [10:55:40.527] is.null <- base::is.null [10:55:40.527] muffled <- FALSE [10:55:40.527] if (inherits(cond, "message")) { [10:55:40.527] muffled <- grepl(pattern, "muffleMessage") [10:55:40.527] if (muffled) [10:55:40.527] invokeRestart("muffleMessage") [10:55:40.527] } [10:55:40.527] else if (inherits(cond, "warning")) { [10:55:40.527] muffled <- grepl(pattern, "muffleWarning") [10:55:40.527] if (muffled) [10:55:40.527] invokeRestart("muffleWarning") [10:55:40.527] } [10:55:40.527] else if (inherits(cond, "condition")) { [10:55:40.527] if (!is.null(pattern)) { [10:55:40.527] computeRestarts <- base::computeRestarts [10:55:40.527] grepl <- base::grepl [10:55:40.527] restarts <- computeRestarts(cond) [10:55:40.527] for (restart in restarts) { [10:55:40.527] name <- restart$name [10:55:40.527] if (is.null(name)) [10:55:40.527] next [10:55:40.527] if (!grepl(pattern, name)) [10:55:40.527] next [10:55:40.527] invokeRestart(restart) [10:55:40.527] muffled <- TRUE [10:55:40.527] break [10:55:40.527] } [10:55:40.527] } [10:55:40.527] } [10:55:40.527] invisible(muffled) [10:55:40.527] } [10:55:40.527] muffleCondition(cond, pattern = "^muffle") [10:55:40.527] } [10:55:40.527] } [10:55:40.527] else { [10:55:40.527] if (TRUE) { [10:55:40.527] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.527] { [10:55:40.527] inherits <- base::inherits [10:55:40.527] invokeRestart <- base::invokeRestart [10:55:40.527] is.null <- base::is.null [10:55:40.527] muffled <- FALSE [10:55:40.527] if (inherits(cond, "message")) { [10:55:40.527] muffled <- grepl(pattern, "muffleMessage") [10:55:40.527] if (muffled) [10:55:40.527] invokeRestart("muffleMessage") [10:55:40.527] } [10:55:40.527] else if (inherits(cond, "warning")) { [10:55:40.527] muffled <- grepl(pattern, "muffleWarning") [10:55:40.527] if (muffled) [10:55:40.527] invokeRestart("muffleWarning") [10:55:40.527] } [10:55:40.527] else if (inherits(cond, "condition")) { [10:55:40.527] if (!is.null(pattern)) { [10:55:40.527] computeRestarts <- base::computeRestarts [10:55:40.527] grepl <- base::grepl [10:55:40.527] restarts <- computeRestarts(cond) [10:55:40.527] for (restart in restarts) { [10:55:40.527] name <- restart$name [10:55:40.527] if (is.null(name)) [10:55:40.527] next [10:55:40.527] if (!grepl(pattern, name)) [10:55:40.527] next [10:55:40.527] invokeRestart(restart) [10:55:40.527] muffled <- TRUE [10:55:40.527] break [10:55:40.527] } [10:55:40.527] } [10:55:40.527] } [10:55:40.527] invisible(muffled) [10:55:40.527] } [10:55:40.527] muffleCondition(cond, pattern = "^muffle") [10:55:40.527] } [10:55:40.527] } [10:55:40.527] } [10:55:40.527] })) [10:55:40.527] }, error = function(ex) { [10:55:40.527] base::structure(base::list(value = NULL, visible = NULL, [10:55:40.527] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.527] ...future.rng), started = ...future.startTime, [10:55:40.527] finished = Sys.time(), session_uuid = NA_character_, [10:55:40.527] version = "1.8"), class = "FutureResult") [10:55:40.527] }, finally = { [10:55:40.527] if (!identical(...future.workdir, getwd())) [10:55:40.527] setwd(...future.workdir) [10:55:40.527] { [10:55:40.527] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:55:40.527] ...future.oldOptions$nwarnings <- NULL [10:55:40.527] } [10:55:40.527] base::options(...future.oldOptions) [10:55:40.527] if (.Platform$OS.type == "windows") { [10:55:40.527] old_names <- names(...future.oldEnvVars) [10:55:40.527] envs <- base::Sys.getenv() [10:55:40.527] names <- names(envs) [10:55:40.527] common <- intersect(names, old_names) [10:55:40.527] added <- setdiff(names, old_names) [10:55:40.527] removed <- setdiff(old_names, names) [10:55:40.527] changed <- common[...future.oldEnvVars[common] != [10:55:40.527] envs[common]] [10:55:40.527] NAMES <- toupper(changed) [10:55:40.527] args <- list() [10:55:40.527] for (kk in seq_along(NAMES)) { [10:55:40.527] name <- changed[[kk]] [10:55:40.527] NAME <- NAMES[[kk]] [10:55:40.527] if (name != NAME && is.element(NAME, old_names)) [10:55:40.527] next [10:55:40.527] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.527] } [10:55:40.527] NAMES <- toupper(added) [10:55:40.527] for (kk in seq_along(NAMES)) { [10:55:40.527] name <- added[[kk]] [10:55:40.527] NAME <- NAMES[[kk]] [10:55:40.527] if (name != NAME && is.element(NAME, old_names)) [10:55:40.527] next [10:55:40.527] args[[name]] <- "" [10:55:40.527] } [10:55:40.527] NAMES <- toupper(removed) [10:55:40.527] for (kk in seq_along(NAMES)) { [10:55:40.527] name <- removed[[kk]] [10:55:40.527] NAME <- NAMES[[kk]] [10:55:40.527] if (name != NAME && is.element(NAME, old_names)) [10:55:40.527] next [10:55:40.527] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.527] } [10:55:40.527] if (length(args) > 0) [10:55:40.527] base::do.call(base::Sys.setenv, args = args) [10:55:40.527] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:55:40.527] } [10:55:40.527] else { [10:55:40.527] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:55:40.527] } [10:55:40.527] { [10:55:40.527] if (base::length(...future.futureOptionsAdded) > [10:55:40.527] 0L) { [10:55:40.527] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:55:40.527] base::names(opts) <- ...future.futureOptionsAdded [10:55:40.527] base::options(opts) [10:55:40.527] } [10:55:40.527] { [10:55:40.527] NULL [10:55:40.527] options(future.plan = NULL) [10:55:40.527] if (is.na(NA_character_)) [10:55:40.527] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.527] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:55:40.527] future::plan(...future.strategy.old, .cleanup = FALSE, [10:55:40.527] .init = FALSE) [10:55:40.527] } [10:55:40.527] } [10:55:40.527] } [10:55:40.527] }) [10:55:40.527] if (TRUE) { [10:55:40.527] base::sink(type = "output", split = FALSE) [10:55:40.527] if (TRUE) { [10:55:40.527] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:55:40.527] } [10:55:40.527] else { [10:55:40.527] ...future.result["stdout"] <- base::list(NULL) [10:55:40.527] } [10:55:40.527] base::close(...future.stdout) [10:55:40.527] ...future.stdout <- NULL [10:55:40.527] } [10:55:40.527] ...future.result$conditions <- ...future.conditions [10:55:40.527] ...future.result$finished <- base::Sys.time() [10:55:40.527] ...future.result [10:55:40.527] } [10:55:40.534] - Launch lazy future ... done [10:55:40.534] run() for 'MiraiFuture' ... done [10:55:40.535] - run() ... done [10:55:40.535] - resolved() ... [10:55:40.535] resolved() for 'MiraiFuture' ... [10:55:40.535] - state: 'running' [10:55:40.536] - run: TRUE [10:55:40.536] - result: 'NULL' [10:55:40.536] - resolved: FALSE [10:55:40.537] resolved() for 'MiraiFuture' ... done [10:55:40.537] - resolved: FALSE [10:55:40.537] - resolved() ... done [10:55:40.537] resolved() for 'MiraiFuture' ... done [10:55:40.538] resolved() for 'Future' ... [10:55:40.538] - state: 'created' [10:55:40.538] - run: TRUE [10:55:40.539] - run() ... [10:55:40.539] run() for 'Future' ... [10:55:40.539] - state: 'created' [10:55:40.540] - Future backend: 'FutureStrategy', 'tweaked', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:55:40.540] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:55:40.541] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:55:40.541] - Field: 'label' [10:55:40.541] - Field: 'local' [10:55:40.542] - Field: 'owner' [10:55:40.542] - Field: 'envir' [10:55:40.542] - Field: 'packages' [10:55:40.542] - Field: 'gc' [10:55:40.543] - Field: 'conditions' [10:55:40.543] - Field: 'expr' [10:55:40.543] - Field: 'uuid' [10:55:40.544] - Field: 'seed' [10:55:40.544] - Field: 'version' [10:55:40.544] - Field: 'result' [10:55:40.544] - Field: 'asynchronous' [10:55:40.545] - Field: 'calls' [10:55:40.545] - Field: 'globals' [10:55:40.545] - Field: 'stdout' [10:55:40.545] - Field: 'earlySignal' [10:55:40.546] - Field: 'lazy' [10:55:40.546] - Field: 'state' [10:55:40.546] - Field: '.cluster' [10:55:40.547] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:55:40.547] - Launch lazy future ... [10:55:40.547] Packages needed by the future expression (n = 1): 'future' [10:55:40.548] Packages needed by future strategies (n = 0): [10:55:40.549] { [10:55:40.549] { [10:55:40.549] { [10:55:40.549] ...future.startTime <- base::Sys.time() [10:55:40.549] { [10:55:40.549] { [10:55:40.549] { [10:55:40.549] { [10:55:40.549] base::local({ [10:55:40.549] has_future <- base::requireNamespace("future", [10:55:40.549] quietly = TRUE) [10:55:40.549] if (has_future) { [10:55:40.549] ns <- base::getNamespace("future") [10:55:40.549] version <- ns[[".package"]][["version"]] [10:55:40.549] if (is.null(version)) [10:55:40.549] version <- utils::packageVersion("future") [10:55:40.549] } [10:55:40.549] else { [10:55:40.549] version <- NULL [10:55:40.549] } [10:55:40.549] if (!has_future || version < "1.8.0") { [10:55:40.549] info <- base::c(r_version = base::gsub("R version ", [10:55:40.549] "", base::R.version$version.string), [10:55:40.549] platform = base::sprintf("%s (%s-bit)", [10:55:40.549] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:55:40.549] os = base::paste(base::Sys.info()[base::c("sysname", [10:55:40.549] "release", "version")], collapse = " "), [10:55:40.549] hostname = base::Sys.info()[["nodename"]]) [10:55:40.549] info <- base::sprintf("%s: %s", base::names(info), [10:55:40.549] info) [10:55:40.549] info <- base::paste(info, collapse = "; ") [10:55:40.549] if (!has_future) { [10:55:40.549] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:55:40.549] info) [10:55:40.549] } [10:55:40.549] else { [10:55:40.549] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:55:40.549] info, version) [10:55:40.549] } [10:55:40.549] base::stop(msg) [10:55:40.549] } [10:55:40.549] }) [10:55:40.549] } [10:55:40.549] base::local({ [10:55:40.549] for (pkg in "future") { [10:55:40.549] base::loadNamespace(pkg) [10:55:40.549] base::library(pkg, character.only = TRUE) [10:55:40.549] } [10:55:40.549] }) [10:55:40.549] } [10:55:40.549] ...future.strategy.old <- future::plan("list") [10:55:40.549] options(future.plan = NULL) [10:55:40.549] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.549] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:55:40.549] } [10:55:40.549] ...future.workdir <- getwd() [10:55:40.549] } [10:55:40.549] ...future.oldOptions <- base::as.list(base::.Options) [10:55:40.549] ...future.oldEnvVars <- base::Sys.getenv() [10:55:40.549] } [10:55:40.549] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:55:40.549] future.globals.maxSize = NULL, future.globals.method = NULL, [10:55:40.549] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:55:40.549] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:55:40.549] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:55:40.549] future.stdout.windows.reencode = NULL, width = 80L) [10:55:40.549] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:55:40.549] base::names(...future.oldOptions)) [10:55:40.549] } [10:55:40.549] if (FALSE) { [10:55:40.549] } [10:55:40.549] else { [10:55:40.549] if (TRUE) { [10:55:40.549] ...future.stdout <- base::rawConnection(base::raw(0L), [10:55:40.549] open = "w") [10:55:40.549] } [10:55:40.549] else { [10:55:40.549] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:55:40.549] windows = "NUL", "/dev/null"), open = "w") [10:55:40.549] } [10:55:40.549] base::sink(...future.stdout, type = "output", split = FALSE) [10:55:40.549] base::on.exit(if (!base::is.null(...future.stdout)) { [10:55:40.549] base::sink(type = "output", split = FALSE) [10:55:40.549] base::close(...future.stdout) [10:55:40.549] }, add = TRUE) [10:55:40.549] } [10:55:40.549] ...future.frame <- base::sys.nframe() [10:55:40.549] ...future.conditions <- base::list() [10:55:40.549] ...future.rng <- base::globalenv()$.Random.seed [10:55:40.549] if (FALSE) { [10:55:40.549] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:55:40.549] "...future.value", "...future.globalenv.names", ".Random.seed") [10:55:40.549] } [10:55:40.549] ...future.result <- base::tryCatch({ [10:55:40.549] base::withCallingHandlers({ [10:55:40.549] ...future.value <- base::withVisible(base::local({ [10:55:40.549] message(sprintf("Calculating tile #%d of %d ...", [10:55:40.549] ii, n), appendLF = FALSE) [10:55:40.549] fit <- mandelbrot(C) [10:55:40.549] delay(fit) [10:55:40.549] message(" done") [10:55:40.549] fit [10:55:40.549] })) [10:55:40.549] future::FutureResult(value = ...future.value$value, [10:55:40.549] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.549] ...future.rng), globalenv = if (FALSE) [10:55:40.549] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:55:40.549] ...future.globalenv.names)) [10:55:40.549] else NULL, started = ...future.startTime, version = "1.8") [10:55:40.549] }, condition = base::local({ [10:55:40.549] c <- base::c [10:55:40.549] inherits <- base::inherits [10:55:40.549] invokeRestart <- base::invokeRestart [10:55:40.549] length <- base::length [10:55:40.549] list <- base::list [10:55:40.549] seq.int <- base::seq.int [10:55:40.549] signalCondition <- base::signalCondition [10:55:40.549] sys.calls <- base::sys.calls [10:55:40.549] `[[` <- base::`[[` [10:55:40.549] `+` <- base::`+` [10:55:40.549] `<<-` <- base::`<<-` [10:55:40.549] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:55:40.549] calls[seq.int(from = from + 12L, to = length(calls) - [10:55:40.549] 3L)] [10:55:40.549] } [10:55:40.549] function(cond) { [10:55:40.549] is_error <- inherits(cond, "error") [10:55:40.549] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:55:40.549] NULL) [10:55:40.549] if (is_error) { [10:55:40.549] sessionInformation <- function() { [10:55:40.549] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:55:40.549] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:55:40.549] search = base::search(), system = base::Sys.info()) [10:55:40.549] } [10:55:40.549] ...future.conditions[[length(...future.conditions) + [10:55:40.549] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:55:40.549] cond$call), session = sessionInformation(), [10:55:40.549] timestamp = base::Sys.time(), signaled = 0L) [10:55:40.549] signalCondition(cond) [10:55:40.549] } [10:55:40.549] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:55:40.549] signal <- FALSE && inherits(cond, character(0)) [10:55:40.549] ...future.conditions[[length(...future.conditions) + [10:55:40.549] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:55:40.549] if (FALSE && !signal) { [10:55:40.549] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.549] { [10:55:40.549] inherits <- base::inherits [10:55:40.549] invokeRestart <- base::invokeRestart [10:55:40.549] is.null <- base::is.null [10:55:40.549] muffled <- FALSE [10:55:40.549] if (inherits(cond, "message")) { [10:55:40.549] muffled <- grepl(pattern, "muffleMessage") [10:55:40.549] if (muffled) [10:55:40.549] invokeRestart("muffleMessage") [10:55:40.549] } [10:55:40.549] else if (inherits(cond, "warning")) { [10:55:40.549] muffled <- grepl(pattern, "muffleWarning") [10:55:40.549] if (muffled) [10:55:40.549] invokeRestart("muffleWarning") [10:55:40.549] } [10:55:40.549] else if (inherits(cond, "condition")) { [10:55:40.549] if (!is.null(pattern)) { [10:55:40.549] computeRestarts <- base::computeRestarts [10:55:40.549] grepl <- base::grepl [10:55:40.549] restarts <- computeRestarts(cond) [10:55:40.549] for (restart in restarts) { [10:55:40.549] name <- restart$name [10:55:40.549] if (is.null(name)) [10:55:40.549] next [10:55:40.549] if (!grepl(pattern, name)) [10:55:40.549] next [10:55:40.549] invokeRestart(restart) [10:55:40.549] muffled <- TRUE [10:55:40.549] break [10:55:40.549] } [10:55:40.549] } [10:55:40.549] } [10:55:40.549] invisible(muffled) [10:55:40.549] } [10:55:40.549] muffleCondition(cond, pattern = "^muffle") [10:55:40.549] } [10:55:40.549] } [10:55:40.549] else { [10:55:40.549] if (TRUE) { [10:55:40.549] muffleCondition <- function (cond, pattern = "^muffle") [10:55:40.549] { [10:55:40.549] inherits <- base::inherits [10:55:40.549] invokeRestart <- base::invokeRestart [10:55:40.549] is.null <- base::is.null [10:55:40.549] muffled <- FALSE [10:55:40.549] if (inherits(cond, "message")) { [10:55:40.549] muffled <- grepl(pattern, "muffleMessage") [10:55:40.549] if (muffled) [10:55:40.549] invokeRestart("muffleMessage") [10:55:40.549] } [10:55:40.549] else if (inherits(cond, "warning")) { [10:55:40.549] muffled <- grepl(pattern, "muffleWarning") [10:55:40.549] if (muffled) [10:55:40.549] invokeRestart("muffleWarning") [10:55:40.549] } [10:55:40.549] else if (inherits(cond, "condition")) { [10:55:40.549] if (!is.null(pattern)) { [10:55:40.549] computeRestarts <- base::computeRestarts [10:55:40.549] grepl <- base::grepl [10:55:40.549] restarts <- computeRestarts(cond) [10:55:40.549] for (restart in restarts) { [10:55:40.549] name <- restart$name [10:55:40.549] if (is.null(name)) [10:55:40.549] next [10:55:40.549] if (!grepl(pattern, name)) [10:55:40.549] next [10:55:40.549] invokeRestart(restart) [10:55:40.549] muffled <- TRUE [10:55:40.549] break [10:55:40.549] } [10:55:40.549] } [10:55:40.549] } [10:55:40.549] invisible(muffled) [10:55:40.549] } [10:55:40.549] muffleCondition(cond, pattern = "^muffle") [10:55:40.549] } [10:55:40.549] } [10:55:40.549] } [10:55:40.549] })) [10:55:40.549] }, error = function(ex) { [10:55:40.549] base::structure(base::list(value = NULL, visible = NULL, [10:55:40.549] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:55:40.549] ...future.rng), started = ...future.startTime, [10:55:40.549] finished = Sys.time(), session_uuid = NA_character_, [10:55:40.549] version = "1.8"), class = "FutureResult") [10:55:40.549] }, finally = { [10:55:40.549] if (!identical(...future.workdir, getwd())) [10:55:40.549] setwd(...future.workdir) [10:55:40.549] { [10:55:40.549] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:55:40.549] ...future.oldOptions$nwarnings <- NULL [10:55:40.549] } [10:55:40.549] base::options(...future.oldOptions) [10:55:40.549] if (.Platform$OS.type == "windows") { [10:55:40.549] old_names <- names(...future.oldEnvVars) [10:55:40.549] envs <- base::Sys.getenv() [10:55:40.549] names <- names(envs) [10:55:40.549] common <- intersect(names, old_names) [10:55:40.549] added <- setdiff(names, old_names) [10:55:40.549] removed <- setdiff(old_names, names) [10:55:40.549] changed <- common[...future.oldEnvVars[common] != [10:55:40.549] envs[common]] [10:55:40.549] NAMES <- toupper(changed) [10:55:40.549] args <- list() [10:55:40.549] for (kk in seq_along(NAMES)) { [10:55:40.549] name <- changed[[kk]] [10:55:40.549] NAME <- NAMES[[kk]] [10:55:40.549] if (name != NAME && is.element(NAME, old_names)) [10:55:40.549] next [10:55:40.549] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.549] } [10:55:40.549] NAMES <- toupper(added) [10:55:40.549] for (kk in seq_along(NAMES)) { [10:55:40.549] name <- added[[kk]] [10:55:40.549] NAME <- NAMES[[kk]] [10:55:40.549] if (name != NAME && is.element(NAME, old_names)) [10:55:40.549] next [10:55:40.549] args[[name]] <- "" [10:55:40.549] } [10:55:40.549] NAMES <- toupper(removed) [10:55:40.549] for (kk in seq_along(NAMES)) { [10:55:40.549] name <- removed[[kk]] [10:55:40.549] NAME <- NAMES[[kk]] [10:55:40.549] if (name != NAME && is.element(NAME, old_names)) [10:55:40.549] next [10:55:40.549] args[[name]] <- ...future.oldEnvVars[[name]] [10:55:40.549] } [10:55:40.549] if (length(args) > 0) [10:55:40.549] base::do.call(base::Sys.setenv, args = args) [10:55:40.549] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:55:40.549] } [10:55:40.549] else { [10:55:40.549] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:55:40.549] } [10:55:40.549] { [10:55:40.549] if (base::length(...future.futureOptionsAdded) > [10:55:40.549] 0L) { [10:55:40.549] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:55:40.549] base::names(opts) <- ...future.futureOptionsAdded [10:55:40.549] base::options(opts) [10:55:40.549] } [10:55:40.549] { [10:55:40.549] NULL [10:55:40.549] options(future.plan = NULL) [10:55:40.549] if (is.na(NA_character_)) [10:55:40.549] Sys.unsetenv("R_FUTURE_PLAN") [10:55:40.549] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:55:40.549] future::plan(...future.strategy.old, .cleanup = FALSE, [10:55:40.549] .init = FALSE) [10:55:40.549] } [10:55:40.549] } [10:55:40.549] } [10:55:40.549] }) [10:55:40.549] if (TRUE) { [10:55:40.549] base::sink(type = "output", split = FALSE) [10:55:40.549] if (TRUE) { [10:55:40.549] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:55:40.549] } [10:55:40.549] else { [10:55:40.549] ...future.result["stdout"] <- base::list(NULL) [10:55:40.549] } [10:55:40.549] base::close(...future.stdout) [10:55:40.549] ...future.stdout <- NULL [10:55:40.549] } [10:55:40.549] ...future.result$conditions <- ...future.conditions [10:55:40.549] ...future.result$finished <- base::Sys.time() [10:55:40.549] ...future.result [10:55:40.549] } [10:55:40.556] - Launch lazy future ... done [10:55:40.556] run() for 'MiraiFuture' ... done [10:55:40.556] - run() ... done [10:55:40.557] - resolved() ... [10:55:40.557] resolved() for 'MiraiFuture' ... [10:55:40.557] - state: 'running' [10:55:40.558] - run: TRUE [10:55:40.558] - result: 'NULL' [10:55:40.558] - resolved: FALSE [10:55:40.559] resolved() for 'MiraiFuture' ... done [10:55:40.559] - resolved: FALSE [10:55:40.559] - resolved() ... done [10:55:40.559] resolved() for 'MiraiFuture' ... done [10:55:40.560] resolved() for 'MiraiFuture' ... [10:55:40.560] - state: 'running' [10:55:40.560] - run: TRUE [10:55:40.561] - result: 'NULL' [10:55:40.561] - resolved: FALSE [10:55:40.561] resolved() for 'MiraiFuture' ... done Plotting tile #1 of 4 ... [10:55:40.562] signalConditions() ... [10:55:40.562] - include = 'immediateCondition' [10:55:40.563] - exclude = [10:55:40.563] - resignal = FALSE [10:55:40.563] - Number of conditions: 2 [10:55:40.564] signalConditions() ... done [10:55:40.564] Future state: 'finished' [10:55:40.564] signalConditions() ... [10:55:40.564] - include = 'condition' [10:55:40.565] - exclude = 'immediateCondition' [10:55:40.565] - resignal = TRUE [10:55:40.565] - Number of conditions: 2 [10:55:40.566] - Condition #1: 'simpleMessage', 'message', 'condition' Calculating tile #1 of 4 ...[10:55:40.566] - Condition #2: 'simpleMessage', 'message', 'condition' done [10:55:40.566] signalConditions() ... done [10:55:40.569] resolved() for 'MiraiFuture' ... [10:55:40.570] - state: 'running' [10:55:40.570] - run: TRUE [10:55:40.570] - result: 'NULL' [10:55:40.570] - resolved: FALSE [10:55:40.571] resolved() for 'MiraiFuture' ... done Plotting tile #2 of 4 ... [10:55:40.572] signalConditions() ... [10:55:40.575] - include = 'immediateCondition' [10:55:40.575] - exclude = [10:55:40.575] - resignal = FALSE [10:55:40.576] - Number of conditions: 2 [10:55:40.576] signalConditions() ... done [10:55:40.576] Future state: 'finished' [10:55:40.577] signalConditions() ... [10:55:40.577] - include = 'condition' [10:55:40.577] - exclude = 'immediateCondition' [10:55:40.577] - resignal = TRUE [10:55:40.578] - Number of conditions: 2 [10:55:40.578] - Condition #1: 'simpleMessage', 'message', 'condition' Calculating tile #2 of 4 ...[10:55:40.578] - Condition #2: 'simpleMessage', 'message', 'condition' done [10:55:40.579] signalConditions() ... done [10:55:40.580] resolved() for 'MiraiFuture' ... [10:55:40.580] - state: 'running' [10:55:40.580] - run: TRUE [10:55:40.581] - result: 'NULL' [10:55:40.581] - resolved: FALSE [10:55:40.581] resolved() for 'MiraiFuture' ... done [10:55:40.582] resolved() for 'MiraiFuture' ... [10:55:40.582] - state: 'running' [10:55:40.582] - run: TRUE [10:55:40.583] - result: 'NULL' [10:55:40.583] - resolved: FALSE [10:55:40.583] resolved() for 'MiraiFuture' ... done [10:55:40.584] resolved() for 'MiraiFuture' ... [10:55:40.584] - state: 'running' [10:55:40.584] - run: TRUE [10:55:40.585] - result: 'NULL' [10:55:40.585] - resolved: FALSE [10:55:40.585] resolved() for 'MiraiFuture' ... done [10:55:40.585] resolved() for 'MiraiFuture' ... [10:55:40.586] - state: 'running' [10:55:40.586] - run: TRUE [10:55:40.586] - result: 'NULL' [10:55:40.587] - resolved: FALSE [10:55:40.587] resolved() for 'MiraiFuture' ... done [10:55:40.587] resolved() for 'MiraiFuture' ... [10:55:40.588] - state: 'running' [10:55:40.588] - run: TRUE [10:55:40.588] - result: 'NULL' [10:55:40.588] - resolved: FALSE [10:55:40.589] resolved() for 'MiraiFuture' ... done [10:55:40.589] resolved() for 'MiraiFuture' ... [10:55:40.589] - state: 'running' [10:55:40.590] - run: TRUE [10:55:40.590] - result: 'NULL' [10:55:40.590] - resolved: FALSE [10:55:40.590] resolved() for 'MiraiFuture' ... done [10:55:40.591] resolved() for 'MiraiFuture' ... [10:55:40.591] - state: 'running' [10:55:40.591] - run: TRUE [10:55:40.592] - result: 'NULL' [10:55:40.592] - resolved: FALSE [10:55:40.592] resolved() for 'MiraiFuture' ... done Plotting tile #3 of 4 ... [10:55:40.593] signalConditions() ... [10:55:40.593] - include = 'immediateCondition' [10:55:40.594] - exclude = [10:55:40.594] - resignal = FALSE [10:55:40.594] - Number of conditions: 2 [10:55:40.594] signalConditions() ... done [10:55:40.595] Future state: 'finished' [10:55:40.595] signalConditions() ... [10:55:40.595] - include = 'condition' [10:55:40.596] - exclude = 'immediateCondition' [10:55:40.596] - resignal = TRUE [10:55:40.596] - Number of conditions: 2 [10:55:40.596] - Condition #1: 'simpleMessage', 'message', 'condition' Calculating tile #3 of 4 ...[10:55:40.597] - Condition #2: 'simpleMessage', 'message', 'condition' done [10:55:40.597] signalConditions() ... done [10:55:40.598] resolved() for 'MiraiFuture' ... [10:55:40.598] - state: 'running' [10:55:40.599] - run: TRUE [10:55:40.599] - result: 'NULL' [10:55:40.599] - resolved: FALSE [10:55:40.600] resolved() for 'MiraiFuture' ... done [10:55:40.600] resolved() for 'MiraiFuture' ... [10:55:40.600] - state: 'running' [10:55:40.601] - run: TRUE [10:55:40.601] - result: 'NULL' [10:55:40.601] - resolved: FALSE [10:55:40.601] resolved() for 'MiraiFuture' ... done [10:55:40.602] resolved() for 'MiraiFuture' ... [10:55:40.602] - state: 'running' [10:55:40.602] - run: TRUE [10:55:40.603] - result: 'NULL' [10:55:40.603] - resolved: FALSE [10:55:40.603] resolved() for 'MiraiFuture' ... done Plotting tile #4 of 4 ... [10:55:40.604] signalConditions() ... [10:55:40.604] - include = 'immediateCondition' [10:55:40.605] - exclude = [10:55:40.605] - resignal = FALSE [10:55:40.605] - Number of conditions: 2 [10:55:40.605] signalConditions() ... done [10:55:40.606] Future state: 'finished' [10:55:40.606] signalConditions() ... [10:55:40.606] - include = 'condition' [10:55:40.607] - exclude = 'immediateCondition' [10:55:40.607] - resignal = TRUE [10:55:40.607] - Number of conditions: 2 [10:55:40.607] - Condition #1: 'simpleMessage', 'message', 'condition' Calculating tile #4 of 4 ...[10:55:40.608] - Condition #2: 'simpleMessage', 'message', 'condition' done [10:55:40.608] signalConditions() ... done > close.screen() [1] 1 2 3 4 > message("SUGGESTION: Try to rerun this demo after changing strategy for how futures are resolved, e.g. plan(multisession).\n") SUGGESTION: Try to rerun this demo after changing strategy for how futures are resolved, e.g. plan(multisession). > > message("*** Demos ... DONE") *** Demos ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.59 0.17 1.31