[padb] r438 committed - Work with hidden slurm partitions....

padb at googlecode.com padb at googlecode.com
Fri May 20 21:01:37 BST 2011


Revision: 438
Author:   apittman at gmail.com
Date:     Fri May 20 13:01:28 2011
Log:      Work with hidden slurm partitions.

This patch is from Matthieu Hautreux (CEA)

http://code.google.com/p/padb/source/detail?r=438

Modified:
  /trunk/src/padb

=======================================
--- /trunk/src/padb	Tue May 17 14:06:57 2011
+++ /trunk/src/padb	Fri May 20 13:01:28 2011
@@ -2532,7 +2532,7 @@

  sub slurm_get_jobs {
      my $user = shift;
-    my @res  = slurp_cmd("squeue -t running -u $user -h -o %i");
+    my @res  = slurp_cmd("squeue -a -t running -u $user -h -o %i");
      chomp @res;
      return @res;
  }
@@ -2542,7 +2542,7 @@
  sub slurm_job_to_ncpus {
      my $job   = shift;
      my $s     = "$job." . $conf{slurm_job_step};
-    my @steps = slurp_cmd("squeue -s $s -o %i,%A");
+    my @steps = slurp_cmd("squeue -a -s $s -o %i,%A");

      # The %A option is new so ensure we have the TASKS output before we
      # believe what we see here...  Mind you %A is several years old now so
@@ -2562,7 +2562,7 @@
  # Query the nodecount for the "job" as that is what we shall be running on.
  sub slurm_job_to_nodecount {
      my $job  = shift;
-    my @jobs = slurp_cmd('squeue -o %i,%D');
+    my @jobs = slurp_cmd('squeue -a -o %i,%D');

      chomp @jobs;
      foreach my $step (@jobs) {
@@ -2578,7 +2578,7 @@
  sub slurm_job_to_nodelist {
      my $job   = shift;
      my $s     = "$job." . $conf{slurm_job_step};
-    my @steps = slurp_cmd("squeue -s $s -o %i,%N");
+    my @steps = slurp_cmd("squeue -a -s $s -o %i,%N");

      chomp @steps;
      foreach my $step (@steps) {
@@ -2590,7 +2590,7 @@

  sub slurm_job_is_running {
      my $job    = shift;
-    my @s      = slurp_cmd("squeue -h -j $job -o %T");
+    my @s      = slurp_cmd("squeue -a -h -j $job -o %T");
      my $status = lc $s[0];
      chomp $status;
      return ( $status eq 'running' );
@@ -2604,7 +2604,7 @@
      # step ids slurm thinks are running and pick the first one.
      # Previously this value just defaulted to zero.
      if ( not defined $conf{slurm_job_step} ) {
-        my @all_steps = slurp_cmd("squeue -s -o %i");
+        my @all_steps = slurp_cmd("squeue -a -s -o %i");
          my @valid_steps;
          foreach my $step (@all_steps) {
              chomp $step;




More information about the padb-devel mailing list