[slurm-dev] squeue -o "%h"

0 views
Skip to first unread message

Bill....@bull.com

unread,
Aug 13, 2010, 1:12:36 PM8/13/10
to slur...@lists.llnl.gov

I have encountered curious results when I designate  the '%h' format  option on an 'squeue' command with a specific configuration. What I see is a number.   Below is an example of the 'squeue' command and the parameters that are set in slurm.conf that may be involved.  If the number is appropriate, what does it mean in this context?

Best Regards,
Bill

 
[scotty] (slurm) slurm> srun -w n0 sleep 400 &
[1] 32296
[scotty] (slurm) slurm> srun -w n0 sleep 400 &
[2] 32339
[scotty] (slurm) slurm> srun -w n0 sleep 400 &
[3] 32376
[scotty] (slurm) slurm> srun -w n0 sleep 400 &
[4] 32419
[scotty] (slurm) slurm> squeue -o "%.6i %6h %N"
 JOBID SHARED NODELIST
   1322    2                 n0
   1323    2                 n0
   1324    2                 n0
   1325    2                 n0


SchedulerType=sched/builtin
SelectType=select/cons_res
SelectTypeParameters=CR_CORE

NodeName=n0 NodeHostname=scotty NodeAddr=scotty Procs=8
NodeName=n1 NodeHostname=chekov NodeAddr=chekov Procs=8
NodeName=n2 NodeHostname=sulu NodeAddr=sulu Procs=8

PartitionName=phoenix Nodes=n0,n1,n2 Default=YES

Lipari, Don

unread,
Aug 13, 2010, 4:47:47 PM8/13/10
to slur...@lists.llnl.gov

Bill,

 

Thanks for reporting this.  There is clearly a discrepancy between the squeue man page and the output.

 

Here’s a patch that I just checked into 2.1 to make the behavior match the documentation:

 

--- src/squeue/print.c  (revision 20944)

+++ src/squeue/print.c  (working copy)

@@ -757,7 +757,19 @@

        if (job == NULL)        /* Print the Header instead */

                _print_str("SHARED", width, right_justify, true);

        else {

-               _print_int(job->shared, width, right_justify, true);

+               switch (job->shared) {

+               case 0:

+                       _print_str("no", width, right_justify, true);

+                       break;

+               case 1:

+               case 2:

+                       _print_str("yes", width, right_justify, true);

+                       break;

+               case (uint16_t)NO_VAL:

+               default:

+                       _print_str("unknwn", width, right_justify, true);

+                       break;

+               }

        }

        if (suffix)

                printf("%s", suffix);

 

Don

Bill....@bull.com

unread,
Aug 16, 2010, 11:09:44 AM8/16/10
to slur...@lists.llnl.gov

Don,
Thank you for the patch.  I installed it on my test system & now see the expected output.
Best Regards,
Bill


"Lipari, Don" <lip...@llnl.gov>
Sent by: owner-s...@lists.llnl.gov

08/13/2010 02:48 PM

Please respond to
slur...@lists.llnl.gov

To
"slur...@lists.llnl.gov" <slur...@lists.llnl.gov>
cc
Subject
RE: [slurm-dev] squeue -o "%h"


Reply all
Reply to author
Forward
0 new messages