#720: check at runtime that all REQUIREd and OPTIONAL thorns and capabilities are active
Reporter:Roland Haas
Status:resolved
Milestone:
Version:
Type:enhancement
Priority:minor
Component:Cactus

Changes (by Roland Haas):

status:resolved (was new)

This is an offshot of a discussion on the Cactus developers mailing list: http://cactuscode.org/pipermail/developers/2011-November/006258.html

On 6 Jan 2012 12:54:13 -0500 eschnett said:

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.).

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.

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.

The idea seems to be to document all thorns whose code is executed in the parameter file.

Ian's original need might be served by an "OPTIONAL" statement in configuration.ccl (http://einsteintoolkit.org/documentation/UsersGuide/UsersGuidech12.html#x17-199000D2.5) and some #ifdefs, maybe.

Keyword:

Comment (by Roland Haas):

REQUIRE'd thorns are being activated since git hash 4aa241b6 "Automatically activate required thorns" of cactus Fri Jan 18 02:02:31 2013 +0000.

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.

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 #ifdev HAVE_CAPABILITY_XXX.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/720/check-at-runtime-that-all-required-and