Hi Ian!
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.
My best!
Jens
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
#include "cctk_Functions.h"
#include <carpet.hh>
#include "loopcontrol.h"
void FFEvolve_Test1 (CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
int const ni = cctk_lsh[0];
int const nj = cctk_lsh[1];
int const nk = cctk_lsh[2];
int const np = cctk_ash[0] * cctk_ash[1] * cctk_ash[2];
const int di = 1;
const int dj = cctk_lsh[0];
const int dk = cctk_lsh[0]*cctk_lsh[1];
#include "EinsteinBase/ADMMacros/src/macro/DA_declare.h"
#include "EinsteinBase/ADMMacros/src/macro/UPPERMET_declare.h"
#pragma omp parallel
{
CCTK_LOOP3(test1, i, j, k, 0, 0, 0, ni , nj , nk , ni , nj ,
nk )
{
CCTK_INT ijk;
ijk = CCTK_GFINDEX3D(cctkGH, i,j,k);
#include "EinsteinBase/ADMMacros/src/macro/DA_guts.h"
#include "EinsteinBase/ADMMacros/src/macro/UPPERMET_guts.h"
}CCTK_ENDLOOP3(test1);
}
#include "EinsteinBase/ADMMacros/src/macro/UPPERMET_undefine.h"
#include "EinsteinBase/ADMMacros/src/macro/DA_undefine.h"
}
void FFEvolve_Test2 (CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
int const ni = cctk_lsh[0];
int const nj = cctk_lsh[1];
int const nk = cctk_lsh[2];
int const np = cctk_ash[0] * cctk_ash[1] * cctk_ash[2];
const int di = 1;
const int dj = cctk_lsh[0];
const int dk = cctk_lsh[0]*cctk_lsh[1];
#include "EinsteinBase/ADMMacros/src/macro/TRRICCI_declare.h"
#pragma omp parallel
{
CCTK_LOOP3(test2, i, j, k, 0, 0, 0, ni , nj , nk , ni , nj ,
nk )
{
CCTK_INT ijk;
ijk = CCTK_GFINDEX3D(cctkGH, i,j,k);
#include "EinsteinBase/ADMMacros/src/macro/TRRICCI_guts.h"
}CCTK_ENDLOOP3(test1);
}
#include "EinsteinBase/ADMMacros/src/macro/TRRICCI_undefine.h"
}
On 07/11/2017 11:09 AM, Ian Hinder wrote:
On 11 Jul 2017, at 09:42, Jens Mahlmann <jensm...@alumni.uv.es> wrote:
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
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?
_______________________________________________
Users mailing list
Users@einsteintoolkit.org
http://lists.einsteintoolkit.org/mailman/listinfo/users