<html>#2463: add option to run tests in parallel
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</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>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td></td></tr>
</table>

<p>Currently Cactus' testsuite mechanism will run tests one after the other even if there are very many cores available on the node.</p>
<p>Pull request <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/pull-requests/114/cactus-run-tests-in-parallel-if-requested" rel="nofollow">https://bitbucket.org/cactuscode/cactus/pull-requests/114/cactus-run-tests-in-parallel-if-requested</a> adds options to the testsuite system to run multiple tests in parallel. </p>
<p>Using it goes like this:</p>
<div class="codehilite language-shell"><pre><span></span><span class="c1"># prevent OpenMP from using all cores</span>
<span class="nb">export</span> <span class="nv">OMP_NUM_THREADS</span><span class="o">=</span><span class="m">2</span>
<span class="c1"># prevent OpenMPI from ties multiple MPI jobs to the same cores</span>
<span class="nb">export</span> <span class="nv">OMPI_MCA_hwloc_base_binding_policy</span><span class="o">=</span>none
<span class="c1"># run up to 6 tests in parallel</span>
make <span class="nv">CCTK_TESTSUITE_PARALLEL_TESTS</span><span class="o">=</span><span class="m">6</span> sim-testsuite <span class="nv">PROMPT</span><span class="o">=</span>no
</pre></div>


<ul>
<li>for each parallel test it collects all screen output and outputs it at once to avoid mixing screen output from multiple tests. </li>
<li>in its current state it counts tests but not eg MPI ranks or cores used by tests. Making it count MPI ranks should be easy, making it count OpenMP threads is impossible with the information at hand since Cactus does not know if a given thorn will use OpenMP or not (but does know the number of MPI ranks that are launchend for a test)</li>
<li>this will most likely not work on clusters which often prevent multiple <code>mpiruns</code> from targetting the same compute node</li>
</ul>
<p>‌</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2463/add-option-to-run-tests-in-parallel'>https://bitbucket.org/einsteintoolkit/tickets/issues/2463/add-option-to-run-tests-in-parallel</a></p>
</html>