Skip to content

Commit

Permalink
Merge branch 'develop' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson authored Jan 19, 2024
2 parents 911116d + cbbd847 commit 2bc4754
Show file tree
Hide file tree
Showing 65 changed files with 3,449 additions and 7,689 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ jobs:
- {os: macOS-latest, r: 'devel' }
- {os: macOS-latest, r: 'release' }
- {os: macOS-latest, r: 'oldrel' }
- {os: ubuntu-20.04, r: 'devel' }
- {os: ubuntu-20.04, r: 'release' }
- {os: ubuntu-20.04, r: 'oldrel' }
- {os: ubuntu-20.04, r: 'oldrel-1' }
- {os: ubuntu-20.04, r: 'oldrel-2' }
- {os: ubuntu-20.04, r: '3.4' }
- {os: ubuntu-20.04, r: 'release' , language: ko, label: ko }
- {os: ubuntu-20.04, r: 'release' , language: zh_CN, label: zh_CN }
- {os: ubuntu-20.04, r: 'release' , language: zh_TW, label: zh_TW }
- {os: ubuntu-20.04, r: 'release' , globals_keepWhere: true, label: 'keepWhere' }
- {os: ubuntu-20.04, r: 'release' , globals_keepWhere: false, label: '!keepWhere' }
- {os: ubuntu-20.04, r: 'release' , plan: multicore, fork_multithreading_enable: false, label: 'multicore, no-multithreading-in-forks' }
- {os: ubuntu-20.04, r: 'release' , plan: multisession, fork_multithreading_enable: false, label: 'multisession, no-multithreading-in-forks' }
- {os: ubuntu-20.04, r: 'release' , psock_relay_immediate: false, label: 'no-immediate-relay-in-psock' }
- {os: ubuntu-latest, r: 'devel' }
- {os: ubuntu-latest, r: 'release' }
- {os: ubuntu-latest, r: 'oldrel' }
- {os: ubuntu-latest, r: 'oldrel-1' }
- {os: ubuntu-latest, r: 'oldrel-2' }
- {os: ubuntu-latest, r: '3.5' }
- {os: ubuntu-latest, r: 'release' , language: ko, label: ko }
- {os: ubuntu-latest, r: 'release' , language: zh_CN, label: zh_CN }
- {os: ubuntu-latest, r: 'release' , language: zh_TW, label: zh_TW }
- {os: ubuntu-latest, r: 'release' , globals_keepWhere: true, label: 'keepWhere' }
- {os: ubuntu-latest, r: 'release' , globals_keepWhere: false, label: '!keepWhere' }
- {os: ubuntu-latest, r: 'release' , plan: multicore, fork_multithreading_enable: false, label: 'multicore, no-multithreading-in-forks' }
- {os: ubuntu-latest, r: 'release' , plan: multisession, fork_multithreading_enable: false, label: 'multisession, no-multithreading-in-forks' }
- {os: ubuntu-latest, r: 'release' , psock_relay_immediate: false, label: 'no-immediate-relay-in-psock' }

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -50,12 +50,14 @@ jobs:
_R_CHECK_MATRIX_DATA_: true
_R_CHECK_SUGGESTS_ONLY_: true
_R_CHECK_THINGS_IN_TEMP_DIR_: true
_R_CHECK_TESTS_NLINES_: 300
RCMDCHECK_ERROR_ON: note
## Specific to futures
R_FUTURE_RNG_ONMISUSE: error
R_FUTURE_GLOBALS_KEEPWHERE: ${{ matrix.config.globals_keepWhere }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand Down Expand Up @@ -90,7 +92,7 @@ jobs:
tryCatch(log("a"), error = conditionMessage)
shell: Rscript {0}

- name: Check (!Windows)
- name: Check
if: runner.os != 'Windows'
env:
## FIXME: Eventually update to 'R_FUTURE_GLOBALS_ONREFERENCE=error'
Expand All @@ -100,9 +102,10 @@ jobs:
R_FUTURE_FORK_MULTITHREADING_ENABLE: ${{ matrix.config.fork_multithreading_enable }}
R_FUTURE_PSOCK_RELAY_IMMEDIATE: ${{ matrix.config.psock_relay_immediate }}
run: |
if (nzchar(Sys.getenv("R_FUTURE_PLAN")) || getRversion() < "3.5.0") Sys.setenv(RCMDCHECK_ERROR_ON = "error")
rcmdcheck::rcmdcheck(
args = c("--no-manual", "--as-cran"),
error_on = if (nzchar(Sys.getenv("R_FUTURE_PLAN"))) "error" else "note",
build_args = if (getRversion() < "3.5.0") "--no-build-vignettes",
args = c("--no-manual", "--as-cran", if (getRversion() < "3.5.0") c("--no-vignettes", "--no-build-vignettes", "--ignore-vignettes")),
check_dir = "check"
)
shell: Rscript {0}
Expand All @@ -112,7 +115,6 @@ jobs:
run: |
rcmdcheck::rcmdcheck(
args = c("--no-manual", "--as-cran", if (.Platform$OS.type == "windows" && getRversion() >= "4.2.0") "--no-multiarch"),
error_on = "note",
check_dir = "check"
)
shell: Rscript {0}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/covr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

timeout-minutes: 45

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

name: covr

Expand All @@ -17,7 +17,7 @@ jobs:

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
## R CMD check
_R_CHECK_LENGTH_1_CONDITION_: true
Expand All @@ -26,7 +26,7 @@ jobs:
_R_CHECK_CRAN_INCOMING_: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/future_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

timeout-minutes: 30

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

name: future.plan=${{ matrix.future.plan }}

Expand All @@ -21,22 +21,22 @@ jobs:
- { plan: 'multisession' }
- { plan: 'sequential' }
- { plan: 'future.batchtools::batchtools_local' }
- { plan: 'future.batchtools::batchtools_bash' }
- { plan: 'future.callr::callr' }

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
## R CMD check
_R_CHECK_LENGTH_1_CONDITION_: true
_R_CHECK_LENGTH_1_LOGIC2_: true
_R_CHECK_MATRIX_DATA_: true
_R_CHECK_CRAN_INCOMING_: false
## Specific to futures
R_FUTURE_RNG_ONMISUSE: error

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/revdepcheck-top.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

timeout-minutes: 30

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

name: ${{ matrix.config.pkg }} (${{ matrix.config.r }}) ${{ matrix.config.label }}

Expand All @@ -29,7 +29,7 @@ jobs:

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
## R CMD check
_R_CHECK_LENGTH_1_CONDITION_: true
Expand All @@ -44,7 +44,7 @@ jobs:
NOT_CRAN: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: future
Version: 1.31.0-9005
Version: 1.33.1
Title: Unified Parallel and Distributed Processing in R for Everyone
Imports:
digest,
Expand All @@ -14,8 +14,10 @@ Suggests:
R.rsp,
markdown
VignetteBuilder: R.rsp
Authors@R: c(person("Henrik", "Bengtsson", role=c("aut", "cre", "cph"),
email = "[email protected]"))
Authors@R: c(person("Henrik", "Bengtsson",
role = c("aut", "cre", "cph"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-7579-5165")))
Description: The purpose of this package is to provide a lightweight and
unified Future API for sequential and parallel processing of R
expression via futures. The simplest way to evaluate an expression
Expand Down
14 changes: 13 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method("$<-",Future)
S3method("[",FutureGlobals)
S3method("[",sessionDetails)
S3method(as.FutureGlobals,FutureGlobals)
Expand All @@ -16,6 +17,10 @@ S3method(getExpression,Future)
S3method(getExpression,MulticoreFuture)
S3method(getExpression,MultisessionFuture)
S3method(getExpression,UniprocessFuture)
S3method(journal,Future)
S3method(journal,FutureJournal)
S3method(journal,FutureJournalCondition)
S3method(journal,list)
S3method(mandelbrot,matrix)
S3method(mandelbrot,numeric)
S3method(nbrOfFreeWorkers,"NULL")
Expand All @@ -33,6 +38,8 @@ S3method(nbrOfWorkers,uniprocess)
S3method(plot,Mandelbrot)
S3method(print,Future)
S3method(print,FutureCondition)
S3method(print,FutureJournal)
S3method(print,FutureJournalSummary)
S3method(print,FutureResult)
S3method(print,FutureStrategy)
S3method(print,FutureStrategyList)
Expand Down Expand Up @@ -64,6 +71,7 @@ S3method(run,ConstantFuture)
S3method(run,Future)
S3method(run,MulticoreFuture)
S3method(run,UniprocessFuture)
S3method(summary,FutureJournal)
S3method(tweak,"function")
S3method(tweak,character)
S3method(tweak,future)
Expand All @@ -89,9 +97,13 @@ export(Future)
export(FutureCondition)
export(FutureError)
export(FutureGlobals)
export(FutureJournalCondition)
export(FutureMessage)
export(FutureResult)
export(FutureWarning)
export(GlobalEnvFutureCondition)
export(GlobalEnvFutureError)
export(GlobalEnvFutureWarning)
export(MulticoreFuture)
export(MultiprocessFuture)
export(MultisessionFuture)
Expand Down Expand Up @@ -122,7 +134,6 @@ export(makeNodePSOCK)
export(mandelbrot)
export(mandelbrot_tiles)
export(multicore)
export(multiprocess)
export(multisession)
export(nbrOfFreeWorkers)
export(nbrOfWorkers)
Expand Down Expand Up @@ -163,6 +174,7 @@ importFrom(parallelly,availableCores)
importFrom(parallelly,availableWorkers)
importFrom(parallelly,connectionId)
importFrom(parallelly,isConnectionValid)
importFrom(parallelly,isNodeAlive)
importFrom(parallelly,makeClusterMPI)
importFrom(parallelly,makeClusterPSOCK)
importFrom(parallelly,makeNodePSOCK)
Expand Down
74 changes: 68 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,81 @@
# Version (development version)

* ...


# Version 1.33.1 [2023-12-21]

## Bug Fixes

* `getExpression()` on 'cluster' future could under some
circumstances call `local()` on the global search path rather than
`base::local()` as intended. For example, if a package that
exports its own `local()` function was attached, then that would be
called instead, often leading to a hard-to-troubleshoot error.


# Version 1.33.0 [2023-07-01]

## New Features

* When a 'cluster' future fails to communicate with the parallel
worker, it does a post-mortem analysis to figure out why, including
inspecting whether the worker process is still alive or not. In
previous versions, this only worked for workers running on the
current machine. Starting with this version, it also attempts to
check this for remote versions.

## Bug Fixes

* If a 'multicore' future failed, because the parallel process
crashed, the corresponding parallel-worker slot was never released.
Now it is removed if it can confirm that the forked worker process
is no longer alive.

## Deprecated and Defunct

* Deprecated `plan(multiprocess, ...)` is now defunct when running in
interactive mode. The next step is to make it defunct also when
running in batch mode.

* The 'multiprocess' strategy has now been fully removed. Please use
'multisession' (recommended) or 'multicore' instead.


# Version 1.32.0 [2023-03-06]

## New Features

* Add prototype of an internal event-logging framework for the
purpose of profiling futures and their backends.

* Add option `future.globalenv.onMisuse` for optionally asserting
that a future expression does not result in variables being added
to the global environment.

* Add option `future.onFutureCondition.keepFuture` for controlling
whether `FutureCondition` objects should keep a copy of the
`Future` object or not. The default is to keep a copy, but if the
future carries large global objects, then the `FutureCondition`
will also be large, which can result in memory issues and slow
downs.

## Miscellaneous

* Fix a **future.tests** check that occurred only on MS Windows.

## Deprecated and Defunct

* The 'multiprocess' strategy, which has been deprecated since future
1.20.0 [2020-10-30] is now defunct. Please use 'multisession'
(recommended) or 'multicore' instead.

* Add optional assertion of the internal Future `state` field.


# Version 1.31.0 [2023-01-31]

## Signficant Changes
## Significant Changes

* Remove function `remote()`. Note that `plan(remote, ...)` has been
deprecated since **future** 1.24.0 [2022-02-19] and defunct since
**future** 1.3.0 (2022-12-15).
**future** 1.30.0 (2022-12-15).

## Documentation

Expand Down
Loading

0 comments on commit 2bc4754

Please sign in to comment.