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