On Tue, Jul 11, 2017 at 11:26:22AM +0200, Jens Mahlmann wrote:
in the following, I assembled an exemplary code reproducing the problem when compiling. I figured that making use of TRRICCI and UPPERMET in different files does not yield any problems. So for now I split up my routines to avoid this double declaration.
Hi JensThe problem is that the includes use a macro to avoid problems for double-inclusion: if included a second time, it will be a no-op. This is in general a good idea (e.g., it prevents problems if you include RICCI and TRRICI, which also includes RICCI). However, this is a problem if you include the "declare" part not globally once, but locally (within a function) twice, since the second time the include will be a no-op, an nothing will be declared locally. It also explains why it works if you split things up into different files, as then you only include the _declare includes once in each file.
To prevent this without changing the ADMMacros thorn (which I don't know it would break), put a
#undef TRRICCI_DECLAREbefore every include of TRRICCI_declare.h (and likely also other _declare.h files). (You technically do not need it before the first, but it also shouldn't hurt.)
Frank
signature.asc
Description: Digital signature
_______________________________________________ Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users