Skip to content
Snippets Groups Projects
Commit 38af9ef2 authored by Moe Jette's avatar Moe Jette
Browse files

Define new slurm_step_ctx_get filed: SLURM_STEP_CTX_STEPID.

parent b0ac6667
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,9 @@ Signal to be sent to the spawned tasks. ...@@ -80,7 +80,9 @@ Signal to be sent to the spawned tasks.
.LP .LP
\fBslurm_step_ctx_create\fR Create a job step context. To avoid memory \fBslurm_step_ctx_create\fR Create a job step context. To avoid memory
leaks call \fBslurm_step_ctx_destroy\fR when the use of this context is leaks call \fBslurm_step_ctx_destroy\fR when the use of this context is
finished. finished. NOTE: this function creates a slurm job step. Call \fBslurm_spawn\fR
in a timely fashion to avoid having job step credentials time out. If
\fBslurm_spawn\fR is not used, explicitly cancel the job step.
.LP .LP
\fBslurm_step_ctx_get\fR Get values from a job step context. \fBslurm_step_ctx_get\fR Get values from a job step context.
\fIctx_key\fP identifies the fields to be gathered from the job step context. \fIctx_key\fP identifies the fields to be gathered from the job step context.
...@@ -125,6 +127,10 @@ Accepts two additional arguments, the first of type int and ...@@ -125,6 +127,10 @@ Accepts two additional arguments, the first of type int and
the second of type char **. By default the current environment the second of type char **. By default the current environment
variables are copied to started task's environment. variables are copied to started task's environment.
.TP .TP
\fBSLURM_STEP_CTX_STEPID\fR
Get the step id of the created job step.
Accepts one additional argument of type uint32_t *.
.TP
\fBSLURM_STEP_CTX_TASKS\fR \fBSLURM_STEP_CTX_TASKS\fR
Get the number of tasks per node for a given job. Get the number of tasks per node for a given job.
Accepts one additional argument of type uint32_t **. Accepts one additional argument of type uint32_t **.
......
...@@ -168,6 +168,7 @@ enum ctx_keys { ...@@ -168,6 +168,7 @@ enum ctx_keys {
SLURM_STEP_CTX_ARGS, /* set argument count and values */ SLURM_STEP_CTX_ARGS, /* set argument count and values */
SLURM_STEP_CTX_CHDIR, /* set directory to run from */ SLURM_STEP_CTX_CHDIR, /* set directory to run from */
SLURM_STEP_CTX_ENV, /* set environment variable count and values */ SLURM_STEP_CTX_ENV, /* set environment variable count and values */
SLURM_STEP_CTX_STEPID, /* get the created job step id */
SLURM_STEP_CTX_TASKS, /* get array of task count on each node */ SLURM_STEP_CTX_TASKS, /* get array of task count on each node */
SLURM_STEP_CTX_TID /* get array of task IDs for specified node */ SLURM_STEP_CTX_TID /* get array of task IDs for specified node */
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment