Re: [mpi3-coll] Comments on nonblocking collectives section
Torsten Hoefler wrote:
p 65, 5.13: The example is good but the current text is bad. It is simply not allowed to call NBC in a different order. If a certain implementation runs into a deadlock does not matter. This would even be on of the better scenarios (i.e. an easy-to-noticeable error). Other implementations could complete both bcasts (because it thinks they match) but provide the wrong data (i.e. the data from the other bcast or even a mixture?) - which is a much harder failure to detect. which example are you referring to? Only Ex 5.24 is on this page and doesn't use NBC (and the phrasing "deadlock" is used correctly there. ah, yes - sorry it's ok then (this was the first example directly after the description of all nonblocking collectives, so somehow I was thinking about Ibcast)
p 70, example 5.31: To me this example is not "per se" illegal. Both operations simply don't match - that's fine. However, it is possible to extent the example so that the final program is still a valid MPI program. Maybe just add sth. like "in this form" or "without additional collectives that match". no, it's not possible to make this correct if both ranks call it at the same time. Remember, blocking and nonblocking colls have the same matching "namespace". Just add "if (0==rank) MPI_Alltoall(...)" before the switch and add "if (1==rank) MPI_Ialltoall(...)" after the switch statement to make this a correct program.
BTW: remove the "int"s before the function calls! ;-) Thanks, Christian
participants (1)
-
Christian Siebert