[ET Trac] [Einstein Toolkit] #817: add function to flesh to query name of currently executing function
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Thu Apr 19 19:09:53 CDT 2012
#817: add function to flesh to query name of currently executing function
-------------------------+--------------------------------------------------
Reporter: rhaas | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Cactus | Version:
Keywords: |
-------------------------+--------------------------------------------------
It would be nice if there was a function:
{{{
#include <cctk.h>
const cFunctionData * CCTK_QueryScheduledFunction(const cGH * cctkGH);
const cFunctionData * func = QueryScheduledFunction(cctkGH);
printf("Currently running: %s::%s\n", func->thorn, func->routine);
}}}
to find the function most recently called via CCTK_CallFunction. In the
simplest implementation CCTK_CallFunction() (in main/ScheduleInterface.c)
would simply store its {{{attribute}}} arguement in a global variable for
later retrieval. A more complete implementation might have stack of called
functions (in case CallFunction can be called recurively) or store the
information in cctkGH (though CallFunction does not take cctkGH as an
argument).
I currently have a hacked version of the first option running to find out
who is calling CarpetReduce in local mode. BUt it might be useful also in
eg. the interpolator calls (as in "AEILocalInterpolator: point foo out of
bounds").
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/817>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list