Resource-efficient programming (INF205) lab u42: 20th October 2022

1. Terminology

Suggest one term for the glossary and provide your own definition for it. (Same task every second week.)

2. MPI environment

Install an MPI environment on your system, e.g., Open MPI or MVAPICH. In most cases under Linux this will work by installing the corresponding package(s) through the package manager, such as sudo apt-get install openmpi*.

Compile and run the MPI-parallel counting of prime numbers, varying the number of parallel processes. Do you observe a parallel speedup? How would you explain it your observations on account of your system?

3. MPI send-receive ping-pong

Write an MPI-parallel code that should run with two processes, rank 0 and rank 1. Alternatingly, rank 0 sends a number to rank 1, and then rank 1 sends the number back to rank 0. Each time, the number is incremented.

How long does it take in this way on your system to count up to one million?

(Submit your findings and code through Canvas - many thanks!)