[padb] r344 committed - Add a mechanism to allow the find_pids function on the inner processes...

padb at googlecode.com padb at googlecode.com
Wed Dec 2 14:18:54 GMT 2009


Revision: 344
Author: apittman
Date: Wed Dec  2 06:18:09 2009
Log: Add a mechanism to allow the find_pids function on the inner processes
to report back a different value of nprocesses to the outer process.
The find_pids function can do this by calling
target_key_pair($rank,"JOB_SIZE",$job_size) which the outer process
will spot and update it's expectations accordingly.

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

Modified:
  /trunk/src/padb

=======================================
--- /trunk/src/padb	Tue Dec  1 06:37:02 2009
+++ /trunk/src/padb	Wed Dec  2 06:18:09 2009
@@ -4175,6 +4175,22 @@

      # The inner process has signed on.
      if ( $comm_data->{current_req}->{mode} eq 'signon' ) {
+
+        # Allow the find_pids function to report back a different job
+        # size to the one the resource manager spotted, potentially
+        # because there is a job running under an allocation and there
+        # may be a discrepancy between the two.
+        if ( defined $d->{target_data}{JOB_SIZE} ) {
+            my @size = keys %{ $d->{target_data}{JOB_SIZE} };
+            if ( @size == 1 ) {
+                $comm_data->{nprocesses} = $size[0];
+            } else {
+                print
+                  "More than one value reported for Job Size, using  
largest\n";
+                my @s = sort { $a <=> $b } @size;
+                $comm_data->{nprocesses} = $s[-1];
+            }
+        }

          # Check the signon messages, reporting minor errors to the user, if
          # no processes are found then don't bother processing any commands




More information about the padb-devel mailing list