Practical work with  OpenMP


Practical work with simple codes (BLAS) on shared memory systems. Avoiding data races
in shared memory programming.

Have  a look at the exercise and download the template.
  1. untar the template in a different subdirectory than the sequential example
  2. cd template_shm
  3. make run
  4. You can swich between GNU- and Intel-compiler by changing the line
    COMPILER=GCC_
    into
    COMPILER=ICC_
    in the Makefile
  5. Set the number of parallel threads from the command line via
    export  OMP_NUM_THREADS=2
  6. The following targets/calls are available in the Makefile:
    1. make           :  Compiles and links the code
    2. make run     :  Recompiles the whole code and runs it
    3. make cache :  Profiles the code wrt. cache performance
    4. make prof    :  Profiles the code
    5. make mem   :  Checks the code for correct data accesses, pointers alloc/deallocs, memory leaks
      1. Intel's inspector checks als for data races!
    6. doc               :  Generates documentation, see html/index.html  afterwards
    7. clean            :  Cleans temporary files
    8. clean_all      :  Cleans everything
    9. tar                :  Cleans everything and packs the remainding files into a tar-file in the root directory
Available compilers: OpenMP as shared memory programming environment