From 38af9ef2e0571342bdfaa05ee1329bef7cc3e7b4 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Wed, 14 Jul 2004 16:51:02 +0000 Subject: [PATCH] Define new slurm_step_ctx_get filed: SLURM_STEP_CTX_STEPID. --- doc/man/man3/slurm_spawn.3 | 8 +++++++- slurm/slurm.h.in | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/man/man3/slurm_spawn.3 b/doc/man/man3/slurm_spawn.3 index cfd931c7bcd..00edf2fa772 100644 --- a/doc/man/man3/slurm_spawn.3 +++ b/doc/man/man3/slurm_spawn.3 @@ -80,7 +80,9 @@ Signal to be sent to the spawned tasks. .LP \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 -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 \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. @@ -125,6 +127,10 @@ Accepts two additional arguments, the first of type int and the second of type char **. By default the current environment variables are copied to started task's environment. .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 Get the number of tasks per node for a given job. Accepts one additional argument of type uint32_t **. diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index ea4f0cd4031..3a469040b79 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -168,6 +168,7 @@ enum ctx_keys { SLURM_STEP_CTX_ARGS, /* set argument count and values */ SLURM_STEP_CTX_CHDIR, /* set directory to run from */ 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_TID /* get array of task IDs for specified node */ }; -- GitLab