Point to Point Communication

Examples

Nodes 0 communicating with other nodes in communicator

simplest_message.c: simplest message passing example - node 0
                               sends a message to other nodes

simple_message.c: next simplest message passing example - each node
                               (rank != 0) sends a message to node 0

still_simple.c:        process 0 sends a message to all other processes
                            all other processes process info
                            send result back to process 0 

Nodes form a "ring", each node communicating with its neighbors

hop.c:  each node sends a message to right neighbor in a ring

            Note: The blocking version of the routines produces
                        a deadlock in this process.

hop_again_again.c:     each node sends a message to left and right 
                                  neighbors in a ring fashion again-and-again

ring.c:    non-blocking communication example

Communication time

ping_pong.c:    Edinburgh example illustrating the scaling of communication time


   Back to top of page

   Back to course contents