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

Added new slurm_step_ctx_get() option: SLURM_STEP_CTX_RESP.

parent 69e5279a
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,7 @@ man3_MANS = man3/slurm_hostlist_create.3 \
man3/slurm_spawn_kill.3 \
man3/slurm_step_ctx_create.3 \
man3/slurm_step_ctx_destroy.3 \
man3/slurm_step_ctx_get.3 \
man3/slurm_step_ctx_set.3 \
man3/slurm_strerror.3 \
man3/slurm_submit_batch_job.3 \
......
.TH "Slurm API" "3" "July 2004" "Morris Jette" "Slurm task spawn functions"
.TH "Slurm API" "3" "March 2005" "Morris Jette" "Slurm task spawn functions"
.SH "NAME"
slurm_spawn \- Slurm task spawn functions
.SH "SYNTAX"
......@@ -127,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_RESP\fR
Get the job step response message.
Accepts one additional argument of type job_step_create_response_msg_t **.
.TP
\fBSLURM_STEP_CTX_STEPID\fR
Get the step id of the created job step.
Accepts one additional argument of type uint32_t *.
......
......@@ -226,7 +226,8 @@ enum ctx_keys {
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 */
SLURM_STEP_CTX_TID, /* get array of task IDs for specified node */
SLURM_STEP_CTX_RESP /* get job step create response message */
};
/*****************************************************************************\
......
......@@ -162,6 +162,7 @@ slurm_step_ctx_get (slurm_step_ctx ctx, int ctx_key, ...)
uint32_t node_inx;
uint32_t *step_id_ptr;
uint32_t **array_pptr = (uint32_t **) NULL;
job_step_create_response_msg_t ** step_resp_pptr;
if ((ctx == NULL) ||
(ctx->magic != STEP_CTX_MAGIC)) {
......@@ -191,6 +192,12 @@ slurm_step_ctx_get (slurm_step_ctx ctx, int ctx_key, ...)
*array_pptr = ctx->tids[node_inx];
break;
case SLURM_STEP_CTX_RESP:
step_resp_pptr = (job_step_create_response_msg_t **)
va_arg(ap, void *);
*step_resp_pptr = ctx->step_resp;
break;
default:
slurm_seterrno(EINVAL);
rc = SLURM_ERROR;
......
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