From ee001b3351c0352427127fe77134d6807131074a Mon Sep 17 00:00:00 2001 From: Don Lipari <lipari1@llnl.gov> Date: Mon, 1 Jun 2009 20:44:31 +0000 Subject: [PATCH] Eliminated the redundant squeue -o "%D" and "%b" formats. Eliminated the redundant squeue -o "%X" and "%Y" and "%Z" formats. --- NEWS | 4 ++++ doc/man/man1/squeue.1 | 33 ++++++++--------------------- src/squeue/opts.c | 25 ---------------------- src/squeue/print.c | 48 ------------------------------------------- src/squeue/print.h | 12 ----------- 5 files changed, 13 insertions(+), 109 deletions(-) diff --git a/NEWS b/NEWS index d73afbf8c1e..89eacd2b239 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,10 @@ documents those changes that are of interest to users and admins. -- Added support for Solaris. Patch from David Hoppner. -- Rename "slurm-aix-federation-<version>.rpm" to just "slurm-aix-<version>.rpm" (federation switch plugin may not be present). + -- Eliminated the redundant squeue -o "%D" and "%b" formats. + Instead, use the squeue -o "%o" and "%S" formats respectively. + -- Eliminated the redundant squeue -o "%X" and "%Y" and "%Z" formats. + Instead, use the squeue -o "%z" format. * Changes in SLURM 2.0.1 ======================== diff --git a/doc/man/man1/squeue.1 b/doc/man/man1/squeue.1 index 3d9679f77f5..d2563d51dd9 100644 --- a/doc/man/man1/squeue.1 +++ b/doc/man/man1/squeue.1 @@ -99,9 +99,6 @@ Account associated with the job. Number of tasks created by a job step. This reports the value of the \fBsrun \-\-ntasks\fR option. .TP -\fB%b\fR -Time at which the job began execution -.TP \fB%c\fR Minimum number of CPUs (processors) per node requested by the job. This reports the value of the \fBsrun \-\-mincpus\fR option with a @@ -114,14 +111,6 @@ it if already running. \fB%d\fR Minimum size of temporary disk space (in MB) requested by the job. .TP -\fB%D\fR -Number of nodes allocated to the job or the minimum number of nodes -required by a pending job. The actual number of nodes allocated to a pending -job may exceed this number if the job specified a node range count (e.g. -minimum and maximum node counts) or the the job specifies a processor -count instead of a node count and the cluster contains nodes with varying -processor counts. -.TP \fB%e\fR Time at which the job ended or is expected to end (based upon its time limit) .TP @@ -185,7 +174,12 @@ nodes that have not yet been returned to service. This may result in the node count being greater than the number of listed nodes. .TP \fB%o\fR -Minimum number of nodes requested by the job. +Number of nodes allocated to the job or the minimum number of nodes +required by a pending job. The actual number of nodes allocated to a +pending job may exceed this number if the job specified a node range +count (e.g. minimum and maximum node counts) or the the job specifies +a processor count instead of a node count and the cluster contains +nodes with varying processor counts. .TP \fB%O\fR Are contiguous nodes requested by the job. @@ -252,18 +246,9 @@ Reservation for the job. \fB%x\fR List of node names explicitly excluded by the job. .TP -\fB%X\fR -Number of requested sockets per node for the job. -.TP -\fB%Y\fR -Number of requested cores per socket for the job. -.TP -\fB%Z\fR -Number of requested threads per core for the job. -.TP -\fB%z\fR -Extended processor information: number of requested sockets, cores, -threads (S:C:T) per node for the job. +\fB%z\fR +Number of requested sockets, cores, and threads (S:C:T) per node for +the job. .RE .TP diff --git a/src/squeue/opts.c b/src/squeue/opts.c index 972b330c87f..4db662b434a 100644 --- a/src/squeue/opts.c +++ b/src/squeue/opts.c @@ -469,11 +469,6 @@ extern int parse_format( char* format ) field_size, right_justify, suffix ); - else if (field[0] == 'b') - job_format_add_time_start( params.format_list, - field_size, - right_justify, - suffix ); else if (field[0] == 'c') job_format_add_min_procs( params.format_list, field_size, @@ -490,11 +485,6 @@ extern int parse_format( char* format ) field_size, right_justify, suffix ); - else if (field[0] == 'D') - job_format_add_num_nodes( params.format_list, - field_size, - right_justify, - suffix ); else if (field[0] == 'e') job_format_add_time_end( params.format_list, field_size, @@ -659,21 +649,6 @@ extern int parse_format( char* format ) field_size, right_justify, suffix ); - else if (field[0] == 'X') - job_format_add_num_sockets( params.format_list, - field_size, - right_justify, - suffix ); - else if (field[0] == 'Y') - job_format_add_num_cores( params.format_list, - field_size, - right_justify, - suffix ); - else if (field[0] == 'Z') - job_format_add_num_threads( params.format_list, - field_size, - right_justify, - suffix ); else if (field[0] == 'z') job_format_add_num_sct( params.format_list, field_size, diff --git a/src/squeue/print.c b/src/squeue/print.c index c9c8a5c62e7..b2488b5f1c6 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -745,54 +745,6 @@ int _print_job_num_sct(job_info_t * job, int width, bool right_justify, return SLURM_SUCCESS; } -int _print_job_num_sockets(job_info_t * job, int width, bool right_justify, - char* suffix) -{ - char tmp_char[10]; - if (job == NULL) /* Print the Header instead */ - _print_str("SOCKETS", width, right_justify, true); - else { - convert_num_unit((float)job->min_sockets, tmp_char, - sizeof(tmp_char), UNIT_NONE); - _print_str(tmp_char, width, right_justify, true); - } - if (suffix) - printf("%s", suffix); - return SLURM_SUCCESS; -} - -int _print_job_num_cores(job_info_t * job, int width, bool right_justify, - char* suffix) -{ - char tmp_char[10]; - if (job == NULL) /* Print the Header instead */ - _print_str("CORES", width, right_justify, true); - else { - convert_num_unit((float)job->min_cores, tmp_char, - sizeof(tmp_char), UNIT_NONE); - _print_str(tmp_char, width, right_justify, true); - } - if (suffix) - printf("%s", suffix); - return SLURM_SUCCESS; -} - -int _print_job_num_threads(job_info_t * job, int width, bool right_justify, - char* suffix) -{ - char tmp_char[10]; - if (job == NULL) /* Print the Header instead */ - _print_str("THREADS", width, right_justify, true); - else { - convert_num_unit((float)job->min_threads, tmp_char, - sizeof(tmp_char), UNIT_NONE); - _print_str(tmp_char, width, right_justify, true); - } - if (suffix) - printf("%s", suffix); - return SLURM_SUCCESS; -} - static int _nodes_in_list(char *node_list) { hostset_t host_set = hostset_create(node_list); diff --git a/src/squeue/print.h b/src/squeue/print.h index 932648872e0..d77c9d5f10b 100644 --- a/src/squeue/print.h +++ b/src/squeue/print.h @@ -130,12 +130,6 @@ int job_format_add_function(List list, int width, bool right_justify, job_format_add_function(list,wid,right,suffix,_print_job_num_nodes) #define job_format_add_num_sct(list,wid,right,suffix) \ job_format_add_function(list,wid,right,suffix,_print_job_num_sct) -#define job_format_add_num_sockets(list,wid,right,suffix) \ - job_format_add_function(list,wid,right,suffix,_print_job_num_sockets) -#define job_format_add_num_cores(list,wid,right,suffix) \ - job_format_add_function(list,wid,right,suffix,_print_job_num_cores) -#define job_format_add_num_threads(list,wid,right,suffix) \ - job_format_add_function(list,wid,right,suffix,_print_job_num_threads) #define job_format_add_shared(list,wid,right,suffix) \ job_format_add_function(list,wid,right,suffix,_print_job_shared) #define job_format_add_contiguous(list,wid,right,suffix) \ @@ -226,12 +220,6 @@ int _print_job_num_nodes(job_info_t * job, int width, bool right_justify, char* suffix); int _print_job_num_sct(job_info_t * job, int width, bool right_justify, char* suffix); -int _print_job_num_sockets(job_info_t * job, int width, bool right_justify, - char* suffix); -int _print_job_num_cores(job_info_t * job, int width, bool right_justify, - char* suffix); -int _print_job_num_threads(job_info_t * job, int width, bool right_justify, - char* suffix); int _print_job_shared(job_info_t * job, int width, bool right_justify, char* suffix); int _print_job_contiguous(job_info_t * job, int width, bool right_justify, -- GitLab