Last updated on 2025-05-03 22:49:51 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0.2 | 3.49 | 135.19 | 138.68 | OK | |
r-devel-linux-x86_64-debian-gcc | 1.0.2 | 2.30 | 107.30 | 109.60 | OK | |
r-devel-linux-x86_64-fedora-clang | 1.0.2 | 233.43 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 1.0.2 | 213.66 | OK | |||
r-devel-windows-x86_64 | 1.0.2 | 5.00 | 338.00 | 343.00 | ERROR | |
r-patched-linux-x86_64 | 1.0.2 | 3.24 | 130.57 | 133.81 | OK | |
r-release-linux-x86_64 | OK | |||||
r-release-macos-arm64 | 1.0.2 | 116.00 | OK | |||
r-release-macos-x86_64 | 1.0.2 | 176.00 | OK | |||
r-release-windows-x86_64 | 1.0.2 | 5.00 | 306.00 | 311.00 | ERROR | |
r-oldrel-macos-arm64 | 1.0.2 | 110.00 | OK | |||
r-oldrel-macos-x86_64 | 1.0.2 | 281.00 | OK | |||
r-oldrel-windows-x86_64 | 1.0.2 | 5.00 | 353.00 | 358.00 | ERROR |
Version: 1.0.2
Check: tests
Result: ERROR
Running 'foreach_dofuture,cluster-missing-doFuture-pkg.R' [63s]
Running 'foreach_dofuture,errors.R' [13s]
Running 'foreach_dofuture,globals.R' [9s]
Running 'foreach_dofuture,nested_colon.R' [15s]
Running 'foreach_dofuture,nested_dofuture.R' [18s]
Running 'foreach_dofuture,rng.R' [5s]
Running 'foreach_dofuture.R' [4s]
Running 'foreach_dopar,cluster-missing-doFuture-pkg.R' [63s]
Running 'foreach_dopar,doRNG,dopar.R' [2s]
Running 'foreach_dopar,doRNG,dorng.R' [6s]
Running 'foreach_dopar,errors.R' [8s]
Running 'foreach_dopar,globals.R' [8s]
Running 'foreach_dopar,nested_colon.R' [15s]
Running 'foreach_dopar,nested_dopar.R' [19s]
Running 'foreach_dopar,options-for-export.R' [6s]
Running 'foreach_dopar.R' [4s]
Running 'makeChunks.R' [4s]
Running 'options,nested.R' [3s]
Running 'registerDoFuture.R' [2s]
Running 'times.R' [2s]
Running 'utils.R' [1s]
Running 'withDoRNG.R' [4s]
Running the tests in 'tests/foreach_dofuture,cluster-missing-doFuture-pkg.R' failed.
Complete output:
> source("incl/start.R")
Loading required package: foreach
Loading required package: future
R Under development (unstable) (2025-04-29 r88182 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)
Matrix products: default
LAPACK version 3.12.1
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.2 future_1.40.0 foreach_1.5.2
loaded via a namespace (and not attached):
[1] compiler_4.6.0 parallelly_1.43.0 tools_4.6.0
[4] parallel_4.6.0 future.apply_1.11.3 listenv_0.9.1
[7] codetools_0.2-20 iterators_1.0.14 digest_0.6.37
[10] globals_0.17.0
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_05_01_01_50_00_26125/RtmpmcILe3/RLIBS_137481804e3a', 'D:/RCompile/recent/R/library'
> message("Package path: ", sQuote(system.file(package = "future")))
Package path: 'D:/RCompile/CRANpkg/lib/4.6/future'
>
> types <- "PSOCK"
> #if (supportsMulticore()) types <- c(types, "FORK")
>
> setupClusterWithoutPkgs <- function(type = "PSOCK",
+ withs = c("digest", "globals",
+ "listenv", "future"),
+ withouts = c("doFuture")) {
+ cl <- parallel::makeCluster(1L, type = type, timeout = 60)
+
+ ## Emulate a worker that does not have 'future' installed.
+ ## by setting a different user library path on the worker.
+ libs <- parallel::clusterEvalQ(cl, .libPaths(tempdir()))[[1]]
+ attr(cl, "libs") <- libs
+
+ ## 'withouts' tops 'withs' for conveniency
+ withs <- setdiff(withs, withouts)
+
+ ## "Install" any 'withs' packages?
+ if (length(withs) > 0L) {
+ paths <- find.package(withs)
+ res <- parallel::clusterCall(cl, fun = sapply, X = paths,
+ FUN = file.copy, to = libs[1],
+ recursive = TRUE)[[1]]
+ res <- parallel::clusterCall(cl, fun = sapply, X = withs,
+ FUN = requireNamespace)[[1]]
+ }
+ attr(cl, "withs") <- res
+
+ ## Check whether 'future' is still available on the worker or not.
+ ## It could be that it is installed in the system library path, which
+ ## in case we cannot "hide" the future package from the worker.
+ res <- parallel::clusterCall(cl, fun = sapply, X = withouts,
+ FUN = requireNamespace)[[1]]
+ attr(cl, "withouts") <- res
+
+ cl
+ }
>
> cl <- NULL
> for (type in types) {
+ message(sprintf("Test set #1 with cluster type %s ...", sQuote(type)))
+
+ cl <- setupClusterWithoutPkgs(type, withouts = c("future", "doFuture"))
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## Package 'future' is not installed on worker (r_version: ...)>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dofuture% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ cl <- setupClusterWithoutPkgs(type)
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## there is no package called 'doFuture'>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dofuture% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ plan(sequential)
+
+ message(sprintf("Test set #1 with cluster type %s ... DONE", sQuote(type)))
+ } ## for (type ...)
Test set #1 with cluster type 'PSOCK' ...
[18:05:56.562] doFuture2() ...
[18:05:56.633] Number of chunks: 1
[18:05:56.634] Number of futures (= number of chunks): 1
[18:05:56.634] seed = FALSE
[18:05:56.635] NULL
[18:05:56.638] seed = FALSE
[18:05:56.638] seed = FALSE
[18:05:56.638] - %dofuture% R expression:
[18:05:56.638] ii
[18:05:56.639] - foreach iterator arguments: [1] 'ii'
[18:05:56.639] - dummy globals (as locals): [1] 'ii'
[18:05:56.640] - R expression (map-reduce expression adjusted for RNG):
[18:05:56.640] {
[18:05:56.640] NULL
[18:05:56.640] "# doFuture():::doFuture2(): process chunk of elements"
[18:05:56.640] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[18:05:56.640] ...future.x_jj <- ...future.x_ii[[jj]]
[18:05:56.640] {
[18:05:56.640] NULL
[18:05:56.640] ii <- NULL
[18:05:56.640] }
[18:05:56.640] ...future.env <- environment()
[18:05:56.640] local({
[18:05:56.640] for (name in names(...future.x_jj)) {
[18:05:56.640] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[18:05:56.640] inherits = FALSE)
[18:05:56.640] }
[18:05:56.640] })
[18:05:56.640] NULL
[18:05:56.640] tryCatch(ii, error = identity)
[18:05:56.640] })
[18:05:56.640] }
[18:05:56.641] - identifying globals and packages ...
[18:05:56.641] - Argument 'globals':
[18:05:56.641] logi TRUE
[18:05:56.641] - attr(*, "add")= chr "...future.x_ii"
[18:05:56.641] - attr(*, "ignore")= chr "ii"
[18:05:56.644] - R expression (map-reduce expression searched for globals):
[18:05:56.644] {
[18:05:56.644] NULL
[18:05:56.644] "# doFuture():::doFuture2(): process chunk of elements"
[18:05:56.644] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[18:05:56.644] ...future.x_jj <- ...future.x_ii[[jj]]
[18:05:56.644] {
[18:05:56.644] NULL
[18:05:56.644] ii <- NULL
[18:05:56.644] }
[18:05:56.644] ...future.env <- environment()
[18:05:56.644] local({
[18:05:56.644] for (name in names(...future.x_jj)) {
[18:05:56.644] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[18:05:56.644] inherits = FALSE)
[18:05:56.644] }
[18:05:56.644] })
[18:05:56.644] NULL
[18:05:56.644] tryCatch(ii, error = identity)
[18:05:56.644] })
[18:05:56.644] }
[18:05:56.659] - R expression (%dofuture% expression searched for globals):
[18:05:56.659] ii
[18:05:56.661] - Globals in %dofuture% R expression not in map-reduce expression:
[18:05:56.661] - Appending 0 globals only found in the vanilla %dofuture% expression:
[18:05:56.661] - globals: [1] '...future.x_ii'
[18:05:56.662] List of 1
[18:05:56.662] $ ...future.x_ii: num 42
[18:05:56.662] - attr(*, "where")=List of 1
[18:05:56.662] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[18:05:56.662] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[18:05:56.662] - attr(*, "resolved")= logi FALSE
[18:05:56.662] - attr(*, "total_size")= num 39
[18:05:56.666] - packages: [1] 'doFuture'
[18:05:56.666] - identifying globals and packages ... DONE
[18:05:56.666] Launching 1 futures (chunks) ...
[18:05:56.667] Chunk #1 of 1 ...
[18:05:56.667] - Finding globals in 'args_list' for chunk #1 ...
[18:05:56.668]
[18:05:56.668]
[18:05:56.669] - Finding globals in 'args_list' for chunk #1 ... DONE
[18:05:56.669] - seeds: <none>
[18:05:56.676] Chunk #1 of 1 ... DONE
[18:05:56.677] Launching 1 futures (chunks) ... DONE
[18:05:56.677] - resolving futures
[18:05:56.677] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: 300f45db029c5ac6d7f75d73903ce7fd-2
DEBUG: BEGIN TROUBLESHOOTING HELP
Future involved:
ClusterFuture:
Label: 'doFuture2-1'
Expression:
{
NULL
"# doFuture():::doFuture2(): process chunk of elements"
lapply(seq_along(...future.x_ii), FUN = function(jj) {
...future.x_jj <- ...future.x_ii[[jj]]
{
NULL
ii <- NULL
}
...future.env <- environment()
local({
for (name in names(...future.x_jj)) {
assign(name, ...future.x_jj[[name]], envir = ...future.env,
inherits = FALSE)
}
})
NULL
tryCatch(ii, error = identity)
})
}
Lazy evaluation: FALSE
Asynchronous evaluation: TRUE
Local evaluation: TRUE
Environment: R_GlobalEnv
Capture standard output: TRUE
Capture condition classes: 'condition' (excluding '<none>')
Immediate condition classes: 'immediateCondition'
Globals: 1 objects totaling 194 bytes (list '...future.x_ii' of 194 bytes)
Packages: 1 packages ('doFuture')
L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
Resolved: TRUE
Value: <not collected>
Conditions captured: <none>
Early signaling: FALSE
Owner process: 300f45db029c5ac6d7f75d73903ce7fd
Class: 'ClusterFuture', 'MultiprocessFuture', 'Future'
DEBUG: END TROUBLESHOOTING HELP
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
Execution halted
Running the tests in 'tests/foreach_dopar,cluster-missing-doFuture-pkg.R' failed.
Complete output:
> source("incl/start.R")
Loading required package: foreach
Loading required package: future
R Under development (unstable) (2025-04-29 r88182 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)
Matrix products: default
LAPACK version 3.12.1
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.2 future_1.40.0 foreach_1.5.2
loaded via a namespace (and not attached):
[1] compiler_4.6.0 parallelly_1.43.0 tools_4.6.0
[4] parallel_4.6.0 future.apply_1.11.3 listenv_0.9.1
[7] codetools_0.2-20 iterators_1.0.14 digest_0.6.37
[10] globals_0.17.0
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> registerDoFuture()
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_05_01_01_50_00_26125/RtmpmcILe3/RLIBS_137481804e3a', 'D:/RCompile/recent/R/library'
> message("Package path: ", sQuote(system.file(package = "future")))
Package path: 'D:/RCompile/CRANpkg/lib/4.6/future'
>
> types <- "PSOCK"
> #if (supportsMulticore()) types <- c(types, "FORK")
>
> setupClusterWithoutPkgs <- function(type = "PSOCK",
+ withs = c("digest", "globals",
+ "listenv", "future"),
+ withouts = c("doFuture")) {
+ cl <- parallel::makeCluster(1L, type = type, timeout = 60)
+
+ ## Emulate a worker that does not have 'future' installed.
+ ## by setting a different user library path on the worker.
+ libs <- parallel::clusterEvalQ(cl, .libPaths(tempdir()))[[1]]
+ attr(cl, "libs") <- libs
+
+ ## 'withouts' tops 'withs' for conveniency
+ withs <- setdiff(withs, withouts)
+
+ ## "Install" any 'withs' packages?
+ if (length(withs) > 0L) {
+ paths <- find.package(withs)
+ res <- parallel::clusterCall(cl, fun = sapply, X = paths,
+ FUN = file.copy, to = libs[1],
+ recursive = TRUE)[[1]]
+ res <- parallel::clusterCall(cl, fun = sapply, X = withs,
+ FUN = requireNamespace)[[1]]
+ }
+ attr(cl, "withs") <- res
+
+ ## Check whether 'future' is still available on the worker or not.
+ ## It could be that it is installed in the system library path, which
+ ## in case we cannot "hide" the future package from the worker.
+ res <- parallel::clusterCall(cl, fun = sapply, X = withouts,
+ FUN = requireNamespace)[[1]]
+ attr(cl, "withouts") <- res
+
+ cl
+ }
>
>
> cl <- NULL
> for (type in types) {
+ message(sprintf("Test set #1 with cluster type %s ...", sQuote(type)))
+
+ cl <- setupClusterWithoutPkgs(type, withouts = c("future", "doFuture"))
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## Package 'future' is not installed on worker (r_version: ...)>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dopar% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ cl <- setupClusterWithoutPkgs(type)
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## there is no package called 'doFuture'>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dopar% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ plan(sequential)
+
+ message(sprintf("Test set #1 with cluster type %s ... DONE", sQuote(type)))
+ } ## for (type ...)
Test set #1 with cluster type 'PSOCK' ...
[18:08:03.162] doFuture() ...
[18:08:03.165] - dummy globals (as locals): [1] 'ii'
[18:08:03.165] - R expression:
[18:08:03.166] {
[18:08:03.166] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[18:08:03.166] "# also in nested calls "
[18:08:03.166] doFuture::registerDoFuture()
[18:08:03.166] "# doFuture():::doFuture(): process chunk of elements"
[18:08:03.166] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[18:08:03.166] ...future.x_jj <- ...future.x_ii[[jj]]
[18:08:03.166] {
[18:08:03.166] NULL
[18:08:03.166] ii <- NULL
[18:08:03.166] }
[18:08:03.166] ...future.env <- environment()
[18:08:03.166] local({
[18:08:03.166] for (name in names(...future.x_jj)) {
[18:08:03.166] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[18:08:03.166] inherits = FALSE)
[18:08:03.166] }
[18:08:03.166] })
[18:08:03.166] tryCatch(ii, error = identity)
[18:08:03.166] })
[18:08:03.166] }
[18:08:03.167] - identifying globals and packages ...
[18:08:03.184] List of 1
[18:08:03.184] $ ...future.x_ii: NULL
[18:08:03.184] - attr(*, "where")=List of 1
[18:08:03.184] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[18:08:03.184] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[18:08:03.184] - attr(*, "resolved")= logi FALSE
[18:08:03.184] - attr(*, "total_size")= num 27
[18:08:03.191] - R expression:
[18:08:03.191] {
[18:08:03.191] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[18:08:03.191] "# also in nested calls "
[18:08:03.191] doFuture::registerDoFuture()
[18:08:03.191] "# doFuture():::doFuture(): process chunk of elements"
[18:08:03.191] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[18:08:03.191] ...future.x_jj <- ...future.x_ii[[jj]]
[18:08:03.191] {
[18:08:03.191] NULL
[18:08:03.191] ii <- NULL
[18:08:03.191] }
[18:08:03.191] ...future.env <- environment()
[18:08:03.191] local({
[18:08:03.191] for (name in names(...future.x_jj)) {
[18:08:03.191] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[18:08:03.191] inherits = FALSE)
[18:08:03.191] }
[18:08:03.191] })
[18:08:03.191] tryCatch(ii, error = identity)
[18:08:03.191] })
[18:08:03.191] }
[18:08:03.192] - globals: [1] '...future.x_ii'
[18:08:03.192] List of 1
[18:08:03.192] $ ...future.x_ii: NULL
[18:08:03.192] - attr(*, "where")=List of 1
[18:08:03.192] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[18:08:03.192] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[18:08:03.192] - attr(*, "resolved")= logi FALSE
[18:08:03.192] - attr(*, "total_size")= num 27
[18:08:03.196] - packages: [1] 'doFuture'
[18:08:03.196] - identifying globals and packages ... DONE
[18:08:03.243] Number of chunks: 1
[18:08:03.244] Number of futures (= number of chunks): 1
[18:08:03.244] Launching 1 futures (chunks) ...
[18:08:03.244] Chunk #1 of 1 ...
[18:08:03.245] - Finding globals in 'args_list' chunk #1 ...
[18:08:03.246]
[18:08:03.246]
[18:08:03.246] - Finding globals in 'args_list' for chunk #1 ... DONE
[18:08:03.253] Chunk #1 of 1 ... DONE
[18:08:03.253] Launching 1 futures (chunks) ... DONE
[18:08:03.253] - resolving futures
[18:08:03.254] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: ce02d01743ed708543f8775f99055d1c-2
DEBUG: BEGIN TROUBLESHOOTING HELP
Future involved:
ClusterFuture:
Label: 'doFuture-1'
Expression:
{
"# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
"# also in nested calls "
doFuture::registerDoFuture()
"# doFuture():::doFuture(): process chunk of elements"
lapply(seq_along(...future.x_ii), FUN = function(jj) {
...future.x_jj <- ...future.x_ii[[jj]]
{
NULL
ii <- NULL
}
...future.env <- environment()
local({
for (name in names(...future.x_jj)) {
assign(name, ...future.x_jj[[name]], envir = ...future.env,
inherits = FALSE)
}
})
tryCatch(ii, error = identity)
})
}
Lazy evaluation: FALSE
Asynchronous evaluation: TRUE
Local evaluation: TRUE
Environment: R_GlobalEnv
Capture standard output: TRUE
Capture condition classes: 'condition' (excluding '<none>')
Immediate condition classes: 'immediateCondition'
Globals: 1 objects totaling 194 bytes (list '...future.x_ii' of 194 bytes)
Packages: 1 packages ('doFuture')
L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
Resolved: TRUE
Value: <not collected>
Conditions captured: <none>
Early signaling: FALSE
Owner process: ce02d01743ed708543f8775f99055d1c
Class: 'ClusterFuture', 'MultiprocessFuture', 'Future'
DEBUG: END TROUBLESHOOTING HELP
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
Execution halted
Flavor: r-devel-windows-x86_64
Version: 1.0.2
Check: tests
Result: ERROR
Running 'foreach_dofuture,cluster-missing-doFuture-pkg.R' [62s]
Running 'foreach_dofuture,errors.R' [10s]
Running 'foreach_dofuture,globals.R' [7s]
Running 'foreach_dofuture,nested_colon.R' [14s]
Running 'foreach_dofuture,nested_dofuture.R' [15s]
Running 'foreach_dofuture,rng.R' [4s]
Running 'foreach_dofuture.R' [3s]
Running 'foreach_dopar,cluster-missing-doFuture-pkg.R' [62s]
Running 'foreach_dopar,doRNG,dopar.R' [2s]
Running 'foreach_dopar,doRNG,dorng.R' [6s]
Running 'foreach_dopar,errors.R' [8s]
Running 'foreach_dopar,globals.R' [7s]
Running 'foreach_dopar,nested_colon.R' [13s]
Running 'foreach_dopar,nested_dopar.R' [16s]
Running 'foreach_dopar,options-for-export.R' [5s]
Running 'foreach_dopar.R' [3s]
Running 'makeChunks.R' [4s]
Running 'options,nested.R' [3s]
Running 'registerDoFuture.R' [2s]
Running 'times.R' [2s]
Running 'utils.R' [1s]
Running 'withDoRNG.R' [3s]
Running the tests in 'tests/foreach_dofuture,cluster-missing-doFuture-pkg.R' failed.
Complete output:
> source("incl/start.R")
Loading required package: foreach
Loading required package: future
R version 4.5.0 (2025-04-11 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)
Matrix products: default
LAPACK version 3.12.1
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.2 future_1.40.0 foreach_1.5.2
loaded via a namespace (and not attached):
[1] compiler_4.5.0 parallelly_1.43.0 tools_4.5.0
[4] parallel_4.5.0 future.apply_1.11.3 listenv_0.9.1
[7] codetools_0.2-20 iterators_1.0.14 digest_0.6.37
[10] globals_0.17.0
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_05_03_01_50_00_593/RtmpaQ7jk5/RLIBS_1345052da164b', 'D:/RCompile/recent/R-4.5.0/library'
> message("Package path: ", sQuote(system.file(package = "future")))
Package path: 'D:/RCompile/CRANpkg/lib/4.5/future'
>
> types <- "PSOCK"
> #if (supportsMulticore()) types <- c(types, "FORK")
>
> setupClusterWithoutPkgs <- function(type = "PSOCK",
+ withs = c("digest", "globals",
+ "listenv", "future"),
+ withouts = c("doFuture")) {
+ cl <- parallel::makeCluster(1L, type = type, timeout = 60)
+
+ ## Emulate a worker that does not have 'future' installed.
+ ## by setting a different user library path on the worker.
+ libs <- parallel::clusterEvalQ(cl, .libPaths(tempdir()))[[1]]
+ attr(cl, "libs") <- libs
+
+ ## 'withouts' tops 'withs' for conveniency
+ withs <- setdiff(withs, withouts)
+
+ ## "Install" any 'withs' packages?
+ if (length(withs) > 0L) {
+ paths <- find.package(withs)
+ res <- parallel::clusterCall(cl, fun = sapply, X = paths,
+ FUN = file.copy, to = libs[1],
+ recursive = TRUE)[[1]]
+ res <- parallel::clusterCall(cl, fun = sapply, X = withs,
+ FUN = requireNamespace)[[1]]
+ }
+ attr(cl, "withs") <- res
+
+ ## Check whether 'future' is still available on the worker or not.
+ ## It could be that it is installed in the system library path, which
+ ## in case we cannot "hide" the future package from the worker.
+ res <- parallel::clusterCall(cl, fun = sapply, X = withouts,
+ FUN = requireNamespace)[[1]]
+ attr(cl, "withouts") <- res
+
+ cl
+ }
>
> cl <- NULL
> for (type in types) {
+ message(sprintf("Test set #1 with cluster type %s ...", sQuote(type)))
+
+ cl <- setupClusterWithoutPkgs(type, withouts = c("future", "doFuture"))
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## Package 'future' is not installed on worker (r_version: ...)>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dofuture% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ cl <- setupClusterWithoutPkgs(type)
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## there is no package called 'doFuture'>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dofuture% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ plan(sequential)
+
+ message(sprintf("Test set #1 with cluster type %s ... DONE", sQuote(type)))
+ } ## for (type ...)
Test set #1 with cluster type 'PSOCK' ...
[08:16:40.112] doFuture2() ...
[08:16:40.187] Number of chunks: 1
[08:16:40.187] Number of futures (= number of chunks): 1
[08:16:40.187] seed = FALSE
[08:16:40.188] NULL
[08:16:40.191] seed = FALSE
[08:16:40.191] seed = FALSE
[08:16:40.192] - %dofuture% R expression:
[08:16:40.192] ii
[08:16:40.192] - foreach iterator arguments: [1] 'ii'
[08:16:40.192] - dummy globals (as locals): [1] 'ii'
[08:16:40.193] - R expression (map-reduce expression adjusted for RNG):
[08:16:40.193] {
[08:16:40.193] NULL
[08:16:40.193] "# doFuture():::doFuture2(): process chunk of elements"
[08:16:40.193] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[08:16:40.193] ...future.x_jj <- ...future.x_ii[[jj]]
[08:16:40.193] {
[08:16:40.193] NULL
[08:16:40.193] ii <- NULL
[08:16:40.193] }
[08:16:40.193] ...future.env <- environment()
[08:16:40.193] local({
[08:16:40.193] for (name in names(...future.x_jj)) {
[08:16:40.193] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[08:16:40.193] inherits = FALSE)
[08:16:40.193] }
[08:16:40.193] })
[08:16:40.193] NULL
[08:16:40.193] tryCatch(ii, error = identity)
[08:16:40.193] })
[08:16:40.193] }
[08:16:40.194] - identifying globals and packages ...
[08:16:40.194] - Argument 'globals':
[08:16:40.194] logi TRUE
[08:16:40.194] - attr(*, "add")= chr "...future.x_ii"
[08:16:40.194] - attr(*, "ignore")= chr "ii"
[08:16:40.196] - R expression (map-reduce expression searched for globals):
[08:16:40.196] {
[08:16:40.196] NULL
[08:16:40.196] "# doFuture():::doFuture2(): process chunk of elements"
[08:16:40.196] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[08:16:40.196] ...future.x_jj <- ...future.x_ii[[jj]]
[08:16:40.196] {
[08:16:40.196] NULL
[08:16:40.196] ii <- NULL
[08:16:40.196] }
[08:16:40.196] ...future.env <- environment()
[08:16:40.196] local({
[08:16:40.196] for (name in names(...future.x_jj)) {
[08:16:40.196] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[08:16:40.196] inherits = FALSE)
[08:16:40.196] }
[08:16:40.196] })
[08:16:40.196] NULL
[08:16:40.196] tryCatch(ii, error = identity)
[08:16:40.196] })
[08:16:40.196] }
[08:16:40.208] - R expression (%dofuture% expression searched for globals):
[08:16:40.208] ii
[08:16:40.210] - Globals in %dofuture% R expression not in map-reduce expression:
[08:16:40.210] - Appending 0 globals only found in the vanilla %dofuture% expression:
[08:16:40.210] - globals: [1] '...future.x_ii'
[08:16:40.210] List of 1
[08:16:40.210] $ ...future.x_ii: num 42
[08:16:40.210] - attr(*, "where")=List of 1
[08:16:40.210] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[08:16:40.210] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[08:16:40.210] - attr(*, "resolved")= logi FALSE
[08:16:40.210] - attr(*, "total_size")= num 39
[08:16:40.214] - packages: [1] 'doFuture'
[08:16:40.214] - identifying globals and packages ... DONE
[08:16:40.214] Launching 1 futures (chunks) ...
[08:16:40.214] Chunk #1 of 1 ...
[08:16:40.215] - Finding globals in 'args_list' for chunk #1 ...
[08:16:40.215]
[08:16:40.216]
[08:16:40.216] - Finding globals in 'args_list' for chunk #1 ... DONE
[08:16:40.216] - seeds: <none>
[08:16:40.223] Chunk #1 of 1 ... DONE
[08:16:40.224] Launching 1 futures (chunks) ... DONE
[08:16:40.224] - resolving futures
[08:16:40.224] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: ea7e32c3188b7f7f5077ff02636f3e27-2
DEBUG: BEGIN TROUBLESHOOTING HELP
Future involved:
ClusterFuture:
Label: 'doFuture2-1'
Expression:
{
NULL
"# doFuture():::doFuture2(): process chunk of elements"
lapply(seq_along(...future.x_ii), FUN = function(jj) {
...future.x_jj <- ...future.x_ii[[jj]]
{
NULL
ii <- NULL
}
...future.env <- environment()
local({
for (name in names(...future.x_jj)) {
assign(name, ...future.x_jj[[name]], envir = ...future.env,
inherits = FALSE)
}
})
NULL
tryCatch(ii, error = identity)
})
}
Lazy evaluation: FALSE
Asynchronous evaluation: TRUE
Local evaluation: TRUE
Environment: R_GlobalEnv
Capture standard output: TRUE
Capture condition classes: 'condition' (excluding '<none>')
Immediate condition classes: 'immediateCondition'
Globals: 1 objects totaling 194 bytes (list '...future.x_ii' of 194 bytes)
Packages: 1 packages ('doFuture')
L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
Resolved: TRUE
Value: <not collected>
Conditions captured: <none>
Early signaling: FALSE
Owner process: ea7e32c3188b7f7f5077ff02636f3e27
Class: 'ClusterFuture', 'MultiprocessFuture', 'Future'
DEBUG: END TROUBLESHOOTING HELP
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
Execution halted
Running the tests in 'tests/foreach_dopar,cluster-missing-doFuture-pkg.R' failed.
Complete output:
> source("incl/start.R")
Loading required package: foreach
Loading required package: future
R version 4.5.0 (2025-04-11 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)
Matrix products: default
LAPACK version 3.12.1
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.2 future_1.40.0 foreach_1.5.2
loaded via a namespace (and not attached):
[1] compiler_4.5.0 parallelly_1.43.0 tools_4.5.0
[4] parallel_4.5.0 future.apply_1.11.3 listenv_0.9.1
[7] codetools_0.2-20 iterators_1.0.14 digest_0.6.37
[10] globals_0.17.0
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> registerDoFuture()
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_05_03_01_50_00_593/RtmpaQ7jk5/RLIBS_1345052da164b', 'D:/RCompile/recent/R-4.5.0/library'
> message("Package path: ", sQuote(system.file(package = "future")))
Package path: 'D:/RCompile/CRANpkg/lib/4.5/future'
>
> types <- "PSOCK"
> #if (supportsMulticore()) types <- c(types, "FORK")
>
> setupClusterWithoutPkgs <- function(type = "PSOCK",
+ withs = c("digest", "globals",
+ "listenv", "future"),
+ withouts = c("doFuture")) {
+ cl <- parallel::makeCluster(1L, type = type, timeout = 60)
+
+ ## Emulate a worker that does not have 'future' installed.
+ ## by setting a different user library path on the worker.
+ libs <- parallel::clusterEvalQ(cl, .libPaths(tempdir()))[[1]]
+ attr(cl, "libs") <- libs
+
+ ## 'withouts' tops 'withs' for conveniency
+ withs <- setdiff(withs, withouts)
+
+ ## "Install" any 'withs' packages?
+ if (length(withs) > 0L) {
+ paths <- find.package(withs)
+ res <- parallel::clusterCall(cl, fun = sapply, X = paths,
+ FUN = file.copy, to = libs[1],
+ recursive = TRUE)[[1]]
+ res <- parallel::clusterCall(cl, fun = sapply, X = withs,
+ FUN = requireNamespace)[[1]]
+ }
+ attr(cl, "withs") <- res
+
+ ## Check whether 'future' is still available on the worker or not.
+ ## It could be that it is installed in the system library path, which
+ ## in case we cannot "hide" the future package from the worker.
+ res <- parallel::clusterCall(cl, fun = sapply, X = withouts,
+ FUN = requireNamespace)[[1]]
+ attr(cl, "withouts") <- res
+
+ cl
+ }
>
>
> cl <- NULL
> for (type in types) {
+ message(sprintf("Test set #1 with cluster type %s ...", sQuote(type)))
+
+ cl <- setupClusterWithoutPkgs(type, withouts = c("future", "doFuture"))
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## Package 'future' is not installed on worker (r_version: ...)>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dopar% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ cl <- setupClusterWithoutPkgs(type)
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## there is no package called 'doFuture'>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dopar% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ plan(sequential)
+
+ message(sprintf("Test set #1 with cluster type %s ... DONE", sQuote(type)))
+ } ## for (type ...)
Test set #1 with cluster type 'PSOCK' ...
[08:18:34.432] doFuture() ...
[08:18:34.435] - dummy globals (as locals): [1] 'ii'
[08:18:34.436] - R expression:
[08:18:34.436] {
[08:18:34.436] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[08:18:34.436] "# also in nested calls "
[08:18:34.436] doFuture::registerDoFuture()
[08:18:34.436] "# doFuture():::doFuture(): process chunk of elements"
[08:18:34.436] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[08:18:34.436] ...future.x_jj <- ...future.x_ii[[jj]]
[08:18:34.436] {
[08:18:34.436] NULL
[08:18:34.436] ii <- NULL
[08:18:34.436] }
[08:18:34.436] ...future.env <- environment()
[08:18:34.436] local({
[08:18:34.436] for (name in names(...future.x_jj)) {
[08:18:34.436] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[08:18:34.436] inherits = FALSE)
[08:18:34.436] }
[08:18:34.436] })
[08:18:34.436] tryCatch(ii, error = identity)
[08:18:34.436] })
[08:18:34.436] }
[08:18:34.437] - identifying globals and packages ...
[08:18:34.457] List of 1
[08:18:34.457] $ ...future.x_ii: NULL
[08:18:34.457] - attr(*, "where")=List of 1
[08:18:34.457] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[08:18:34.457] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[08:18:34.457] - attr(*, "resolved")= logi FALSE
[08:18:34.457] - attr(*, "total_size")= num 27
[08:18:34.466] - R expression:
[08:18:34.466] {
[08:18:34.466] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[08:18:34.466] "# also in nested calls "
[08:18:34.466] doFuture::registerDoFuture()
[08:18:34.466] "# doFuture():::doFuture(): process chunk of elements"
[08:18:34.466] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[08:18:34.466] ...future.x_jj <- ...future.x_ii[[jj]]
[08:18:34.466] {
[08:18:34.466] NULL
[08:18:34.466] ii <- NULL
[08:18:34.466] }
[08:18:34.466] ...future.env <- environment()
[08:18:34.466] local({
[08:18:34.466] for (name in names(...future.x_jj)) {
[08:18:34.466] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[08:18:34.466] inherits = FALSE)
[08:18:34.466] }
[08:18:34.466] })
[08:18:34.466] tryCatch(ii, error = identity)
[08:18:34.466] })
[08:18:34.466] }
[08:18:34.467] - globals: [1] '...future.x_ii'
[08:18:34.468] List of 1
[08:18:34.468] $ ...future.x_ii: NULL
[08:18:34.468] - attr(*, "where")=List of 1
[08:18:34.468] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[08:18:34.468] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[08:18:34.468] - attr(*, "resolved")= logi FALSE
[08:18:34.468] - attr(*, "total_size")= num 27
[08:18:34.472] - packages: [1] 'doFuture'
[08:18:34.473] - identifying globals and packages ... DONE
[08:18:34.525] Number of chunks: 1
[08:18:34.526] Number of futures (= number of chunks): 1
[08:18:34.526] Launching 1 futures (chunks) ...
[08:18:34.526] Chunk #1 of 1 ...
[08:18:34.527] - Finding globals in 'args_list' chunk #1 ...
[08:18:34.528]
[08:18:34.528]
[08:18:34.528] - Finding globals in 'args_list' for chunk #1 ... DONE
[08:18:34.535] Chunk #1 of 1 ... DONE
[08:18:34.536] Launching 1 futures (chunks) ... DONE
[08:18:34.536] - resolving futures
[08:18:34.536] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: d40c925b36085076d33b1b81c39e9715-2
DEBUG: BEGIN TROUBLESHOOTING HELP
Future involved:
ClusterFuture:
Label: 'doFuture-1'
Expression:
{
"# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
"# also in nested calls "
doFuture::registerDoFuture()
"# doFuture():::doFuture(): process chunk of elements"
lapply(seq_along(...future.x_ii), FUN = function(jj) {
...future.x_jj <- ...future.x_ii[[jj]]
{
NULL
ii <- NULL
}
...future.env <- environment()
local({
for (name in names(...future.x_jj)) {
assign(name, ...future.x_jj[[name]], envir = ...future.env,
inherits = FALSE)
}
})
tryCatch(ii, error = identity)
})
}
Lazy evaluation: FALSE
Asynchronous evaluation: TRUE
Local evaluation: TRUE
Environment: R_GlobalEnv
Capture standard output: TRUE
Capture condition classes: 'condition' (excluding '<none>')
Immediate condition classes: 'immediateCondition'
Globals: 1 objects totaling 194 bytes (list '...future.x_ii' of 194 bytes)
Packages: 1 packages ('doFuture')
L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
Resolved: TRUE
Value: <not collected>
Conditions captured: <none>
Early signaling: FALSE
Owner process: d40c925b36085076d33b1b81c39e9715
Class: 'ClusterFuture', 'MultiprocessFuture', 'Future'
DEBUG: END TROUBLESHOOTING HELP
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
Execution halted
Flavor: r-release-windows-x86_64
Version: 1.0.2
Check: tests
Result: ERROR
Running 'foreach_dofuture,cluster-missing-doFuture-pkg.R' [63s]
Running 'foreach_dofuture,errors.R' [13s]
Running 'foreach_dofuture,globals.R' [9s]
Running 'foreach_dofuture,nested_colon.R' [18s]
Running 'foreach_dofuture,nested_dofuture.R' [19s]
Running 'foreach_dofuture,rng.R' [5s]
Running 'foreach_dofuture.R' [4s]
Running 'foreach_dopar,cluster-missing-doFuture-pkg.R' [63s]
Running 'foreach_dopar,doRNG,dopar.R' [3s]
Running 'foreach_dopar,doRNG,dorng.R' [7s]
Running 'foreach_dopar,errors.R' [10s]
Running 'foreach_dopar,globals.R' [10s]
Running 'foreach_dopar,nested_colon.R' [15s]
Running 'foreach_dopar,nested_dopar.R' [21s]
Running 'foreach_dopar,options-for-export.R' [6s]
Running 'foreach_dopar.R' [4s]
Running 'makeChunks.R' [5s]
Running 'options,nested.R' [4s]
Running 'registerDoFuture.R' [2s]
Running 'times.R' [2s]
Running 'utils.R' [1s]
Running 'withDoRNG.R' [5s]
Running the tests in 'tests/foreach_dofuture,cluster-missing-doFuture-pkg.R' failed.
Complete output:
> source("incl/start.R")
Loading required package: foreach
Loading required package: future
R version 4.4.3 (2025-02-28 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.2 future_1.40.0 foreach_1.5.2
loaded via a namespace (and not attached):
[1] compiler_4.4.3 parallelly_1.43.0 tools_4.4.3
[4] parallel_4.4.3 future.apply_1.11.3 listenv_0.9.1
[7] codetools_0.2-20 iterators_1.0.14 digest_0.6.37
[10] globals_0.17.0
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_05_02_10_47_41_20405/RtmpGgLL5L/RLIBS_8d301cf43e1b', 'D:/RCompile/recent/R-4.4.3/library'
> message("Package path: ", sQuote(system.file(package = "future")))
Package path: 'D:/RCompile/CRANpkg/lib/4.4/future'
>
> types <- "PSOCK"
> #if (supportsMulticore()) types <- c(types, "FORK")
>
> setupClusterWithoutPkgs <- function(type = "PSOCK",
+ withs = c("digest", "globals",
+ "listenv", "future"),
+ withouts = c("doFuture")) {
+ cl <- parallel::makeCluster(1L, type = type, timeout = 60)
+
+ ## Emulate a worker that does not have 'future' installed.
+ ## by setting a different user library path on the worker.
+ libs <- parallel::clusterEvalQ(cl, .libPaths(tempdir()))[[1]]
+ attr(cl, "libs") <- libs
+
+ ## 'withouts' tops 'withs' for conveniency
+ withs <- setdiff(withs, withouts)
+
+ ## "Install" any 'withs' packages?
+ if (length(withs) > 0L) {
+ paths <- find.package(withs)
+ res <- parallel::clusterCall(cl, fun = sapply, X = paths,
+ FUN = file.copy, to = libs[1],
+ recursive = TRUE)[[1]]
+ res <- parallel::clusterCall(cl, fun = sapply, X = withs,
+ FUN = requireNamespace)[[1]]
+ }
+ attr(cl, "withs") <- res
+
+ ## Check whether 'future' is still available on the worker or not.
+ ## It could be that it is installed in the system library path, which
+ ## in case we cannot "hide" the future package from the worker.
+ res <- parallel::clusterCall(cl, fun = sapply, X = withouts,
+ FUN = requireNamespace)[[1]]
+ attr(cl, "withouts") <- res
+
+ cl
+ }
>
> cl <- NULL
> for (type in types) {
+ message(sprintf("Test set #1 with cluster type %s ...", sQuote(type)))
+
+ cl <- setupClusterWithoutPkgs(type, withouts = c("future", "doFuture"))
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## Package 'future' is not installed on worker (r_version: ...)>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dofuture% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ cl <- setupClusterWithoutPkgs(type)
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## there is no package called 'doFuture'>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dofuture% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ plan(sequential)
+
+ message(sprintf("Test set #1 with cluster type %s ... DONE", sQuote(type)))
+ } ## for (type ...)
Test set #1 with cluster type 'PSOCK' ...
[02:42:49.532] doFuture2() ...
[02:42:49.618] Number of chunks: 1
[02:42:49.619] Number of futures (= number of chunks): 1
[02:42:49.619] seed = FALSE
[02:42:49.620] NULL
[02:42:49.626] seed = FALSE
[02:42:49.626] seed = FALSE
[02:42:49.627] - %dofuture% R expression:
[02:42:49.627] ii
[02:42:49.628] - foreach iterator arguments: [1] 'ii'
[02:42:49.628] - dummy globals (as locals): [1] 'ii'
[02:42:49.629] - R expression (map-reduce expression adjusted for RNG):
[02:42:49.630] {
[02:42:49.630] NULL
[02:42:49.630] "# doFuture():::doFuture2(): process chunk of elements"
[02:42:49.630] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[02:42:49.630] ...future.x_jj <- ...future.x_ii[[jj]]
[02:42:49.630] {
[02:42:49.630] NULL
[02:42:49.630] ii <- NULL
[02:42:49.630] }
[02:42:49.630] ...future.env <- environment()
[02:42:49.630] local({
[02:42:49.630] for (name in names(...future.x_jj)) {
[02:42:49.630] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[02:42:49.630] inherits = FALSE)
[02:42:49.630] }
[02:42:49.630] })
[02:42:49.630] NULL
[02:42:49.630] tryCatch(ii, error = identity)
[02:42:49.630] })
[02:42:49.630] }
[02:42:49.631] - identifying globals and packages ...
[02:42:49.631] - Argument 'globals':
[02:42:49.631] logi TRUE
[02:42:49.631] - attr(*, "add")= chr "...future.x_ii"
[02:42:49.631] - attr(*, "ignore")= chr "ii"
[02:42:49.637] - R expression (map-reduce expression searched for globals):
[02:42:49.637] {
[02:42:49.637] NULL
[02:42:49.637] "# doFuture():::doFuture2(): process chunk of elements"
[02:42:49.637] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[02:42:49.637] ...future.x_jj <- ...future.x_ii[[jj]]
[02:42:49.637] {
[02:42:49.637] NULL
[02:42:49.637] ii <- NULL
[02:42:49.637] }
[02:42:49.637] ...future.env <- environment()
[02:42:49.637] local({
[02:42:49.637] for (name in names(...future.x_jj)) {
[02:42:49.637] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[02:42:49.637] inherits = FALSE)
[02:42:49.637] }
[02:42:49.637] })
[02:42:49.637] NULL
[02:42:49.637] tryCatch(ii, error = identity)
[02:42:49.637] })
[02:42:49.637] }
[02:42:49.663] - R expression (%dofuture% expression searched for globals):
[02:42:49.664] ii
[02:42:49.667] - Globals in %dofuture% R expression not in map-reduce expression:
[02:42:49.667] - Appending 0 globals only found in the vanilla %dofuture% expression:
[02:42:49.668] - globals: [1] '...future.x_ii'
[02:42:49.668] List of 1
[02:42:49.668] $ ...future.x_ii: num 42
[02:42:49.668] - attr(*, "where")=List of 1
[02:42:49.668] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[02:42:49.668] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[02:42:49.668] - attr(*, "resolved")= logi FALSE
[02:42:49.668] - attr(*, "total_size")= num 39
[02:42:49.676] - packages: [1] 'doFuture'
[02:42:49.676] - identifying globals and packages ... DONE
[02:42:49.677] Launching 1 futures (chunks) ...
[02:42:49.677] Chunk #1 of 1 ...
[02:42:49.678] - Finding globals in 'args_list' for chunk #1 ...
[02:42:49.680]
[02:42:49.680]
[02:42:49.681] - Finding globals in 'args_list' for chunk #1 ... DONE
[02:42:49.681] - seeds: <none>
[02:42:49.693] Chunk #1 of 1 ... DONE
[02:42:49.693] Launching 1 futures (chunks) ... DONE
[02:42:49.694] - resolving futures
[02:42:49.694] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: f76aea68fba780d4e8172b70154bb9cd-2
DEBUG: BEGIN TROUBLESHOOTING HELP
Future involved:
ClusterFuture:
Label: 'doFuture2-1'
Expression:
{
NULL
"# doFuture():::doFuture2(): process chunk of elements"
lapply(seq_along(...future.x_ii), FUN = function(jj) {
...future.x_jj <- ...future.x_ii[[jj]]
{
NULL
ii <- NULL
}
...future.env <- environment()
local({
for (name in names(...future.x_jj)) {
assign(name, ...future.x_jj[[name]], envir = ...future.env,
inherits = FALSE)
}
})
NULL
tryCatch(ii, error = identity)
})
}
Lazy evaluation: FALSE
Asynchronous evaluation: TRUE
Local evaluation: TRUE
Environment: R_GlobalEnv
Capture standard output: TRUE
Capture condition classes: 'condition' (excluding '<none>')
Immediate condition classes: 'immediateCondition'
Globals: 1 objects totaling 194 bytes (list '...future.x_ii' of 194 bytes)
Packages: 1 packages ('doFuture')
L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
Resolved: TRUE
Value: <not collected>
Conditions captured: <none>
Early signaling: FALSE
Owner process: f76aea68fba780d4e8172b70154bb9cd
Class: 'ClusterFuture', 'MultiprocessFuture', 'Future'
DEBUG: END TROUBLESHOOTING HELP
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
Execution halted
Running the tests in 'tests/foreach_dopar,cluster-missing-doFuture-pkg.R' failed.
Complete output:
> source("incl/start.R")
Loading required package: foreach
Loading required package: future
R version 4.4.3 (2025-02-28 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.2 future_1.40.0 foreach_1.5.2
loaded via a namespace (and not attached):
[1] compiler_4.4.3 parallelly_1.43.0 tools_4.4.3
[4] parallel_4.4.3 future.apply_1.11.3 listenv_0.9.1
[7] codetools_0.2-20 iterators_1.0.14 digest_0.6.37
[10] globals_0.17.0
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> registerDoFuture()
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_05_02_10_47_41_20405/RtmpGgLL5L/RLIBS_8d301cf43e1b', 'D:/RCompile/recent/R-4.4.3/library'
> message("Package path: ", sQuote(system.file(package = "future")))
Package path: 'D:/RCompile/CRANpkg/lib/4.4/future'
>
> types <- "PSOCK"
> #if (supportsMulticore()) types <- c(types, "FORK")
>
> setupClusterWithoutPkgs <- function(type = "PSOCK",
+ withs = c("digest", "globals",
+ "listenv", "future"),
+ withouts = c("doFuture")) {
+ cl <- parallel::makeCluster(1L, type = type, timeout = 60)
+
+ ## Emulate a worker that does not have 'future' installed.
+ ## by setting a different user library path on the worker.
+ libs <- parallel::clusterEvalQ(cl, .libPaths(tempdir()))[[1]]
+ attr(cl, "libs") <- libs
+
+ ## 'withouts' tops 'withs' for conveniency
+ withs <- setdiff(withs, withouts)
+
+ ## "Install" any 'withs' packages?
+ if (length(withs) > 0L) {
+ paths <- find.package(withs)
+ res <- parallel::clusterCall(cl, fun = sapply, X = paths,
+ FUN = file.copy, to = libs[1],
+ recursive = TRUE)[[1]]
+ res <- parallel::clusterCall(cl, fun = sapply, X = withs,
+ FUN = requireNamespace)[[1]]
+ }
+ attr(cl, "withs") <- res
+
+ ## Check whether 'future' is still available on the worker or not.
+ ## It could be that it is installed in the system library path, which
+ ## in case we cannot "hide" the future package from the worker.
+ res <- parallel::clusterCall(cl, fun = sapply, X = withouts,
+ FUN = requireNamespace)[[1]]
+ attr(cl, "withouts") <- res
+
+ cl
+ }
>
>
> cl <- NULL
> for (type in types) {
+ message(sprintf("Test set #1 with cluster type %s ...", sQuote(type)))
+
+ cl <- setupClusterWithoutPkgs(type, withouts = c("future", "doFuture"))
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## Package 'future' is not installed on worker (r_version: ...)>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dopar% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ cl <- setupClusterWithoutPkgs(type)
+ if (all(attr(cl, "withs")) && !all(attr(cl, "withouts"))) {
+ plan(cluster, workers = cl, .init = FALSE)
+
+ ## Here we will get:
+ ## <UnexpectedFutureResultError: Unexpected result (of class
+ ## 'snow-try-error' != 'FutureResult') retrieved for ClusterFuture
+ ## future (label = '<none>', expression = '{ ... }'):
+ ## there is no package called 'doFuture'>
+ ## Note: This error is produced by the future backend when it recieves
+ ## the unexpected results.
+ res <- tryCatch({
+ y <- foreach(ii = 1:3) %dopar% ii
+ }, error = identity)
+ print(res)
+ stopifnot(inherits(res, "FutureError"))
+ }
+ parallel::stopCluster(cl)
+ cl <- NULL
+
+ plan(sequential)
+
+ message(sprintf("Test set #1 with cluster type %s ... DONE", sQuote(type)))
+ } ## for (type ...)
Test set #1 with cluster type 'PSOCK' ...
[02:44:59.824] doFuture() ...
[02:44:59.828] - dummy globals (as locals): [1] 'ii'
[02:44:59.829] - R expression:
[02:44:59.830] {
[02:44:59.830] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[02:44:59.830] "# also in nested calls "
[02:44:59.830] doFuture::registerDoFuture()
[02:44:59.830] "# doFuture():::doFuture(): process chunk of elements"
[02:44:59.830] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[02:44:59.830] ...future.x_jj <- ...future.x_ii[[jj]]
[02:44:59.830] {
[02:44:59.830] NULL
[02:44:59.830] ii <- NULL
[02:44:59.830] }
[02:44:59.830] ...future.env <- environment()
[02:44:59.830] local({
[02:44:59.830] for (name in names(...future.x_jj)) {
[02:44:59.830] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[02:44:59.830] inherits = FALSE)
[02:44:59.830] }
[02:44:59.830] })
[02:44:59.830] tryCatch(ii, error = identity)
[02:44:59.830] })
[02:44:59.830] }
[02:44:59.831] - identifying globals and packages ...
[02:44:59.858] List of 1
[02:44:59.858] $ ...future.x_ii: NULL
[02:44:59.858] - attr(*, "where")=List of 1
[02:44:59.858] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[02:44:59.858] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[02:44:59.858] - attr(*, "resolved")= logi FALSE
[02:44:59.858] - attr(*, "total_size")= num 27
[02:44:59.867] - R expression:
[02:44:59.867] {
[02:44:59.867] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[02:44:59.867] "# also in nested calls "
[02:44:59.867] doFuture::registerDoFuture()
[02:44:59.867] "# doFuture():::doFuture(): process chunk of elements"
[02:44:59.867] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[02:44:59.867] ...future.x_jj <- ...future.x_ii[[jj]]
[02:44:59.867] {
[02:44:59.867] NULL
[02:44:59.867] ii <- NULL
[02:44:59.867] }
[02:44:59.867] ...future.env <- environment()
[02:44:59.867] local({
[02:44:59.867] for (name in names(...future.x_jj)) {
[02:44:59.867] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[02:44:59.867] inherits = FALSE)
[02:44:59.867] }
[02:44:59.867] })
[02:44:59.867] tryCatch(ii, error = identity)
[02:44:59.867] })
[02:44:59.867] }
[02:44:59.868] - globals: [1] '...future.x_ii'
[02:44:59.869] List of 1
[02:44:59.869] $ ...future.x_ii: NULL
[02:44:59.869] - attr(*, "where")=List of 1
[02:44:59.869] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[02:44:59.869] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[02:44:59.869] - attr(*, "resolved")= logi FALSE
[02:44:59.869] - attr(*, "total_size")= num 27
[02:44:59.873] - packages: [1] 'doFuture'
[02:44:59.873] - identifying globals and packages ... DONE
[02:44:59.937] Number of chunks: 1
[02:44:59.938] Number of futures (= number of chunks): 1
[02:44:59.938] Launching 1 futures (chunks) ...
[02:44:59.938] Chunk #1 of 1 ...
[02:44:59.939] - Finding globals in 'args_list' chunk #1 ...
[02:44:59.940]
[02:44:59.941]
[02:44:59.941] - Finding globals in 'args_list' for chunk #1 ... DONE
[02:44:59.951] Chunk #1 of 1 ... DONE
[02:44:59.952] Launching 1 futures (chunks) ... DONE
[02:44:59.952] - resolving futures
[02:44:59.953] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: 78ce5ac64e78be6fbe45b4f854acb70d-2
DEBUG: BEGIN TROUBLESHOOTING HELP
Future involved:
ClusterFuture:
Label: 'doFuture-1'
Expression:
{
"# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
"# also in nested calls "
doFuture::registerDoFuture()
"# doFuture():::doFuture(): process chunk of elements"
lapply(seq_along(...future.x_ii), FUN = function(jj) {
...future.x_jj <- ...future.x_ii[[jj]]
{
NULL
ii <- NULL
}
...future.env <- environment()
local({
for (name in names(...future.x_jj)) {
assign(name, ...future.x_jj[[name]], envir = ...future.env,
inherits = FALSE)
}
})
tryCatch(ii, error = identity)
})
}
Lazy evaluation: FALSE
Asynchronous evaluation: TRUE
Local evaluation: TRUE
Environment: R_GlobalEnv
Capture standard output: TRUE
Capture condition classes: 'condition' (excluding '<none>')
Immediate condition classes: 'immediateCondition'
Globals: 1 objects totaling 194 bytes (list '...future.x_ii' of 194 bytes)
Packages: 1 packages ('doFuture')
L'Ecuyer-CMRG RNG seed: <none> (seed = FALSE)
Resolved: TRUE
Value: <not collected>
Conditions captured: <none>
Early signaling: FALSE
Owner process: 78ce5ac64e78be6fbe45b4f854acb70d
Class: 'ClusterFuture', 'MultiprocessFuture', 'Future'
DEBUG: END TROUBLESHOOTING HELP
Error in serialize(data, node$con) : error writing to connection
Calls: <Anonymous> ... postNode -> sendData -> sendData.SOCKnode -> serialize
Execution halted
Flavor: r-oldrel-windows-x86_64
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.