R version 4.4.0 alpha (2024-03-26 r86209 ucrt) 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 [15:32:53.752] plan(): Setting new future strategy stack: [15:32:53.754] List of future strategies: [15:32:53.754] 1. sequential: [15:32:53.754] - args: function (..., envir = parent.frame(), workers = "") [15:32:53.754] - tweaked: FALSE [15:32:53.754] - call: future::plan("sequential") [15:32:53.779] 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 69456 1234000 2 inner 3 69456 1234000 3 inner 4 69456 1234000 4 outer 2 69456 1234000 5 inner 3 69456 1234000 6 inner 4 69456 1234000 - plan('multisession') ... label idx pid maxSize 1 outer 1 69456 1234000 2 inner 3 69456 1234000 3 inner 4 69456 1234000 4 outer 2 69456 1234000 5 inner 3 69456 1234000 6 inner 4 69456 1234000 - plan('sequential') ... label idx pid maxSize 1 outer 1 69456 1234000 2 inner 3 69456 1234000 3 inner 4 69456 1234000 4 outer 2 69456 1234000 5 inner 3 69456 1234000 6 inner 4 69456 1234000 - plan('multisession') ... label idx pid maxSize 1 outer 1 69456 1234000 2 inner 3 69456 1234000 3 inner 4 69456 1234000 4 outer 2 69456 1234000 5 inner 3 69456 1234000 6 inner 4 69456 1234000 Testing with 2 cores ... - plan('multisession') ... label idx pid maxSize 1 outer 1 93320 1234000 2 inner 3 93320 1234000 3 inner 4 93320 1234000 4 outer 2 164124 1234000 5 inner 3 164124 1234000 6 inner 4 164124 1234000 > > message("*** Options in nested parallelization ... done") *** Options in nested parallelization ... done > > source("incl/end.R") > > proc.time() user system elapsed 0.98 0.14 2.43