[mpich2-dev] Weird behavior collective routine
Simone Atzeni
simone.at at gmail.com
Tue May 12 22:57:33 CDT 2009
Hi,
According to the MPI-2 Standard about collectives routine at page 132
(Section 5.2.1), it says "All processes in the group
identified by the intracommunicator must call the collective routine
with matching arguments".
Running the program below using MPICH:
if (rank == 0) {
} else if (rank == 1) {
MPI_Reduce(&u, &v, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
} else if (rank == 2) {
MPI_Reduce(&u, &v, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
}
it terminates correctly, but it shouldn't be in agreement whit the
standard because all process in the group (MPI_COMM_WORLD in this
case) must call the collective routine. In this case the root process
does not call the REDUCE routine, so where do all the messages from
other MPI_Reduce end up?
Another program, using Broadcast routine:
if (rank == 0) {
MPI_Bcast(&u, 1, MPI_INT, 0, MPI_COMM_WORLD);
}
else if (rank == 1) {
} else if (rank == 2) {
MPI_Bcast(&v, 1, MPI_INT, 0, MPI_COMM_WORLD);
}
it also terminates correctly, but also in this case not all process in
the group (MPI_COMM_WORLD) call the collective routine. So it seems
that also in this case the standard is not enforced. So where does the
message to process 1 end up?
I tried the same programs with Open MPI and they have the same
behavior, but using Microsoft MPI both programs crash.
So, the question is, MPICH2 and Open MPI don't enforce the standard
and only Microsoft MPI enforces it?
Thanks
Regards
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich2-dev/attachments/20090512/10234d68/attachment.htm>
More information about the mpich2-dev
mailing list