We start with a warm-up exercise. 

Copy the HELLO folder from the central directory (/lrz/sys/courses/PPHPS25). In there you will find simple parallel "Hello World"-type programs in OpenMP and MPI for both C and Fortran. You will need the Intel-OneAPI toolkit environment for this to work

$ module load intel-toolkit

Typing "make" will build the binaries.

  1. Compile and run the OpenMP version of the program:

    $ cd ~/HELLO/omp
    $ make
    $ OMP_NUM_THREADS=4 ./HELLO_C.exe
    Something is obviously wrong. Fix it!

  2. Compile and run the MPI version of the program (this is only possible within a batch job - see the introduction):

    $ cd ~/HELLO/mpi
    $ make
    $ mpirun -np 4 ./HELLO_C.exe
    Modify the code so that each process sends its own rank to process 0, which then prints all the ranks.


Last modified: Tuesday, 18 February 2025, 1:20 PM