#2444: Make it possible to disable OpenMP in the `cctk_Loop.h` loop macros
Reporter:Erik Schnetter
Status:new
Milestone:
Version:
Type:enhancement
Priority:major
Component:Cactus

Comment (by Roland Haas):

Uff, I had not realized it would leave OpenMP statements behind.

Yes, please leave out the defined _OPENMP as a more comprehensive solution is needed.

As for the danger of silently disabling OpenMP: yes, that was definitely a concern.

Right now we kind of cheat since even if CPPFLAGS does not contain -fopenmp it really only affects the MAKEDEPEND call in the Makefile since C/C++ preprocessing is handled on-the-fly by the compiler wrappers to which we pass both CPPFLAGS and CFLAGS/ CXXFLAGS. If these two stages were actually separate (or if there was a wrapper that would take say --cppflags = ““ and --cflags = ““ then we’ woul be in trouble already now since LoopControl (likely, I have not checked right now) contains the same #ifdef _OPENMP constructs to wrap around omp_num_threads() calls.

For Fortran code this is much more obvious since there FPP is indeed a separate invocation from the compiler.

So: please apply (the original version).

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2444/make-it-possible-to-disable-openmp-in-the