[MPICH] About syncronism.
Bruno Simioni
brunosimioni at gmail.com
Sat Oct 14 17:52:29 CDT 2006
Hi ererybody!
How can I solve this problem
At id = 0
double x1,fr;
Do
{
MPI_Recv(&x2, 1, MPI_DOUBLE, 1, 1, MPI_COMM_WORLD, &status);
fr=x1+x2;
MPI_Send(&fr, 1, MPI_DOUBLE, 1, 1, MPI_COMM_WORLD,&status);
.
.
}
At id = 1
double x2,calc;
Do
{
MPI_Send(&x2, 1, MPI_DOUBLE, 0, 1, MPI_COMM_WORLD,&status); //
MPI_Send(x2 em 1 -> 0.).
MPI_Recv(&fr, 1, MPI_DOUBLE, 0, 1, MPI_COMM_WORLD, &status);
calc=fr*2;
.
.
}
Well, that is a slow solution. And that is my present problem. How can I
optimize the comunication using non-blocking comunication?
I've tried MPI_Isend and MPI_Irecv, but i thing that I should use MPI_Wait
somewhere (i don't know yet), to provide some syncronism. So, how can I
solve the problem of time and became that syncronous?
Thanks!
--
Bruno.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20061014/f074fe2a/attachment.htm>
More information about the mpich-discuss
mailing list