R version 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [13:11:10.880] plan(): Setting new future strategy stack: [13:11:10.882] List of future strategies: [13:11:10.882] 1. mirai_multisession: [13:11:10.882] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:10.882] - tweaked: FALSE [13:11:10.882] - call: future::plan(future.mirai::mirai_multisession) [13:11:10.894] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:10.894] < mirai | $data > [13:11:10.899] getGlobalsAndPackages() ... [13:11:10.899] Not searching for globals [13:11:10.899] - globals: [0] [13:11:10.900] getGlobalsAndPackages() ... DONE [13:11:10.900] getGlobalsAndPackages() ... [13:11:10.900] [13:11:10.900] - globals: [0] [13:11:10.901] getGlobalsAndPackages() ... DONE [13:11:11.179] Packages needed by the future expression (n = 0): [13:11:11.179] Packages needed by future strategies (n = 0): [13:11:11.180] { [13:11:11.180] { [13:11:11.180] { [13:11:11.180] ...future.startTime <- base::Sys.time() [13:11:11.180] { [13:11:11.180] { [13:11:11.180] { [13:11:11.180] base::local({ [13:11:11.180] has_future <- base::requireNamespace("future", [13:11:11.180] quietly = TRUE) [13:11:11.180] if (has_future) { [13:11:11.180] ns <- base::getNamespace("future") [13:11:11.180] version <- ns[[".package"]][["version"]] [13:11:11.180] if (is.null(version)) [13:11:11.180] version <- utils::packageVersion("future") [13:11:11.180] } [13:11:11.180] else { [13:11:11.180] version <- NULL [13:11:11.180] } [13:11:11.180] if (!has_future || version < "1.8.0") { [13:11:11.180] info <- base::c(r_version = base::gsub("R version ", [13:11:11.180] "", base::R.version$version.string), [13:11:11.180] platform = base::sprintf("%s (%s-bit)", [13:11:11.180] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:11.180] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:11.180] "release", "version")], collapse = " "), [13:11:11.180] hostname = base::Sys.info()[["nodename"]]) [13:11:11.180] info <- base::sprintf("%s: %s", base::names(info), [13:11:11.180] info) [13:11:11.180] info <- base::paste(info, collapse = "; ") [13:11:11.180] if (!has_future) { [13:11:11.180] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:11.180] info) [13:11:11.180] } [13:11:11.180] else { [13:11:11.180] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:11.180] info, version) [13:11:11.180] } [13:11:11.180] base::stop(msg) [13:11:11.180] } [13:11:11.180] }) [13:11:11.180] } [13:11:11.180] ...future.strategy.old <- future::plan("list") [13:11:11.180] options(future.plan = NULL) [13:11:11.180] Sys.unsetenv("R_FUTURE_PLAN") [13:11:11.180] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:11.180] } [13:11:11.180] ...future.workdir <- getwd() [13:11:11.180] } [13:11:11.180] ...future.oldOptions <- base::as.list(base::.Options) [13:11:11.180] ...future.oldEnvVars <- base::Sys.getenv() [13:11:11.180] } [13:11:11.180] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:11.180] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:11.180] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:11.180] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:11.180] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:11.180] future.stdout.windows.reencode = NULL, width = 80L) [13:11:11.180] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:11.180] base::names(...future.oldOptions)) [13:11:11.180] } [13:11:11.180] if (FALSE) { [13:11:11.180] } [13:11:11.180] else { [13:11:11.180] if (TRUE) { [13:11:11.180] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:11.180] open = "w") [13:11:11.180] } [13:11:11.180] else { [13:11:11.180] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:11.180] windows = "NUL", "/dev/null"), open = "w") [13:11:11.180] } [13:11:11.180] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:11.180] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:11.180] base::sink(type = "output", split = FALSE) [13:11:11.180] base::close(...future.stdout) [13:11:11.180] }, add = TRUE) [13:11:11.180] } [13:11:11.180] ...future.frame <- base::sys.nframe() [13:11:11.180] ...future.conditions <- base::list() [13:11:11.180] ...future.rng <- base::globalenv()$.Random.seed [13:11:11.180] if (FALSE) { [13:11:11.180] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:11.180] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:11.180] } [13:11:11.180] ...future.result <- base::tryCatch({ [13:11:11.180] base::withCallingHandlers({ [13:11:11.180] ...future.value <- base::withVisible(base::local(NA)) [13:11:11.180] future::FutureResult(value = ...future.value$value, [13:11:11.180] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:11.180] ...future.rng), globalenv = if (FALSE) [13:11:11.180] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:11.180] ...future.globalenv.names)) [13:11:11.180] else NULL, started = ...future.startTime, version = "1.8") [13:11:11.180] }, condition = base::local({ [13:11:11.180] c <- base::c [13:11:11.180] inherits <- base::inherits [13:11:11.180] invokeRestart <- base::invokeRestart [13:11:11.180] length <- base::length [13:11:11.180] list <- base::list [13:11:11.180] seq.int <- base::seq.int [13:11:11.180] signalCondition <- base::signalCondition [13:11:11.180] sys.calls <- base::sys.calls [13:11:11.180] `[[` <- base::`[[` [13:11:11.180] `+` <- base::`+` [13:11:11.180] `<<-` <- base::`<<-` [13:11:11.180] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:11.180] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:11.180] 3L)] [13:11:11.180] } [13:11:11.180] function(cond) { [13:11:11.180] is_error <- inherits(cond, "error") [13:11:11.180] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:11.180] NULL) [13:11:11.180] if (is_error) { [13:11:11.180] sessionInformation <- function() { [13:11:11.180] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:11.180] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:11.180] search = base::search(), system = base::Sys.info()) [13:11:11.180] } [13:11:11.180] ...future.conditions[[length(...future.conditions) + [13:11:11.180] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:11.180] cond$call), session = sessionInformation(), [13:11:11.180] timestamp = base::Sys.time(), signaled = 0L) [13:11:11.180] signalCondition(cond) [13:11:11.180] } [13:11:11.180] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:11.180] signal <- FALSE && inherits(cond, character(0)) [13:11:11.180] ...future.conditions[[length(...future.conditions) + [13:11:11.180] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:11.180] if (FALSE && !signal) { [13:11:11.180] muffleCondition <- function (cond, pattern = "^muffle") [13:11:11.180] { [13:11:11.180] inherits <- base::inherits [13:11:11.180] invokeRestart <- base::invokeRestart [13:11:11.180] is.null <- base::is.null [13:11:11.180] muffled <- FALSE [13:11:11.180] if (inherits(cond, "message")) { [13:11:11.180] muffled <- grepl(pattern, "muffleMessage") [13:11:11.180] if (muffled) [13:11:11.180] invokeRestart("muffleMessage") [13:11:11.180] } [13:11:11.180] else if (inherits(cond, "warning")) { [13:11:11.180] muffled <- grepl(pattern, "muffleWarning") [13:11:11.180] if (muffled) [13:11:11.180] invokeRestart("muffleWarning") [13:11:11.180] } [13:11:11.180] else if (inherits(cond, "condition")) { [13:11:11.180] if (!is.null(pattern)) { [13:11:11.180] computeRestarts <- base::computeRestarts [13:11:11.180] grepl <- base::grepl [13:11:11.180] restarts <- computeRestarts(cond) [13:11:11.180] for (restart in restarts) { [13:11:11.180] name <- restart$name [13:11:11.180] if (is.null(name)) [13:11:11.180] next [13:11:11.180] if (!grepl(pattern, name)) [13:11:11.180] next [13:11:11.180] invokeRestart(restart) [13:11:11.180] muffled <- TRUE [13:11:11.180] break [13:11:11.180] } [13:11:11.180] } [13:11:11.180] } [13:11:11.180] invisible(muffled) [13:11:11.180] } [13:11:11.180] muffleCondition(cond, pattern = "^muffle") [13:11:11.180] } [13:11:11.180] } [13:11:11.180] else { [13:11:11.180] if (TRUE) { [13:11:11.180] muffleCondition <- function (cond, pattern = "^muffle") [13:11:11.180] { [13:11:11.180] inherits <- base::inherits [13:11:11.180] invokeRestart <- base::invokeRestart [13:11:11.180] is.null <- base::is.null [13:11:11.180] muffled <- FALSE [13:11:11.180] if (inherits(cond, "message")) { [13:11:11.180] muffled <- grepl(pattern, "muffleMessage") [13:11:11.180] if (muffled) [13:11:11.180] invokeRestart("muffleMessage") [13:11:11.180] } [13:11:11.180] else if (inherits(cond, "warning")) { [13:11:11.180] muffled <- grepl(pattern, "muffleWarning") [13:11:11.180] if (muffled) [13:11:11.180] invokeRestart("muffleWarning") [13:11:11.180] } [13:11:11.180] else if (inherits(cond, "condition")) { [13:11:11.180] if (!is.null(pattern)) { [13:11:11.180] computeRestarts <- base::computeRestarts [13:11:11.180] grepl <- base::grepl [13:11:11.180] restarts <- computeRestarts(cond) [13:11:11.180] for (restart in restarts) { [13:11:11.180] name <- restart$name [13:11:11.180] if (is.null(name)) [13:11:11.180] next [13:11:11.180] if (!grepl(pattern, name)) [13:11:11.180] next [13:11:11.180] invokeRestart(restart) [13:11:11.180] muffled <- TRUE [13:11:11.180] break [13:11:11.180] } [13:11:11.180] } [13:11:11.180] } [13:11:11.180] invisible(muffled) [13:11:11.180] } [13:11:11.180] muffleCondition(cond, pattern = "^muffle") [13:11:11.180] } [13:11:11.180] } [13:11:11.180] } [13:11:11.180] })) [13:11:11.180] }, error = function(ex) { [13:11:11.180] base::structure(base::list(value = NULL, visible = NULL, [13:11:11.180] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:11.180] ...future.rng), started = ...future.startTime, [13:11:11.180] finished = Sys.time(), session_uuid = NA_character_, [13:11:11.180] version = "1.8"), class = "FutureResult") [13:11:11.180] }, finally = { [13:11:11.180] if (!identical(...future.workdir, getwd())) [13:11:11.180] setwd(...future.workdir) [13:11:11.180] { [13:11:11.180] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:11.180] ...future.oldOptions$nwarnings <- NULL [13:11:11.180] } [13:11:11.180] base::options(...future.oldOptions) [13:11:11.180] if (.Platform$OS.type == "windows") { [13:11:11.180] old_names <- names(...future.oldEnvVars) [13:11:11.180] envs <- base::Sys.getenv() [13:11:11.180] names <- names(envs) [13:11:11.180] common <- intersect(names, old_names) [13:11:11.180] added <- setdiff(names, old_names) [13:11:11.180] removed <- setdiff(old_names, names) [13:11:11.180] changed <- common[...future.oldEnvVars[common] != [13:11:11.180] envs[common]] [13:11:11.180] NAMES <- toupper(changed) [13:11:11.180] args <- list() [13:11:11.180] for (kk in seq_along(NAMES)) { [13:11:11.180] name <- changed[[kk]] [13:11:11.180] NAME <- NAMES[[kk]] [13:11:11.180] if (name != NAME && is.element(NAME, old_names)) [13:11:11.180] next [13:11:11.180] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:11.180] } [13:11:11.180] NAMES <- toupper(added) [13:11:11.180] for (kk in seq_along(NAMES)) { [13:11:11.180] name <- added[[kk]] [13:11:11.180] NAME <- NAMES[[kk]] [13:11:11.180] if (name != NAME && is.element(NAME, old_names)) [13:11:11.180] next [13:11:11.180] args[[name]] <- "" [13:11:11.180] } [13:11:11.180] NAMES <- toupper(removed) [13:11:11.180] for (kk in seq_along(NAMES)) { [13:11:11.180] name <- removed[[kk]] [13:11:11.180] NAME <- NAMES[[kk]] [13:11:11.180] if (name != NAME && is.element(NAME, old_names)) [13:11:11.180] next [13:11:11.180] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:11.180] } [13:11:11.180] if (length(args) > 0) [13:11:11.180] base::do.call(base::Sys.setenv, args = args) [13:11:11.180] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:11.180] } [13:11:11.180] else { [13:11:11.180] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:11.180] } [13:11:11.180] { [13:11:11.180] if (base::length(...future.futureOptionsAdded) > [13:11:11.180] 0L) { [13:11:11.180] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:11.180] base::names(opts) <- ...future.futureOptionsAdded [13:11:11.180] base::options(opts) [13:11:11.180] } [13:11:11.180] { [13:11:11.180] NULL [13:11:11.180] options(future.plan = NULL) [13:11:11.180] if (is.na(NA_character_)) [13:11:11.180] Sys.unsetenv("R_FUTURE_PLAN") [13:11:11.180] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:11.180] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:11.180] .init = FALSE) [13:11:11.180] } [13:11:11.180] } [13:11:11.180] } [13:11:11.180] }) [13:11:11.180] if (TRUE) { [13:11:11.180] base::sink(type = "output", split = FALSE) [13:11:11.180] if (TRUE) { [13:11:11.180] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:11.180] } [13:11:11.180] else { [13:11:11.180] ...future.result["stdout"] <- base::list(NULL) [13:11:11.180] } [13:11:11.180] base::close(...future.stdout) [13:11:11.180] ...future.stdout <- NULL [13:11:11.180] } [13:11:11.180] ...future.result$conditions <- ...future.conditions [13:11:11.180] ...future.result$finished <- base::Sys.time() [13:11:11.180] ...future.result [13:11:11.180] } [13:11:11.283] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:11.284] plan(): nbrOfWorkers() = 2 > > message("*** nbrOfWorkers() ...") *** nbrOfWorkers() ... > > ncores <- availableCores() > n <- nbrOfWorkers(mirai_multisession) > message("Number of workers: ", n) Number of workers: 2 > stopifnot(n == ncores) > > message("*** nbrOfWorkers() ... DONE") *** nbrOfWorkers() ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.23 0.10 0.68