Skip to content

Fail the job when one of its QPU resources cannot be acquired - #205

Merged
ohtanim merged 1 commit into
mainfrom
aw/fail-partial-acquire
Sep 29, 2026
Merged

ohtanim merged 1 commit into
mainfrom
aw/fail-partial-acquire

Conversation

@awennersteen

@awennersteen awennersteen commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Description of Change

With --qpu=A,B, a failed acquire of B only logged an error and the job ran with A alone; the user never saw the deferred error. Now the init is marked as failed, further acquisitions stop, and slurm_spank_task_init() reports the error and cancels the job. Resources acquired before the failure are released in slurm_spank_exit(), which runs unconditionally.

Unknown resource names are still ignored, as documented. README describes the new behaviour.

This is a behavior change. Happy to discuss if this is desired or not.

With --qpu=A,B, a failed acquire of B only logged an error and the
job ran with A alone; the user never saw the deferred error. Mark the
init as failed so slurm_spank_task_init() reports the error and
cancels the job, and stop acquiring further resources. Anything
already acquired is released in slurm_spank_exit().

Unknown resource names are still ignored, as documented.
@awennersteen
awennersteen marked this pull request as ready for review September 29, 2026 10:42

@ohtanim ohtanim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. LTGM

@ohtanim
ohtanim merged commit 1c2eb64 into main Sep 29, 2026
2 checks passed
@ohtanim
ohtanim deleted the aw/fail-partial-acquire branch September 29, 2026 10:52
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