R Under development (unstable) (2025-05-08 r88190 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## This runs testme test script inst/testme/test-plan.R > ## Don't edit - it was autogenerated by inst/testme/deploy.R > future:::testme("plan") Test 'plan' ... Sourcing 9 prologue scripts ... 01/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/001.load.R' 02/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/002.record-state.R' 03/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/030.imports.R' 04/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/050.utils.R' 05/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/090.context.R' 06/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/090.options.R' 07/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/091.envvars.R' 08/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/099.future-setup.R' 09/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_prologue/995.detrius-connections.R' Sourcing 9 prologue scripts ... done Running test script: 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/test-plan.R' > library(future) [01:58:18.875] Option 'future.startup.script': TRUE [01:58:18.876] Future startup scripts considered: '.future.R', '~/.future.R' [01:58:18.877] Future startup scripts found: > options(future.debug = FALSE) > message("*** plan() ...") *** plan() ... > cl <- parallelly::makeClusterPSOCK(1) > print(cl) Socket cluster with 1 nodes where 1 node is on host 'localhost' (R Under development (unstable) (2025-05-08 r88190 ucrt), platform x86_64-w64-mingw32) > pid <- Sys.getpid() > message("R session PID: ", pid) R session PID: 36144 > message("*** Set strategy via plan(sequential)") *** Set strategy via plan(sequential) > oplan <- plan(sequential) > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) FutureBackend to be launched > plan(oplan) > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) FutureBackend to be launched > worker_pid <- value(future(Sys.getpid())) > message("Worker PID: ", worker_pid) Worker PID: 36144 > stopifnot(worker_pid == pid) > message("*** Set strategy via plan(cluster, workers = cl)") *** Set strategy via plan(cluster, workers = cl) > oplan <- plan(cluster, workers = cl) > print(plan()) cluster: - args: function (..., workers = "", envir = parent.frame()) - tweaked: TRUE - call: plan(cluster, workers = cl) ClusterFutureBackend: Inherits: MultiprocessFutureBackend, FutureBackend UUID: c358709a11fed028d006e2313914d78b Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: TRUE Interrupts are enabled: FALSE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'persistent': FALSE Argument 'wait.timeout': 86400 Argument 'wait.interval': 0.01 Argument 'wait.alpha': 1.01 Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 0 (0 created, 0 launched, 0 finished) Total runtime of futures: 0 secs (NaN secs/finished future) Workers of type RichSOCKcluster: - Summary: Socket cluster with 1 nodes where 1 node is on host 'localhost' (R Under development (unstable) (2025-05-08 r88190 ucrt), platform x86_64-w64-mingw32) - [ OK ] Node 1/1: valid connection [RichSOCKnode of a socket cluster on local host 'localhost' with pid 61468 (R Under development (unstable) (2025-05-08 r88190 ucrt), x86_64-w64-mingw32) using socket connection #4 ('<-CRANwin3.fb05.statistik.uni-dortmund.de:34333')] > worker_pid_1 <- value(future(Sys.getpid())) > message("Worker PID: ", worker_pid_1) Worker PID: 61468 > stopifnot(worker_pid_1 != pid) > plan(oplan) > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: 1c720eadf4ea8ae2f65bca500a98a45d Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 1 (1 created, 1 launched, 1 finished) Total runtime of futures: 0.004436016 secs (0.004436016 secs/finished future) > message("*** Set strategy via plan(cluster(workers = cl)") *** Set strategy via plan(cluster(workers = cl) > oplan <- plan(future::cluster(workers = cl)) > print(plan()) cluster: - args: function (..., workers = "", envir = parent.frame()) - tweaked: TRUE - call: plan(future::cluster(workers = cl)) ClusterFutureBackend: Inherits: MultiprocessFutureBackend, FutureBackend UUID: d2917e32b7ded76ecd46106a5f56a65e Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: TRUE Interrupts are enabled: FALSE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'persistent': FALSE Argument 'wait.timeout': 86400 Argument 'wait.interval': 0.01 Argument 'wait.alpha': 1.01 Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 0 (0 created, 0 launched, 0 finished) Total runtime of futures: 0 secs (NaN secs/finished future) Workers of type RichSOCKcluster: - Summary: Socket cluster with 1 nodes where 1 node is on host 'localhost' (R Under development (unstable) (2025-05-08 r88190 ucrt), platform x86_64-w64-mingw32) - [ OK ] Node 1/1: valid connection [RichSOCKnode of a socket cluster on local host 'localhost' with pid 61468 (R Under development (unstable) (2025-05-08 r88190 ucrt), x86_64-w64-mingw32) using socket connection #4 ('<-CRANwin3.fb05.statistik.uni-dortmund.de:34333')] > worker_pid_2 <- value(future(Sys.getpid())) > message("Worker PID: ", worker_pid_2) Worker PID: 61468 > stopifnot(worker_pid_2 != pid, worker_pid_2 == worker_pid_1) > plan(oplan) > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: 1c720eadf4ea8ae2f65bca500a98a45d Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 1 (1 created, 1 launched, 1 finished) Total runtime of futures: 0.004436016 secs (0.004436016 secs/finished future) > message("*** Set strategy via plan('sequential')") *** Set strategy via plan('sequential') > oplan <- plan("sequential") > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: 1c720eadf4ea8ae2f65bca500a98a45d Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 1 (1 created, 1 launched, 1 finished) Total runtime of futures: 0.004436016 secs (0.004436016 secs/finished future) > worker_pid <- value(future(Sys.getpid())) > message("Worker PID: ", worker_pid) Worker PID: 36144 > stopifnot(worker_pid == pid) > plan(oplan) > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: 1c720eadf4ea8ae2f65bca500a98a45d Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 2 (2 created, 2 launched, 2 finished) Total runtime of futures: 0.007338047 secs (0.003669024 secs/finished future) > message("*** plan('default')") *** plan('default') > oplan <- plan("default") > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: 1c720eadf4ea8ae2f65bca500a98a45d Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 2 (2 created, 2 launched, 2 finished) Total runtime of futures: 0.007338047 secs (0.003669024 secs/finished future) > plan(oplan) > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: 1c720eadf4ea8ae2f65bca500a98a45d Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 2 (2 created, 2 launched, 2 finished) Total runtime of futures: 0.007338047 secs (0.003669024 secs/finished future) > message("*** Stability of plan(cluster, workers = n)") *** Stability of plan(cluster, workers = n) > oplan <- plan(cluster, workers = I(1)) > print(plan()) cluster: - args: function (..., workers = 1, envir = parent.frame()) - tweaked: TRUE - call: plan(cluster, workers = I(1)) ClusterFutureBackend: Inherits: MultiprocessFutureBackend, FutureBackend UUID: a1277910725f643381ac6b2936de0b28 Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: TRUE Interrupts are enabled: FALSE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'persistent': FALSE Argument 'wait.timeout': 86400 Argument 'wait.interval': 0.01 Argument 'wait.alpha': 1.01 Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 0 (0 created, 0 launched, 0 finished) Total runtime of futures: 0 secs (NaN secs/finished future) Workers of type RichSOCKcluster: - Summary: Socket cluster with 1 nodes where 1 node is on host 'localhost' (R Under development (unstable) (2025-05-08 r88190 ucrt), platform x86_64-w64-mingw32) - [ OK ] Node 1/1: valid connection [RichSOCKnode of a socket cluster on local host 'localhost' with pid 115156 (R Under development (unstable) (2025-05-08 r88190 ucrt), x86_64-w64-mingw32) using socket connection #5 ('<-CRANwin3.fb05.statistik.uni-dortmund.de:38051')] > worker_pid_1 <- value(future(Sys.getpid())) > message("Worker PID: ", worker_pid_1) Worker PID: 115156 > stopifnot(worker_pid_1 != pid) > oplan <- plan(cluster, workers = I(1)) > print(plan()) cluster: - args: function (..., workers = 1, envir = parent.frame()) - tweaked: TRUE - call: plan(cluster, workers = I(1)) ClusterFutureBackend: Inherits: MultiprocessFutureBackend, FutureBackend UUID: a1277910725f643381ac6b2936de0b28 Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: TRUE Interrupts are enabled: FALSE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'persistent': FALSE Argument 'wait.timeout': 86400 Argument 'wait.interval': 0.01 Argument 'wait.alpha': 1.01 Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 1 (1 created, 1 launched, 1 finished) Total runtime of futures: 0.06143403 secs (0.06143403 secs/finished future) Workers of type RichSOCKcluster: - Summary: Socket cluster with 1 nodes where 1 node is on host 'localhost' (R Under development (unstable) (2025-05-08 r88190 ucrt), platform x86_64-w64-mingw32) - [ OK ] Node 1/1: valid connection [RichSOCKnode of a socket cluster on local host 'localhost' with pid 115156 (R Under development (unstable) (2025-05-08 r88190 ucrt), x86_64-w64-mingw32) using socket connection #5 ('<-CRANwin3.fb05.statistik.uni-dortmund.de:38051')] > worker_pid_2 <- value(future(Sys.getpid())) > message("Worker PID: ", worker_pid_2) Worker PID: 115156 > stopifnot(worker_pid_2 != pid, worker_pid_2 == worker_pid_1) > plan(oplan) > print(plan()) cluster: - args: function (..., workers = 1, envir = parent.frame()) - tweaked: TRUE - call: plan(cluster, workers = I(1)) ClusterFutureBackend: Inherits: MultiprocessFutureBackend, FutureBackend UUID: a1277910725f643381ac6b2936de0b28 Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: TRUE Interrupts are enabled: FALSE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'persistent': FALSE Argument 'wait.timeout': 86400 Argument 'wait.interval': 0.01 Argument 'wait.alpha': 1.01 Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 2 (2 created, 2 launched, 2 finished) Total runtime of futures: 0.06516814 secs (0.03258407 secs/finished future) Workers of type RichSOCKcluster: - Summary: Socket cluster with 1 nodes where 1 node is on host 'localhost' (R Under development (unstable) (2025-05-08 r88190 ucrt), platform x86_64-w64-mingw32) - [ OK ] Node 1/1: valid connection [RichSOCKnode of a socket cluster on local host 'localhost' with pid 115156 (R Under development (unstable) (2025-05-08 r88190 ucrt), x86_64-w64-mingw32) using socket connection #5 ('<-CRANwin3.fb05.statistik.uni-dortmund.de:38051')] > message("*** plan('unknown strategy')") *** plan('unknown strategy') > res <- try(plan("unknown strategy"), silent = TRUE) > print(res) [1] "Error : No such backend for futures: 'unknown strategy'\n" attr(,"class") [1] "try-error" attr(,"condition") > stopifnot(inherits(res, "try-error")) > message("*** plan(sequential)") *** plan(sequential) > plan(sequential) > a <- 0 > f <- future({ + b <- 3 + c <- 2 + a * b * c + }) > a <- 7 > v <- value(f) > print(v) [1] 0 > stopifnot(v == 0) > message("*** plan('sequential')") *** plan('sequential') > plan("sequential") > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: cfccc7b8222b5242974a04e190b8cb4a Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 1 (1 created, 1 launched, 1 finished) Total runtime of futures: 0.003280878 secs (0.003280878 secs/finished future) > message("*** plan() and overriding defaults") *** plan() and overriding defaults > message("*** plan(sequential)") *** plan(sequential) > plan(sequential) > fcn <- plan("next") > print(fcn) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) SequentialFutureBackend: Inherits: FutureBackend UUID: cfccc7b8222b5242974a04e190b8cb4a Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 1 (1 created, 1 launched, 1 finished) Total runtime of futures: 0.003280878 secs (0.003280878 secs/finished future) > x <- 0 > f <- future({ + x <- 1 + }) > print(value(f)) [1] 1 > stopifnot(x == 0) > message("*** plan(sequential, abc = 1)") *** plan(sequential, abc = 1) > plan(sequential, abc = 1, def = TRUE) Warning: Detected 2 unknown future arguments: 'abc', 'def' > fcn <- plan("next") > print(fcn) sequential: - args: function (..., abc = 1, def = TRUE, envir = parent.frame(), workers = "") - tweaked: TRUE - call: plan(sequential, abc = 1, def = TRUE) SequentialFutureBackend: Inherits: FutureBackend UUID: 36cdc6fb4214676dbc30641e3e1d8388 Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 0 (0 created, 0 launched, 0 finished) Total runtime of futures: 0 secs (NaN secs/finished future) > stopifnot(formals(fcn)$abc == 1) > message("*** plan(sequential(abc = 1))") *** plan(sequential(abc = 1)) > plan(cluster, workers = cl) > plan(sequential(abc = 1)) Warning: Detected 1 unknown future arguments: 'abc' > fcn <- plan("next") > print(fcn) sequential: - args: function (..., abc = 1, envir = parent.frame(), workers = "") - tweaked: TRUE - call: plan(sequential(abc = 1)) SequentialFutureBackend: Inherits: FutureBackend UUID: ae93941b06eaf8e71525e7dc62e38708 Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 0 (0 created, 0 launched, 0 finished) Total runtime of futures: 0 secs (NaN secs/finished future) > stopifnot(formals(fcn)$abc == 1) > message("*** plan(tweak(sequential, abc = 1))") *** plan(tweak(sequential, abc = 1)) > plan(cluster, workers = cl) > plan(tweak(sequential, abc = 1)) Warning: Detected 1 unknown future arguments: 'abc' Warning: Detected 1 unknown future arguments: 'abc' > fcn <- plan("next") > print(fcn) sequential: - args: function (..., abc = 1, envir = parent.frame(), workers = "") - tweaked: TRUE - call: plan(tweak(sequential, abc = 1)) SequentialFutureBackend: Inherits: FutureBackend UUID: d20e34b4ca7d175fe6a086412733526f Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 0 (0 created, 0 launched, 0 finished) Total runtime of futures: 0 secs (NaN secs/finished future) > stopifnot(formals(fcn)$abc == 1) > message("*** do.call(plan, args = list(sequential, abc = 1))") *** do.call(plan, args = list(sequential, abc = 1)) > do.call(plan, args = list(sequential, abc = 1, def = TRUE)) Warning: Detected 2 unknown future arguments: 'abc', 'def' > fcn <- plan("next") > print(fcn) sequential: - args: function (..., abc = 1, def = TRUE, envir = parent.frame(), workers = "") - tweaked: TRUE - call: NULL SequentialFutureBackend: Inherits: FutureBackend UUID: d20e34b4ca7d175fe6a086412733526f Number of workers: 1 Number of free workers: 1 Available cores: 2 Automatic garbage collection: FALSE Early signaling: FALSE Interrupts are enabled: TRUE Maximum total size of globals: +Inf Maximum total size of value: +Inf Argument 'hooks': FALSE Number of active futures: 0 Number of futures since start: 0 (0 created, 0 launched, 0 finished) Total runtime of futures: 0 secs (NaN secs/finished future) > stopifnot(formals(fcn)$abc == 1) > message("*** plan(cluster, ..., rscript_startup = \"\")") *** plan(cluster, ..., rscript_startup = "") > plan(cluster, workers = 1, rscript_startup = "options(abc = 42L)") Warning: Detected 1 unknown future arguments: 'rscript_startup' > f <- future(getOption("abc")) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** plan(cluster, ..., rscript_startup = )") *** plan(cluster, ..., rscript_startup = ) > plan(cluster, workers = 1, rscript_startup = quote(options(abc = 42))) Warning: Detected 1 unknown future arguments: 'rscript_startup' > f <- future(getOption("abc")) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** plan(sequential, gc = TRUE)") *** plan(sequential, gc = TRUE) > oplan <- plan(cluster, gc = TRUE) > f <- future(42) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** plan(cluster, gc = TRUE)") *** plan(cluster, gc = TRUE) > oplan <- plan(cluster, gc = TRUE) > f <- future(42) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** plan(cluster, gc = TRUE)") *** plan(cluster, gc = TRUE) > oplan <- plan(cluster, gc = TRUE) > f <- future(42) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** plan(cluster, earlySignal = TRUE)") *** plan(cluster, earlySignal = TRUE) > oplan <- plan(cluster, earlySignal = TRUE) > f <- future(42) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** plan(cluster, earlySignal = TRUE)") *** plan(cluster, earlySignal = TRUE) > oplan <- plan(cluster, earlySignal = TRUE) > f <- future(42) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** plan(cluster, earlySignal = TRUE)") *** plan(cluster, earlySignal = TRUE) > oplan <- plan(cluster, earlySignal = TRUE) > f <- future(42) > v <- value(f) > print(v) [1] 42 > stopifnot(identical(v, 42)) > plan(sequential) > message("*** old <- plan(new)") *** old <- plan(new) > truth <- plan("list") > old <- plan(cluster, workers = cl) > stopifnot(identical(unclass(old), unclass(truth))) > stack <- plan("list") > prev <- plan(old) > stopifnot(identical(stack, prev)) > stack <- plan("list") > stopifnot(identical(stack, old)) > stopifnot(identical(stack, truth)) > message("*** with(plan(sequential), ...)") *** with(plan(sequential), ...) > plan(cluster, workers = cl) > pid <- Sys.getpid() > with(plan(sequential), { + f <- future({ + Sys.getpid() + }) + v <- value(f) + }) > stopifnot(v == pid, inherits(plan("next"), "cluster")) > message("*** with(plan(sequential), local = TRUE)") *** with(plan(sequential), local = TRUE) > plan(cluster, workers = cl) > pid <- Sys.getpid() > v <- local({ + with(plan(sequential), local = TRUE) + f <- future({ + Sys.getpid() + }) + v <- value(f) + }) > stopifnot(v == pid, inherits(plan("next"), "cluster")) > message("*** %plan% 'sequential'") *** %plan% 'sequential' > plan(cluster, workers = cl) > pid <- Sys.getpid() > x %<-% { + Sys.getpid() + } %plan% "sequential" > stopifnot(v == pid, inherits(plan("next"), "cluster")) > message("*** %plan% sequential") *** %plan% sequential > plan(cluster, workers = cl) > fun <- { + plan("next") + } %plan% sequential > pid <- Sys.getpid() > x %<-% { + Sys.getpid() + } %plan% sequential > stopifnot(v == pid, inherits(plan("next"), "cluster")) > message("*** Nested futures with different plans") *** Nested futures with different plans > c %<-% { + message("Resolving 'c'") + a %<-% { + message("Resolving 'a'") + 2 + } %plan% sequential + b %<-% { + .... [TRUNCATED] > d <- 42 > print(d) [1] 42 > print(c) Resolving 'c' Resolving 'a' Local variable 'x' Resolving 'b' [1] 6 > stopifnot(c == 6) > message("*** plan() by functions and character names ... ") *** plan() by functions and character names ... > plan(sequential) > a %<-% 42 > stopifnot(a == 42) > plan("sequential") > a %<-% 42 > stopifnot(a == 42) > plan(list(sequential)) > a %<-% 42 > stopifnot(a == 42) > plan(list("sequential")) > a %<-% 42 > stopifnot(a == 42) > plan(list(sequential, sequential)) > a %<-% { + b %<-% 42 + b + } > stopifnot(a == 42) > plan(list("sequential", sequential)) > a %<-% { + b %<-% 42 + b + } > stopifnot(a == 42) > plan(list(sequential, "sequential")) > a %<-% { + b %<-% 42 + b + } > stopifnot(a == 42) > plan(list("sequential", "sequential")) > a %<-% { + b %<-% 42 + b + } > stopifnot(a == 42) > plan(list("sequential", "sequential")) > a %<-% { + b %<-% 42 + b + } > stopifnot(a == 42) > message("*** plan() by functions and character names ... DONE") *** plan() by functions and character names ... DONE > message("*** plan() w/ commands ...") *** plan() w/ commands ... > plan(list(sequential, sequential)) > res <- plan("list") > print(res) List of future strategies: 1. sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(list(sequential, sequential)) 2. sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(list(sequential, sequential)) > stopifnot(length(res) == 2) > plan("pop") List of future strategies: 1. sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(list(sequential, sequential)) 2. sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(list(sequential, sequential)) > res <- plan("list") > print(res) [[1]] sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(list(sequential, sequential)) FutureBackend to be launched > stopifnot(length(res) == 1) > plan("reset") List of future strategies: 1. sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) > print(plan()) sequential: - args: function (..., gc = FALSE, earlySignal = FALSE, envir = parent.frame(), workers = "") - tweaked: FALSE - call: plan(sequential) FutureBackend to be launched > message("*** plan() w/ commands ... DONE") *** plan() w/ commands ... DONE > message("*** plan() - odds'n'ends ...") *** plan() - odds'n'ends ... > plan(sequential, split = FALSE) > f <- future(42) > v <- value(f) > stopifnot(v == 42) > stopifnot(inherits(f$envir, "environment"), identical(f$envir, + globalenv())) > message("*** plan() - odds'n'ends ... DONE") *** plan() - odds'n'ends ... DONE > parallel::stopCluster(cl) > plan(sequential) > message("*** plan() ... DONE") *** plan() ... DONE Sourcing 6 epilogue scripts ... 01/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_epilogue/001.undo-future.R' 02/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_epilogue/002.undo-state.R' Failed to undo environment variables: - Expected environment variables: [n=213] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', 'BIBINPUTS', 'BINDIR', 'BSTINPUTS', 'COMMONPROGRAMFILES', 'COMPUTERNAME', 'COMSPEC', 'CURL_CA_BUNDLE', 'CYGWIN', 'CommonProgramFiles(x86)', 'CommonProgramW6432', 'DriverData', 'HOME', 'HOMEDRIVE', 'HOMEPATH', 'JAGS_ROOT', 'JAVA_HOME', 'LANGUAGE', 'LC_COLLATE', 'LC_MONETARY', 'LC_TIME', 'LOCALAPPDATA', 'LOGONSERVER', 'LS_HOME', 'LS_LICENSE_PATH', 'MAKE', 'MAKEFLAGS', 'MAKELEVEL', 'MFLAGS', 'MSMPI_BENCHMARKS', 'MSMPI_BIN', 'MSYS2_ENV_CONV_EXCL', 'NUMBER_OF_PROCESSORS', 'OCL', 'OMP_THREAD_LIMIT', 'OS', 'PATH', 'PATHEXT', 'PROCESSOR_ARCHITECTURE', 'PROCESSOR_IDENTIFIER', 'PROCESSOR_LEVEL', 'PROCESSOR_REVISION', 'PROGRAMFILES', 'PROMPT', 'PSModulePath', 'PUBLIC', 'PWD', 'ProgramData', 'ProgramFiles(x86)', 'ProgramW6432', 'RTOOLS44_HOME', 'RTOOLS45_HOME', 'R_ARCH', 'R_BROWSER', 'R_BZIPCMD', 'R_CMD', 'R_COMPILED_BY', 'R_CRAN_WEB', 'R_CUSTOM_TOOLS_PATH', 'R_CUSTOM_TOOLS_SOFT', 'R_DOC_DIR', 'R_ENVIRON_USER', 'R_GSCMD', 'R_GZIPCMD', 'R_HOME', 'R_INCLUDE_DIR', 'R_INSTALL_TAR', 'R_LIBS', 'R_LIBS_SITE', 'R_LIBS_USER', 'R_MAX_NUM_DLLS', 'R_OSTYPE', 'R_PAPERSIZE', 'R_PAPERSIZE_USER', 'R_PARALLELLY_MAKENODEPSOCK_AUTOKILL', 'R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT', 'R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL', 'R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS', 'R_PARALLELLY_MAKENODEPSOCK_TIMEOUT', 'R_PARALLELLY_RANDOM_PORTS', 'R_PARALLEL_PORT', 'R_RD4PDF', 'R_RTOOLS45_PATH', 'R_SCRIPT_LEGACY', 'R_SHARE_DIR', 'R_TESTME_NAME', 'R_TESTME_PACKAGE', 'R_TESTME_PATH', 'R_TESTS', 'R_UNZIPCMD', 'R_USER', 'R_VERSION', 'R_ZIPCMD', 'SED', 'SHLVL', 'SYSTEMDRIVE', 'SYSTEMROOT', 'TAR', 'TAR_OPTIONS', 'TEMP', 'TERM', 'TEXINPUTS', 'TMP', 'TMPDIR', 'USERDOMAIN', 'USERDOMAIN_ROAMINGPROFILE', 'USERNAME', 'USERPROFILE', 'WINDIR', '_', '_R_CHECK_AUTOCONF_', '_R_CHECK_BOGUS_RETURN_', '_R_CHECK_BROWSER_NONINTERACTIVE_', '_R_CHECK_BUILD_VIGNETTES_SEPARATELY_', '_R_CHECK_CODETOOLS_PROFILE_', '_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_', '_R_CHECK_CODE_ATTACH_', '_R_CHECK_CODE_CLASS_IS_STRING_', '_R_CHECK_CODE_DATA_INTO_GLOBALENV_', '_R_CHECK_CODE_USAGE_VIA_NAMESPACES_', '_R_CHECK_CODE_USAGE_WITHOUT_LOADING_', '_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_', '_R_CHECK_CODOC_VARIABLES_IN_USAGES_', '_R_CHECK_COMPACT_DATA2_', '_R_CHECK_COMPILATION_FLAGS_', '_R_CHECK_CONNECTIONS_LEFT_OPEN_', '_R_CHECK_CRAN_INCOMING_', '_R_CHECK_CRAN_INCOMING_ASPELL_RECHECK_MAYBE_', '_R_CHECK_CRAN_INCOMING_ASPELL_RECHECK_START_', '_R_CHECK_CRAN_INCOMING_CHECK_FILE_URIS_', '_R_CHECK_CRAN_INCOMING_CHECK_URLS_IN_PARALLEL_', '_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_', '_R_CHECK_CRAN_INCOMING_REMOTE_', '_R_CHECK_CRAN_INCOMING_USE_ASPELL_', '_R_CHECK_DATALIST_', '_R_CHECK_DEPRECATED_DEFUNCT_', '_R_CHECK_DOC_SIZES2_', '_R_CHECK_DOT_FIRSTLIB_', '_R_CHECK_DOT_INTERNAL_', '_R_CHECK_EXAMPLE_TIMING_THRESHOLD_', '_R_CHECK_EXECUTABLES_', '_R_CHECK_EXECUTABLES_EXCLUSIONS_', '_R_CHECK_FF_CALLS_', '_R_CHECK_FF_DUP_', '_R_CHECK_FORCE_SUGGESTS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_', '_R_CHECK_FUTURE_FILE_TIMESTAMPS_LEEWAY_', '_R_CHECK_HAVE_MYSQL_', '_R_CHECK_HAVE_ODBC_', '_R_CHECK_HAVE_PERL_', '_R_CHECK_HAVE_POSTGRES_', '_R_CHECK_INSTALL_DEPENDS_', '_R_CHECK_INTERNALS2_', '_R_CHECK_LENGTH_1_CONDITION_', '_R_CHECK_LICENSE_', '_R_CHECK_LIMIT_CORES_', '_R_CHECK_LOG_USE_INFO_', '_R_CHECK_MATRIX_DATA_', '_R_CHECK_MBCS_CONVERSION_FAILURE_', '_R_CHECK_NATIVE_ROUTINE_REGISTRATION_', '_R_CHECK_NEWS_IN_PLAIN_TEXT_', '_R_CHECK_NO_RECOMMENDED_', '_R_CHECK_NO_STOP_ON_TEST_ERROR_', '_R_CHECK_ORPHANED_', '_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_', '_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_', '_R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_', '_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_', '_R_CHECK_PACKAGE_NAME_', '_R_CHECK_PKG_SIZES_', '_R_CHECK_PKG_SIZES_THRESHOLD_', '_R_CHECK_PRAGMAS_', '_R_CHECK_RD_EXAMPLES_T_AND_F_', '_R_CHECK_RD_LINE_WIDTHS_', '_R_CHECK_RD_MATH_RENDERING_', '_R_CHECK_RD_NOTE_LOST_BRACES_', '_R_CHECK_RD_VALIDATE_RD2HTML_', '_R_CHECK_REPLACING_IMPORTS_', '_R_CHECK_R_DEPENDS_', '_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_', '_R_CHECK_SCREEN_DEVICE_', '_R_CHECK_SERIALIZATION_', '_R_CHECK_SHLIB_OPENMP_FLAGS_', '_R_CHECK_SRC_MINUS_W_IMPLICIT_', '_R_CHECK_SUBDIRS_NOCASE_', '_R_CHECK_SUGGESTS_ONLY_', '_R_CHECK_SYSTEM_CLOCK_', '_R_CHECK_TESTS_NLINES_', '_R_CHECK_TEST_TIMING_', '_R_CHECK_TIMINGS_', '_R_CHECK_TOPLEVEL_FILES_', '_R_CHECK_UNDOC_USE_ALL_NAMES_', '_R_CHECK_UNSAFE_CALLS_', '_R_CHECK_URLS_SHOW_301_STATUS_', '_R_CHECK_VC_DIRS_', '_R_CHECK_VIGNETTES_NLINES_', '_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_', '_R_CHECK_VIGNETTE_TIMING_', '_R_CHECK_VIGNETTE_TITLES_', '_R_CHECK_WINDOWS_DEVICE_', '_R_CHECK_XREFS_NOTE_MISSING_PACKAGE_ANCHORS_', '_R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_', '_R_CLASS_MATRIX_ARRAY_', '_R_DEPRECATED_IS_R_', '_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_', '_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_', '_R_USE_STRICT_R_HEADERS_', '__R_CHECK_DOC_FILES_NOTE_IF_ALL_SPECIAL__', 'maj.version', 'nextArg--timingsnextArg--install', 'tempdirname' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: 03/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_epilogue/090.gc.R' 04/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_epilogue/099.session_info.R' 05/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_epilogue/995.detritus-connections.R' 06/06 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/future/testme/_epilogue/999.detritus-files.R' Skipping, because path appears not to be an 'R CMD check' folder: 'D:/temp/2025_05_09_01_55_17_23336' Sourcing 6 epilogue scripts ... done Test time: user.self=2s, sys.self=0.1s, elapsed=5s, user.child=NAs, sys.child=NAs Test 'plan' ... success > > proc.time() user system elapsed 1.76 0.17 5.56