[mpich2-dev] Weird behavior collective routine

Rajeev Thakur thakur at mcs.anl.gov
Wed May 13 12:57:13 CDT 2009


Simone,
              Both those programs are erroneous, but the implementation is
not required to detect erroneous programs. (The behavior of erroneous
programs is undefined.) Because the message size is small, the sends are
being delivered as eager even if the receive is never posted. If you
increase the message size to above the eager threshold (I don't remember
what it is, but try 1 MB to be safe), the programs will hang because the
sends will wait for a rendezvous ack from the receive side.
 
Rajeev
 


  _____  

From: Simone Atzeni [mailto:simone.at at gmail.com] 
Sent: Tuesday, May 12, 2009 10:58 PM
To: Ganesh Gopalakrishnan
Subject: Weird behavior collective routine


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/20090513/703f2ba7/attachment.htm>


More information about the mpich2-dev mailing list