Skip to content

Latest commit

 

History

History
 
 

message-exchange

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Simple message exchange

Communicating general Python objects

Write a simple program where two processes send and receive a message to/from each other using send and recv. The message content is a dictionary with a key {‘rank’ : myrank} where myrank is the rank of the sending process. After receiving a message, each process should print out the rank of the process and the value in the received dictionary.

Communicating NumPy arrays

In each process, construct a 100 000 element NumPy array which is initialized to the rank of process. Send and receive the array using Send and Recv and after receiving print out the rank of process together with the first element of the received array. Investigate what happens when reordering the send and receive calls in one of the processes.