Use one of the following C or Fortran file to test, if your compiler supports OpenMP:

Compile either the C or Fortran source and run the resulting binary.

In order to compile an OpenMP program, you have to use the -fopenmp (gcc, g++, gfortran, clang, clang++, flang) or the -qopenmp (icc, icpc, ifort, icx, icpx, ifx) option.

With the environment variable OMP_NUM_THREADS=n you can specify that the binary will use n OpenMP threads.


Last modified: Friday, 1 March 2024, 10:09 AM