Repository navigation
spank_qrmi: expose --qpu value to slurmctld as QRMI_QPU job control e… - #211
Merged
Merged
Conversation
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.
…nv var
Description of Change
Summary
Pass the
--qpuoption value to slurmctld at submission time by callingspank_job_control_setenv(sp, "QRMI_QPU", <value>, 1)in the allocatorcontext (sbatch / salloc / srun).
Motivation
Currently the
--qpuvalue is only available to the plugin itself. Site-sidecomponents running in slurmctld, such as job_submit plugins, have no reliable
way to see which QPU(s) a job requested. Parsing
#SBATCHlines from thebatch script is fragile: it misses
--qpugiven on the command line and doesnot work for salloc/srun.
With this change, slurmctld receives the value through the job's
spank_job_env, which lets sites enforce policies at submit time — forexample, requiring a matching license for each requested QPU:
Changes
slurm_spank_init_post_opt, when running inS_CTX_ALLOCATORand--qpuwas given, callspank_job_control_setenv(sp, "QRMI_QPU", value, 1).QRMI_to avoid collisions with otherSPANK plugins or site tooling.
Where the value is visible
job_desc.spank_job_envin job_submit plugins)QRMI_QPUSLURM_SPANK_QRMI_QPUTesting
#SBATCH --qpu=<host>and confirmed thatjob_desc.spank_job_envin a job_submit Lua plugin containsQRMI_QPU=<host>.--qpuare unaffected.Checklist ✅
Ticket