I would like to know which of "waitone" vs "waitany" is optimal and of
course, will never produce deadlocks.
Let's say we have "lNp" processes and they want to send an array of int
of length "lNbInt" to process "0" in a non-blocking MPI_Isend (instead
of MPI_Gather). Let's say the order for receiving is unimportant and we
want to start using data as soon as possible.
I have attached wait.cc, that one can compile in two manners:
mpicxx -o waitone wait.cc
mpicxx -DMPI_WAIT_ANY_VERSION -o waitany wait.cc
Then launch using 1 parameter to the executable: the length "lNbInt".
The waitone version:
mpirun -display-map -H host1,host2,host3 -n 24 waitone 10000
The waitany version:
mpirun -display-map -H host1,host2,host3 -n 24 waitany 10000
After executing several times, on different number of processes and
different number of nodes and almost always large value of "lNbInt", I
*think* these could be good conclusions? :
#1- Both version take almost the same wall clock time to complete
#2- Both version do *not* produce deadlock
#3- MPI_WAIT_ANY_VERSION could do better if some work was really done
with received data.
#4- MPI_WAIT_ANY_VERSION received always the data from processes on the
I haven't be able to reproduce a deadlock even while varying array
length, number of processes and number of hosts. How can I conclude
there are no problem with this code? Any reading suggestion?