<html>#2444: Make it possible to disable OpenMP in the `cctk_Loop.h` loop macros
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Erik Schnetter</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>Uff, I had not realized it would leave OpenMP statements behind.</p>
<p>Yes, please leave out the <code>defined _OPENMP</code> as a more comprehensive solution is needed. </p>
<p>As for the danger of silently disabling OpenMP: yes, that was definitely a concern. </p>
<p>Right now we kind of cheat since even if <code>CPPFLAGS</code> does not contain <code>-fopenmp</code> it really only affects the <code>MAKEDEPEND</code> call in the Makefile since C/C++ preprocessing is handled on-the-fly by the compiler wrappers to which we pass both <code>CPPFLAGS</code> and <code>CFLAGS</code>/ <code>CXXFLAGS</code>. If these two stages were actually separate (or if there was a wrapper that would take say <code>--cppflags = ““</code> and <code>--cflags = ““</code> then we’ woul be in trouble already now since LoopControl (likely, I have not checked right now) contains the same <code>#ifdef _OPENMP</code> constructs to wrap around <code>omp_num_threads()</code> calls.</p>
<p>For Fortran code this is much more obvious since there <code>FPP</code> is indeed a separate invocation from the compiler.</p>
<p>So: please apply (the original version).</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2444/make-it-possible-to-disable-openmp-in-the'>https://bitbucket.org/einsteintoolkit/tickets/issues/2444/make-it-possible-to-disable-openmp-in-the</a></p>
</html>