Skip to content

PrologFlags=Alloc in Slurm plugin, documentation, bug fixes - #209

Merged
mplegendre merged 11 commits into
llnl:develfrom
ParaToolsInc:spank-prolog-alloc
Aug 21, 2026
Merged

PrologFlags=Alloc in Slurm plugin, documentation, bug fixes#209
mplegendre merged 11 commits into
llnl:develfrom
ParaToolsInc:spank-prolog-alloc

Conversation

@nchaimov

Copy link
Copy Markdown
Collaborator

This PR makes changes to support PrologFlags=Alloc in the Slurm plugin, adds documentation for the Slurm plugin, and fixes various bugs, eliminates compiler warnings, and increases error checking throughout the plugin.

  • PrologFlags=Alloc (or Contain) forces the prolog to run on every node of an allocation at job allocation time, rather than when the first step runs on a particular node. When this mode is used, we can avoid any of the workarounds that we have to do to force the prolog to run, such as by using srun to launch a dummy step on every node. This avoids the side effect of consuming a step number.
  • A new file doc/slurm_plugin.md is added which documents the configuration and use of the Slurm plugin.

Additionally, various bugs and compiler warnings were fixed:

  • Fix warning about unchecked pipe, chdir
  • Fix write from wrong string in dropPrivilegeAndRun, which would segfault if the unprivileged process returned with an error
  • Fix useless check that substituted NULL for NULL
  • Fix double free of hostlist in case of error
  • Fix grandchild_fork exit check
  • Fix leaks in get_num_hosts_step, dropPrivilegeAndRun
  • Fix allocation size in isBEProc
  • Fix outdated fillInArgs args in SPLIT_CALLBACK_MODE
  • Check exit socket path length
  • Verify that correct exit message received
  • Handle forwarded environment in exit
  • Check handleStart failure in addition to prepApp
  • Only use step ID env var in job script context
  • Check realize failure in fillInArgs
  • Set current_slurm first so we can look up job control env vars
  • Don't leak orig_commpath if realize created a new one
  • Use env var in commpath in Slurm plugin container to test that branch of realize
  • Don't leak fd if exit socket connect fails
  • Handle error return calling isBEProc

We only need workarounds for delayed prolog in the default mode.
If PrologFlags=Alloc is set in slurm.conf, don't use the
workarounds and instead launch Spindle on all nodes in the prolog.
- Fix warning about unchecked pipe, chdir
- Fix write from wrong string in dropPrivilegeAndRun
- Fix useless check that substituted NULL for NULL
- Fix double free of hostlist in case of error
- Fix grandchild_fork exit check
- Fix leaks in get_num_hosts_step, dropPrivilegeAndRun
- Fix allocation size in isBEProc
- Fix outdated fillInArgs args in SPLIT_CALLBACK_MODE
- Check exit socket path length
- Verify that correct exit message received
- Handle forwarded environment in exit
- Check handleStart failure in addition to prepApp
- Only use step ID env var in job script context
- Check realize failure in fillInArgs
- Set current_slurm first so we can look up job control env vars
- Don't leak orig_commpath if realize created a new one
- Use env var in commpath in Slurm plugin container to test that branch
  of realize
- Don't leak fd if exit socket connect fails
- Handle error return calling isBEProc
@mplegendre
mplegendre merged commit 949b9a5 into llnl:devel Aug 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants