Last updated on 2025-04-18 18:49:19 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0.2 | 3.42 | 135.87 | 139.29 | OK | |
r-devel-linux-x86_64-debian-gcc | 1.0.2 | 2.20 | 108.13 | 110.33 | OK | |
r-devel-linux-x86_64-fedora-clang | 1.0.2 | 233.43 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 1.0.2 | 228.34 | OK | |||
r-devel-windows-x86_64 | 1.0.2 | 4.00 | 313.00 | 317.00 | ERROR | |
r-patched-linux-x86_64 | 1.0.2 | 3.41 | 130.84 | 134.25 | OK | |
r-release-linux-x86_64 | 1.0.2 | 3.13 | 132.10 | 135.23 | 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 | 4.00 | 312.00 | 316.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 | 350.00 | 355.00 | ERROR |
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' [16s]
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' [3s]
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' [4s]
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-16 r88149 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_04_17_01_50_00_8240/RtmpA5Nt7O/RLIBS_2c6dc3ecf4a04', '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' ...
[05:58:35.402] doFuture2() ...
[05:58:35.457] Number of chunks: 1
[05:58:35.458] Number of futures (= number of chunks): 1
[05:58:35.458] seed = FALSE
[05:58:35.459] NULL
[05:58:35.462] seed = FALSE
[05:58:35.462] seed = FALSE
[05:58:35.463] - %dofuture% R expression:
[05:58:35.463] ii
[05:58:35.463] - foreach iterator arguments: [1] 'ii'
[05:58:35.464] - dummy globals (as locals): [1] 'ii'
[05:58:35.464] - R expression (map-reduce expression adjusted for RNG):
[05:58:35.465] {
[05:58:35.465] NULL
[05:58:35.465] "# doFuture():::doFuture2(): process chunk of elements"
[05:58:35.465] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[05:58:35.465] ...future.x_jj <- ...future.x_ii[[jj]]
[05:58:35.465] {
[05:58:35.465] NULL
[05:58:35.465] ii <- NULL
[05:58:35.465] }
[05:58:35.465] ...future.env <- environment()
[05:58:35.465] local({
[05:58:35.465] for (name in names(...future.x_jj)) {
[05:58:35.465] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[05:58:35.465] inherits = FALSE)
[05:58:35.465] }
[05:58:35.465] })
[05:58:35.465] NULL
[05:58:35.465] tryCatch(ii, error = identity)
[05:58:35.465] })
[05:58:35.465] }
[05:58:35.465] - identifying globals and packages ...
[05:58:35.465] - Argument 'globals':
[05:58:35.465] logi TRUE
[05:58:35.465] - attr(*, "add")= chr "...future.x_ii"
[05:58:35.465] - attr(*, "ignore")= chr "ii"
[05:58:35.468] - R expression (map-reduce expression searched for globals):
[05:58:35.468] {
[05:58:35.468] NULL
[05:58:35.468] "# doFuture():::doFuture2(): process chunk of elements"
[05:58:35.468] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[05:58:35.468] ...future.x_jj <- ...future.x_ii[[jj]]
[05:58:35.468] {
[05:58:35.468] NULL
[05:58:35.468] ii <- NULL
[05:58:35.468] }
[05:58:35.468] ...future.env <- environment()
[05:58:35.468] local({
[05:58:35.468] for (name in names(...future.x_jj)) {
[05:58:35.468] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[05:58:35.468] inherits = FALSE)
[05:58:35.468] }
[05:58:35.468] })
[05:58:35.468] NULL
[05:58:35.468] tryCatch(ii, error = identity)
[05:58:35.468] })
[05:58:35.468] }
[05:58:35.479] - R expression (%dofuture% expression searched for globals):
[05:58:35.479] ii
[05:58:35.480] - Globals in %dofuture% R expression not in map-reduce expression:
[05:58:35.480] - Appending 0 globals only found in the vanilla %dofuture% expression:
[05:58:35.481] - globals: [1] '...future.x_ii'
[05:58:35.481] List of 1
[05:58:35.481] $ ...future.x_ii: num 42
[05:58:35.481] - attr(*, "where")=List of 1
[05:58:35.481] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[05:58:35.481] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[05:58:35.481] - attr(*, "resolved")= logi FALSE
[05:58:35.481] - attr(*, "total_size")= num 39
[05:58:35.485] - packages: [1] 'doFuture'
[05:58:35.486] - identifying globals and packages ... DONE
[05:58:35.486] Launching 1 futures (chunks) ...
[05:58:35.486] Chunk #1 of 1 ...
[05:58:35.487] - Finding globals in 'args_list' for chunk #1 ...
[05:58:35.488]
[05:58:35.488]
[05:58:35.489] - Finding globals in 'args_list' for chunk #1 ... DONE
[05:58:35.489] - seeds: <none>
[05:58:35.498] Chunk #1 of 1 ... DONE
[05:58:35.498] Launching 1 futures (chunks) ... DONE
[05:58:35.499] - resolving futures
[05:58:35.499] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: e608a6df73248bb4fdaf2045a8a2a259-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: e608a6df73248bb4fdaf2045a8a2a259
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-16 r88149 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_04_17_01_50_00_8240/RtmpA5Nt7O/RLIBS_2c6dc3ecf4a04', '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' ...
[06:00:31.863] doFuture() ...
[06:00:31.866] - dummy globals (as locals): [1] 'ii'
[06:00:31.866] - R expression:
[06:00:31.866] {
[06:00:31.866] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[06:00:31.866] "# also in nested calls "
[06:00:31.866] doFuture::registerDoFuture()
[06:00:31.866] "# doFuture():::doFuture(): process chunk of elements"
[06:00:31.866] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[06:00:31.866] ...future.x_jj <- ...future.x_ii[[jj]]
[06:00:31.866] {
[06:00:31.866] NULL
[06:00:31.866] ii <- NULL
[06:00:31.866] }
[06:00:31.866] ...future.env <- environment()
[06:00:31.866] local({
[06:00:31.866] for (name in names(...future.x_jj)) {
[06:00:31.866] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[06:00:31.866] inherits = FALSE)
[06:00:31.866] }
[06:00:31.866] })
[06:00:31.866] tryCatch(ii, error = identity)
[06:00:31.866] })
[06:00:31.866] }
[06:00:31.867] - identifying globals and packages ...
[06:00:31.882] List of 1
[06:00:31.882] $ ...future.x_ii: NULL
[06:00:31.882] - attr(*, "where")=List of 1
[06:00:31.882] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[06:00:31.882] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[06:00:31.882] - attr(*, "resolved")= logi FALSE
[06:00:31.882] - attr(*, "total_size")= num 27
[06:00:31.892] - R expression:
[06:00:31.892] {
[06:00:31.892] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[06:00:31.892] "# also in nested calls "
[06:00:31.892] doFuture::registerDoFuture()
[06:00:31.892] "# doFuture():::doFuture(): process chunk of elements"
[06:00:31.892] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[06:00:31.892] ...future.x_jj <- ...future.x_ii[[jj]]
[06:00:31.892] {
[06:00:31.892] NULL
[06:00:31.892] ii <- NULL
[06:00:31.892] }
[06:00:31.892] ...future.env <- environment()
[06:00:31.892] local({
[06:00:31.892] for (name in names(...future.x_jj)) {
[06:00:31.892] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[06:00:31.892] inherits = FALSE)
[06:00:31.892] }
[06:00:31.892] })
[06:00:31.892] tryCatch(ii, error = identity)
[06:00:31.892] })
[06:00:31.892] }
[06:00:31.893] - globals: [1] '...future.x_ii'
[06:00:31.893] List of 1
[06:00:31.893] $ ...future.x_ii: NULL
[06:00:31.893] - attr(*, "where")=List of 1
[06:00:31.893] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[06:00:31.893] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[06:00:31.893] - attr(*, "resolved")= logi FALSE
[06:00:31.893] - attr(*, "total_size")= num 27
[06:00:31.898] - packages: [1] 'doFuture'
[06:00:31.898] - identifying globals and packages ... DONE
[06:00:31.951] Number of chunks: 1
[06:00:31.952] Number of futures (= number of chunks): 1
[06:00:31.952] Launching 1 futures (chunks) ...
[06:00:31.952] Chunk #1 of 1 ...
[06:00:31.952] - Finding globals in 'args_list' chunk #1 ...
[06:00:31.953]
[06:00:31.954]
[06:00:31.954] - Finding globals in 'args_list' for chunk #1 ... DONE
[06:00:31.961] Chunk #1 of 1 ... DONE
[06:00:31.961] Launching 1 futures (chunks) ... DONE
[06:00:31.961] - resolving futures
[06:00:31.962] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: a62247df224483150ce2e803eb1accfe-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: a62247df224483150ce2e803eb1accfe
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' [15s]
Running 'foreach_dofuture,nested_dofuture.R' [16s]
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' [3s]
Running 'foreach_dopar,doRNG,dorng.R' [6s]
Running 'foreach_dopar,errors.R' [7s]
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' [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 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.16.3
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_04_16_01_50_00_21006/Rtmp2P19iB/RLIBS_2253042ec4d6b', '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' ...
[16:19:59.614] doFuture2() ...
[16:19:59.679] Number of chunks: 1
[16:19:59.680] Number of futures (= number of chunks): 1
[16:19:59.680] seed = FALSE
[16:19:59.680] NULL
[16:19:59.684] seed = FALSE
[16:19:59.684] seed = FALSE
[16:19:59.684] - %dofuture% R expression:
[16:19:59.685] ii
[16:19:59.685] - foreach iterator arguments: [1] 'ii'
[16:19:59.685] - dummy globals (as locals): [1] 'ii'
[16:19:59.686] - R expression (map-reduce expression adjusted for RNG):
[16:19:59.686] {
[16:19:59.686] NULL
[16:19:59.686] "# doFuture():::doFuture2(): process chunk of elements"
[16:19:59.686] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[16:19:59.686] ...future.x_jj <- ...future.x_ii[[jj]]
[16:19:59.686] {
[16:19:59.686] NULL
[16:19:59.686] ii <- NULL
[16:19:59.686] }
[16:19:59.686] ...future.env <- environment()
[16:19:59.686] local({
[16:19:59.686] for (name in names(...future.x_jj)) {
[16:19:59.686] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[16:19:59.686] inherits = FALSE)
[16:19:59.686] }
[16:19:59.686] })
[16:19:59.686] NULL
[16:19:59.686] tryCatch(ii, error = identity)
[16:19:59.686] })
[16:19:59.686] }
[16:19:59.687] - identifying globals and packages ...
[16:19:59.687] - Argument 'globals':
[16:19:59.688] logi TRUE
[16:19:59.688] - attr(*, "add")= chr "...future.x_ii"
[16:19:59.688] - attr(*, "ignore")= chr "ii"
[16:19:59.691] - R expression (map-reduce expression searched for globals):
[16:19:59.691] {
[16:19:59.691] NULL
[16:19:59.691] "# doFuture():::doFuture2(): process chunk of elements"
[16:19:59.691] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[16:19:59.691] ...future.x_jj <- ...future.x_ii[[jj]]
[16:19:59.691] {
[16:19:59.691] NULL
[16:19:59.691] ii <- NULL
[16:19:59.691] }
[16:19:59.691] ...future.env <- environment()
[16:19:59.691] local({
[16:19:59.691] for (name in names(...future.x_jj)) {
[16:19:59.691] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[16:19:59.691] inherits = FALSE)
[16:19:59.691] }
[16:19:59.691] })
[16:19:59.691] NULL
[16:19:59.691] tryCatch(ii, error = identity)
[16:19:59.691] })
[16:19:59.691] }
[16:19:59.705] - R expression (%dofuture% expression searched for globals):
[16:19:59.705] ii
[16:19:59.706] - Globals in %dofuture% R expression not in map-reduce expression:
[16:19:59.706] - Appending 0 globals only found in the vanilla %dofuture% expression:
[16:19:59.707] - globals: [1] '...future.x_ii'
[16:19:59.707] List of 1
[16:19:59.707] $ ...future.x_ii: num 42
[16:19:59.707] - attr(*, "where")=List of 1
[16:19:59.707] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[16:19:59.707] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[16:19:59.707] - attr(*, "resolved")= logi FALSE
[16:19:59.707] - attr(*, "total_size")= num 39
[16:19:59.710] - packages: [1] 'doFuture'
[16:19:59.710] - identifying globals and packages ... DONE
[16:19:59.710] Launching 1 futures (chunks) ...
[16:19:59.710] Chunk #1 of 1 ...
[16:19:59.710] - Finding globals in 'args_list' for chunk #1 ...
[16:19:59.711]
[16:19:59.711]
[16:19:59.711] - Finding globals in 'args_list' for chunk #1 ... DONE
[16:19:59.712] - seeds: <none>
[16:19:59.719] Chunk #1 of 1 ... DONE
[16:19:59.719] Launching 1 futures (chunks) ... DONE
[16:19:59.719] - resolving futures
[16:19:59.719] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: 8e15d890397503d5592d61f61861284c-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: 8e15d890397503d5592d61f61861284c
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.16.3
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> registerDoFuture()
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_04_16_01_50_00_21006/Rtmp2P19iB/RLIBS_2253042ec4d6b', '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' ...
[16:21:56.352] doFuture() ...
[16:21:56.355] - dummy globals (as locals): [1] 'ii'
[16:21:56.356] - R expression:
[16:21:56.356] {
[16:21:56.356] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[16:21:56.356] "# also in nested calls "
[16:21:56.356] doFuture::registerDoFuture()
[16:21:56.356] "# doFuture():::doFuture(): process chunk of elements"
[16:21:56.356] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[16:21:56.356] ...future.x_jj <- ...future.x_ii[[jj]]
[16:21:56.356] {
[16:21:56.356] NULL
[16:21:56.356] ii <- NULL
[16:21:56.356] }
[16:21:56.356] ...future.env <- environment()
[16:21:56.356] local({
[16:21:56.356] for (name in names(...future.x_jj)) {
[16:21:56.356] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[16:21:56.356] inherits = FALSE)
[16:21:56.356] }
[16:21:56.356] })
[16:21:56.356] tryCatch(ii, error = identity)
[16:21:56.356] })
[16:21:56.356] }
[16:21:56.358] - identifying globals and packages ...
[16:21:56.387] List of 1
[16:21:56.387] $ ...future.x_ii: NULL
[16:21:56.387] - attr(*, "where")=List of 1
[16:21:56.387] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[16:21:56.387] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[16:21:56.387] - attr(*, "resolved")= logi FALSE
[16:21:56.387] - attr(*, "total_size")= num 27
[16:21:56.398] - R expression:
[16:21:56.398] {
[16:21:56.398] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[16:21:56.398] "# also in nested calls "
[16:21:56.398] doFuture::registerDoFuture()
[16:21:56.398] "# doFuture():::doFuture(): process chunk of elements"
[16:21:56.398] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[16:21:56.398] ...future.x_jj <- ...future.x_ii[[jj]]
[16:21:56.398] {
[16:21:56.398] NULL
[16:21:56.398] ii <- NULL
[16:21:56.398] }
[16:21:56.398] ...future.env <- environment()
[16:21:56.398] local({
[16:21:56.398] for (name in names(...future.x_jj)) {
[16:21:56.398] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[16:21:56.398] inherits = FALSE)
[16:21:56.398] }
[16:21:56.398] })
[16:21:56.398] tryCatch(ii, error = identity)
[16:21:56.398] })
[16:21:56.398] }
[16:21:56.399] - globals: [1] '...future.x_ii'
[16:21:56.400] List of 1
[16:21:56.400] $ ...future.x_ii: NULL
[16:21:56.400] - attr(*, "where")=List of 1
[16:21:56.400] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[16:21:56.400] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[16:21:56.400] - attr(*, "resolved")= logi FALSE
[16:21:56.400] - attr(*, "total_size")= num 27
[16:21:56.406] - packages: [1] 'doFuture'
[16:21:56.406] - identifying globals and packages ... DONE
[16:21:56.469] Number of chunks: 1
[16:21:56.469] Number of futures (= number of chunks): 1
[16:21:56.470] Launching 1 futures (chunks) ...
[16:21:56.470] Chunk #1 of 1 ...
[16:21:56.471] - Finding globals in 'args_list' chunk #1 ...
[16:21:56.472]
[16:21:56.472]
[16:21:56.472] - Finding globals in 'args_list' for chunk #1 ... DONE
[16:21:56.480] Chunk #1 of 1 ... DONE
[16:21:56.481] Launching 1 futures (chunks) ... DONE
[16:21:56.481] - resolving futures
[16:21:56.481] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: bbc90afaba67fe986cc057a8cddf52e8-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: bbc90afaba67fe986cc057a8cddf52e8
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' [20s]
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' [9s]
Running 'foreach_dopar,globals.R' [9s]
Running 'foreach_dopar,nested_colon.R' [16s]
Running 'foreach_dopar,nested_dopar.R' [20s]
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' [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 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.16.3
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_04_16_01_50_00_21006/RtmpCWO6gR/RLIBS_30e0c77f114b6', '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' ...
[20:46:16.253] doFuture2() ...
[20:46:16.322] Number of chunks: 1
[20:46:16.323] Number of futures (= number of chunks): 1
[20:46:16.323] seed = FALSE
[20:46:16.324] NULL
[20:46:16.328] seed = FALSE
[20:46:16.328] seed = FALSE
[20:46:16.329] - %dofuture% R expression:
[20:46:16.329] ii
[20:46:16.330] - foreach iterator arguments: [1] 'ii'
[20:46:16.330] - dummy globals (as locals): [1] 'ii'
[20:46:16.331] - R expression (map-reduce expression adjusted for RNG):
[20:46:16.332] {
[20:46:16.332] NULL
[20:46:16.332] "# doFuture():::doFuture2(): process chunk of elements"
[20:46:16.332] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[20:46:16.332] ...future.x_jj <- ...future.x_ii[[jj]]
[20:46:16.332] {
[20:46:16.332] NULL
[20:46:16.332] ii <- NULL
[20:46:16.332] }
[20:46:16.332] ...future.env <- environment()
[20:46:16.332] local({
[20:46:16.332] for (name in names(...future.x_jj)) {
[20:46:16.332] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[20:46:16.332] inherits = FALSE)
[20:46:16.332] }
[20:46:16.332] })
[20:46:16.332] NULL
[20:46:16.332] tryCatch(ii, error = identity)
[20:46:16.332] })
[20:46:16.332] }
[20:46:16.333] - identifying globals and packages ...
[20:46:16.333] - Argument 'globals':
[20:46:16.333] logi TRUE
[20:46:16.333] - attr(*, "add")= chr "...future.x_ii"
[20:46:16.333] - attr(*, "ignore")= chr "ii"
[20:46:16.336] - R expression (map-reduce expression searched for globals):
[20:46:16.337] {
[20:46:16.337] NULL
[20:46:16.337] "# doFuture():::doFuture2(): process chunk of elements"
[20:46:16.337] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[20:46:16.337] ...future.x_jj <- ...future.x_ii[[jj]]
[20:46:16.337] {
[20:46:16.337] NULL
[20:46:16.337] ii <- NULL
[20:46:16.337] }
[20:46:16.337] ...future.env <- environment()
[20:46:16.337] local({
[20:46:16.337] for (name in names(...future.x_jj)) {
[20:46:16.337] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[20:46:16.337] inherits = FALSE)
[20:46:16.337] }
[20:46:16.337] })
[20:46:16.337] NULL
[20:46:16.337] tryCatch(ii, error = identity)
[20:46:16.337] })
[20:46:16.337] }
[20:46:16.360] - R expression (%dofuture% expression searched for globals):
[20:46:16.360] ii
[20:46:16.362] - Globals in %dofuture% R expression not in map-reduce expression:
[20:46:16.362] - Appending 0 globals only found in the vanilla %dofuture% expression:
[20:46:16.362] - globals: [1] '...future.x_ii'
[20:46:16.362] List of 1
[20:46:16.362] $ ...future.x_ii: num 42
[20:46:16.362] - attr(*, "where")=List of 1
[20:46:16.362] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[20:46:16.362] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[20:46:16.362] - attr(*, "resolved")= logi FALSE
[20:46:16.362] - attr(*, "total_size")= num 39
[20:46:16.366] - packages: [1] 'doFuture'
[20:46:16.367] - identifying globals and packages ... DONE
[20:46:16.367] Launching 1 futures (chunks) ...
[20:46:16.367] Chunk #1 of 1 ...
[20:46:16.367] - Finding globals in 'args_list' for chunk #1 ...
[20:46:16.368]
[20:46:16.369]
[20:46:16.369] - Finding globals in 'args_list' for chunk #1 ... DONE
[20:46:16.369] - seeds: <none>
[20:46:16.377] Chunk #1 of 1 ... DONE
[20:46:16.377] Launching 1 futures (chunks) ... DONE
[20:46:16.377] - resolving futures
[20:46:16.378] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: d25c3856ac06db83c69f439330cbe8b5-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: d25c3856ac06db83c69f439330cbe8b5
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.16.3
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> registerDoFuture()
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_04_16_01_50_00_21006/RtmpCWO6gR/RLIBS_30e0c77f114b6', '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' ...
[20:48:28.462] doFuture() ...
[20:48:28.466] - dummy globals (as locals): [1] 'ii'
[20:48:28.467] - R expression:
[20:48:28.467] {
[20:48:28.467] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[20:48:28.467] "# also in nested calls "
[20:48:28.467] doFuture::registerDoFuture()
[20:48:28.467] "# doFuture():::doFuture(): process chunk of elements"
[20:48:28.467] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[20:48:28.467] ...future.x_jj <- ...future.x_ii[[jj]]
[20:48:28.467] {
[20:48:28.467] NULL
[20:48:28.467] ii <- NULL
[20:48:28.467] }
[20:48:28.467] ...future.env <- environment()
[20:48:28.467] local({
[20:48:28.467] for (name in names(...future.x_jj)) {
[20:48:28.467] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[20:48:28.467] inherits = FALSE)
[20:48:28.467] }
[20:48:28.467] })
[20:48:28.467] tryCatch(ii, error = identity)
[20:48:28.467] })
[20:48:28.467] }
[20:48:28.469] - identifying globals and packages ...
[20:48:28.509] List of 1
[20:48:28.509] $ ...future.x_ii: NULL
[20:48:28.509] - attr(*, "where")=List of 1
[20:48:28.509] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[20:48:28.509] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[20:48:28.509] - attr(*, "resolved")= logi FALSE
[20:48:28.509] - attr(*, "total_size")= num 27
[20:48:28.523] - R expression:
[20:48:28.523] {
[20:48:28.523] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[20:48:28.523] "# also in nested calls "
[20:48:28.523] doFuture::registerDoFuture()
[20:48:28.523] "# doFuture():::doFuture(): process chunk of elements"
[20:48:28.523] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[20:48:28.523] ...future.x_jj <- ...future.x_ii[[jj]]
[20:48:28.523] {
[20:48:28.523] NULL
[20:48:28.523] ii <- NULL
[20:48:28.523] }
[20:48:28.523] ...future.env <- environment()
[20:48:28.523] local({
[20:48:28.523] for (name in names(...future.x_jj)) {
[20:48:28.523] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[20:48:28.523] inherits = FALSE)
[20:48:28.523] }
[20:48:28.523] })
[20:48:28.523] tryCatch(ii, error = identity)
[20:48:28.523] })
[20:48:28.523] }
[20:48:28.524] - globals: [1] '...future.x_ii'
[20:48:28.525] List of 1
[20:48:28.525] $ ...future.x_ii: NULL
[20:48:28.525] - attr(*, "where")=List of 1
[20:48:28.525] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[20:48:28.525] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[20:48:28.525] - attr(*, "resolved")= logi FALSE
[20:48:28.525] - attr(*, "total_size")= num 27
[20:48:28.532] - packages: [1] 'doFuture'
[20:48:28.533] - identifying globals and packages ... DONE
[20:48:28.627] Number of chunks: 1
[20:48:28.627] Number of futures (= number of chunks): 1
[20:48:28.628] Launching 1 futures (chunks) ...
[20:48:28.628] Chunk #1 of 1 ...
[20:48:28.629] - Finding globals in 'args_list' chunk #1 ...
[20:48:28.630]
[20:48:28.631]
[20:48:28.631] - Finding globals in 'args_list' for chunk #1 ... DONE
[20:48:28.642] Chunk #1 of 1 ... DONE
[20:48:28.643] Launching 1 futures (chunks) ... DONE
[20:48:28.643] - resolving futures
[20:48:28.643] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: b37203365004e98222c9458198636841-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: b37203365004e98222c9458198636841
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