diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 82f8684ddbe9689885f7a0026b1f17dcb8f68205..bdf2e86eb10fdc01be20b7a3c3506c9f9841017c 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -26,7 +26,9 @@ SLURM will result in loss of state information. HIGHLIGHTS ========== - Added support for job arrays, which increases performance and ease of use - for sets of similar jobs. + for sets of similar jobs. This man necessitate changes in prolog and/or + epilog scripts due to change in the job ID format, which is now of the form + "<job_id>_<index>" for job arrays. - Added slurmctld/dynalloc plugin for MapReduce+ support. - Added prolog and epilog support for advanced reservations. - Much faster throughput for job step execution with --exclusive option. The @@ -91,6 +93,11 @@ COMMAND CHANGES (see man pages for details) support job arrays. For job arrays, the job ID is no longer a single number but has the format "JOBID_TASKID" while a step ID format is now "JOBID_TASKID.STEPID". + - Modified squeue output field options for job arrays: + %i is now of the form <base_job_id>_<array_index> + %F is the <base_job_id> + %K is the <array_index> + %A is the <job_id>, which is unique for each element of a job array - Fully removed deprecated sacct --dump --fdump options. - Added partition "SelectTypeParameters" field to scontrol output. - Added Allocated Memory to node information displayed by sview and scontrol diff --git a/doc/man/man1/squeue.1 b/doc/man/man1/squeue.1 index e8a504e2a5c897e4fb2495d7d2d6ad97a45f54cb..07bf04b46635699f1d4c31964534c3b7be2de649 100644 --- a/doc/man/man1/squeue.1 +++ b/doc/man/man1/squeue.1 @@ -126,6 +126,11 @@ Number of tasks created by a job step. This reports the value of the \fBsrun \-\-ntasks\fR option. (Valid for job steps only) .TP +\fB%A\fR +Job id. +This will have a unique value for each element of job arrays. +(Valid for jobs only) +.TP \fB%b\fR Generic resources (gres) required by the job or step. (Valid for jobs and job steps) @@ -179,7 +184,7 @@ Features required by the job. (Valid for jobs only) .TP \fB%F\fR -Job array's job ID. +Job array's job ID. This is the base job ID. (Valid for jobs only) .TP \fB%g\fR @@ -202,6 +207,8 @@ When \-\-sockets\-per\-node has not been set, "*" is displayed. .TP \fB%i\fR Job or job step id. +In the case of job arrays, the job ID format will be of the form +"<base_job_id>_<index>". (Valid for jobs and job steps) .TP \fB%I\fR diff --git a/etc/slurm.epilog.clean b/etc/slurm.epilog.clean index e829554f7651cda64280b080cf591941e44f2108..15d435229b8b21e81ccea1c282244e3511ba251f 100644 --- a/etc/slurm.epilog.clean +++ b/etc/slurm.epilog.clean @@ -22,7 +22,7 @@ if [ $SLURM_UID -lt 100 ] ; then exit 0 fi -job_list=`${SLURM_BIN}squeue --noheader --format=%i --user=$SLURM_UID --node=localhost` +job_list=`${SLURM_BIN}squeue --noheader --format=%A --user=$SLURM_UID --node=localhost` for job_id in $job_list do if [ $job_id -ne $SLURM_JOB_ID ] ; then diff --git a/src/squeue/opts.c b/src/squeue/opts.c index 75f2bb508cf527723c8f8b6bcd8d2fc108008e79..6b163ce411f698a68313e1fded485839250a5f81 100644 --- a/src/squeue/opts.c +++ b/src/squeue/opts.c @@ -589,6 +589,11 @@ extern int parse_format( char* format ) field_size, right_justify, suffix ); + else if (field[0] == 'A') + job_format_add_job_id2(params.format_list, + field_size, + right_justify, + suffix); else if (field[0] == 'b') job_format_add_gres( params.format_list, field_size, right_justify, diff --git a/src/squeue/print.c b/src/squeue/print.c index 7cf24c08b88fa03ea45563116d766a7c42c6e2b2..9b8d8fc14d1ab0738f79f1e4b9546ae212b4c1a0 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -413,6 +413,20 @@ int _print_job_job_id(job_info_t * job, int width, bool right, char* suffix) return SLURM_SUCCESS; } +int _print_job_job_id2(job_info_t * job, int width, bool right, char* suffix) +{ + if (job == NULL) { /* Print the Header instead */ + _print_str("JOBID", width, right, true); + } else { + char id[FORMAT_STRING_SIZE]; + snprintf(id, FORMAT_STRING_SIZE, "%u", job->job_id); + _print_str(id, width, right, true); + } + if (suffix) + printf("%s", suffix); + return SLURM_SUCCESS; +} + int _print_job_partition(job_info_t * job, int width, bool right, char* suffix) { if (job == NULL) /* Print the Header instead */ diff --git a/src/squeue/print.h b/src/squeue/print.h index 7e2e1df89a8197010c1e0934ff3d3fe95aad4317..35240ba566550aa6e080780984c41cee62059277 100644 --- a/src/squeue/print.h +++ b/src/squeue/print.h @@ -88,6 +88,8 @@ int job_format_add_function(List list, int width, bool right_justify, job_format_add_function(list,wid,right,suffix,_print_job_batch_host) #define job_format_add_job_id(list,wid,right,suffix) \ job_format_add_function(list,wid,right,suffix,_print_job_job_id) +#define job_format_add_job_id2(list,wid,right,suffix) \ + job_format_add_function(list,wid,right,suffix,_print_job_job_id2) #define job_format_add_partition(list,wid,right,suffix) \ job_format_add_function(list,wid,right,suffix,_print_job_partition) #define job_format_add_prefix(list,wid,right,prefix) \ @@ -195,6 +197,8 @@ int _print_job_batch_host(job_info_t * job, int width, bool right_justify, char* suffix); int _print_job_job_id(job_info_t * job, int width, bool right_justify, char* suffix); +int _print_job_job_id2(job_info_t * job, int width, bool right_justify, + char* suffix); int _print_job_prefix(job_info_t * job, int width, bool right_justify, char* suffix); int _print_job_reason(job_info_t * job, int width, bool right_justify,