[Users] isnan & compile error: "'(' before 'Cactus'"?

Scott Hawley scott.hawley at belmont.edu
Thu Jun 13 17:41:25 CDT 2013


Hi, I'm confused as to why using "isnan" should produce an error involving
"Cactus". I've pulled code out and reduced it to a mere isnan call, and
even placed it within HAVE_ISNAN....

#ifdef HAVE_ISNAN
     if isnan(1.0) {}
#endif

(Ultimately I want isnan(gxx[CCTK_GFINDEX3D(cctkGH, i,j,k)]) in there...)


Here's the error:

%make bruiser SILENT=no
..
COMPILING 
/Users/shawley/Cactus/arrangements/Bruiser/BruiserConstraints/src/BruiserUt
il.cc
current_wd=`pwd` ; cd /Users/shawley/Cactus/configs/bruiser/scratch ;
/opt/local/bin/g++-mp-4.7   -m64 -fopenmp -g -O0 -O2 -c -o
$current_wd/BruiserUtil.cc.o $current_wd/BruiserUtil.cc
-I"/opt/local/include/openmpi" -I"/opt/local/include/openmpi"
-I"/opt/local/include/openmpi" -I"/opt/local/include/openmpi"
-I"/Users/shawley/Cactus/arrangements/Bruiser/BruiserConstraints/src"
-I"/Users/shawley/Cactus/arrangements/Bruiser/BruiserConstraints/src/includ
e" -I"/Users/shawley/Cactus/configs/bruiser/config-data"
-I"/Users/shawley/Cactus/configs/bruiser/bindings/include"
-I"/Users/shawley/Cactus/src/include"
-I"/Users/shawley/Cactus/arrangements"
-I"/Users/shawley/Cactus/configs/bruiser/bindings/Configuration/Thorns"
-I"/Users/shawley/Cactus/configs/bruiser/bindings/include/BruiserConstraint
s" -I"/opt/local/include/openmpi" -I"/opt/local/include/openmpi"
-I"/opt/local/include/openmpi" -I"/opt/local/include/openmpi"
-I"/Users/shawley/Cactus/arrangements/Bruiser/BruiserConstraints/src"
-I"/Users/shawley/Cactus/arrangements/Bruiser/BruiserConstraints/src/includ
e" 
-I"/Users/shawley/Cactus/configs/bruiser/bindings/include/BruiserConstraint
s"  -DCCODE
/Users/shawley/Cactus/configs/bruiser/build/BruiserConstraints/BruiserUtil.
cc: In function 'void BruiserF2CIBFillVar(cGH*, int, int, int, int,
maskcodes_type)':
/Users/shawley/Cactus/configs/bruiser/build/BruiserConstraints/BruiserUtil.
cc:461:30: error: expected '(' before 'Cactus'
make[3]: *** [BruiserUtil.cc.o] Error 1
make[2]: *** [make.checked] Error 2



Pulling the raw code itself shows no lines with "Cactus" in them, so
apparently "isnan" has NOT been redefined by some header:
% sed -n 460,462p 
/Users/shawley/Cactus/configs/bruiser/build/BruiserConstraints/BruiserUtil.
cc
#ifdef HAVE_ISNAN
     if isnan(6.0) {}
#endif
% 


I'm guessing this is one of those cases where the error being reported is
not the "real" error.  So I checked to make sure parentheses and curly
braces are opened & closed appropriately.

Any suggestions for how to fix this?
Thanks.








More information about the Users mailing list