<html>#2774: OpenMP Heisenbug with Default Thornfile
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>José Ferreira</td></tr>
<tr><td style='text-align:right'> Status:</td><td>submitted</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'> Version:</td><td>ET_2023_11</td></tr>
<tr><td style='text-align:right'> Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>critical</td></tr>
<tr><td style='text-align:right'>Component:</td><td></td></tr>
</table>
<p>Changes (by José Ferreira):</p>
<p>Hello, I am facing an issue where running a simulation with the toolkit, using the default thornlist, can either run as expected, or crash right in the beginning of the simulation. This took place with <code>ET_TOV.par</code>, that ships with the toolkit, and a thornfile that evolves a constant scalar field, that ships with the Scalar thorn also included in the toolkit.</p>
<p>I believe that the culprit is OpenMP because if I disable threading during run-time, by setting <code>OMP_NUM_THREADS=1</code>, or if I disable OpenMP during compile-time, the simulations run as expected.</p>
<p>This bug takes place both in my laptop and in my desktop, which share similar operating systems and software stack.</p>
<p></p>
<p>In the following sections, I will write, line by line, the steps that I have performed in order to reproduce the bug, and my attempt of tracking it down.</p>
<p></p>
<h1 id="markdown-header-installing-and-compiling-the-toolkit">Installing and Compiling the Toolkit</h1>
<p>To avoid compiling CarpetX thorns that fail to compile in my system, for some reason, I start by downloading the previous version of the toolkit with</p>
<div class="codehilite language-shell"><pre><span></span>$ curl -kLO https://raw.githubusercontent.com/gridaphobe/CRL/ET_2023_05/GetComponents
$ chmod a+x GetComponents
$ ./GetComponents --parallel https://bitbucket.org/einsteintoolkit/manifest/raw/ET_2023_05/einsteintoolkit.th
</pre></div>
<p>and then change to the Cactus root directory</p>
<div class="codehilite language-shell"><pre><span></span>$ <span class="nb">cd</span> Cactus
</pre></div>
<p>I create the options file <code>arch.cfg</code> , which should already be present in the parent directory, with the following written in it</p>
<div class="codehilite language-text"><pre><span></span># Cactus configuration for Arch and Arch-based distros
## Decide which flags will be used at compile-time
OPTIMISE = yes
WARN = yes
DEBUG = no
PROFILE = no
OPENMP = yes
## Compilers
CPP = cpp
FPP = cpp
CC = gcc
CXX = g++
F7
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2774/openmp-heisenbug-with-default-thornfile'>https://bitbucket.org/einsteintoolkit/tickets/issues/2774/openmp-heisenbug-with-default-thornfile</a></p>
</html>