[padb] [PATCH] IntelMPI (hydra) vs SLURM support

Gilles Gouaillardet gilles.gouaillardet at iferc.org
Thu Jul 11 06:19:06 BST 2013


Dear padb folks,

Here is attached a patch to support the hydra launcher used by IntelMPI 
under SLURM

Basically, hydra will call
srun pmi_proxy
and each pmi_proxy will fork and exec the MPI binary.

This is very similar to what is currently done for OpenMPI support

Best regards,

Gilles
-------------- next part --------------
--- /opt/bullxde/debuggers/padb/bin/padb	2011-09-22 11:22:30.000000000 +0900
+++ /csc/home1/gouaillardet/HPC-RT/1571/padb.gg1	2013-06-24 15:21:41.122719000 +0900
@@ -9224,6 +9232,7 @@
         pbs_attach => 1,
         orted      => 1,
         mpirun     => 1,
+        pmi_proxy  => 1,
     };
     return 1 if ( defined $mgrs->{$name} );
     return;
@@ -9275,18 +9284,30 @@
         next unless defined $env{SLURM_JOB_ID};
         next if ( $env{SLURM_JOB_ID} != $jobid );
 
-        next unless defined $env{OMPI_COMM_WORLD_RANK};
+        if ( defined $env{OMPI_COMM_WORLD_RANK} ) {
+            # If this is defined check it's correct, it might be missing though.
+            if ( defined $env{SLURM_JOB_STEP} ) {
+                next if $env{SLURM_JOB_STEP} != $inner_conf{slurm_job_step};
+            }
 
-        # If this is defined check it's correct, it might be missing though.
-        if ( defined $env{SLURM_JOB_STEP} ) {
-            next if $env{SLURM_JOB_STEP} != $inner_conf{slurm_job_step};
-        }
+            if ( defined $env{OMPI_COMM_WORLD_SIZE} ) {
+                target_key_pair( $vp, "JOB_SIZE", $env{OMPI_COMM_WORLD_SIZE} );
+            }
 
-        if ( defined $env{OMPI_COMM_WORLD_SIZE} ) {
-            target_key_pair( $vp, "JOB_SIZE", $env{OMPI_COMM_WORLD_SIZE} );
-        }
+            register_target_process( $env{OMPI_COMM_WORLD_RANK}, $pid );
+        } elsif ( defined $env{PMI_RANK} ) {
+
+            # If this is defined check it's correct, it might be missing though.
+            if ( defined $env{SLURM_JOB_STEP} ) {
+                next if $env{SLURM_JOB_STEP} != $inner_conf{slurm_job_step};
+            }
 
-        register_target_process( $env{OMPI_COMM_WORLD_RANK}, $pid );
+            if ( defined $env{PMI_SIZE} ) {
+                target_key_pair( $vp, "PMI_SIZE", $env{PMI_SIZE} );
+            }
+
+            register_target_process( $env{PMI_RANK}, $pid );
+        }
     }
 
     return;


More information about the padb-devel mailing list