Skip to content

feat: make default Slurm account configurable#109

Merged
chrisdjscott merged 1 commit into
mainfrom
slurm-account-config
May 24, 2026
Merged

feat: make default Slurm account configurable#109
chrisdjscott merged 1 commit into
mainfrom
slurm-account-config

Conversation

@chrisdjscott

@chrisdjscott chrisdjscott commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds an optional [SLURM] account config key. rjm_config now persists the NeSI project code entered at the prompt into this key when the Globus stack is configured (and skips it on --ssh).
  • GlobusComputeSlurmRunner reads the new key and passes it through to the remote submit_slurm_job helper, which injects --account="<account>" into the sbatch command line.
  • If the user's Slurm script already specifies an account via #SBATCH --account=... or #SBATCH -A ..., the script wins and RJM does not add --account to the command. The key is optional, so existing configs and non-NeSI Slurm sites keep working unchanged.
  • Docs: new "Default Slurm account" section in docs/configuration.rst documenting the persistence, injection, and precedence rules.

Test plan

  • pytest (full suite passes locally, 67 tests).
  • New unit tests cover the four submit_slurm_job cases (no account configured, account injected, script already specifies via long form, script already specifies via short form) plus runner-init parsing (missing / whitespace / set).
  • make html in docs/ succeeds with no new warnings.
  • Manual run of rjm_config against a real NeSI account to confirm the value lands in rjm_config.ini and is picked up by rjm_batch_submit.

Persist the NeSI project code entered during `rjm_config` into the new
`[SLURM] account` config key and have `GlobusComputeSlurmRunner` inject
it as `sbatch --account=<account>` at submit time. If the user's Slurm
script already specifies an account via `#SBATCH --account=...` or
`#SBATCH -A ...`, the script value still wins. The key is optional, so
existing configs and non-NeSI Slurm sites are unaffected.
@chrisdjscott chrisdjscott merged commit 26f99f1 into main May 24, 2026
56 of 66 checks passed
@chrisdjscott chrisdjscott deleted the slurm-account-config branch May 24, 2026 09:12
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.

1 participant