Repository navigation
Power-law calibration: cap its processes like the threshold calibration - #85
Merged
Merged
Conversation
…hold calibration's memory/CPU/mc.cores caps calibrationCores() forked one process per DEoptim host (15 in our runs) on the local machine, ignoring options(mc.cores), memory and other fits on the host. forkBudget() wraps the budget the threshold self-calibration already used (thresholdForks()), so both share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
eliotmcintire
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new power-law calibration could start far too many processes on one machine. It started one per cluster host named in
cores(15 in our runs) for every fit, ignoring the per-process limit we set, the memory left and other fits running on the same machine. It now uses the same limit as the existing threshold calibration.Affects: power-law fits; how many processes the calibration starts, not its result (that does not depend on the number of processes).
Depends-on: PredictiveEcology/fireSenseUtils#168
Technical details
calibrationCores()(R/powerLawCalibration.R, from #84) tooklength(cores)capped atdetectCores(). It is replaced byforkBudget(nTasks)(R/thresholdForks.R), which wraps the budgetrunSpreadWithoutDEoptim()already computed inline for the threshold self-calibration:thresholdForks()with the R heap, available memory, busy threads,detectCores()andoptions(mc.cores). Both callers now use it, so the code is not duplicated.calibratePowerLaw()itself runs in one process where forking is unavailable (Windows, RStudio; fireSenseUtils#168).New test:
forkBudget()honoursoptions(mc.cores). Full module suite: 904 + 3 new expectations pass, 0 fail.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6