Adding persistent workers for 3dvar_atmos suite - #777
Open
ftgoktas wants to merge 21 commits into
Open
Conversation
Contributor
Member
Author
|
Ran 100 trials of each approach on Discover. Both sets submitted simultaneously so they were under same cluster conditions.
So it's 5.4x improvement in average queue wait. The max on non-persistent (~40 min) matches what was being observed on real |
ftgoktas
marked this pull request as ready for review
August 21, 2026 17:12
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.


When running a workflow, every heavy task (
RunJediVariationalExecutable,BuildJedi,EvaObservations) normally submits its ownsbatchjob to SLURM. Each job waits in the queue before it can run, even if the previous task just finished 2 seconds ago.The changes adds a
persistent_workersflag toslurm.yaml. Whenpersistent_workersis set totrue, Swell reserves compute nodes at the start of the workflow usingsalloc --no-shelland holds them until all cycles finish. Every heavy task then runs as ansrun --jobidstep inside that allocation without individual queue waits. The nodes are released viascancelonce all cycles finish.How to test:
Before creating an experiment, make your
src/swell/deployment/platforms/nccs_discover_cascade/slurm.yamlhas:persistent_workers: trueSome things I've tried and encountered errors during testing (fixed now):
srun --jobidfrom a login node (outside a batch job) requires--mpi=pmi2to set up MPI across nodes. Without it, each node starts its own independent group of MPI processes instead of one single communicator, and the run fails.--ntasks-per-node: The globalntasks-per-node: 64fromslurm.yamlwas being passed to thesrunstep. The correct value isnp // nodes (96 / 3 = 32). Passing 64 would request 192 total tasks and cause the run to fail.srun --ntasks=1allocates exactly 1 CPU.EvaObservationscreates 40 Python workers andBuildJediruns parallel compile threads. SLURM'scgroupkilled both. Fixed by adding--cpus-per-taskfrom each task'ssrun_directives.--exclusive lock: RunJediVariationalExecutable uses--exclusivewhich locks all allocated nodes.EvaObservationswith--exclusivewould queue behind it indefinitely. Fixed by runningEvaObservationsassrun --ntasks=1without--exclusiveit only needs CPUs on one node and doesn't need to lock all three.#697