openmp

OpenMP system variables and environments


I'm currently dealing with some benchmarks that are highly dependent on OpenMP settings. I noticed that the results can vary greatly from setting values for variables such as OMP_PLACES OMP_PROC_BIND I would really like to get a reliable source of information on such variables, because now I find them in different parts of the Internet without a clear explanation of their role.


Solution

  • I would really like to get a reliable source of information on such variables, because now I find them in different parts of the Internet without a clear explanation of their role.

    All of the OpenMP environment variables and associated internal control variables are described in the OpenMP standard, which you can find here.

    In the latest standard (OpenMP 6.0) Internal Control Variables are described in chapter 3, Environment Variables in chapter 4.

    Since this is the standard, it is the definitive reference for this information.

    If you are investigating the binding of threads to hardware locations (as it seems you are), then it is also worth getting a copy of hwloc, so that you can understand which resources your hardware is providing.