R Under development (unstable) (2023-12-20 r85711 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-20 r85711 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.1 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') ... [13:11:18.790] doFuture2() ... [13:11:18.792] Number of chunks: 1 [13:11:18.792] Number of futures (= number of chunks): 1 [13:11:18.793] seed = FALSE [13:11:18.793] NULL [13:11:18.796] seed = FALSE [13:11:18.796] seed = FALSE [13:11:18.796] - foreach iterator arguments: [1] 'i' [13:11:18.796] - dummy globals (as locals): [1] 'i' [13:11:18.797] - R expression: [13:11:18.797] { [13:11:18.797] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:18.797] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:18.797] { [13:11:18.797] NULL [13:11:18.797] i <- NULL [13:11:18.797] } [13:11:18.797] ...future.env <- environment() [13:11:18.797] local({ [13:11:18.797] for (name in names(...future.x_jj)) { [13:11:18.797] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:18.797] inherits = FALSE) [13:11:18.797] } [13:11:18.797] }) [13:11:18.797] tryCatch({ [13:11:18.797] dnorm(i, mean = mu, sd = sigma) [13:11:18.797] }, error = identity) [13:11:18.797] }) [13:11:18.797] } [13:11:18.798] function (i) [13:11:18.798] { [13:11:18.798] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:18.798] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:18.798] { [13:11:18.798] NULL [13:11:18.798] i <- NULL [13:11:18.798] } [13:11:18.798] ...future.env <- environment() [13:11:18.798] local({ [13:11:18.798] for (name in names(...future.x_jj)) { [13:11:18.798] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:18.798] inherits = FALSE) [13:11:18.798] } [13:11:18.798] }) [13:11:18.798] tryCatch({ [13:11:18.798] dnorm(i, mean = mu, sd = sigma) [13:11:18.798] }, error = identity) [13:11:18.798] }) [13:11:18.798] } [13:11:18.798] - identifying globals and packages ... [13:11:18.798] logi TRUE [13:11:18.798] - attr(*, "add")= chr "...future.x_ii" [13:11:18.798] - attr(*, "ignore")= chr "i" [13:11:18.816] List of 3 [13:11:18.816] $ ...future.x_ii: num 42 [13:11:18.816] $ mu : num 1 [13:11:18.816] $ sigma : num 2 [13:11:18.816] - attr(*, "where")=List of 3 [13:11:18.816] ..$ ...future.x_ii: [13:11:18.816] ..$ mu : [13:11:18.816] ..$ sigma : [13:11:18.816] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [13:11:18.816] - attr(*, "resolved")= logi FALSE [13:11:18.816] - attr(*, "total_size")= num 168 [13:11:18.821] - R expression: [13:11:18.821] { [13:11:18.821] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:18.821] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:18.821] { [13:11:18.821] NULL [13:11:18.821] i <- NULL [13:11:18.821] } [13:11:18.821] ...future.env <- environment() [13:11:18.821] local({ [13:11:18.821] for (name in names(...future.x_jj)) { [13:11:18.821] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:18.821] inherits = FALSE) [13:11:18.821] } [13:11:18.821] }) [13:11:18.821] tryCatch({ [13:11:18.821] dnorm(i, mean = mu, sd = sigma) [13:11:18.821] }, error = identity) [13:11:18.821] }) [13:11:18.821] } [13:11:18.821] - globals: [3] '...future.x_ii', 'mu', 'sigma' [13:11:18.822] List of 3 [13:11:18.822] $ ...future.x_ii: num 42 [13:11:18.822] $ mu : num 1 [13:11:18.822] $ sigma : num 2 [13:11:18.822] - attr(*, "where")=List of 3 [13:11:18.822] ..$ ...future.x_ii: [13:11:18.822] ..$ mu : [13:11:18.822] ..$ sigma : [13:11:18.822] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [13:11:18.822] - attr(*, "resolved")= logi FALSE [13:11:18.822] - attr(*, "total_size")= num 168 [13:11:18.826] - packages: [2] 'doFuture', 'stats' [13:11:18.826] - identifying globals and packages ... DONE [13:11:18.826] Launching 1 futures (chunks) ... [13:11:18.827] Chunk #1 of 1 ... [13:11:18.827] - Finding globals in 'args_list' chunk #1 ... [13:11:18.828] [13:11:18.828] [13:11:18.828] - Finding globals in 'args_list' for chunk #1 ... DONE [13:11:18.828] - seeds: [13:11:18.842] Chunk #1 of 1 ... DONE [13:11:18.842] Launching 1 futures (chunks) ... DONE [13:11:18.842] - resolving futures [13:11:18.843] - gathering results & relaying conditions (except errors) [13:11:18.844] - Number of value chunks collected: 1 [13:11:18.844] Resolving 1 futures (chunks) ... DONE [13:11:18.844] Reducing values from 1 chunks ... [13:11:18.844] Raw results: [13:11:18.845] List of 1 [13:11:18.845] $ :List of 3 [13:11:18.845] ..$ : num 0.199 [13:11:18.845] ..$ : num 0.176 [13:11:18.845] ..$ : num 0.121 [13:11:18.846] Combined results: [13:11:18.847] List of 3 [13:11:18.847] $ : num 0.199 [13:11:18.847] $ : num 0.176 [13:11:18.847] $ : num 0.121 [13:11:18.848] - accumulating results [13:11:18.849] - extracting results [13:11:18.850] doFuture2() ... DONE [[1]] [1] 0.1994711 [[2]] [1] 0.1760327 [[3]] [1] 0.1209854 - plan('sequential') ... DONE - plan('multisession') ... [13:11:19.677] doFuture2() ... [13:11:19.682] Number of chunks: 2 [13:11:19.682] Number of futures (= number of chunks): 2 [13:11:19.682] seed = FALSE [13:11:19.682] NULL [13:11:19.683] seed = FALSE [13:11:19.683] seed = FALSE [13:11:19.683] - foreach iterator arguments: [1] 'i' [13:11:19.683] - dummy globals (as locals): [1] 'i' [13:11:19.684] - R expression: [13:11:19.684] { [13:11:19.684] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:19.684] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:19.684] { [13:11:19.684] NULL [13:11:19.684] i <- NULL [13:11:19.684] } [13:11:19.684] ...future.env <- environment() [13:11:19.684] local({ [13:11:19.684] for (name in names(...future.x_jj)) { [13:11:19.684] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:19.684] inherits = FALSE) [13:11:19.684] } [13:11:19.684] }) [13:11:19.684] tryCatch({ [13:11:19.684] dnorm(i, mean = mu, sd = sigma) [13:11:19.684] }, error = identity) [13:11:19.684] }) [13:11:19.684] } [13:11:19.684] function (i) [13:11:19.684] { [13:11:19.684] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:19.684] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:19.684] { [13:11:19.684] NULL [13:11:19.684] i <- NULL [13:11:19.684] } [13:11:19.684] ...future.env <- environment() [13:11:19.684] local({ [13:11:19.684] for (name in names(...future.x_jj)) { [13:11:19.684] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:19.684] inherits = FALSE) [13:11:19.684] } [13:11:19.684] }) [13:11:19.684] tryCatch({ [13:11:19.684] dnorm(i, mean = mu, sd = sigma) [13:11:19.684] }, error = identity) [13:11:19.684] }) [13:11:19.684] } [13:11:19.685] - identifying globals and packages ... [13:11:19.685] logi TRUE [13:11:19.685] - attr(*, "add")= chr "...future.x_ii" [13:11:19.685] - attr(*, "ignore")= chr "i" [13:11:19.694] List of 3 [13:11:19.694] $ ...future.x_ii: num 42 [13:11:19.694] $ mu : num 1 [13:11:19.694] $ sigma : num 2 [13:11:19.694] - attr(*, "where")=List of 3 [13:11:19.694] ..$ ...future.x_ii: [13:11:19.694] ..$ mu : [13:11:19.694] ..$ sigma : [13:11:19.694] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [13:11:19.694] - attr(*, "resolved")= logi FALSE [13:11:19.694] - attr(*, "total_size")= num 168 [13:11:19.698] - R expression: [13:11:19.698] { [13:11:19.698] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:19.698] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:19.698] { [13:11:19.698] NULL [13:11:19.698] i <- NULL [13:11:19.698] } [13:11:19.698] ...future.env <- environment() [13:11:19.698] local({ [13:11:19.698] for (name in names(...future.x_jj)) { [13:11:19.698] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:19.698] inherits = FALSE) [13:11:19.698] } [13:11:19.698] }) [13:11:19.698] tryCatch({ [13:11:19.698] dnorm(i, mean = mu, sd = sigma) [13:11:19.698] }, error = identity) [13:11:19.698] }) [13:11:19.698] } [13:11:19.699] - globals: [3] '...future.x_ii', 'mu', 'sigma' [13:11:19.699] List of 3 [13:11:19.699] $ ...future.x_ii: num 42 [13:11:19.699] $ mu : num 1 [13:11:19.699] $ sigma : num 2 [13:11:19.699] - attr(*, "where")=List of 3 [13:11:19.699] ..$ ...future.x_ii: [13:11:19.699] ..$ mu : [13:11:19.699] ..$ sigma : [13:11:19.699] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [13:11:19.699] - attr(*, "resolved")= logi FALSE [13:11:19.699] - attr(*, "total_size")= num 168 [13:11:19.703] - packages: [2] 'doFuture', 'stats' [13:11:19.704] - identifying globals and packages ... DONE [13:11:19.704] Launching 2 futures (chunks) ... [13:11:19.704] Chunk #1 of 2 ... [13:11:19.704] - Finding globals in 'args_list' chunk #1 ... [13:11:19.705] [13:11:19.705] [13:11:19.705] - Finding globals in 'args_list' for chunk #1 ... DONE [13:11:19.705] - seeds: [13:11:19.723] Chunk #1 of 2 ... DONE [13:11:19.723] Chunk #2 of 2 ... [13:11:19.723] - Finding globals in 'args_list' chunk #2 ... [13:11:19.724] [13:11:19.724] [13:11:19.724] - Finding globals in 'args_list' for chunk #2 ... DONE [13:11:19.724] - seeds: [13:11:19.819] Chunk #2 of 2 ... DONE [13:11:19.819] Launching 2 futures (chunks) ... DONE [13:11:19.820] - resolving futures [13:11:19.820] - gathering results & relaying conditions (except errors) [13:11:19.925] - Number of value chunks collected: 2 [13:11:19.925] Resolving 2 futures (chunks) ... DONE [13:11:19.925] Reducing values from 2 chunks ... [13:11:19.925] Raw results: [13:11:19.925] List of 2 [13:11:19.925] $ :List of 1 [13:11:19.925] ..$ : num 0.199 [13:11:19.925] $ :List of 2 [13:11:19.925] ..$ : num 0.176 [13:11:19.925] ..$ : num 0.121 [13:11:19.928] Combined results: [13:11:19.928] List of 3 [13:11:19.928] $ : num 0.199 [13:11:19.928] $ : num 0.176 [13:11:19.928] $ : num 0.121 [13:11:19.930] - accumulating results [13:11:19.930] - extracting results [13:11:19.930] doFuture2() ... DONE [[1]] [1] 0.1994711 [[2]] [1] 0.1760327 [[3]] [1] 0.1209854 - plan('multisession') ... DONE - plan('cluster') ... [13:11:20.267] doFuture2() ... [13:11:20.271] Number of chunks: 2 [13:11:20.271] Number of futures (= number of chunks): 2 [13:11:20.271] seed = FALSE [13:11:20.271] NULL [13:11:20.272] seed = FALSE [13:11:20.272] seed = FALSE [13:11:20.272] - foreach iterator arguments: [1] 'i' [13:11:20.272] - dummy globals (as locals): [1] 'i' [13:11:20.272] - R expression: [13:11:20.273] { [13:11:20.273] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:20.273] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:20.273] { [13:11:20.273] NULL [13:11:20.273] i <- NULL [13:11:20.273] } [13:11:20.273] ...future.env <- environment() [13:11:20.273] local({ [13:11:20.273] for (name in names(...future.x_jj)) { [13:11:20.273] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:20.273] inherits = FALSE) [13:11:20.273] } [13:11:20.273] }) [13:11:20.273] tryCatch({ [13:11:20.273] dnorm(i, mean = mu, sd = sigma) [13:11:20.273] }, error = identity) [13:11:20.273] }) [13:11:20.273] } [13:11:20.273] function (i) [13:11:20.273] { [13:11:20.273] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:20.273] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:20.273] { [13:11:20.273] NULL [13:11:20.273] i <- NULL [13:11:20.273] } [13:11:20.273] ...future.env <- environment() [13:11:20.273] local({ [13:11:20.273] for (name in names(...future.x_jj)) { [13:11:20.273] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:20.273] inherits = FALSE) [13:11:20.273] } [13:11:20.273] }) [13:11:20.273] tryCatch({ [13:11:20.273] dnorm(i, mean = mu, sd = sigma) [13:11:20.273] }, error = identity) [13:11:20.273] }) [13:11:20.273] } [13:11:20.273] - identifying globals and packages ... [13:11:20.274] logi TRUE [13:11:20.274] - attr(*, "add")= chr "...future.x_ii" [13:11:20.274] - attr(*, "ignore")= chr "i" [13:11:20.282] List of 3 [13:11:20.282] $ ...future.x_ii: num 42 [13:11:20.282] $ mu : num 1 [13:11:20.282] $ sigma : num 2 [13:11:20.282] - attr(*, "where")=List of 3 [13:11:20.282] ..$ ...future.x_ii: [13:11:20.282] ..$ mu : [13:11:20.282] ..$ sigma : [13:11:20.282] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [13:11:20.282] - attr(*, "resolved")= logi FALSE [13:11:20.282] - attr(*, "total_size")= num 168 [13:11:20.286] - R expression: [13:11:20.286] { [13:11:20.286] lapply(seq_along(...future.x_ii), FUN = function(jj) { [13:11:20.286] ...future.x_jj <- ...future.x_ii[[jj]] [13:11:20.286] { [13:11:20.286] NULL [13:11:20.286] i <- NULL [13:11:20.286] } [13:11:20.286] ...future.env <- environment() [13:11:20.286] local({ [13:11:20.286] for (name in names(...future.x_jj)) { [13:11:20.286] assign(name, ...future.x_jj[[name]], envir = ...future.env, [13:11:20.286] inherits = FALSE) [13:11:20.286] } [13:11:20.286] }) [13:11:20.286] tryCatch({ [13:11:20.286] dnorm(i, mean = mu, sd = sigma) [13:11:20.286] }, error = identity) [13:11:20.286] }) [13:11:20.286] } [13:11:20.287] - globals: [3] '...future.x_ii', 'mu', 'sigma' [13:11:20.287] List of 3 [13:11:20.287] $ ...future.x_ii: num 42 [13:11:20.287] $ mu : num 1 [13:11:20.287] $ sigma : num 2 [13:11:20.287] - attr(*, "where")=List of 3 [13:11:20.287] ..$ ...future.x_ii: [13:11:20.287] ..$ mu : [13:11:20.287] ..$ sigma : [13:11:20.287] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [13:11:20.287] - attr(*, "resolved")= logi FALSE [13:11:20.287] - attr(*, "total_size")= num 168 [13:11:20.291] - packages: [2] 'doFuture', 'stats' [13:11:20.291] - identifying globals and packages ... DONE [13:11:20.291] Launching 2 futures (chunks) ... [13:11:20.291] Chunk #1 of 2 ... [13:11:20.291] - Finding globals in 'args_list' chunk #1 ... [13:11:20.292] [13:11:20.292] [13:11:20.292] - Finding globals in 'args_list' for chunk #1 ... DONE [13:11:20.292] - seeds: [13:11:20.310] Chunk #1 of 2 ... DONE [13:11:20.310] Chunk #2 of 2 ... [13:11:20.310] - Finding globals in 'args_list' chunk #2 ... [13:11:20.311] [13:11:20.311] [13:11:20.311] - Finding globals in 'args_list' for chunk #2 ... DONE [13:11:20.311] - seeds: [13:11:20.402] Chunk #2 of 2 ... DONE [13:11:20.402] Launching 2 futures (chunks) ... DONE [13:11:20.402] - resolving futures [13:11:20.403] - gathering results & relaying conditions (except errors) [13:11:20.502] - Number of value chunks collected: 2 [13:11:20.502] Resolving 2 futures (chunks) ... DONE [13:11:20.502] Reducing values from 2 chunks ... [13:11:20.503] Raw results: [13:11:20.503] List of 2 [13:11:20.503] $ :List of 1 [13:11:20.503] ..$ : num 0.199 [13:11:20.503] $ :List of 2 [13:11:20.503] ..$ : num 0.176 [13:11:20.503] ..$ : num 0.121 [13:11:20.505] Combined results: [13:11:20.505] List of 3 [13:11:20.505] $ : num 0.199 [13:11:20.505] $ : num 0.176 [13:11:20.505] $ : num 0.121 [13:11:20.507] - accumulating results [13:11:20.507] - extracting results [13:11:20.507] 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-20 r85711 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.1 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.57 0.12 2.11