[mpich2-dev] translating process ranks

Thomas Ropars thomas.ropars at inria.fr
Wed Dec 15 16:45:20 CST 2010


Thank you. That's what I was looking for :).

I thought of that but I wasn't sure to understand clearly what pg_rank is.
The comment says "Rank of the process in that process group associated 
with this VC". And so i was wondering if it could be another process 
group than the one of MPI_COMM_WORLD.

Thomas

On 15/12/2010 16:35, Darius Buntinas wrote:
> If you want to do this from inside the library you can do it this way:
>
>      MPIDI_VC_t *vc;
>      MPIDI_Comm_get_vc(comm, rank,&vc);
>      comm_world_rank = vc->pg_rank;
>
> -d
>
> On Dec 15, 2010, at 3:49 PM, David Fiala wrote:
>
>> Thomas,
>>
>> I've found that using the combination of MPI_Comm_group with
>> MPI_Group_translate_ranks works for this purpose.
>>
>> -David Fiala
>>
>> On Wed, Dec 15, 2010 at 4:43 PM, Thomas Ropars<thomas.ropars at inria.fr>  wrote:
>>> Hi,
>>>
>>> Is there a function in mpich2 that can takes as input a communicator and a
>>> rank provides as output the rank of the process in MPI_COMM_WORLD?
>>> If not, what would be the easiest way to do it ?
>>>
>>> Regards,
>>> Thomas
>>>
>



More information about the mpich2-dev mailing list