Last updated on 2025-04-30 04:50:04 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0.2 | 3.01 | 134.14 | 137.15 | OK | |
r-devel-linux-x86_64-debian-gcc | 1.0.2 | 2.00 | 103.45 | 105.45 | OK | |
r-devel-linux-x86_64-fedora-clang | 1.0.2 | 233.43 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 1.0.2 | 208.82 | OK | |||
r-devel-windows-x86_64 | 1.0.2 | 4.00 | 317.00 | 321.00 | ERROR | |
r-patched-linux-x86_64 | 1.0.2 | 3.50 | 131.46 | 134.96 | OK | |
r-release-linux-x86_64 | 1.0.2 | 2.89 | 130.43 | 133.32 | 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 | 315.00 | 319.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' [8s]
Running 'foreach_dofuture,nested_colon.R' [16s]
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' [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' [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-26 r88181 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_29_01_50_00_18889/Rtmp6hGLCl/RLIBS_164e44a246c0', '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' ...
[12:04:37.862] doFuture2() ...
[12:04:37.922] Number of chunks: 1
[12:04:37.922] Number of futures (= number of chunks): 1
[12:04:37.922] seed = FALSE
[12:04:37.923] NULL
[12:04:37.926] seed = FALSE
[12:04:37.927] seed = FALSE
[12:04:37.927] - %dofuture% R expression:
[12:04:37.927] ii
[12:04:37.927] - foreach iterator arguments: [1] 'ii'
[12:04:37.928] - dummy globals (as locals): [1] 'ii'
[12:04:37.928] - R expression (map-reduce expression adjusted for RNG):
[12:04:37.929] {
[12:04:37.929] NULL
[12:04:37.929] "# doFuture():::doFuture2(): process chunk of elements"
[12:04:37.929] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[12:04:37.929] ...future.x_jj <- ...future.x_ii[[jj]]
[12:04:37.929] {
[12:04:37.929] NULL
[12:04:37.929] ii <- NULL
[12:04:37.929] }
[12:04:37.929] ...future.env <- environment()
[12:04:37.929] local({
[12:04:37.929] for (name in names(...future.x_jj)) {
[12:04:37.929] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[12:04:37.929] inherits = FALSE)
[12:04:37.929] }
[12:04:37.929] })
[12:04:37.929] NULL
[12:04:37.929] tryCatch(ii, error = identity)
[12:04:37.929] })
[12:04:37.929] }
[12:04:37.929] - identifying globals and packages ...
[12:04:37.929] - Argument 'globals':
[12:04:37.930] logi TRUE
[12:04:37.930] - attr(*, "add")= chr "...future.x_ii"
[12:04:37.930] - attr(*, "ignore")= chr "ii"
[12:04:37.933] - R expression (map-reduce expression searched for globals):
[12:04:37.933] {
[12:04:37.933] NULL
[12:04:37.933] "# doFuture():::doFuture2(): process chunk of elements"
[12:04:37.933] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[12:04:37.933] ...future.x_jj <- ...future.x_ii[[jj]]
[12:04:37.933] {
[12:04:37.933] NULL
[12:04:37.933] ii <- NULL
[12:04:37.933] }
[12:04:37.933] ...future.env <- environment()
[12:04:37.933] local({
[12:04:37.933] for (name in names(...future.x_jj)) {
[12:04:37.933] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[12:04:37.933] inherits = FALSE)
[12:04:37.933] }
[12:04:37.933] })
[12:04:37.933] NULL
[12:04:37.933] tryCatch(ii, error = identity)
[12:04:37.933] })
[12:04:37.933] }
[12:04:37.948] - R expression (%dofuture% expression searched for globals):
[12:04:37.948] ii
[12:04:37.950] - Globals in %dofuture% R expression not in map-reduce expression:
[12:04:37.951] - Appending 0 globals only found in the vanilla %dofuture% expression:
[12:04:37.951] - globals: [1] '...future.x_ii'
[12:04:37.951] List of 1
[12:04:37.951] $ ...future.x_ii: num 42
[12:04:37.951] - attr(*, "where")=List of 1
[12:04:37.951] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[12:04:37.951] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[12:04:37.951] - attr(*, "resolved")= logi FALSE
[12:04:37.951] - attr(*, "total_size")= num 39
[12:04:37.956] - packages: [1] 'doFuture'
[12:04:37.956] - identifying globals and packages ... DONE
[12:04:37.956] Launching 1 futures (chunks) ...
[12:04:37.957] Chunk #1 of 1 ...
[12:04:37.957] - Finding globals in 'args_list' for chunk #1 ...
[12:04:37.958]
[12:04:37.958]
[12:04:37.958] - Finding globals in 'args_list' for chunk #1 ... DONE
[12:04:37.958] - seeds: <none>
[12:04:37.965] Chunk #1 of 1 ... DONE
[12:04:37.966] Launching 1 futures (chunks) ... DONE
[12:04:37.966] - resolving futures
[12:04:37.966] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: 7af0089f56a7badd124836bac2804ed5-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: 7af0089f56a7badd124836bac2804ed5
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-26 r88181 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_29_01_50_00_18889/Rtmp6hGLCl/RLIBS_164e44a246c0', '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' ...
[12:06:37.499] doFuture() ...
[12:06:37.503] - dummy globals (as locals): [1] 'ii'
[12:06:37.503] - R expression:
[12:06:37.503] {
[12:06:37.503] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[12:06:37.503] "# also in nested calls "
[12:06:37.503] doFuture::registerDoFuture()
[12:06:37.503] "# doFuture():::doFuture(): process chunk of elements"
[12:06:37.503] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[12:06:37.503] ...future.x_jj <- ...future.x_ii[[jj]]
[12:06:37.503] {
[12:06:37.503] NULL
[12:06:37.503] ii <- NULL
[12:06:37.503] }
[12:06:37.503] ...future.env <- environment()
[12:06:37.503] local({
[12:06:37.503] for (name in names(...future.x_jj)) {
[12:06:37.503] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[12:06:37.503] inherits = FALSE)
[12:06:37.503] }
[12:06:37.503] })
[12:06:37.503] tryCatch(ii, error = identity)
[12:06:37.503] })
[12:06:37.503] }
[12:06:37.505] - identifying globals and packages ...
[12:06:37.526] List of 1
[12:06:37.526] $ ...future.x_ii: NULL
[12:06:37.526] - attr(*, "where")=List of 1
[12:06:37.526] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[12:06:37.526] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[12:06:37.526] - attr(*, "resolved")= logi FALSE
[12:06:37.526] - attr(*, "total_size")= num 27
[12:06:37.536] - R expression:
[12:06:37.537] {
[12:06:37.537] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[12:06:37.537] "# also in nested calls "
[12:06:37.537] doFuture::registerDoFuture()
[12:06:37.537] "# doFuture():::doFuture(): process chunk of elements"
[12:06:37.537] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[12:06:37.537] ...future.x_jj <- ...future.x_ii[[jj]]
[12:06:37.537] {
[12:06:37.537] NULL
[12:06:37.537] ii <- NULL
[12:06:37.537] }
[12:06:37.537] ...future.env <- environment()
[12:06:37.537] local({
[12:06:37.537] for (name in names(...future.x_jj)) {
[12:06:37.537] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[12:06:37.537] inherits = FALSE)
[12:06:37.537] }
[12:06:37.537] })
[12:06:37.537] tryCatch(ii, error = identity)
[12:06:37.537] })
[12:06:37.537] }
[12:06:37.538] - globals: [1] '...future.x_ii'
[12:06:37.538] List of 1
[12:06:37.538] $ ...future.x_ii: NULL
[12:06:37.538] - attr(*, "where")=List of 1
[12:06:37.538] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[12:06:37.538] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[12:06:37.538] - attr(*, "resolved")= logi FALSE
[12:06:37.538] - attr(*, "total_size")= num 27
[12:06:37.544] - packages: [1] 'doFuture'
[12:06:37.544] - identifying globals and packages ... DONE
[12:06:37.602] Number of chunks: 1
[12:06:37.602] Number of futures (= number of chunks): 1
[12:06:37.602] Launching 1 futures (chunks) ...
[12:06:37.603] Chunk #1 of 1 ...
[12:06:37.603] - Finding globals in 'args_list' chunk #1 ...
[12:06:37.604]
[12:06:37.604]
[12:06:37.605] - Finding globals in 'args_list' for chunk #1 ... DONE
[12:06:37.612] Chunk #1 of 1 ... DONE
[12:06:37.612] Launching 1 futures (chunks) ... DONE
[12:06:37.613] - resolving futures
[12:06:37.613] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: e37439e98a453f1e7c3c3dced7bdd3c0-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: e37439e98a453f1e7c3c3dced7bdd3c0
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' [2s]
Running 'foreach_dopar,doRNG,dorng.R' [5s]
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' [17s]
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 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_04_28_01_50_01_31658/RtmpaeD5kY/RLIBS_5244193310f6', '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' ...
[14:45:04.237] doFuture2() ...
[14:45:04.323] Number of chunks: 1
[14:45:04.324] Number of futures (= number of chunks): 1
[14:45:04.324] seed = FALSE
[14:45:04.325] NULL
[14:45:04.329] seed = FALSE
[14:45:04.329] seed = FALSE
[14:45:04.329] - %dofuture% R expression:
[14:45:04.330] ii
[14:45:04.330] - foreach iterator arguments: [1] 'ii'
[14:45:04.331] - dummy globals (as locals): [1] 'ii'
[14:45:04.332] - R expression (map-reduce expression adjusted for RNG):
[14:45:04.332] {
[14:45:04.332] NULL
[14:45:04.332] "# doFuture():::doFuture2(): process chunk of elements"
[14:45:04.332] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[14:45:04.332] ...future.x_jj <- ...future.x_ii[[jj]]
[14:45:04.332] {
[14:45:04.332] NULL
[14:45:04.332] ii <- NULL
[14:45:04.332] }
[14:45:04.332] ...future.env <- environment()
[14:45:04.332] local({
[14:45:04.332] for (name in names(...future.x_jj)) {
[14:45:04.332] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[14:45:04.332] inherits = FALSE)
[14:45:04.332] }
[14:45:04.332] })
[14:45:04.332] NULL
[14:45:04.332] tryCatch(ii, error = identity)
[14:45:04.332] })
[14:45:04.332] }
[14:45:04.333] - identifying globals and packages ...
[14:45:04.333] - Argument 'globals':
[14:45:04.333] logi TRUE
[14:45:04.333] - attr(*, "add")= chr "...future.x_ii"
[14:45:04.333] - attr(*, "ignore")= chr "ii"
[14:45:04.337] - R expression (map-reduce expression searched for globals):
[14:45:04.338] {
[14:45:04.338] NULL
[14:45:04.338] "# doFuture():::doFuture2(): process chunk of elements"
[14:45:04.338] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[14:45:04.338] ...future.x_jj <- ...future.x_ii[[jj]]
[14:45:04.338] {
[14:45:04.338] NULL
[14:45:04.338] ii <- NULL
[14:45:04.338] }
[14:45:04.338] ...future.env <- environment()
[14:45:04.338] local({
[14:45:04.338] for (name in names(...future.x_jj)) {
[14:45:04.338] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[14:45:04.338] inherits = FALSE)
[14:45:04.338] }
[14:45:04.338] })
[14:45:04.338] NULL
[14:45:04.338] tryCatch(ii, error = identity)
[14:45:04.338] })
[14:45:04.338] }
[14:45:04.357] - R expression (%dofuture% expression searched for globals):
[14:45:04.358] ii
[14:45:04.360] - Globals in %dofuture% R expression not in map-reduce expression:
[14:45:04.361] - Appending 0 globals only found in the vanilla %dofuture% expression:
[14:45:04.361] - globals: [1] '...future.x_ii'
[14:45:04.361] List of 1
[14:45:04.361] $ ...future.x_ii: num 42
[14:45:04.361] - attr(*, "where")=List of 1
[14:45:04.361] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[14:45:04.361] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[14:45:04.361] - attr(*, "resolved")= logi FALSE
[14:45:04.361] - attr(*, "total_size")= num 39
[14:45:04.367] - packages: [1] 'doFuture'
[14:45:04.368] - identifying globals and packages ... DONE
[14:45:04.368] Launching 1 futures (chunks) ...
[14:45:04.368] Chunk #1 of 1 ...
[14:45:04.369] - Finding globals in 'args_list' for chunk #1 ...
[14:45:04.370]
[14:45:04.371]
[14:45:04.371] - Finding globals in 'args_list' for chunk #1 ... DONE
[14:45:04.371] - seeds: <none>
[14:45:04.380] Chunk #1 of 1 ... DONE
[14:45:04.381] Launching 1 futures (chunks) ... DONE
[14:45:04.381] - resolving futures
[14:45:04.381] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: e0092f901208fcd6d083f5af8da88c3d-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: e0092f901208fcd6d083f5af8da88c3d
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_04_28_01_50_01_31658/RtmpaeD5kY/RLIBS_5244193310f6', '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' ...
[14:47:01.651] doFuture() ...
[14:47:01.653] - dummy globals (as locals): [1] 'ii'
[14:47:01.654] - R expression:
[14:47:01.654] {
[14:47:01.654] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[14:47:01.654] "# also in nested calls "
[14:47:01.654] doFuture::registerDoFuture()
[14:47:01.654] "# doFuture():::doFuture(): process chunk of elements"
[14:47:01.654] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[14:47:01.654] ...future.x_jj <- ...future.x_ii[[jj]]
[14:47:01.654] {
[14:47:01.654] NULL
[14:47:01.654] ii <- NULL
[14:47:01.654] }
[14:47:01.654] ...future.env <- environment()
[14:47:01.654] local({
[14:47:01.654] for (name in names(...future.x_jj)) {
[14:47:01.654] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[14:47:01.654] inherits = FALSE)
[14:47:01.654] }
[14:47:01.654] })
[14:47:01.654] tryCatch(ii, error = identity)
[14:47:01.654] })
[14:47:01.654] }
[14:47:01.655] - identifying globals and packages ...
[14:47:01.669] List of 1
[14:47:01.669] $ ...future.x_ii: NULL
[14:47:01.669] - attr(*, "where")=List of 1
[14:47:01.669] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[14:47:01.669] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[14:47:01.669] - attr(*, "resolved")= logi FALSE
[14:47:01.669] - attr(*, "total_size")= num 27
[14:47:01.676] - R expression:
[14:47:01.676] {
[14:47:01.676] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[14:47:01.676] "# also in nested calls "
[14:47:01.676] doFuture::registerDoFuture()
[14:47:01.676] "# doFuture():::doFuture(): process chunk of elements"
[14:47:01.676] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[14:47:01.676] ...future.x_jj <- ...future.x_ii[[jj]]
[14:47:01.676] {
[14:47:01.676] NULL
[14:47:01.676] ii <- NULL
[14:47:01.676] }
[14:47:01.676] ...future.env <- environment()
[14:47:01.676] local({
[14:47:01.676] for (name in names(...future.x_jj)) {
[14:47:01.676] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[14:47:01.676] inherits = FALSE)
[14:47:01.676] }
[14:47:01.676] })
[14:47:01.676] tryCatch(ii, error = identity)
[14:47:01.676] })
[14:47:01.676] }
[14:47:01.677] - globals: [1] '...future.x_ii'
[14:47:01.677] List of 1
[14:47:01.677] $ ...future.x_ii: NULL
[14:47:01.677] - attr(*, "where")=List of 1
[14:47:01.677] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[14:47:01.677] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[14:47:01.677] - attr(*, "resolved")= logi FALSE
[14:47:01.677] - attr(*, "total_size")= num 27
[14:47:01.682] - packages: [1] 'doFuture'
[14:47:01.682] - identifying globals and packages ... DONE
[14:47:01.740] Number of chunks: 1
[14:47:01.740] Number of futures (= number of chunks): 1
[14:47:01.741] Launching 1 futures (chunks) ...
[14:47:01.741] Chunk #1 of 1 ...
[14:47:01.741] - Finding globals in 'args_list' chunk #1 ...
[14:47:01.742]
[14:47:01.743]
[14:47:01.743] - Finding globals in 'args_list' for chunk #1 ... DONE
[14:47:01.750] Chunk #1 of 1 ... DONE
[14:47:01.751] Launching 1 futures (chunks) ... DONE
[14:47:01.751] - resolving futures
[14:47:01.751] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: c40a704b11de850394d60ae0323996d2-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: c40a704b11de850394d60ae0323996d2
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' [12s]
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' [19s]
Running 'foreach_dopar,options-for-export.R' [6s]
Running 'foreach_dopar.R' [4s]
Running 'makeChunks.R' [5s]
Running 'options,nested.R' [5s]
Running 'registerDoFuture.R' [3s]
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.17.0
> options(future.debug = FALSE)
>
> message("*** cluster() ...")
*** cluster() ...
>
> message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", "))
Library paths: 'D:/temp/2025_04_26_01_50_00_24418/RtmpQL56xn/RLIBS_3d046264258b', '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' ...
[04:03:54.430] doFuture2() ...
[04:03:54.525] Number of chunks: 1
[04:03:54.525] Number of futures (= number of chunks): 1
[04:03:54.526] seed = FALSE
[04:03:54.526] NULL
[04:03:54.531] seed = FALSE
[04:03:54.531] seed = FALSE
[04:03:54.532] - %dofuture% R expression:
[04:03:54.532] ii
[04:03:54.533] - foreach iterator arguments: [1] 'ii'
[04:03:54.533] - dummy globals (as locals): [1] 'ii'
[04:03:54.534] - R expression (map-reduce expression adjusted for RNG):
[04:03:54.534] {
[04:03:54.534] NULL
[04:03:54.534] "# doFuture():::doFuture2(): process chunk of elements"
[04:03:54.534] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[04:03:54.534] ...future.x_jj <- ...future.x_ii[[jj]]
[04:03:54.534] {
[04:03:54.534] NULL
[04:03:54.534] ii <- NULL
[04:03:54.534] }
[04:03:54.534] ...future.env <- environment()
[04:03:54.534] local({
[04:03:54.534] for (name in names(...future.x_jj)) {
[04:03:54.534] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[04:03:54.534] inherits = FALSE)
[04:03:54.534] }
[04:03:54.534] })
[04:03:54.534] NULL
[04:03:54.534] tryCatch(ii, error = identity)
[04:03:54.534] })
[04:03:54.534] }
[04:03:54.535] - identifying globals and packages ...
[04:03:54.536] - Argument 'globals':
[04:03:54.536] logi TRUE
[04:03:54.536] - attr(*, "add")= chr "...future.x_ii"
[04:03:54.536] - attr(*, "ignore")= chr "ii"
[04:03:54.540] - R expression (map-reduce expression searched for globals):
[04:03:54.541] {
[04:03:54.541] NULL
[04:03:54.541] "# doFuture():::doFuture2(): process chunk of elements"
[04:03:54.541] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[04:03:54.541] ...future.x_jj <- ...future.x_ii[[jj]]
[04:03:54.541] {
[04:03:54.541] NULL
[04:03:54.541] ii <- NULL
[04:03:54.541] }
[04:03:54.541] ...future.env <- environment()
[04:03:54.541] local({
[04:03:54.541] for (name in names(...future.x_jj)) {
[04:03:54.541] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[04:03:54.541] inherits = FALSE)
[04:03:54.541] }
[04:03:54.541] })
[04:03:54.541] NULL
[04:03:54.541] tryCatch(ii, error = identity)
[04:03:54.541] })
[04:03:54.541] }
[04:03:54.563] - R expression (%dofuture% expression searched for globals):
[04:03:54.563] ii
[04:03:54.566] - Globals in %dofuture% R expression not in map-reduce expression:
[04:03:54.566] - Appending 0 globals only found in the vanilla %dofuture% expression:
[04:03:54.567] - globals: [1] '...future.x_ii'
[04:03:54.567] List of 1
[04:03:54.567] $ ...future.x_ii: num 42
[04:03:54.567] - attr(*, "where")=List of 1
[04:03:54.567] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[04:03:54.567] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[04:03:54.567] - attr(*, "resolved")= logi FALSE
[04:03:54.567] - attr(*, "total_size")= num 39
[04:03:54.573] - packages: [1] 'doFuture'
[04:03:54.573] - identifying globals and packages ... DONE
[04:03:54.574] Launching 1 futures (chunks) ...
[04:03:54.574] Chunk #1 of 1 ...
[04:03:54.575] - Finding globals in 'args_list' for chunk #1 ...
[04:03:54.576]
[04:03:54.577]
[04:03:54.577] - Finding globals in 'args_list' for chunk #1 ... DONE
[04:03:54.577] - seeds: <none>
[04:03:54.587] Chunk #1 of 1 ... DONE
[04:03:54.587] Launching 1 futures (chunks) ... DONE
[04:03:54.588] - resolving futures
[04:03:54.588] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: c63be7907a24aff4c5614939f64c7877-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: c63be7907a24aff4c5614939f64c7877
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_04_26_01_50_00_24418/RtmpQL56xn/RLIBS_3d046264258b', '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' ...
[04:06:05.607] doFuture() ...
[04:06:05.610] - dummy globals (as locals): [1] 'ii'
[04:06:05.611] - R expression:
[04:06:05.612] {
[04:06:05.612] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[04:06:05.612] "# also in nested calls "
[04:06:05.612] doFuture::registerDoFuture()
[04:06:05.612] "# doFuture():::doFuture(): process chunk of elements"
[04:06:05.612] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[04:06:05.612] ...future.x_jj <- ...future.x_ii[[jj]]
[04:06:05.612] {
[04:06:05.612] NULL
[04:06:05.612] ii <- NULL
[04:06:05.612] }
[04:06:05.612] ...future.env <- environment()
[04:06:05.612] local({
[04:06:05.612] for (name in names(...future.x_jj)) {
[04:06:05.612] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[04:06:05.612] inherits = FALSE)
[04:06:05.612] }
[04:06:05.612] })
[04:06:05.612] tryCatch(ii, error = identity)
[04:06:05.612] })
[04:06:05.612] }
[04:06:05.613] - identifying globals and packages ...
[04:06:05.640] List of 1
[04:06:05.640] $ ...future.x_ii: NULL
[04:06:05.640] - attr(*, "where")=List of 1
[04:06:05.640] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[04:06:05.640] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[04:06:05.640] - attr(*, "resolved")= logi FALSE
[04:06:05.640] - attr(*, "total_size")= num 27
[04:06:05.651] - R expression:
[04:06:05.651] {
[04:06:05.651] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'"
[04:06:05.651] "# also in nested calls "
[04:06:05.651] doFuture::registerDoFuture()
[04:06:05.651] "# doFuture():::doFuture(): process chunk of elements"
[04:06:05.651] lapply(seq_along(...future.x_ii), FUN = function(jj) {
[04:06:05.651] ...future.x_jj <- ...future.x_ii[[jj]]
[04:06:05.651] {
[04:06:05.651] NULL
[04:06:05.651] ii <- NULL
[04:06:05.651] }
[04:06:05.651] ...future.env <- environment()
[04:06:05.651] local({
[04:06:05.651] for (name in names(...future.x_jj)) {
[04:06:05.651] assign(name, ...future.x_jj[[name]], envir = ...future.env,
[04:06:05.651] inherits = FALSE)
[04:06:05.651] }
[04:06:05.651] })
[04:06:05.651] tryCatch(ii, error = identity)
[04:06:05.651] })
[04:06:05.651] }
[04:06:05.652] - globals: [1] '...future.x_ii'
[04:06:05.653] List of 1
[04:06:05.653] $ ...future.x_ii: NULL
[04:06:05.653] - attr(*, "where")=List of 1
[04:06:05.653] ..$ ...future.x_ii:<environment: R_EmptyEnv>
[04:06:05.653] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
[04:06:05.653] - attr(*, "resolved")= logi FALSE
[04:06:05.653] - attr(*, "total_size")= num 27
[04:06:05.659] - packages: [1] 'doFuture'
[04:06:05.660] - identifying globals and packages ... DONE
[04:06:05.742] Number of chunks: 1
[04:06:05.742] Number of futures (= number of chunks): 1
[04:06:05.743] Launching 1 futures (chunks) ...
[04:06:05.743] Chunk #1 of 1 ...
[04:06:05.744] - Finding globals in 'args_list' chunk #1 ...
[04:06:05.745]
[04:06:05.746]
[04:06:05.746] - Finding globals in 'args_list' for chunk #1 ... DONE
[04:06:05.755] Chunk #1 of 1 ... DONE
[04:06:05.756] Launching 1 futures (chunks) ... DONE
[04:06:05.756] - resolving futures
[04:06:05.756] - gathering results & relaying conditions (except errors)
<FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'>
Future UUID: bc7d94b1bdbbd26876db5fec02d6bb6f-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: bc7d94b1bdbbd26876db5fec02d6bb6f
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