R Under development (unstable) (2024-10-26 r87273 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 [18:42:06.751] plan(): Setting new future strategy stack: [18:42:06.753] List of future strategies: [18:42:06.753] 1. sequential: [18:42:06.753] - args: function (..., envir = parent.frame(), workers = "") [18:42:06.753] - tweaked: FALSE [18:42:06.753] - call: future::plan("sequential") [18:42:06.765] plan(): nbrOfWorkers() = 1 > > message("*** Options in nested parallelization ...") *** Options in nested parallelization ... > > options(future.debug = FALSE) > options(future.apply.debug = FALSE) > options(future.globals.maxSize = 1234000) > > for (cores in 1:availCores) { + message(sprintf("Testing with %d cores ...", cores)) + options(mc.cores = cores) + strategies <- supportedStrategies(cores) + + for (strategy1 in strategies) { + for (strategy2 in strategies) { + message(sprintf("- plan('%s') ...", strategy2)) + plan(list(outer = tweak(strategy1), inner = strategy2)) + + v <- future_lapply(1:2, FUN = function(x) { + outer <- data.frame( + label = "outer", + idx = x, + pid = Sys.getpid(), + maxSize = getOption("future.globals.maxSize", NA_real_) + ) + + inner <- future_lapply(3:4, FUN = function(x) { + data.frame( + label = "inner", + idx = x, + pid = Sys.getpid(), + maxSize = getOption("future.globals.maxSize", NA_real_)) + }) + inner <- do.call(rbind, inner) + rbind(outer, inner) + }) + v <- do.call(rbind, v) + print(v) + stopifnot(!anyNA(v$maxSize)) + } ## for (strategy2 ...) + } ## for (strategy1 ...) + } ## for (cores in ...) Testing with 1 cores ... - plan('sequential') ... label idx pid maxSize 1 outer 1 181720 1234000 2 inner 3 181720 1234000 3 inner 4 181720 1234000 4 outer 2 181720 1234000 5 inner 3 181720 1234000 6 inner 4 181720 1234000 - plan('multisession') ... label idx pid maxSize 1 outer 1 181720 1234000 2 inner 3 181720 1234000 3 inner 4 181720 1234000 4 outer 2 181720 1234000 5 inner 3 181720 1234000 6 inner 4 181720 1234000 - plan('sequential') ... label idx pid maxSize 1 outer 1 181720 1234000 2 inner 3 181720 1234000 3 inner 4 181720 1234000 4 outer 2 181720 1234000 5 inner 3 181720 1234000 6 inner 4 181720 1234000 - plan('multisession') ... label idx pid maxSize 1 outer 1 181720 1234000 2 inner 3 181720 1234000 3 inner 4 181720 1234000 4 outer 2 181720 1234000 5 inner 3 181720 1234000 6 inner 4 181720 1234000 Testing with 2 cores ... - plan('multisession') ... label idx pid maxSize 1 outer 1 78664 1234000 2 inner 3 78664 1234000 3 inner 4 78664 1234000 4 outer 2 65200 1234000 5 inner 3 65200 1234000 6 inner 4 65200 1234000 > > message("*** Options in nested parallelization ... done") *** Options in nested parallelization ... done > > source("incl/end.R") > > proc.time() user system elapsed 0.60 0.18 1.78