21
Message Passing Example
•In message passing, there is no abstraction … the programmer does everything
•Consider overlapping comm/comp
•When exchanging data in middle of a computation
–nb_send(to_right, data1);
–much computing;
–recv(from_left, loc1);
•The programmer knows that data1 will not be used, and so there can be no error in delaying the recv
•… but compilers usually must be
•much more conservative
l
Compiler uses blocking send