R Under development (unstable) (2023-12-19 r85710 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 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: foreach Loading required package: future R Under development (unstable) (2023-12-19 r85710 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows Server 2022 x64 (build 20348) Matrix products: default locale: [1] LC_COLLATE=C LC_CTYPE=German_Germany.utf8 [3] LC_MONETARY=C LC_NUMERIC=C [5] LC_TIME=C time zone: Europe/Berlin tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] doFuture_1.0.1 future_1.33.0 foreach_1.5.2 loaded via a namespace (and not attached): [1] compiler_4.4.0 parallelly_1.36.0 tools_4.4.0 [4] parallel_4.4.0 future.apply_1.11.0 listenv_0.9.0 [7] codetools_0.2-19 iterators_1.0.14 digest_0.6.33 [10] globals_0.16.2 > > strategies <- future:::supportedStrategies() > strategies <- setdiff(strategies, "multiprocess") > > message("*** doFuture - reproducibility ...") *** doFuture - reproducibility ... > > res0 <- NULL > > for (strategy in strategies) { + message(sprintf("- plan('%s') ...", strategy)) + plan(strategy) + + mu <- 1.0 + sigma <- 2.0 + res <- foreach(i = 1:3, .options.future = list(packages = "stats")) %dofuture% { + dnorm(i, mean = mu, sd = sigma) + } + print(res) + + if (is.null(res0)) { + res0 <- res + } else { + stopifnot(all.equal(res, res0)) + } + + # Shutdown current plan + plan(sequential) + + message(sprintf("- plan('%s') ... DONE", strategy)) + } ## for (strategy ...) - plan('sequential') ... [08:11:36.568] doFuture2() ... [08:11:36.572] Number of chunks: 1 [08:11:36.572] Number of futures (= number of chunks): 1 [08:11:36.573] seed = FALSE [08:11:36.573] NULL [08:11:36.577] seed = FALSE [08:11:36.578] seed = FALSE [08:11:36.578] - foreach iterator arguments: [1] 'i' [08:11:36.579] - dummy globals (as locals): [1] 'i' [08:11:36.579] - R expression: [08:11:36.579] { [08:11:36.579] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:36.579] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:36.579] { [08:11:36.579] NULL [08:11:36.579] i <- NULL [08:11:36.579] } [08:11:36.579] ...future.env <- environment() [08:11:36.579] local({ [08:11:36.579] for (name in names(...future.x_jj)) { [08:11:36.579] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:36.579] inherits = FALSE) [08:11:36.579] } [08:11:36.579] }) [08:11:36.579] tryCatch({ [08:11:36.579] dnorm(i, mean = mu, sd = sigma) [08:11:36.579] }, error = identity) [08:11:36.579] }) [08:11:36.579] } [08:11:36.580] function (i) [08:11:36.580] { [08:11:36.580] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:36.580] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:36.580] { [08:11:36.580] NULL [08:11:36.580] i <- NULL [08:11:36.580] } [08:11:36.580] ...future.env <- environment() [08:11:36.580] local({ [08:11:36.580] for (name in names(...future.x_jj)) { [08:11:36.580] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:36.580] inherits = FALSE) [08:11:36.580] } [08:11:36.580] }) [08:11:36.580] tryCatch({ [08:11:36.580] dnorm(i, mean = mu, sd = sigma) [08:11:36.580] }, error = identity) [08:11:36.580] }) [08:11:36.580] } [08:11:36.581] - identifying globals and packages ... [08:11:36.582] logi TRUE [08:11:36.582] - attr(*, "add")= chr "...future.x_ii" [08:11:36.582] - attr(*, "ignore")= chr "i" [08:11:36.612] List of 3 [08:11:36.612] $ ...future.x_ii: num 42 [08:11:36.612] $ mu : num 1 [08:11:36.612] $ sigma : num 2 [08:11:36.612] - attr(*, "where")=List of 3 [08:11:36.612] ..$ ...future.x_ii: [08:11:36.612] ..$ mu : [08:11:36.612] ..$ sigma : [08:11:36.612] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [08:11:36.612] - attr(*, "resolved")= logi FALSE [08:11:36.612] - attr(*, "total_size")= num 168 [08:11:36.620] - R expression: [08:11:36.620] { [08:11:36.620] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:36.620] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:36.620] { [08:11:36.620] NULL [08:11:36.620] i <- NULL [08:11:36.620] } [08:11:36.620] ...future.env <- environment() [08:11:36.620] local({ [08:11:36.620] for (name in names(...future.x_jj)) { [08:11:36.620] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:36.620] inherits = FALSE) [08:11:36.620] } [08:11:36.620] }) [08:11:36.620] tryCatch({ [08:11:36.620] dnorm(i, mean = mu, sd = sigma) [08:11:36.620] }, error = identity) [08:11:36.620] }) [08:11:36.620] } [08:11:36.621] - globals: [3] '...future.x_ii', 'mu', 'sigma' [08:11:36.621] List of 3 [08:11:36.621] $ ...future.x_ii: num 42 [08:11:36.621] $ mu : num 1 [08:11:36.621] $ sigma : num 2 [08:11:36.621] - attr(*, "where")=List of 3 [08:11:36.621] ..$ ...future.x_ii: [08:11:36.621] ..$ mu : [08:11:36.621] ..$ sigma : [08:11:36.621] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [08:11:36.621] - attr(*, "resolved")= logi FALSE [08:11:36.621] - attr(*, "total_size")= num 168 [08:11:36.629] - packages: [2] 'doFuture', 'stats' [08:11:36.629] - identifying globals and packages ... DONE [08:11:36.629] Launching 1 futures (chunks) ... [08:11:36.629] Chunk #1 of 1 ... [08:11:36.630] - Finding globals in 'args_list' chunk #1 ... [08:11:36.631] [08:11:36.632] [08:11:36.632] - Finding globals in 'args_list' for chunk #1 ... DONE [08:11:36.632] - seeds: [08:11:36.655] Chunk #1 of 1 ... DONE [08:11:36.655] Launching 1 futures (chunks) ... DONE [08:11:36.656] - resolving futures [08:11:36.656] - gathering results & relaying conditions (except errors) [08:11:36.658] - Number of value chunks collected: 1 [08:11:36.658] Resolving 1 futures (chunks) ... DONE [08:11:36.659] Reducing values from 1 chunks ... [08:11:36.659] Raw results: [08:11:36.659] List of 1 [08:11:36.659] $ :List of 3 [08:11:36.659] ..$ : num 0.199 [08:11:36.659] ..$ : num 0.176 [08:11:36.659] ..$ : num 0.121 [08:11:36.662] Combined results: [08:11:36.662] List of 3 [08:11:36.662] $ : num 0.199 [08:11:36.662] $ : num 0.176 [08:11:36.662] $ : num 0.121 [08:11:36.665] - accumulating results [08:11:36.667] - extracting results [08:11:36.667] doFuture2() ... DONE [[1]] [1] 0.1994711 [[2]] [1] 0.1760327 [[3]] [1] 0.1209854 - plan('sequential') ... DONE - plan('multisession') ... [08:11:37.698] doFuture2() ... [08:11:37.704] Number of chunks: 2 [08:11:37.704] Number of futures (= number of chunks): 2 [08:11:37.705] seed = FALSE [08:11:37.705] NULL [08:11:37.706] seed = FALSE [08:11:37.706] seed = FALSE [08:11:37.706] - foreach iterator arguments: [1] 'i' [08:11:37.707] - dummy globals (as locals): [1] 'i' [08:11:37.707] - R expression: [08:11:37.707] { [08:11:37.707] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:37.707] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:37.707] { [08:11:37.707] NULL [08:11:37.707] i <- NULL [08:11:37.707] } [08:11:37.707] ...future.env <- environment() [08:11:37.707] local({ [08:11:37.707] for (name in names(...future.x_jj)) { [08:11:37.707] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:37.707] inherits = FALSE) [08:11:37.707] } [08:11:37.707] }) [08:11:37.707] tryCatch({ [08:11:37.707] dnorm(i, mean = mu, sd = sigma) [08:11:37.707] }, error = identity) [08:11:37.707] }) [08:11:37.707] } [08:11:37.708] function (i) [08:11:37.708] { [08:11:37.708] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:37.708] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:37.708] { [08:11:37.708] NULL [08:11:37.708] i <- NULL [08:11:37.708] } [08:11:37.708] ...future.env <- environment() [08:11:37.708] local({ [08:11:37.708] for (name in names(...future.x_jj)) { [08:11:37.708] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:37.708] inherits = FALSE) [08:11:37.708] } [08:11:37.708] }) [08:11:37.708] tryCatch({ [08:11:37.708] dnorm(i, mean = mu, sd = sigma) [08:11:37.708] }, error = identity) [08:11:37.708] }) [08:11:37.708] } [08:11:37.709] - identifying globals and packages ... [08:11:37.709] logi TRUE [08:11:37.709] - attr(*, "add")= chr "...future.x_ii" [08:11:37.709] - attr(*, "ignore")= chr "i" [08:11:37.724] List of 3 [08:11:37.724] $ ...future.x_ii: num 42 [08:11:37.724] $ mu : num 1 [08:11:37.724] $ sigma : num 2 [08:11:37.724] - attr(*, "where")=List of 3 [08:11:37.724] ..$ ...future.x_ii: [08:11:37.724] ..$ mu : [08:11:37.724] ..$ sigma : [08:11:37.724] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [08:11:37.724] - attr(*, "resolved")= logi FALSE [08:11:37.724] - attr(*, "total_size")= num 168 [08:11:37.731] - R expression: [08:11:37.731] { [08:11:37.731] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:37.731] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:37.731] { [08:11:37.731] NULL [08:11:37.731] i <- NULL [08:11:37.731] } [08:11:37.731] ...future.env <- environment() [08:11:37.731] local({ [08:11:37.731] for (name in names(...future.x_jj)) { [08:11:37.731] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:37.731] inherits = FALSE) [08:11:37.731] } [08:11:37.731] }) [08:11:37.731] tryCatch({ [08:11:37.731] dnorm(i, mean = mu, sd = sigma) [08:11:37.731] }, error = identity) [08:11:37.731] }) [08:11:37.731] } [08:11:37.732] - globals: [3] '...future.x_ii', 'mu', 'sigma' [08:11:37.732] List of 3 [08:11:37.732] $ ...future.x_ii: num 42 [08:11:37.732] $ mu : num 1 [08:11:37.732] $ sigma : num 2 [08:11:37.732] - attr(*, "where")=List of 3 [08:11:37.732] ..$ ...future.x_ii: [08:11:37.732] ..$ mu : [08:11:37.732] ..$ sigma : [08:11:37.732] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [08:11:37.732] - attr(*, "resolved")= logi FALSE [08:11:37.732] - attr(*, "total_size")= num 168 [08:11:37.738] - packages: [2] 'doFuture', 'stats' [08:11:37.739] - identifying globals and packages ... DONE [08:11:37.739] Launching 2 futures (chunks) ... [08:11:37.739] Chunk #1 of 2 ... [08:11:37.740] - Finding globals in 'args_list' chunk #1 ... [08:11:37.740] [08:11:37.741] [08:11:37.741] - Finding globals in 'args_list' for chunk #1 ... DONE [08:11:37.741] - seeds: [08:11:37.766] Chunk #1 of 2 ... DONE [08:11:37.767] Chunk #2 of 2 ... [08:11:37.767] - Finding globals in 'args_list' chunk #2 ... [08:11:37.768] [08:11:37.768] [08:11:37.769] - Finding globals in 'args_list' for chunk #2 ... DONE [08:11:37.769] - seeds: [08:11:37.938] Chunk #2 of 2 ... DONE [08:11:37.939] Launching 2 futures (chunks) ... DONE [08:11:37.939] - resolving futures [08:11:37.939] - gathering results & relaying conditions (except errors) [08:11:38.123] - Number of value chunks collected: 2 [08:11:38.124] Resolving 2 futures (chunks) ... DONE [08:11:38.124] Reducing values from 2 chunks ... [08:11:38.124] Raw results: [08:11:38.125] List of 2 [08:11:38.125] $ :List of 1 [08:11:38.125] ..$ : num 0.199 [08:11:38.125] $ :List of 2 [08:11:38.125] ..$ : num 0.176 [08:11:38.125] ..$ : num 0.121 [08:11:38.128] Combined results: [08:11:38.128] List of 3 [08:11:38.128] $ : num 0.199 [08:11:38.128] $ : num 0.176 [08:11:38.128] $ : num 0.121 [08:11:38.131] - accumulating results [08:11:38.131] - extracting results [08:11:38.132] doFuture2() ... DONE [[1]] [1] 0.1994711 [[2]] [1] 0.1760327 [[3]] [1] 0.1209854 - plan('multisession') ... DONE - plan('cluster') ... [08:11:38.627] doFuture2() ... [08:11:38.631] Number of chunks: 2 [08:11:38.631] Number of futures (= number of chunks): 2 [08:11:38.632] seed = FALSE [08:11:38.632] NULL [08:11:38.632] seed = FALSE [08:11:38.633] seed = FALSE [08:11:38.633] - foreach iterator arguments: [1] 'i' [08:11:38.633] - dummy globals (as locals): [1] 'i' [08:11:38.633] - R expression: [08:11:38.633] { [08:11:38.633] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:38.633] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:38.633] { [08:11:38.633] NULL [08:11:38.633] i <- NULL [08:11:38.633] } [08:11:38.633] ...future.env <- environment() [08:11:38.633] local({ [08:11:38.633] for (name in names(...future.x_jj)) { [08:11:38.633] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:38.633] inherits = FALSE) [08:11:38.633] } [08:11:38.633] }) [08:11:38.633] tryCatch({ [08:11:38.633] dnorm(i, mean = mu, sd = sigma) [08:11:38.633] }, error = identity) [08:11:38.633] }) [08:11:38.633] } [08:11:38.634] function (i) [08:11:38.634] { [08:11:38.634] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:38.634] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:38.634] { [08:11:38.634] NULL [08:11:38.634] i <- NULL [08:11:38.634] } [08:11:38.634] ...future.env <- environment() [08:11:38.634] local({ [08:11:38.634] for (name in names(...future.x_jj)) { [08:11:38.634] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:38.634] inherits = FALSE) [08:11:38.634] } [08:11:38.634] }) [08:11:38.634] tryCatch({ [08:11:38.634] dnorm(i, mean = mu, sd = sigma) [08:11:38.634] }, error = identity) [08:11:38.634] }) [08:11:38.634] } [08:11:38.634] - identifying globals and packages ... [08:11:38.634] logi TRUE [08:11:38.634] - attr(*, "add")= chr "...future.x_ii" [08:11:38.634] - attr(*, "ignore")= chr "i" [08:11:38.649] List of 3 [08:11:38.649] $ ...future.x_ii: num 42 [08:11:38.649] $ mu : num 1 [08:11:38.649] $ sigma : num 2 [08:11:38.649] - attr(*, "where")=List of 3 [08:11:38.649] ..$ ...future.x_ii: [08:11:38.649] ..$ mu : [08:11:38.649] ..$ sigma : [08:11:38.649] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [08:11:38.649] - attr(*, "resolved")= logi FALSE [08:11:38.649] - attr(*, "total_size")= num 168 [08:11:38.656] - R expression: [08:11:38.656] { [08:11:38.656] lapply(seq_along(...future.x_ii), FUN = function(jj) { [08:11:38.656] ...future.x_jj <- ...future.x_ii[[jj]] [08:11:38.656] { [08:11:38.656] NULL [08:11:38.656] i <- NULL [08:11:38.656] } [08:11:38.656] ...future.env <- environment() [08:11:38.656] local({ [08:11:38.656] for (name in names(...future.x_jj)) { [08:11:38.656] assign(name, ...future.x_jj[[name]], envir = ...future.env, [08:11:38.656] inherits = FALSE) [08:11:38.656] } [08:11:38.656] }) [08:11:38.656] tryCatch({ [08:11:38.656] dnorm(i, mean = mu, sd = sigma) [08:11:38.656] }, error = identity) [08:11:38.656] }) [08:11:38.656] } [08:11:38.657] - globals: [3] '...future.x_ii', 'mu', 'sigma' [08:11:38.657] List of 3 [08:11:38.657] $ ...future.x_ii: num 42 [08:11:38.657] $ mu : num 1 [08:11:38.657] $ sigma : num 2 [08:11:38.657] - attr(*, "where")=List of 3 [08:11:38.657] ..$ ...future.x_ii: [08:11:38.657] ..$ mu : [08:11:38.657] ..$ sigma : [08:11:38.657] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [08:11:38.657] - attr(*, "resolved")= logi FALSE [08:11:38.657] - attr(*, "total_size")= num 168 [08:11:38.663] - packages: [2] 'doFuture', 'stats' [08:11:38.663] - identifying globals and packages ... DONE [08:11:38.664] Launching 2 futures (chunks) ... [08:11:38.664] Chunk #1 of 2 ... [08:11:38.664] - Finding globals in 'args_list' chunk #1 ... [08:11:38.665] [08:11:38.665] [08:11:38.666] - Finding globals in 'args_list' for chunk #1 ... DONE [08:11:38.666] - seeds: [08:11:38.690] Chunk #1 of 2 ... DONE [08:11:38.690] Chunk #2 of 2 ... [08:11:38.691] - Finding globals in 'args_list' chunk #2 ... [08:11:38.691] [08:11:38.692] [08:11:38.692] - Finding globals in 'args_list' for chunk #2 ... DONE [08:11:38.692] - seeds: [08:11:38.829] Chunk #2 of 2 ... DONE [08:11:38.829] Launching 2 futures (chunks) ... DONE [08:11:38.829] - resolving futures [08:11:38.830] - gathering results & relaying conditions (except errors) [08:11:38.996] - Number of value chunks collected: 2 [08:11:38.997] Resolving 2 futures (chunks) ... DONE [08:11:38.997] Reducing values from 2 chunks ... [08:11:38.997] Raw results: [08:11:38.997] List of 2 [08:11:38.997] $ :List of 1 [08:11:38.997] ..$ : num 0.199 [08:11:38.997] $ :List of 2 [08:11:38.997] ..$ : num 0.176 [08:11:38.997] ..$ : num 0.121 [08:11:39.001] Combined results: [08:11:39.001] List of 3 [08:11:39.001] $ : num 0.199 [08:11:39.001] $ : num 0.176 [08:11:39.001] $ : num 0.121 [08:11:39.003] - accumulating results [08:11:39.004] - extracting results [08:11:39.004] doFuture2() ... DONE [[1]] [1] 0.1994711 [[2]] [1] 0.1760327 [[3]] [1] 0.1209854 - plan('cluster') ... DONE > > message("*** doFuture - reproducibility ... DONE") *** doFuture - reproducibility ... DONE > > source("incl/end.R") R Under development (unstable) (2023-12-19 r85710 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows Server 2022 x64 (build 20348) Matrix products: default locale: [1] LC_COLLATE=C LC_CTYPE=German_Germany.utf8 [3] LC_MONETARY=C LC_NUMERIC=C [5] LC_TIME=C time zone: Europe/Berlin tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] doFuture_1.0.1 future_1.33.0 foreach_1.5.2 loaded via a namespace (and not attached): [1] compiler_4.4.0 parallelly_1.36.0 tools_4.4.0 [4] parallel_4.4.0 future.apply_1.11.0 listenv_0.9.0 [7] codetools_0.2-19 iterators_1.0.14 digest_0.6.33 [10] globals_0.16.2 > > proc.time() user system elapsed 0.92 0.23 3.07