OpenMP Directive Format
sentinel directive_name [clause[,clause]…]
- the sentinels can be in fixed or free source format:
- fixed: !$OMP C$OMP *$OMP (starting from the first column)
- free: !$OMP
- continuation line: !$OMP& (a character in 6th column)
- C/C++: #pragma omp
- in Fortran the directives are not case sensitive
- in C/C++ the directives are case sensitive
- the clauses may appear in any order
- comments cannot appear on the same line as a directive
- conditional compilation:
- Fortran: C$ is replaced by two spaces with -mp flag
- C/C++: #ifdef _OPENMP is defined by OpenMP compliant compiler