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.
@SpheMakh, in the interest of smaller PRs, review early, review often please!
@Athanaseus this ought to get you going. The slurm backend "wrapper" is enabled like so:
stimela/tests/stimela_tests/test_slurm.yml
Line 11 in e61296d
This causes all commands to be wrapped in an
srun
call. Just addscatter: -1
to your for-loops, and you're all parallel.(I call it a "wrapper" because it wraps an actual backend like "native" or "singularity" -- it is not a backend on its own per se.)
The recipe itself is meant to be run on the head node (inside a tmux or screen session, of course).
Under slurm, you don't want to be building Singularity images on-demand on the compute nodes. Rather, pre-build all necessary images on the head node before you run a recipe. There is a new
stimela build recipe.yml
command that will do this (options very similar to the run command). You should also disable on-demand building of images during the run like so:stimela/tests/stimela_tests/test_slurm.yml
Line 10 in e61296d
You'll probably want to tweak srun options on a per-cab (or per-step) basis. This is done similarly to how we tweak k8s settings per cab here:
stimela/tests/stimela_tests/test_kube_config.yml
Line 42 in e61296d
So, something like:
..will run breizorro with
srun --mem 16GB --cpus-per-task 4
. Thesrun_opts
section is free-form, soall srun options are supported.