Skip to content
Snippets Groups Projects
Commit fadc5610 authored by Morris Jette's avatar Morris Jette
Browse files

Improve documentation for prolog/epilog env vars

parent 70d1e809
No related branches found
No related tags found
No related merge requests found
...@@ -3726,16 +3726,36 @@ to all of the programs. ...@@ -3726,16 +3726,36 @@ to all of the programs.
.TP .TP
\fBBASIL_RESERVATION_ID\fR \fBBASIL_RESERVATION_ID\fR
Basil reservation ID. Basil reservation ID.
Available on Cray XT/XE systems only. Available on Cray systems with ALPS only.
.TP .TP
\fBMPIRUN_PARTITION\fR \fBMPIRUN_PARTITION\fR
BlueGene partition name. BlueGene partition name.
Available on BlueGene systems only. Available on BlueGene systems only.
.TP .TP
\fBSLURM_ARRAY_JOB_ID\fR
If this job is part of a job array, this will be set to the job ID.
Otherwise it will not be set.
To reference this specific task of a job array, combine
SLURM_ARRAY_JOB_ID with SLURM_ARRAY_TASK_ID
(e.g. "scontrol update ${SLURM_ARRAY_JOB_ID}_{$SLURM_ARRAY_TASK_ID} ...");
Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only.
.TP
\fBSLURM_ARRAY_TASK_ID\fR
If this job is part of a job array, this will be set to the task ID.
Otherwise it will not be set.
To reference this specific task of a job array, combine
SLURM_ARRAY_JOB_ID with SLURM_ARRAY_TASK_ID
(e.g. "scontrol update ${SLURM_ARRAY_JOB_ID}_{$SLURM_ARRAY_TASK_ID} ...");
Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only.
.TP
\fBSLURM_JOB_ACCOUNT\fR \fBSLURM_JOB_ACCOUNT\fR
Account name used for the job. Account name used for the job.
Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only. Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only.
.TP .TP
\fBSLURM_JOB_CLUSTER_NAME\fR
Name of the cluster executing for the job.
Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only.
.TP
\fBSLURM_JOB_CONSTRAINTS\fR \fBSLURM_JOB_CONSTRAINTS\fR
Features required to run the job. Features required to run the job.
Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only. Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only.
...@@ -3756,7 +3776,6 @@ exit() function. The second number of the signal that caused the process to ...@@ -3756,7 +3776,6 @@ exit() function. The second number of the signal that caused the process to
terminante if it was terminated by a signal. terminante if it was terminated by a signal.
Available in \fBEpilogSlurmctld\fR only. Available in \fBEpilogSlurmctld\fR only.
.TP .TP
\fBSLURM_JOB_GID\fR \fBSLURM_JOB_GID\fR
Group ID of the job's owner. Group ID of the job's owner.
Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only. Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only.
...@@ -3767,6 +3786,9 @@ Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only. ...@@ -3767,6 +3786,9 @@ Available in \fBPrologSlurmctld\fR and \fBEpilogSlurmctld\fR only.
.TP .TP
\fBSLURM_JOB_ID\fR \fBSLURM_JOB_ID\fR
Job ID. Job ID.
CAUTION: If this job is the first task of a job array, then Slurm commands using
this job ID will refer to the entire job array rather than this specific task
of the job array.
.TP .TP
\fBSLURM_JOB_NAME\fR \fBSLURM_JOB_NAME\fR
Name of the job. Name of the job.
......
...@@ -2510,11 +2510,9 @@ static char **_build_env(struct job_record *job_ptr) ...@@ -2510,11 +2510,9 @@ static char **_build_env(struct job_record *job_ptr)
sprintf(buf, "%d:%d", exit_code, signal); sprintf(buf, "%d:%d", exit_code, signal);
setenvf(&my_env, "SLURM_JOB_EXIT_CODE2", "%s", buf); setenvf(&my_env, "SLURM_JOB_EXIT_CODE2", "%s", buf);
if (job_ptr->array_job_id != 0) { if (job_ptr->array_task_id != NO_VAL) {
setenvf(&my_env, "SLURM_ARRAY_JOB_ID", "%u", setenvf(&my_env, "SLURM_ARRAY_JOB_ID", "%u",
job_ptr->array_job_id); job_ptr->array_job_id);
}
if (job_ptr->array_task_id != NO_VAL) {
setenvf(&my_env, "SLURM_ARRAY_TASK_ID", "%u", setenvf(&my_env, "SLURM_ARRAY_TASK_ID", "%u",
job_ptr->array_task_id); job_ptr->array_task_id);
} }
......
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