#1220: OPTIONAL_IFACTIVE -------------------------+-------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: major | Milestone: Component: Cactus | Version: Keywords: | -------------------------+-------------------------------------------------- Following up on a discussion on the Cactus developers mailing list, I want to suggest a third way of indicating a desired capability. In addition to REQUIRES and OPTIONAL, I suggest OPTIONAL_IFACTIVE. This behaves like OPTIONAL, except that the capability relationship only exists if the thorn providing the capability is active.
For example, thorn GRHydro would state "OPTIONAL_IFACTIVE Carpet". This mean that, if Carpet is built into the configuration (i.e. is in the thorn list), _and_ if Carpet is active, then GRHydro will depend on it, e.g. by calling functions in Carpet. If Carpet is not in the thorn lists, these calls will be #ifdef'd out, and if Carpet is not active, these calls will not occur.
This will make it possible to automatically activate all thorns that provide a required capability. In fact, the attached patch already implements this.
#1220: OPTIONAL_IFACTIVE --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: review Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by eschnett):
* status: new => review
#1220: OPTIONAL_IFACTIVE --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: major | Milestone: Component: Cactus | Version: Resolution: fixed | Keywords: --------------------------+------------------------------------------------- Changes (by eschnett):
* status: review => closed * resolution: => fixed
Comment:
Committed.
#1220: OPTIONAL_IFACTIVE --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: reopened Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by rhaas):
* status: closed => reopened * resolution: fixed =>
Comment:
This patch causes segfaults in line 961 of main/ActiveThorns.c when a thorn in ActiveThornss is not compiled into the executable. {{{ this_thorn = ((t_sktree *) SKTreeFindNode(thornlist, thorn))->data; }}} needs to be replaced by the equivalent of {{{ t_sktree *node = SKTreeFindNode(thornlist, thorn); if (!node) continue; this_thorn = node->data; }}}
#1220: OPTIONAL_IFACTIVE --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: reopened Priority: major | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
This correction should be in r4945 already.
#1220: OPTIONAL_IFACTIVE --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: major | Milestone: Component: Cactus | Version: Resolution: fixed | Keywords: --------------------------+------------------------------------------------- Changes (by eschnett):
* status: reopened => closed * resolution: => fixed
Comment:
It was not, but it is corrected now.
trac@lists.einsteintoolkit.org