<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Ian!</p>
<p>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.<br>
</p>
<p>My best!</p>
<p>Jens<br>
</p>
<p><font size="-2">#include "cctk.h"<br>
#include "cctk_Arguments.h"<br>
#include "cctk_Parameters.h"<br>
#include "cctk_Functions.h"<br>
<br>
#include <carpet.hh><br>
#include "loopcontrol.h"<br>
<br>
<br>
void FFEvolve_Test1 (CCTK_ARGUMENTS)<br>
{<br>
DECLARE_CCTK_ARGUMENTS;<br>
DECLARE_CCTK_PARAMETERS;<br>
<br>
int const ni = cctk_lsh[0];<br>
int const nj = cctk_lsh[1];<br>
int const nk = cctk_lsh[2];<br>
int const np = cctk_ash[0] * cctk_ash[1] * cctk_ash[2];<br>
<br>
const int di = 1; <br>
const int dj = cctk_lsh[0]; <br>
const int dk = cctk_lsh[0]*cctk_lsh[1]; <br>
#include "EinsteinBase/ADMMacros/src/macro/DA_declare.h" <br>
#include "EinsteinBase/ADMMacros/src/macro/UPPERMET_declare.h"<br>
<br>
#pragma omp parallel<br>
{<br>
CCTK_LOOP3(test1, i, j, k, 0, 0, 0, ni , nj , nk , ni
, nj , nk )<br>
{<br>
CCTK_INT ijk;<br>
<br>
ijk = CCTK_GFINDEX3D(cctkGH, i,j,k);<br>
#include "EinsteinBase/ADMMacros/src/macro/DA_guts.h"<br>
#include "EinsteinBase/ADMMacros/src/macro/UPPERMET_guts.h"<br>
<br>
}CCTK_ENDLOOP3(test1);<br>
}<br>
<br>
#include
"EinsteinBase/ADMMacros/src/macro/UPPERMET_undefine.h" <br>
#include "EinsteinBase/ADMMacros/src/macro/DA_undefine.h"<br>
<br>
}<br>
<br>
void FFEvolve_Test2 (CCTK_ARGUMENTS)<br>
{<br>
DECLARE_CCTK_ARGUMENTS;<br>
DECLARE_CCTK_PARAMETERS;<br>
<br>
int const ni = cctk_lsh[0];<br>
int const nj = cctk_lsh[1];<br>
int const nk = cctk_lsh[2];<br>
int const np = cctk_ash[0] * cctk_ash[1] * cctk_ash[2];<br>
<br>
const int di = 1; <br>
const int dj = cctk_lsh[0]; <br>
const int dk = cctk_lsh[0]*cctk_lsh[1]; <br>
#include "EinsteinBase/ADMMacros/src/macro/TRRICCI_declare.h"
<br>
<br>
#pragma omp parallel<br>
{<br>
CCTK_LOOP3(test2, i, j, k, 0, 0, 0, ni , nj , nk , ni
, nj , nk )<br>
{<br>
CCTK_INT ijk;<br>
<br>
ijk = CCTK_GFINDEX3D(cctkGH, i,j,k);<br>
#include "EinsteinBase/ADMMacros/src/macro/TRRICCI_guts.h"<br>
<br>
}CCTK_ENDLOOP3(test1);<br>
}<br>
<br>
#include
"EinsteinBase/ADMMacros/src/macro/TRRICCI_undefine.h" <br>
<br>
<br>
}</font><br>
<br>
</p>
<br>
<div class="moz-cite-prefix">On 07/11/2017 11:09 AM, Ian Hinder
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:0FADC3D3-D61C-465E-947E-9FFC589DD167@aei.mpg.de">
<pre wrap="">
On 11 Jul 2017, at 09:42, Jens Mahlmann <a class="moz-txt-link-rfc2396E" href="mailto:jensmahl@alumni.uv.es"><jensmahl@alumni.uv.es></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Dear all,
I am currently working on an analysis thorn which makes use of different quantities provided by the thorn ADMMacros. In one .cc file I assemble different routines. Especialy, one of those uses UPPERMET, and another one uses TRRICCI.
Using the declaration and definition from the thorn documentation, I made sure to correctly employ the includes of _declare, _guts, and, _undefine.
However, when compiling I keep receiving the following error:
In file included from /scratch/je/jensflo/EinsteinTools/Cactus/arrangements/EinsteinBase/ADMMacros/src/macro/UPPERMET_guts.h(14),
from /scratch/je/jensflo/EinsteinTools/Cactus/arrangements/EinsteinBase/ADMMacros/src/macro/TRRICCI_guts.h(15),
from /scratch/je/jensflo/EinsteinTools/Cactus/configs/sim/build/FFEvolve/FFEvolve_Analysis.cc(412):
/scratch/je/jensflo/EinsteinTools/Cactus/arrangements/EinsteinBase/ADMMacros/src/macro/DETG_guts.h(36): error: identifier "detg_psi4" is undefined
DETG_PSI4 = 1;
This error occurs for a variety of other identifiers in the same place. If I take out the TRRICCI part from the code, I do not get these error messages. I would be so glad about an insight into this.
Thank you so much and my best from Valencia
</pre>
</blockquote>
<pre wrap="">
Hi,
I have never used ADMMacros, but looking at the code, it looks like DETG_PSI4 is defined in DETG_declare.h, which also declares the variable it names (CCTK_REAL DETG_PSI4), and this header is included by UPPERMET_declare.h, which is included by TRRICCI_declare.h. So as far as I can see, if you include TRRICCI_declare.h, you should get the declaration of DETG_PSI4, which is detg_psi4.
One thing to check is that you have included the header files in your function, not at the top of the file with the other includes. Could you post your code, or a small cut down example which we can use to reproduce the problem?
</pre>
</blockquote>
<br>
</body>
</html>