OpenMP parallelization

OpenGeoSys supports shared memory parallelization (multi threading) to some extent: by default OpenGeoSys is built with OpenMP support and OpenMP-enabled linear solvers will automatically make use of it.

The number of threads a linear solver uses can be controlled with the environment variable OMP_NUM_THREADS.

Note:

  • Some linear solvers and some preconditioners from the Eigen library run with a single thread only, see here.
  • When using distributed memory parallelization (MPI) it might not make sense to use OpenMP at the same time: the different threads might compete for the same CPU resources.
  • There is an interference between the Intel MKL and OpenMP parallelization: If you use OGS together with the former, you might break the latter. In that case you might want to change the OGS_EIGEN_PARALLEL_BACKEND.

In addition, the assembly of some processes in OGS can be run OpenMP-parallelized when setting the environment variable OGS_ASM_THREADS to the number of threads to be used. At the moment (2024-09-09) that’s supported by the HydroMechanics, TH2M, ThermoRichardsMechanics, and ThermoRichardsFlow processes.


This article was written by Christoph Lehmann. If you are missing something or you find an error please let us know.
Generated with Hugo 0.122.0 in CI job 504124 | Last revision: November 12, 2024
Commit: [BL/MPI] Use MPI_COMM_WORLD in reduceMin 4aae83e  | Edit this page on