CRAN Package Check Results for Package doFuture

Last updated on 2025-04-14 05:50:42 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0.2 3.36 107.31 110.67 OK
r-devel-linux-x86_64-debian-gcc 1.0.2 2.43 106.97 109.40 OK
r-devel-linux-x86_64-fedora-gcc 1.0.2 182.81 OK
r-devel-macos-arm64 1.0.2 116.00 OK
r-devel-macos-x86_64 1.0.2 176.00 OK
r-devel-windows-x86_64 1.0.2 4.00 175.00 179.00 OK
r-patched-linux-x86_64 1.0.2 3.13 130.82 133.95 OK
r-release-linux-x86_64 1.0.2 3.04 130.90 133.94 OK
r-release-macos-arm64 1.0.2 110.00 OK
r-release-macos-x86_64 1.0.2 281.00 OK
r-release-windows-x86_64 1.0.2 6.00 353.00 359.00 ERROR
r-oldrel-macos-arm64 1.0.2 117.00 OK
r-oldrel-macos-x86_64 1.0.2 266.00 OK
r-oldrel-windows-x86_64 1.0.2 5.00 208.00 213.00 OK

Check Details

Version: 1.0.2
Check: tests
Result: ERROR Running 'foreach_dofuture,cluster-missing-doFuture-pkg.R' [62s] 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' [21s] 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' [5s] Running the tests in 'tests/foreach_dofuture,cluster-missing-doFuture-pkg.R' failed. Complete output: > source("incl/start.R") Loading required package: foreach Loading required package: future R version 4.4.3 (2025-02-28 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows Server 2022 x64 (build 20348) Matrix products: default locale: [1] LC_COLLATE=C LC_CTYPE=German_Germany.utf8 [3] LC_MONETARY=C LC_NUMERIC=C [5] LC_TIME=C time zone: Europe/Berlin tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] doFuture_1.0.2 future_1.40.0 foreach_1.5.2 loaded via a namespace (and not attached): [1] compiler_4.4.3 parallelly_1.43.0 tools_4.4.3 [4] parallel_4.4.3 future.apply_1.11.3 listenv_0.9.1 [7] codetools_0.2-20 iterators_1.0.14 digest_0.6.37 [10] globals_0.16.3 > options(future.debug = FALSE) > > message("*** cluster() ...") *** cluster() ... > > message("Library paths: ", paste(sQuote(.libPaths()), collapse = ", ")) Library paths: 'D:/temp/2025_04_12_01_50_00_6534/Rtmp4sP1tf/RLIBS_32b603742120c', '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' ... [21:51:32.552] doFuture2() ... [21:51:32.630] Number of chunks: 1 [21:51:32.630] Number of futures (= number of chunks): 1 [21:51:32.631] seed = FALSE [21:51:32.631] NULL [21:51:32.634] seed = FALSE [21:51:32.634] seed = FALSE [21:51:32.635] - %dofuture% R expression: [21:51:32.635] ii [21:51:32.635] - foreach iterator arguments: [1] 'ii' [21:51:32.636] - dummy globals (as locals): [1] 'ii' [21:51:32.636] - R expression (map-reduce expression adjusted for RNG): [21:51:32.636] { [21:51:32.636] NULL [21:51:32.636] "# doFuture():::doFuture2(): process chunk of elements" [21:51:32.636] lapply(seq_along(...future.x_ii), FUN = function(jj) { [21:51:32.636] ...future.x_jj <- ...future.x_ii[[jj]] [21:51:32.636] { [21:51:32.636] NULL [21:51:32.636] ii <- NULL [21:51:32.636] } [21:51:32.636] ...future.env <- environment() [21:51:32.636] local({ [21:51:32.636] for (name in names(...future.x_jj)) { [21:51:32.636] assign(name, ...future.x_jj[[name]], envir = ...future.env, [21:51:32.636] inherits = FALSE) [21:51:32.636] } [21:51:32.636] }) [21:51:32.636] NULL [21:51:32.636] tryCatch(ii, error = identity) [21:51:32.636] }) [21:51:32.636] } [21:51:32.637] - identifying globals and packages ... [21:51:32.637] - Argument 'globals': [21:51:32.637] logi TRUE [21:51:32.637] - attr(*, "add")= chr "...future.x_ii" [21:51:32.637] - attr(*, "ignore")= chr "ii" [21:51:32.640] - R expression (map-reduce expression searched for globals): [21:51:32.640] { [21:51:32.640] NULL [21:51:32.640] "# doFuture():::doFuture2(): process chunk of elements" [21:51:32.640] lapply(seq_along(...future.x_ii), FUN = function(jj) { [21:51:32.640] ...future.x_jj <- ...future.x_ii[[jj]] [21:51:32.640] { [21:51:32.640] NULL [21:51:32.640] ii <- NULL [21:51:32.640] } [21:51:32.640] ...future.env <- environment() [21:51:32.640] local({ [21:51:32.640] for (name in names(...future.x_jj)) { [21:51:32.640] assign(name, ...future.x_jj[[name]], envir = ...future.env, [21:51:32.640] inherits = FALSE) [21:51:32.640] } [21:51:32.640] }) [21:51:32.640] NULL [21:51:32.640] tryCatch(ii, error = identity) [21:51:32.640] }) [21:51:32.640] } [21:51:32.666] - R expression (%dofuture% expression searched for globals): [21:51:32.667] ii [21:51:32.669] - Globals in %dofuture% R expression not in map-reduce expression: [21:51:32.670] - Appending 0 globals only found in the vanilla %dofuture% expression: [21:51:32.670] - globals: [1] '...future.x_ii' [21:51:32.671] List of 1 [21:51:32.671] $ ...future.x_ii: num 42 [21:51:32.671] - attr(*, "where")=List of 1 [21:51:32.671] ..$ ...future.x_ii:<environment: R_EmptyEnv> [21:51:32.671] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [21:51:32.671] - attr(*, "resolved")= logi FALSE [21:51:32.671] - attr(*, "total_size")= num 39 [21:51:32.677] - packages: [1] 'doFuture' [21:51:32.678] - identifying globals and packages ... DONE [21:51:32.678] Launching 1 futures (chunks) ... [21:51:32.678] Chunk #1 of 1 ... [21:51:32.679] - Finding globals in 'args_list' for chunk #1 ... [21:51:32.680] [21:51:32.681] [21:51:32.681] - Finding globals in 'args_list' for chunk #1 ... DONE [21:51:32.682] - seeds: <none> [21:51:32.692] Chunk #1 of 1 ... DONE [21:51:32.693] Launching 1 futures (chunks) ... DONE [21:51:32.693] - resolving futures [21:51:32.693] - gathering results & relaying conditions (except errors) <FutureInterruptError: A future ('doFuture2-1') of class ClusterFuture was interrupted, while running on 'localhost'> Future UUID: 9dbd310c8ef60e37fe31acf35d1d7edb-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: 9dbd310c8ef60e37fe31acf35d1d7edb 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_12_01_50_00_6534/Rtmp4sP1tf/RLIBS_32b603742120c', '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' ... [21:53:44.660] doFuture() ... [21:53:44.662] - dummy globals (as locals): [1] 'ii' [21:53:44.663] - R expression: [21:53:44.663] { [21:53:44.663] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'" [21:53:44.663] "# also in nested calls " [21:53:44.663] doFuture::registerDoFuture() [21:53:44.663] "# doFuture():::doFuture(): process chunk of elements" [21:53:44.663] lapply(seq_along(...future.x_ii), FUN = function(jj) { [21:53:44.663] ...future.x_jj <- ...future.x_ii[[jj]] [21:53:44.663] { [21:53:44.663] NULL [21:53:44.663] ii <- NULL [21:53:44.663] } [21:53:44.663] ...future.env <- environment() [21:53:44.663] local({ [21:53:44.663] for (name in names(...future.x_jj)) { [21:53:44.663] assign(name, ...future.x_jj[[name]], envir = ...future.env, [21:53:44.663] inherits = FALSE) [21:53:44.663] } [21:53:44.663] }) [21:53:44.663] tryCatch(ii, error = identity) [21:53:44.663] }) [21:53:44.663] } [21:53:44.664] - identifying globals and packages ... [21:53:44.699] List of 1 [21:53:44.699] $ ...future.x_ii: NULL [21:53:44.699] - attr(*, "where")=List of 1 [21:53:44.699] ..$ ...future.x_ii:<environment: R_EmptyEnv> [21:53:44.699] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [21:53:44.699] - attr(*, "resolved")= logi FALSE [21:53:44.699] - attr(*, "total_size")= num 27 [21:53:44.711] - R expression: [21:53:44.712] { [21:53:44.712] "# doFuture():::doFuture(): Make sure that foreach uses 'doFuture'" [21:53:44.712] "# also in nested calls " [21:53:44.712] doFuture::registerDoFuture() [21:53:44.712] "# doFuture():::doFuture(): process chunk of elements" [21:53:44.712] lapply(seq_along(...future.x_ii), FUN = function(jj) { [21:53:44.712] ...future.x_jj <- ...future.x_ii[[jj]] [21:53:44.712] { [21:53:44.712] NULL [21:53:44.712] ii <- NULL [21:53:44.712] } [21:53:44.712] ...future.env <- environment() [21:53:44.712] local({ [21:53:44.712] for (name in names(...future.x_jj)) { [21:53:44.712] assign(name, ...future.x_jj[[name]], envir = ...future.env, [21:53:44.712] inherits = FALSE) [21:53:44.712] } [21:53:44.712] }) [21:53:44.712] tryCatch(ii, error = identity) [21:53:44.712] }) [21:53:44.712] } [21:53:44.713] - globals: [1] '...future.x_ii' [21:53:44.713] List of 1 [21:53:44.713] $ ...future.x_ii: NULL [21:53:44.713] - attr(*, "where")=List of 1 [21:53:44.713] ..$ ...future.x_ii:<environment: R_EmptyEnv> [21:53:44.713] - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list" [21:53:44.713] - attr(*, "resolved")= logi FALSE [21:53:44.713] - attr(*, "total_size")= num 27 [21:53:44.720] - packages: [1] 'doFuture' [21:53:44.720] - identifying globals and packages ... DONE [21:53:44.803] Number of chunks: 1 [21:53:44.803] Number of futures (= number of chunks): 1 [21:53:44.804] Launching 1 futures (chunks) ... [21:53:44.804] Chunk #1 of 1 ... [21:53:44.805] - Finding globals in 'args_list' chunk #1 ... [21:53:44.806] [21:53:44.807] [21:53:44.807] - Finding globals in 'args_list' for chunk #1 ... DONE [21:53:44.817] Chunk #1 of 1 ... DONE [21:53:44.817] Launching 1 futures (chunks) ... DONE [21:53:44.817] - resolving futures [21:53:44.818] - gathering results & relaying conditions (except errors) <FutureInterruptError: A future ('doFuture-1') of class ClusterFuture was interrupted, while running on 'localhost'> Future UUID: 59f54ee2185ec1078318aaf60236b076-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: 59f54ee2185ec1078318aaf60236b076 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