[MPICH] MPI_Comm_size on parent communicator

Wei-keng Liao wkliao at ece.northwestern.edu
Thu Jan 24 20:52:28 CST 2008


I just figured out that I should use MPI_Comm_remote_size() for an 
intercommunicator, rather then MPI_Comm_size(). (MPI 1.1 section 5.6.1)

Wei-keng


On Thu, 24 Jan 2008, Wei-keng Liao wrote:

> 
> Can I call MPI_Comm_size to get the size of a parent communicator (an 
> inter-communicator)?
> 
> My program is in a client-server model and clients spawn a group of 
> servers through MPI_Comm_spawn. On the server size, there are 2 calls:
>     MPI_Comm_get_parent(&client_comm);
>     MPI_Comm_size(client_comm, &client_nproc);
> 
> Should the MPI_Comm_size() return the size of the clients?
> I tried this on mpich2-1.0.6p1 and it did not give me the right 
> number.
> 
> Wei-keng
> 




More information about the mpich-discuss mailing list