The "squeue --state=all" was not working for most architectures
due to pointers to integers being used in one place and pointers to
16-bit unsigned integers being used in the other place. A patch
is attached and this will be fixed in v2.2.4.
________________________________________
From: [email protected] [[email protected]] On Behalf
Of Lennart Karlsson [[email protected]]
Sent: Tuesday, March 15, 2011 4:27 AM
To: [email protected]
Subject: [slurm-dev] Flag combination of "--clusters" and "--states=all" does
not work together
Hi,
I now have two clusters sharing the same slurmdbd and
noticed that the command "squeue -M kalkyl -t all" does
not list my jobs and merely shows:
CLUSTER: kalkyl
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
The problem was solved by changing the command to
"squeue -M kalkyl -t r,cg,cd,ca,f,to,nf", because I
actually did not need to list all kinds of jobs, and
anyway am able to enumerate them myself, but it looks
like a bug that you may want to fix.
SLURM version is 2.2.0. I know that it is not the latest,
but I did not find this bug mentioned in the "CHANGES" log
for later versions.
Thanks for good support,
-- Lennart Karlsson
UPPMAX, Uppsala University, Sweden
http://www.uppmax.uu.se
Index: src/squeue/opts.c
===================================================================
--- src/squeue/opts.c (revision 22777)
+++ src/squeue/opts.c (working copy)
@@ -79,7 +79,7 @@
static char *_get_prefix(char *token);
static void _help( void );
static int _max_cpus_per_node(void);
-static int _parse_state( char* str, enum job_states* states );
+static int _parse_state( char* str, uint16_t* states );
static void _parse_token( char *token, char *field, int *field_size,
bool *right_justify, char **suffix);
static void _print_options( void );
@@ -394,13 +394,13 @@
* RET 0 or error code
*/
static int
-_parse_state( char* str, enum job_states* states )
+_parse_state( char* str, uint16_t* states )
{
int i;
char *state_names;
if ((i = job_state_num(str)) >= 0) {
- *states = i;
+ *states = (uint16_t) i;
return SLURM_SUCCESS;
}
@@ -961,7 +961,7 @@
{
List my_list;
char *state = NULL, *tmp_char = NULL, *my_state_list = NULL;
- enum job_states *state_id = NULL;
+ uint16_t *state_id = NULL;
if ( str == NULL)
return NULL;
Index: src/squeue/print.c
===================================================================
--- src/squeue/print.c (revision 22777)
+++ src/squeue/print.c (working copy)
@@ -1309,7 +1309,7 @@
int filter;
ListIterator iterator;
uint32_t *job_id, *user;
- enum job_states *state_id;
+ uint16_t *state_id;
char *account, *part, *qos;
if (params.job_list) {