From padb at googlecode.com Thu Feb 13 21:54:20 2014 From: padb at googlecode.com (padb at googlecode.com) Date: Thu, 13 Feb 2014 21:54:20 +0000 Subject: [padb] r463 committed - Detect IntelMPI jobs when using slurm.... Message-ID: <20cf300e51674a7e2c04f250bb75@google.com> Revision: 463 Author: apittman at gmail.com Date: Thu Feb 13 21:54:04 2014 UTC Log: Detect IntelMPI jobs when using slurm. This patch is from Mouhamed Gueye. http://code.google.com/p/padb/source/detail?r=463 Modified: /trunk/src/padb ======================================= --- /trunk/src/padb Wed Jan 8 22:46:42 2014 UTC +++ /trunk/src/padb Thu Feb 13 21:54:04 2014 UTC @@ -9473,6 +9473,7 @@ pbs_attach => 1, orted => 1, mpirun => 1, + pmi_proxy => 1, }; return 1 if ( defined $mgrs->{$name} ); return; @@ -9525,18 +9526,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 ( 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}; + } - # 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{PMI_SIZE} ) { + target_key_pair( $vp, "PMI_SIZE", $env{PMI_SIZE} ); + } - if ( defined $env{OMPI_COMM_WORLD_SIZE} ) { - target_key_pair( $vp, "JOB_SIZE", $env{OMPI_COMM_WORLD_SIZE} ); + register_target_process( $env{PMI_RANK}, $pid ); } - - register_target_process( $env{OMPI_COMM_WORLD_RANK}, $pid ); } return;