Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Method for worker to determine its "rank" on a single machine?
From: Terry Dontje (terry.dontje_at_[hidden])
Date: 2010-12-10 16:02:18


On 12/10/2010 03:24 PM, David Mathog wrote:
> Ashley Pittman wrote:
>
>> For a much simpler approach you could also use these two environment
> variables, this is on my current system which is 1.5 based, YMMV of course.
>> OMPI_COMM_WORLD_LOCAL_RANK
>> OMPI_COMM_WORLD_LOCAL_SIZE
However that doesn't really tell you which MPI_COMM_WORLD ranks are on
the same node as you I believe.

--td
> That is simpler. It works on OMPI 1.4.3 too:
>
> cat>/usr/common/bin/dumpev.sh<<EOD
> #!/bin/bash
> set
> EOD
> mpirun -np 4 --host monkey01 --mca plm_rsh_agent rsh
> /usr/common/bin/dumpenv.sh | grep LOCAL_RANK
> OMPI_COMM_WORLD_LOCAL_RANK=0
> OMPI_COMM_WORLD_LOCAL_RANK=1
> OMPI_COMM_WORLD_LOCAL_RANK=2
> OMPI_COMM_WORLD_LOCAL_RANK=3
>
> Thanks,
>
> David Mathog
> mathog_at_[hidden]
> Manager, Sequence Analysis Facility, Biology Division, Caltech
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.dontje_at_[hidden] <mailto:terry.dontje_at_[hidden]>



picture