Getting started, things to remember

  • Remember the header file

#include <omp.h>
  • Insert compiler directives in C++ syntax as

#pragma omp...
  • Compile with for example c++ -fopenmp code.cpp
  • Execute
    • Remember to assign the environment variable OMP NUM THREADS
    • It specifies the total number of threads inside a parallel region, if not otherwise overwritten