Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI_Comm_create with unequal group arguments
From: Josh Hursey (jjhursey_at_[hidden])
Date: 2012-01-20 10:13:04


For MPI_Comm_create -all- processes in the communicator must make the call,
not just those that are in the subgroups. The 2.2 standard states that
  "The function is collective and must be called by all processes in the
group of comm."

However, this is a common misconception about the MPI_Comm_create
interface, and has encouraged the MPI Forum standardization body to
consider an additional interface that just requires those processes in the
specified groups to make the call.

If you are interested in that proposal below are a few links that you might
find informative:
 -
http://meetings.mpi-forum.org/secretary/2012/01/slides/ticket_286_jan_2012_presentation.pdf
 - https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/286

The ticket includes a link to an EuroMPI paper regarding the prototype, and
the specific language being proposed.

-- Josh

2012/1/20 Jens Jørgen Mortensen <jensj_at_[hidden]>

> On 20-01-2012 15:26, Josh Hursey wrote:
>
> That behavior is permitted by the MPI 2.2 standard. It seems that our
> documentation is incorrect in this regard. I'll file a bug to fix it.
>
> Just to clarify, in the MPI 2.2 standard in Section 6.4.2 (Communicator
> Constructors) under MPI_Comm_create it states:
> "Each process must call with a group argument that is a subgroup of the
> group associated with comm; this could be MPI_GROUP_EMPTY. The processes
> may specify different values for the group argument. If a process calls
> with a non-empty group then all processes in that group must call the
> function with the same group as argument, that is the same processes in the
> same order. Otherwise the call is erroneous."
>
> Thanks for reporting the man page bug.
>
>
> Thanks for the quick reply.
>
> Is it also allowed to call MPI_Comm_create only on those processes that
> are in the sub-group? This seems to work also. Or must one always call
> MPI_Comm_create on all processes in comm - as the description says.
>
> Jens Jørgen
>
>
>
> -- Josh
>
> 2012/1/20 Jens Jørgen Mortensen <jensj_at_[hidden]>
>
>> Hi!
>>
>> For a long time, I have been calling MPI_Comm_create(comm, group,
>> newcomm) with different values for group on the different processes of
>> comm. In pseudo-code, I would create two sub-communicators from a world
>> with 4 ranks like this:
>>
>> if world.rank < 2:
>> comm = world.create([0, 1])
>> else:
>> comm = world.create([2, 3])
>>
>> Now I read from the MPI_Comm_create description that this way of calling
>> MPI_Comm_create is erroneous:
>>
>> "The call is erroneous if not all group arguments have the same value"
>>
>> http://www.open-mpi.org/doc/v1.4/man3/MPI_Comm_create.3.php#toc7
>>
>> So, I guess I have just been lucky that it has worked for me? Or is it
>> OK to do what I do?
>>
>> Jens Jørgen
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
>>
>
>
> --
> Joshua Hursey
> Postdoctoral Research Associate
> Oak Ridge National Laboratory
> http://users.nccs.gov/~jjhursey
>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
Joshua Hursey
Postdoctoral Research Associate
Oak Ridge National Laboratory
http://users.nccs.gov/~jjhursey