Yea, that is a bit inscrutable, but I see mumps is the main/only user of this:
/* if using PETSc OpenMP support, we only call MUMPS on master ranks. Before/after the call, we change/restore CPUs the master ranks can run on */ And I see _OPENMP is a macro for the release date (yyyymm) of the OMP version. It's not clear what the v5.0 is ( https://www.openmp.org/specifications/) On Sat, Nov 6, 2021 at 4:27 PM Junchao Zhang <junchao.zh...@gmail.com> wrote: > > > On Sat, Nov 6, 2021 at 5:51 AM Mark Adams <mfad...@lbl.gov> wrote: > >> Two questions on OMP: >> >> * Can I test for the version of OMP? I want >= 5 and I see this, which >> looks promising: >> include/petscsys.h:#elif defined(_OPENMP) && *_OPENMP >= 201307* && >> !defined(_WIN32) >> >> * What is the difference between HAVE_OPENMP and >> HAVE_OPENMP_SUPPORT. >> >> # this is different from HAVE_OPENMP. HAVE_OPENMP_SUPPORT checks if we > have facilities to support > # running PETSc in flat-MPI mode and third party libraries in MPI+OpenMP > hybrid mode > if self.mpi.found and self.mpi.support_mpi3_shm and self.pthread.found and > self.hwloc.found: > # Apple pthread does not provide this functionality > if self.function.check('pthread_barrier_init', libraries = 'pthread'): > self.addDefine('HAVE_OPENMP_SUPPORT', 1) > > >> Thanks, >> Mark >> >