1
0
mirror of https://github.com/msberends/AMR.git synced 2026-05-14 02:30:45 +02:00
Files
AMR/man
Matthijs Berends 23beebc6c3 Migrate parallel computing in as.sir() from parallel:: to future/future.apply (#280)
* Migrate parallel computing in as.sir() from parallel:: to future/future.apply

Replace parallel::mclapply() and parallel::parLapply() with
future.apply::future_lapply(), enabling transparent support for any
future backend (multisession, multicore, mirai_multisession, cluster)
on all platforms including Windows.

When parallel = TRUE the function now: (1) respects an active
future::plan() set by the user without overriding it on exit, or
(2) sets a temporary multisession plan with parallelly::availableCores()
and tears it down on exit. The max_cores argument controls worker count
only when no user plan is active.

future and future.apply are added to Suggests in DESCRIPTION.

https://claude.ai/code/session_01M1Jvf2Miu6JL4TQrEh1wS8

* Require user plan() for parallel=TRUE; fix as_wt_nwt false-positive warnings

- parallel = TRUE now errors with a cli-styled message if no non-sequential
  future::plan() is active; users must call e.g. future::plan(future::multisession)
  before using parallel = TRUE (breaking change)
- Removed auto-setup/teardown of multisession plan inside as.sir(), which was
  slow and caused version-mismatch issues with load_all() workflows
- Added as_wt_nwt to the exclusion list in as_sir_method() to suppress
  false-positive "no longer used" warnings during parallel runs
- Fixed pieces_per_col row-batch calculation to use n_workers (total available
  workers from the active plan) instead of n_cores (workers clipped to n_cols),
  so row-batch mode activates correctly when n_cols < n_workers
- Updated @param parallel and @param max_cores roxygen docs; regenerated man/as.sir.Rd
- Updated sequential-mode hint to instruct users to set plan() first

https://claude.ai/code/session_01M1Jvf2Miu6JL4TQrEh1wS8

* fix parallel

* fix parallel

* unit tests

* unit tedts

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-30 08:57:19 +01:00
..
2026-03-11 16:07:31 +01:00
2026-04-21 22:11:40 +02:00
2026-03-30 10:01:49 +02:00
2026-03-06 12:41:27 +01:00
2026-01-16 10:57:03 +01:00
2026-03-30 10:01:49 +02:00
2026-01-06 23:08:50 +01:00
2025-06-02 12:11:00 +02:00
2025-07-19 14:06:36 +02:00
2025-05-15 10:39:48 +02:00
2026-04-22 08:16:44 +02:00
2025-05-15 10:39:48 +02:00
2026-04-22 08:16:44 +02:00
2026-04-21 22:11:40 +02:00
2026-04-21 22:11:40 +02:00
2026-01-16 10:57:03 +01:00
2024-03-03 23:24:57 +01:00
2025-04-29 16:15:18 +02:00