Computing devices

Tasks:

Get the example code from here.

  1. Do a strong-scaling experiment starting with 2 MPI processes (ranks) and up to 32 ranks and plot the result. Use the following commands for compilation and for running with <rank-number> ranks:

      mpicc main-mpi.c -o mpi.x -lm
      mpirun -n <rank-number> mpi.x
  2. Replace the call to maxval to minval and compute the minimum height of a wave. Search for the comment // HOMEWORK:.

  3. Compare the complexity of the MPI implementation with the OpenMP one from last week. Give your feedback on which is easier to use/learn and a few reasons why.