[mpich-discuss] Getting a unique name for each MPI task

Rayson Ho raysonlogin at gmail.com
Mon Apr 23 11:15:51 CDT 2012


Are there plans to change the semantics of $PMI_RANK? I need a unique
name for each task on each node (or better yet, globally) so that the
unique name can be used for the output filename.

The whole discussion started on Google's gpreftools list: a user
wanted to use the Heap Profiler to profile memory allocation behavior
of an MPI program, but the issue is that all MPI tasks on a node
writes to the same output file:

http://groups.google.com/group/google-perftools/msg/f2c5f81ab41f7182


I proposed to mangle the $RANK into the filename:

http://groups.google.com/group/google-perftools/msg/4b8a70dfb4df9ca1


We are planning to specify the *name* of the RANK variable, so that we
don't need to change the Heap Profiler source code and can use the
same binary to profile different MPI libraries. Thus for MPICH2, we
will use:

% mpirun ... LD_PRELOAD=libtcmalloc.so
HEAP_PROFILE_MPIRANK_ENV_NAME=PMI_RANK mpi_program

In Open MPI, there is the $OMPI_COMM_WORLD_RANK variable:

% mpirun ... LD_PRELOAD=libtcmalloc.so
HEAP_PROFILE_MPIRANK_ENV_NAME=OMPI_COMM_WORLD_RANK mpi_program

(according to: http://www.open-mpi.org/faq/?category=running#mpi-environmental-variables
)

Rayson

==========================================================
Open Grid Scheduler - The Official Open Source Grid Engine
http://gridscheduler.sourceforge.net/

Scalable Grid Engine Support Program
http://www.scalablelogic.com/


More information about the mpich-discuss mailing list