<html>#720: check at runtime that all REQUIREd and OPTIONAL thorns and capabilities are active
<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>resolved</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>Cactus</td></tr>
</table>

<p>Changes (by Roland Haas):</p>
<p><table>
<tr><td>status:</td><td>resolved (was new)</td></tr>
</table></p>
<p>This is an offshot of a discussion on the Cactus developers mailing list: <a href="http://cactuscode.org/pipermail/developers/2011-November/006258.html" rel="nofollow" class="ap-connect-link">http://cactuscode.org/pipermail/developers/2011-November/006258.html</a></p>
<p>On 6 Jan 2012 12:54:13 -0500 eschnett said:</p>
<blockquote>
<p>What is currently missing is the mechanism that checks that all thorns
providing required capabilities are activated. If they are not, code
in inactive thorns is called -- this is fine as long as no Cactus
infrastructure is used (parameters, scheduled routines, grid
functions, etc.).</p>
<p>Yes, we should implement the respective checks; yes, we should
automatically activate thorns required for capabilities (and maybe
some others as well?); yes, we should then output this thorn list to
the screen (done anyway) and into a file.</p>
<p>By the way, Cactus already determines which thorns need to be
activated automatically as a service to the user in the error message
that complains about missing thorns.</p>
</blockquote>
<p>The idea seems to be to document all thorns whose code is executed in the
parameter file.</p>
<p>Ian's original need might be served by an "OPTIONAL" statement in configuration.ccl (<a href="http://einsteintoolkit.org/documentation/UsersGuide/UsersGuidech12.html#x17-199000D2.5" rel="nofollow" class="ap-connect-link">http://einsteintoolkit.org/documentation/UsersGuide/UsersGuidech12.html#x17-199000D2.5</a>) and some #ifdefs, maybe.</p>
<p><strong>Keyword:</strong></p>
<p>Comment (by Roland Haas):</p>
<p>REQUIRE'd thorns are being activated since git hash <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/commits/4aa241b6eb02a6af7164852f7ed9a58b8f0f4ed5" rel="nofollow">4aa241b6</a> "Automatically activate required thorns" of <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus" rel="nofollow">cactus</a> Fri Jan 18 02:02:31 2013 +0000.</p>
<p>OPTIONAL capabilities must not be auto-activated since there are thorns around that OPTIONALly depend on other thorns but then check if those thorns are active at runtime before they use the capability.</p>
<p>Admittedly this could also have been done by REQUIREing thorns, eg a thorn that REQUIREs Carpet to compile but only uses it if Carpet is active. The upside (from the thorn writer point of view, certainly not the user's) compared to using OPTIONAL is that the REQUIREing thorn does not have to use <code>#ifdev HAVE_CAPABILITY_XXX</code>.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/720/check-at-runtime-that-all-required-and'>https://bitbucket.org/einsteintoolkit/tickets/issues/720/check-at-runtime-that-all-required-and</a></p>
</html>