[mpich-discuss] finding the rank of processes from their environment?

Raffenetti, Kenneth J. raffenet at mcs.anl.gov
Mon Feb 4 14:54:26 CST 2019


We have discussed officially supporting exposing this information in the 
past here: https://github.com/pmodels/mpich/issues/2360.

However, it is not actively being worked on. Your use case if helpful to 
confirm its need.

Ken

On 2/3/19 10:42 PM, Jeff Hammond via discuss wrote:
> PMI_RANK and PMI_SIZE look to me like what you want and one of my Intel 
> colleagues had the same answer in response to a similar question 
> regarding Intel MPI, which also uses Hydra 
> (https://software.intel.com/en-us/forums/intel-clusters-and-hpc-technology/topic/703734).
> 
> I'm sure you know that all of this is non-standard and relying on it is 
> inherently non-portable.
> 
> Jeff
> 
> On Sun, Feb 3, 2019 at 1:40 PM Brice Goglin via discuss 
> <discuss at mpich.org <mailto:discuss at mpich.org>> wrote:
> 
>     Hello
> 
>     Is there a way to find out the rank of a process (in COMM_WORLD) by
>     looking at its environment? We use this feature in OpenMPI and srun for
>     displaying the placement of ranks in hwloc tools. By default, we display
>     the PID, but displaying the commworld rank is more useful. Looking in
>     /proc/<pid>/environ is an easy way to find environment variables, but I
>     could not find a clear solution for MPICH.
> 
>     I tried on several machines with different mpich installations. In one
>     case, I found a MPI_LOCALRANKID (which isn't exactly what I want but
>     could be sufficient). There's also PMI_RANK, which may be identical to
>     the commworld rank?
> 
>     Thanks for the help
> 
>     Brice
> 
> 
> 
>     _______________________________________________
>     discuss mailing list discuss at mpich.org <mailto:discuss at mpich.org>
>     To manage subscription options or unsubscribe:
>     https://lists.mpich.org/mailman/listinfo/discuss
> 
> 
> 
> -- 
> Jeff Hammond
> jeff.science at gmail.com <mailto:jeff.science at gmail.com>
> http://jeffhammond.github.io/
> 
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
> 


More information about the discuss mailing list