[mpi3-coll] Comments on nonblocking collectives section

Torsten Hoefler htor at cs.indiana.edu
Wed Jan 28 11:24:26 CST 2009


On Wed, Jan 28, 2009 at 05:58:28PM +0100, Christian Siebert wrote:
> 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)
ok

>>> 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.
citing myself above: "if both ranks call it at the same time". It's
clear that you can fix the example by creating dead code. However, such
things would change most of the examples (for example, you could resolve
the deadlock condition in Ex. 5.25 with a similar approach. You can also
put an if(0) {} around the whole switch and have a correct program ;)).
Fixing this would distract the reader from the real example. I think
it's clear as it is.

> BTW: remove the "int"s before the function calls! ;-)
uh yes - thanks!

Best,
  Torsten

-- 
 bash$ :(){ :|:&};: --------------------- http://www.unixer.de/ -----
Torsten Hoefler       | Postdoctoral Researcher
Open Systems Lab      | Indiana University    
150 S. Woodlawn Ave.  | Bloomington, IN, 474045, USA
Lindley Hall Room 135 | +01 (812) 855-3608



More information about the mpiwg-coll mailing list