* Der Herr Hofrat wrote on Fri, Jun 11, 2004 at 01:48:38PM CEST:
>
> I set the name of two created comms and end up with
> if I don't set the names all goes fine - so I guess the comms are
> ok ?
Are you sure you are not calling MPI_Comm_set_name on the ranks
that are *not* included in the new communicators?
> MPI_Comm_set_name: invalid communicator: Invalid argument (rank 1, MPI_COMM_WORLD)
This is the error message of rank 1 stemming from ...
> MPI_Comm_create(
> MPI_COMM_WORLD,
> lgroup,
> &lcomm);
> MPI_Comm_set_name(lcomm,rname);
and rank 1 is not included within this group (same with rank 3).
The ranks 2 and 4 ae not included within the other group (rgroup),
and subsequently the other MPI_Comm_set_name call fails.
Do not call MPI_Comm_set_name on groups that do not belong to the new
communicator.
Regards,
Ralf
> sequence leading up to the problem:
>
> MPI_Group world,lgroup,rgroup;
> int left[2] = {0,2};
> int right[2] = {1,3};
> MPI_Comm rcomm,lcomm,mycomm;
> char rname[] = "right group\n";
> char lname[] = "left group\n";
> char cname[MPI_MAX_OBJECT_NAME];
>
> ...
>
> MPI_Comm_group(MPI_COMM_WORLD,&world);
> MPI_Group_incl(world,2,left,&lgroup);
> MPI_Group_incl(world,2,right,&rgroup);
> ...
>
> MPI_Comm_create(
> MPI_COMM_WORLD,
> lgroup,
> &lcomm);
> MPI_Comm_set_name(lcomm,rname);
> MPI_Comm_create(
> MPI_COMM_WORLD,
> rgroup,
> &rcomm);
> MPI_Comm_set_name(rcomm,rname);
|