Difference between revisions of "MPI"
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
triple (address, count, type) | triple (address, count, type) | ||
− | ==A Common Bug== | + | ==Synchronisation, Blocking and the role of Buffers== |
+ | |||
+ | Independent 'compute elements' | ||
+ | Synchronised communication requires that both sender and receiver are ready. | ||
+ | Through the introduction of a buffer, a sender can deposit a message before the receiver is ready. | ||
+ | MPI_Recv() only returns when the message has been received, however. Hence the term blocking. | ||
+ | |||
+ | ===A Common Bug=== | ||
+ | |||
+ | If all processes are waiting to receive prior to sending, then we will have deadlock. | ||
=Non-Blocking Communication= | =Non-Blocking Communication= |
Revision as of 13:47, 19 July 2010
MPI: Message passing for distributed memory computing
Introduction
SPMD
Hello World
These programs assume that all processes can write to the screen. This is not a safe assumption.
Send and Receive
triple (address, count, type)
Synchronisation, Blocking and the role of Buffers
Independent 'compute elements' Synchronised communication requires that both sender and receiver are ready. Through the introduction of a buffer, a sender can deposit a message before the receiver is ready. MPI_Recv() only returns when the message has been received, however. Hence the term blocking.
A Common Bug
If all processes are waiting to receive prior to sending, then we will have deadlock.