* Imran Ahmed khan wrote on Wed, Sep 29, 2004 at 05:37:58PM CEST:
>
> if(rank == 0)
> {
> strcpy(message, "Hello, world");
> MPI_Bcast(message,20,MPI_CHAR,0,MPI_COMM_WORLD);
>
> }
> else
> {
> MPI_Recv(message, 20, MPI_CHAR, 0,type, MPI_COMM_WORLD, &status);
The receivers thould also call MPI_Bcast here. The sender is
distinguished by his rank already. No need to do that yourself.
Similar pattern for all other collective communication routines.
Regards,
Ralf
|