Skip to content

Commit 3969336

Browse files
Major internal redesign - step 3:
* All built-in backends now implements the new FutureBackend API * Any backends that does not support the new FutureBackend API, will use the old API Squashed commit of the following: commit 30c7a86 Merge: bcd382d 2fa7893 Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 11:36:16 2025 -0800 Merge branch 'feature/FutureBackend' of github.com:HenrikBengtsson/future into feature/FutureBackend commit 2fa7893 Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 11:15:19 2025 -0800 Add internal getSocketSelectTimeout() that memoizes the 'timeout' value commit bcd382d Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 11:05:05 2025 -0800 REVDEP: 415 packages [ci skip] commit 7f36deb Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 09:45:51 2025 -0800 remove unneeded code commit 1de0c36 Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 03:29:23 2025 -0800 GHA: typo commit 56e7cf2 Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 03:10:18 2025 -0800 drop duplicate code commit 5995d3a Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 03:04:16 2025 -0800 evalFuture(): disable querying of availableCores() for now commit f6ba839 Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 02:23:20 2025 -0800 GHA: Run future.tests also on future.mirai backends + don't test vignettes on Windows commit c7d7d86 Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 02:07:10 2025 -0800 Make future.backend.version=2 the default; previous attempt was a mistake commit 29b2b6d Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 02:05:54 2025 -0800 Allow 'backend' to be a list (for backend.version=1) commit 165b861 Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 01:51:56 2025 -0800 Give more informative error message if 'backend' is not a FutureBackend as expected commit 2539277 Merge: 4c71d9f e8b86ce Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 01:23:20 2025 -0800 Merge branch 'feature/FutureBackend' of github.com:futureverse/future into feature/FutureBackend commit 4c71d9f Author: Henrik Bengtsson <[email protected]> Date: Thu Feb 20 01:16:31 2025 -0800 run() for Future does the common validation and setup now commit 6c25fd5 Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 23:19:44 2025 -0800 Remove coerceFuture(); not really needed commit c578170 Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 22:53:44 2025 -0800 Consolodating the help on all FutureBackend:s to one page commit e8b86ce Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 22:53:44 2025 -0800 Consolodating the help on all FutureBackend:s to one page commit 688f5a7 Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 21:54:18 2025 -0800 More fixes for nested future tests on dual-cores machines [ci skip] commit 00642db Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 20:43:39 2025 -0800 REVDEP: 415 packages [ci skip] commit de8670a Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 14:41:23 2025 -0800 Making sure package passes checks also on single- and dual-core machines (emulated using R_PARALLELLY_AVAILABLECORES_SYSTEM) commit 0c770e6 Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 12:07:42 2025 -0800 Use the FutureBackend approach by default, if the backend implements it commit fc23ad6 Author: Henrik Bengtsson <[email protected]> Date: Wed Feb 19 10:52:34 2025 -0800 ClusterFuture: clean out temporary ClusterFutureBackend0 again commit 9e5eaa1 Author: Henrik Bengtsson <[email protected]> Date: Tue Feb 18 19:55:43 2025 -0800 Make sure 'multicore' and 'multisession' with workers = 1 fall back to sequential Have ClusterFutureBackend "process" the 'workers' argument commit 7d93ae1 Author: Henrik Bengtsson <[email protected]> Date: Tue Feb 18 17:17:27 2025 -0800 First prototype of MulticoreFutureBackend commit 4ff28fc Author: Henrik Bengtsson <[email protected]> Date: Tue Feb 18 15:30:25 2025 -0800 Memoize cluster timeout options related to cluster futures; this should really be done when plan() is configured commit b3208c4 Author: Henrik Bengtsson <[email protected]> Date: Tue Feb 18 15:18:59 2025 -0800 GHA: Test also with R_FUTURE_BACKEND_VERSION=2 commit 3886998 Author: Henrik Bengtsson <[email protected]> Date: Tue Feb 18 15:15:51 2025 -0800 First prototype of ClusterFutureBackend and MultisessionFutureBackend classes commit ecc8c15 Author: Henrik Bengtsson <[email protected]> Date: Mon Feb 17 20:46:04 2025 -0800 First prototype of a SequentialFutureBackend class commit 4f56b20 Author: Henrik Bengtsson <[email protected]> Date: Mon Feb 17 19:13:02 2025 -0800 evalFuture(): add comments explaining that the use of availableCores() adds to the baseline processing time
1 parent eb13514 commit 3969336

29 files changed

+1099
-506
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
- {os: ubuntu-latest, r: 'oldrel-1' }
2929
- {os: ubuntu-latest, r: 'oldrel-2' }
3030
- {os: ubuntu-latest, r: '4.0' }
31+
32+
- {os: ubuntu-latest, r: 'release' , availablecores: 1, label: 'availableCores.system=1' }
33+
- {os: ubuntu-latest, r: 'release' , availablecores: 2, label: 'availableCores.system=2' }
34+
- {os: ubuntu-latest, r: 'release' , backend_version: 1, label: 'backend_version=1' }
3135
- {os: ubuntu-latest, r: 'release' , language: ko, label: ko }
3236
- {os: ubuntu-latest, r: 'release' , language: zh_CN, label: zh_CN }
3337
- {os: ubuntu-latest, r: 'release' , language: zh_TW, label: zh_TW }
@@ -53,8 +57,10 @@ jobs:
5357
_R_CHECK_TESTS_NLINES_: 300
5458
RCMDCHECK_ERROR_ON: note
5559
## Specific to futures
60+
R_PARALLELLY_AVAILABLECORES_SYSTEM: ${{ matrix.config.availablecores }}
5661
R_FUTURE_RNG_ONMISUSE: error
5762
R_FUTURE_GLOBALS_KEEPWHERE: ${{ matrix.config.globals_keepWhere }}
63+
R_FUTURE_BACKEND_VERSION: ${{ matrix.config.backend_version }}
5864

5965
steps:
6066
- uses: actions/checkout@v4

.github/workflows/future_tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ jobs:
2323
- { plan: 'future.batchtools::batchtools_local' }
2424
- { plan: 'future.batchtools::batchtools_bash' }
2525
- { plan: 'future.callr::callr' }
26+
- { plan: 'future.mirai::mirai_multisession' }
27+
- { plan: 'future.mirai::mirai_cluster' }
2628

2729
env:
2830
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2931
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3032
## R CMD check
31-
_R_CHECK_LENGTH_1_LOGIC2_: true
3233
_R_CHECK_MATRIX_DATA_: true
3334
_R_CHECK_CRAN_INCOMING_: false
3435
## Specific to futures

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future
2-
Version: 1.34.0-9140
2+
Version: 1.34.0-9209
33
Title: Unified Parallel and Distributed Processing in R for Everyone
44
Imports:
55
digest,

NAMESPACE

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ S3method(journal,Future)
2121
S3method(journal,FutureJournal)
2222
S3method(journal,FutureJournalCondition)
2323
S3method(journal,list)
24+
S3method(launchFuture,ClusterFutureBackend)
25+
S3method(launchFuture,FutureBackend)
26+
S3method(launchFuture,MulticoreFutureBackend)
27+
S3method(launchFuture,SequentialFutureBackend)
2428
S3method(mandelbrot,matrix)
2529
S3method(mandelbrot,numeric)
2630
S3method(nbrOfFreeWorkers,"NULL")
@@ -92,8 +96,10 @@ export("%seed%")
9296
export("%stdout%")
9397
export("%tweak%")
9498
export(ClusterFuture)
99+
export(ClusterFutureBackend)
95100
export(ConstantFuture)
96101
export(Future)
102+
export(FutureBackend)
97103
export(FutureCondition)
98104
export(FutureError)
99105
export(FutureGlobals)
@@ -105,12 +111,15 @@ export(GlobalEnvFutureCondition)
105111
export(GlobalEnvFutureError)
106112
export(GlobalEnvFutureWarning)
107113
export(MulticoreFuture)
114+
export(MulticoreFutureBackend)
108115
export(MultiprocessFuture)
109116
export(MultisessionFuture)
117+
export(MultisessionFutureBackend)
110118
export(RngFutureCondition)
111119
export(RngFutureError)
112120
export(RngFutureWarning)
113121
export(SequentialFuture)
122+
export(SequentialFutureBackend)
114123
export(UnexpectedFutureResultError)
115124
export(UniprocessFuture)
116125
export(as.FutureGlobals)
@@ -128,6 +137,7 @@ export(futureSessionInfo)
128137
export(futures)
129138
export(getExpression)
130139
export(getGlobalsAndPackages)
140+
export(launchFuture)
131141
export(makeClusterMPI)
132142
export(makeClusterPSOCK)
133143
export(makeNodePSOCK)

0 commit comments

Comments
 (0)