Skip to content

Sessions support for SPANK plugin#152

Open
nchaimov wants to merge 1 commit intollnl:develfrom
ParaToolsInc:spank-session
Open

Sessions support for SPANK plugin#152
nchaimov wants to merge 1 commit intollnl:develfrom
ParaToolsInc:spank-session

Conversation

@nchaimov
Copy link
Copy Markdown
Collaborator

Adds support for sessions to the SPANK plugin.

To ensure that sessions end when the allocation does, sessions are made part of the allocation. An allocation uses a session by passing --spindle-session as an argument to salloc or sbatch. This differs from the other launchers which use spindle --start-session: the session is automatically started when the first step runs, and is automatically ended when the allocation ends.

The major complication is that we have to start the session on every node of the job, even if the first step doesn't run on every node. When using rshlaunch, the first step uses rshlaunch to start the session on every node of the job. When not using rshlaunch, we have to use a dummy srun on every node to cause the job prolog to run everywhere. The srun runs /bin/true and so exits immediately, not consuming any resources. However, this has the side effect of using up a step ID. This could interfere with job scripts that assume the step IDs instead of checking. For this reason, the rshlaunch configuration may be preferred.

To signal session end, a Unix socket is used. This is very similar to, and adapted from, the code used for the "exit note" with OPT_BEEXIT.

Almost all of the changes are restricted to the SPANK plugin itself. The only changes outside the SPANK plugin are to the testsuite: because the sessions are allocation-scoped, session and non-session tests must run in two different allocations. When the resource manager is slurm_plugin, the test scripts check whether a session is being used in the current allocation and run either the session or non-session tests accordingly. The CI workflow for the plugin tests runs ./runTests twice, once outside a session and once inside.

Adds `--spindle-session` argument to salloc and sbatch
which runs jobs in that allocation with a spindle session.
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