Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorns " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹: /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linux -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linux -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linux -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float) /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorn s " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹: /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float) /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorn s " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹: /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float) /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Try now.
-erik
On 2012-08-02, at 15:36 , Erik Schnetter schnetter@cct.lsu.edu wrote:
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorn s " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹: /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float) /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Ok, I got it, and it worked. Thanks!
On 8/2/12 3:40 PM, "Erik Schnetter" schnetter@cct.lsu.edu wrote:
Try now.
-erik
On 2012-08-02, at 15:36 , Erik Schnetter schnetter@cct.lsu.edu wrote:
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src"
-I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/inclu de" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements"
-I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Th orn s " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src"
-I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/inclu de"
-I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹:
/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous
/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double)
/nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-l inu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double)
/nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-l inu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double)
/nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-l inu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float)
/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous
/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
On 2 Aug 2012, at 22:40, Erik Schnetter wrote:
Try now.
This causes a build failure on Datura:
http://git.barrywardell.net/EinsteinToolkitTestResults.git/blob/c32794e5e57d...
/home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o): In function `Vectors_Test': /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o):/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: more undefined references to `__builtin_isnan' follow make[1]: *** [/home/ianhin/Cactus/EinsteinToolkitTests/exe/cactus_EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 1 make: *** [EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 2 0.10user 0.27system 12:11.56elapsed 0%CPU (0avgtext+0avgdata 14928maxresident)k 0inputs+3032outputs (0major+1354minor)pagefaults 0swaps Build failed
-erik
On 2012-08-02, at 15:36 , Erik Schnetter schnetter@cct.lsu.edu wrote:
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorn s " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹: /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float) /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
I don't know why the __builtin_isnan etc. are not defined for some versions of the Intel compilers. I suspect an incompatibility with the Intel compiler and the respective system libraries (which provide math.h). I have updated the Simfactory option lists.
-erik
On Fri, Aug 3, 2012 at 3:44 AM, Ian Hinder ian.hinder@aei.mpg.de wrote:
On 2 Aug 2012, at 22:40, Erik Schnetter wrote:
Try now.
This causes a build failure on Datura:
http://git.barrywardell.net/EinsteinToolkitTestResults.git/blob/c32794e5e57db36da2fede2f1eec451daf108a9c:/build.log/home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o): In function `Vectors_Test': /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o):/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: more undefined references to `__builtin_isnan' follow make[1]: *** [/home/ianhin/Cactus/EinsteinToolkitTests/exe/cactus_EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 1 make: *** [EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 2 0.10user 0.27system 12:11.56elapsed 0%CPU (0avgtext+0avgdata 14928maxresident)k 0inputs+3032outputs (0major+1354minor)pagefaults 0swaps Build failed
-erik
On 2012-08-02, at 15:36 , Erik Schnetter schnetter@cct.lsu.edu wrote:
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorn s " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹: /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float) /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Ian Hinder http://numrel.aei.mpg.de/people/hinder
On 3 Aug 2012, at 13:45, Erik Schnetter wrote:
I don't know why the __builtin_isnan etc. are not defined for some versions of the Intel compilers. I suspect an incompatibility with the Intel compiler and the respective system libraries (which provide math.h). I have updated the Simfactory option lists.
The tests pass again (http://damiana2.aei.mpg.de/~ianhin/testreports/EinsteinToolkitTests/results....); thanks!
Is there a more general way of solving this problem, rather than solving it in each machine's option list? I'm worried that we have a lot of special-case options in our option lists now, and that new users will be essentially unable to use Cactus unless they have an expert to write an optionlist for them. We have many exceptions and special flags in the optionlists now, each added to solve a specific problem. I think these should be solved in a more general way. For example, if isnan is not sufficiently portable that it can be used on any compiler, can we provide an autoconf test for it and a Cactus isnan function which calls the right thing? This goes for all the other options which we have. For example, for Datura, one currently has:
CPPFLAGS = FPPFLAGS = -traditional CFLAGS = -g -debug all -traceback -align -std=c99 -ansi_alias -U__STRICT_ANSI__ -rdynamic CXXFLAGS = -g -debug all -traceback -align -restrict -rdynamic -D__builtin_isnan=::isnan -D__builtin_signbit=::signbit F77FLAGS = -g -debug all -traceback -align -pad -w95 -cm F90FLAGS = -g -debug all -traceback -align -pad -w95 -cm
I understand that adding these to the option list is the safest thing to do and provides a conservative quick fix, but at some point, shouldn't these things move into Cactus?
-erik
On Fri, Aug 3, 2012 at 3:44 AM, Ian Hinder ian.hinder@aei.mpg.de wrote:
On 2 Aug 2012, at 22:40, Erik Schnetter wrote:
Try now.
This causes a build failure on Datura:
http://git.barrywardell.net/EinsteinToolkitTestResults.git/blob/c32794e5e57db36da2fede2f1eec451daf108a9c:/build.log/home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o): In function `Vectors_Test': /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o):/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: more undefined references to `__builtin_isnan' follow make[1]: *** [/home/ianhin/Cactus/EinsteinToolkitTests/exe/cactus_EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 1 make: *** [EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 2 0.10user 0.27system 12:11.56elapsed 0%CPU (0avgtext+0avgdata 14928maxresident)k 0inputs+3032outputs (0major+1354minor)pagefaults 0swaps Build failed
-erik
On 2012-08-02, at 15:36 , Erik Schnetter schnetter@cct.lsu.edu wrote:
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
Hi. The following is a well-documented collision that occurs with the cmath header.
The fixes I've seen around the 'net all involve modifying the source and putting in #define statements. But the code in question isn't mine.
Is there a "-f_____" compiler flag I set instead?
Thanks, Scott
COMPILING /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o $current_wd/test.cc -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" -I"/nics/c/home/hawleys/Cactus/src/include" -I"/nics/c/home/hawleys/Cactus/arrangements" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorn s " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" -DCCODE /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In function Œvoid Vectors_Test(cGH*)¹: /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool std::isnan(long double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool std::isnan(double) /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu x -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool std::isnan(float) /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: error: call of overloaded Œisnan(double&)¹ is ambiguous /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: note: candidates are: /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) ( ...more of the same... ) make[3]: *** [test.cc.o] Error 1 make[3]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[2]: *** [make.checked] Error 2 make[2]: Leaving directory `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' make[1]: *** [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error 2 make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' make: *** [texmex] Error 2
hawleys/Cactus> g++ --version g++ (GCC) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Ian Hinder http://numrel.aei.mpg.de/people/hinder
-- Erik Schnetter schnetter@cct.lsu.edu http://www.perimeterinstitute.ca/personal/eschnetter/
isnan has been around since about 1977. The fact that std::isnan doesn't work with the C++ Intel compiler is either a compiler bug, or an installation problem. Of course, many people won't realise this until they try to build Cactus, so we have to provide a work-around.
The problem is that things probably depend on whether math.h or cmath have been included, and in which order they have been included. C requires isnan to be a macro, whereas C++ requires it to be a function. Our current solution allows isnan to be inlined, which is probably not so important for isnan, but may be important for signbit or copysign. I wonder how a portable implementation of an (inlineable) cctk_copysign would look like. It would mean that we stick the work-arounds for compiler bugs and "misunderstanding" about the C++ standard into this function's implementation instead of option lists.
I think this is a good idea. cctk_math.h?
-erik
On Fri, Aug 3, 2012 at 12:08 PM, Ian Hinder ian.hinder@aei.mpg.de wrote:
On 3 Aug 2012, at 13:45, Erik Schnetter wrote:
I don't know why the __builtin_isnan etc. are not defined for some versions of the Intel compilers. I suspect an incompatibility with the Intel compiler and the respective system libraries (which provide math.h). I have updated the Simfactory option lists.
The tests pass again (http://damiana2.aei.mpg.de/~ianhin/testreports/EinsteinToolkitTests/results....); thanks!
Is there a more general way of solving this problem, rather than solving it in each machine's option list? I'm worried that we have a lot of special-case options in our option lists now, and that new users will be essentially unable to use Cactus unless they have an expert to write an optionlist for them. We have many exceptions and special flags in the optionlists now, each added to solve a specific problem. I think these should be solved in a more general way. For example, if isnan is not sufficiently portable that it can be used on any compiler, can we provide an autoconf test for it and a Cactus isnan function which calls the right thing? This goes for all the other options which we have. For example, for Datura, one currently has:
CPPFLAGS = FPPFLAGS = -traditional CFLAGS = -g -debug all -traceback -align -std=c99 -ansi_alias -U__STRICT_ANSI__ -rdynamic CXXFLAGS = -g -debug all -traceback -align -restrict -rdynamic -D__builtin_isnan=::isnan -D__builtin_signbit=::signbit F77FLAGS = -g -debug all -traceback -align -pad -w95 -cm F90FLAGS = -g -debug all -traceback -align -pad -w95 -cm
I understand that adding these to the option list is the safest thing to do and provides a conservative quick fix, but at some point, shouldn't these things move into Cactus?
-erik
On Fri, Aug 3, 2012 at 3:44 AM, Ian Hinder ian.hinder@aei.mpg.de wrote:
On 2 Aug 2012, at 22:40, Erik Schnetter wrote:
Try now.
This causes a build failure on Datura:
http://git.barrywardell.net/EinsteinToolkitTestResults.git/blob/c32794e5e57db36da2fede2f1eec451daf108a9c:/build.log/home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o): In function `Vectors_Test': /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:252: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:251: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: undefined reference to `__builtin_isnan' /home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.cc.o):/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vectors/src/test.cc:249: more undefined references to `__builtin_isnan' follow make[1]: *** [/home/ianhin/Cactus/EinsteinToolkitTests/exe/cactus_EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 1 make: *** [EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 2 0.10user 0.27system 12:11.56elapsed 0%CPU (0avgtext+0avgdata 14928maxresident)k 0inputs+3032outputs (0major+1354minor)pagefaults 0swaps Build failed
-erik
On 2012-08-02, at 15:36 , Erik Schnetter schnetter@cct.lsu.edu wrote:
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I saw in a few simfactory .cfg files, but no luck.
(Thanks to http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.html)
There is currently no nautilus.cfg file, but if someone would like access to Nautilus in order to make one (which is what I seem to be doing, slowly), I'd be happy to add you to my allocation! :-)
On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote:
> Hi. The following is a well-documented collision that occurs with the > cmath header. > > The fixes I've seen around the 'net all involve modifying the source and > putting in #define statements. But the code in question isn't mine. > > Is there a "-f_____" compiler flag I set instead? > > Thanks, > Scott > > > > COMPILING > /nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test.cc > current_wd=`pwd` ; cd /nics/c/home/hawleys/Cactus/configs/texmex/scratch ; > g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 > -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o > $current_wd/test.cc > -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" > -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" > -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" > -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" > -I"/nics/c/home/hawleys/Cactus/src/include" > -I"/nics/c/home/hawleys/Cactus/arrangements" > -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuration/Thorn > s > " -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" > -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" > -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/include" > -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vectors" > -DCCODE > /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: In > function Œvoid Vectors_Test(cGH*)¹: > /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: > error: call of overloaded Œisnan(double&)¹ is ambiguous > /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: > note: candidates are: > /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) > /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu > x > -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool > std::isnan(long double) > /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu > x > -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool > std::isnan(double) > /nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unknown-linu > x > -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool > std::isnan(float) > /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: > error: call of overloaded Œisnan(double&)¹ is ambiguous > /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:112:3: > note: candidates are: > /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) > ( ...more of the same... ) > make[3]: *** [test.cc.o] Error 1 > make[3]: Leaving directory > `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' > make[2]: *** [make.checked] Error 2 > make[2]: Leaving directory > `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' > make[1]: *** > [/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] Error > 2 > make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' > make: *** [texmex] Error 2 > > hawleys/Cactus> g++ --version > g++ (GCC) 4.6.3 > Copyright (C) 2011 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > > > > > > > > > > > _______________________________________________ > Users mailing list > Users@einsteintoolkit.org > http://lists.einsteintoolkit.org/mailman/listinfo/users >
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Ian Hinder http://numrel.aei.mpg.de/people/hinder
-- Erik Schnetter schnetter@cct.lsu.edu http://www.perimeterinstitute.ca/personal/eschnetter/
-- Ian Hinder http://numrel.aei.mpg.de/people/hinder
Here's a sneaky suggestion: in the pre-processor script used on C++ files, replace instances "cmath.h" with "cmath". It seems to be these two files which end up in conflict, and only one is needed.
On 8/3/12 12:01 PM, "Erik Schnetter" schnetter@cct.lsu.edu wrote:
isnan has been around since about 1977. The fact that std::isnan doesn't work with the C++ Intel compiler is either a compiler bug, or an installation problem. Of course, many people won't realise this until they try to build Cactus, so we have to provide a work-around.
The problem is that things probably depend on whether math.h or cmath have been included, and in which order they have been included. C requires isnan to be a macro, whereas C++ requires it to be a function. Our current solution allows isnan to be inlined, which is probably not so important for isnan, but may be important for signbit or copysign. I wonder how a portable implementation of an (inlineable) cctk_copysign would look like. It would mean that we stick the work-arounds for compiler bugs and "misunderstanding" about the C++ standard into this function's implementation instead of option lists.
I think this is a good idea. cctk_math.h?
-erik
On Fri, Aug 3, 2012 at 12:08 PM, Ian Hinder ian.hinder@aei.mpg.de wrote:
On 3 Aug 2012, at 13:45, Erik Schnetter wrote:
I don't know why the __builtin_isnan etc. are not defined for some versions of the Intel compilers. I suspect an incompatibility with the Intel compiler and the respective system libraries (which provide math.h). I have updated the Simfactory option lists.
The tests pass again (http://damiana2.aei.mpg.de/~ianhin/testreports/EinsteinToolkitTests/resu lts.xml); thanks!
Is there a more general way of solving this problem, rather than solving it in each machine's option list? I'm worried that we have a lot of special-case options in our option lists now, and that new users will be essentially unable to use Cactus unless they have an expert to write an optionlist for them. We have many exceptions and special flags in the optionlists now, each added to solve a specific problem. I think these should be solved in a more general way. For example, if isnan is not sufficiently portable that it can be used on any compiler, can we provide an autoconf test for it and a Cactus isnan function which calls the right thing? This goes for all the other options which we have. For example, for Datura, one currently has:
CPPFLAGS = FPPFLAGS = -traditional CFLAGS = -g -debug all -traceback -align -std=c99 -ansi_alias -U__STRICT_ANSI__ -rdynamic CXXFLAGS = -g -debug all -traceback -align -restrict -rdynamic -D__builtin_isnan=::isnan -D__builtin_signbit=::signbit F77FLAGS = -g -debug all -traceback -align -pad -w95 -cm F90FLAGS = -g -debug all -traceback -align -pad -w95 -cm
I understand that adding these to the option list is the safest thing to do and provides a conservative quick fix, but at some point, shouldn't these things move into Cactus?
-erik
On Fri, Aug 3, 2012 at 3:44 AM, Ian Hinder ian.hinder@aei.mpg.de wrote:
On 2 Aug 2012, at 22:40, Erik Schnetter wrote:
Try now.
This causes a build failure on Datura:
http://git.barrywardell.net/EinsteinToolkitTestResults.git/blob/c32794e 5e57db36da2fede2f1eec451daf108a9c:/build.log
/home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_ bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.c c.o): In function `Vectors_Test':
/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vector s/src/test.cc:252: undefined reference to `__builtin_isnan'
/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vector s/src/test.cc:252: undefined reference to `__builtin_isnan'
/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vector s/src/test.cc:251: undefined reference to `__builtin_isnan'
/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vector s/src/test.cc:251: undefined reference to `__builtin_isnan'
/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/Vector s/src/test.cc:249: undefined reference to `__builtin_isnan'
/home/ianhin/Cactus/EinsteinToolkitTests/configs/EinsteinToolkitTests_ bb930fc2b4a2900b3c5a780e79244bb0ddefb81d/lib/libthorn_Vectors.a(test.c c.o):/home/ianhin/Cactus/EinsteinToolkitTests/arrangements/LSUThorns/V ectors/src/test.cc:249: more undefined references to `__builtin_isnan' follow make[1]: *** [/home/ianhin/Cactus/EinsteinToolkitTests/exe/cactus_EinsteinToolkitTe sts_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 1 make: *** [EinsteinToolkitTests_bb930fc2b4a2900b3c5a780e79244bb0ddefb81d] Error 2 0.10user 0.27system 12:11.56elapsed 0%CPU (0avgtext+0avgdata 14928maxresident)k 0inputs+3032outputs (0major+1354minor)pagefaults 0swaps Build failed
-erik
On 2012-08-02, at 15:36 , Erik Schnetter schnetter@cct.lsu.edu wrote:
The solution is likely to wrap the calls to isnan into a my_isnan function, similar to the way in which signbit is wrapped. I am testing a patch.
-erik
On 2012-08-02, at 15:14 , Scott Hawley scott.hawley@belmont.edu wrote:
> I added '-D__builtin_isinf=::isinf -D__builtin_isnan=::isnan' as I >saw in > a few simfactory .cfg files, but no luck. > > (Thanks to > >http://lists.einsteintoolkit.org/pipermail/users/2011-June/001151.ht >ml) > > There is currently no nautilus.cfg file, but if someone would like >access > to Nautilus in order to make one (which is what I seem to be doing, > slowly), I'd be happy to add you to my allocation! :-) > > > > > > > On 8/2/12 1:58 PM, "Scott Hawley" scott.hawley@belmont.edu wrote: > >> Hi. The following is a well-documented collision that occurs >>with the >> cmath header. >> >> The fixes I've seen around the 'net all involve modifying the >>source and >> putting in #define statements. But the code in question isn't >>mine. >> >> Is there a "-f_____" compiler flag I set instead? >> >> Thanks, >> Scott >> >> >> >> COMPILING >> >>/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/test >>.cc >> current_wd=`pwd` ; cd >>/nics/c/home/hawleys/Cactus/configs/texmex/scratch ; >> g++ -LMPICH_IGNORE_CXX_SEEK -g -DCARPET_DEBUG -fopenmp -O2 -m64 >> -std=gnu++0x -g -O0 -O3 -fopenmp -c -o $current_wd/test.cc.o >> $current_wd/test.cc >> -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" >> >>-I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/i >>nclude" >> -I"/nics/c/home/hawleys/Cactus/configs/texmex/config-data" >> -I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include" >> -I"/nics/c/home/hawleys/Cactus/src/include" >> -I"/nics/c/home/hawleys/Cactus/arrangements" >> >>-I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/Configuratio >>n/Thorn >> s >> " >>-I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vect >>ors" >> -I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src" >> >>-I"/nics/c/home/hawleys/Cactus/arrangements/LSUThorns/Vectors/src/i >>nclude" >> >>-I"/nics/c/home/hawleys/Cactus/configs/texmex/bindings/include/Vect >>ors" >> -DCCODE >> /nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc: >>In >> function Œvoid Vectors_Test(cGH*)¹: >> >>/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:11 >>2:3: >> error: call of overloaded Œisnan(double&)¹ is ambiguous >> >>/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:11 >>2:3: >> note: candidates are: >> /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) >> >>/nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unkno >>wn-linu >> x >> -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:552:3: note: bool >> std::isnan(long double) >> >>/nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unkno >>wn-linu >> x >> -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:548:3: note: bool >> std::isnan(double) >> >>/nics/e/sw/local/nautilus/opt/gcc/4.6.3/bin/../lib/gcc/x86_64-unkno >>wn-linu >> x >> -gnu/4.6.3/../../../../include/c++/4.6.3/cmath:544:3: note: bool >> std::isnan(float) >> >>/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:11 >>2:3: >> error: call of overloaded Œisnan(double&)¹ is ambiguous >> >>/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors/test.cc:11 >>2:3: >> note: candidates are: >> /usr/include/bits/mathcalls.h:235:1: note: int isnan(double) >> ( ...more of the same... ) >> make[3]: *** [test.cc.o] Error 1 >> make[3]: Leaving directory >> `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' >> make[2]: *** [make.checked] Error 2 >> make[2]: Leaving directory >> `/nics/c/home/hawleys/Cactus/configs/texmex/build/Vectors' >> make[1]: *** >> >>[/nics/c/home/hawleys/Cactus/configs/texmex/lib/libthorn_Vectors.a] >> Error >> 2 >> make[1]: Leaving directory `/nics/c/home/hawleys/Cactus' >> make: *** [texmex] Error 2 >> >> hawleys/Cactus> g++ --version >> g++ (GCC) 4.6.3 >> Copyright (C) 2011 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. >>There is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@einsteintoolkit.org >> http://lists.einsteintoolkit.org/mailman/listinfo/users >> > > _______________________________________________ > Users mailing list > Users@einsteintoolkit.org > http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Erik Schnetter eschnetter@perimeterinstitute.ca http://www.perimeterinstitute.ca/personal/eschnetter/ AIM: eschnett247, Skype: eschnett, Google Talk: schnetter@gmail.com
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
-- Ian Hinder http://numrel.aei.mpg.de/people/hinder
-- Erik Schnetter schnetter@cct.lsu.edu http://www.perimeterinstitute.ca/personal/eschnetter/
-- Ian Hinder http://numrel.aei.mpg.de/people/hinder
-- Erik Schnetter schnetter@cct.lsu.edu http://www.perimeterinstitute.ca/personal/eschnetter/
On 3 Aug 2012, at 19:01, Erik Schnetter wrote:
isnan has been around since about 1977. The fact that std::isnan doesn't work with the C++ Intel compiler is either a compiler bug, or an installation problem. Of course, many people won't realise this until they try to build Cactus, so we have to provide a work-around.
Hi Erik,
I'm trying to understand what is going on here.
According to http://en.cppreference.com/w/cpp/numeric/math/isnan, as well as several other pages I found on the internet, std::isnan is a new feature in C++11 (previously called C++0x). By default, the Intel C++ compiler expects code conforming to C++98 (the original C++ standard) plus some GNU extensions. If you use std::isnan, then your code should only be expected to work if compiled in C++11 mode. For the Intel compiler, this requires the option
-std=c++0x
or
-std=gnu++0x
if you also want GNU extensions.
Looking through the option lists in simfactory, some use C++11 and some use C++98 (by omitting the -std option, and leaving it to the compiler default, which is gnu++0x) . Since the choice of language standard is common to all thorns in a configuration, I think we should define which language standard can be expected within the ET (and possibly globally for Cactus).
Can we expect all supported compilers to work with C++11 on all the different architectures? If so, then we should state that the code in the ET should be compiled in C++11 mode, possibly extending this to Cactus, and having the -std=gnu++0x option added automatically. If not, then we should avoid using C++11 features in the ET, unless we implement them ourselves. We can then ask if we also support compiling in C++11 mode. The same question then needs to be asked about the different C language standards, but I have a feeling that the situation there is more hairy.
The problem is that things probably depend on whether math.h or cmath have been included, and in which order they have been included. C requires isnan to be a macro, whereas C++ requires it to be a function. Our current solution allows isnan to be inlined, which is probably not so important for isnan, but may be important for signbit or copysign. I wonder how a portable implementation of an (inlineable) cctk_copysign would look like. It would mean that we stick the work-arounds for compiler bugs and "misunderstanding" about the C++ standard into this function's implementation instead of option lists.
I think this is a good idea. cctk_math.h?
If possible, I would prefer that users can write standards-conforming "normal" code. If there are compiler bugs that we need to work around, maybe we can detect these using autoconf and redefine functions etc so that they behave in a standards-conforming way. This means that when the bugs are fixed, we can drop the workarounds, and users' code won't need to be changed. In this case though, I'm not convinced that it is a compiler bug.
Regarding the change to Vectors, the problem seems to be that both cmath and math.h are being included, and they both offer versions of the isnan function. Why is it necessary to wrap the call with another function? Could you not just replace occurrences of isnan with std::isnan? Or does the wrapping also disambiguate the types?
On 4 Aug 2012, at 00:01, Ian Hinder wrote:
Looking through the option lists in simfactory, some use C++11 and some use C++98 (by omitting the -std option, and leaving it to the compiler default, which is gnu++0x)
Sorry, this should read
and leaving it to the compiler default, which is gnu++98
On 4 Aug 2012, at 00:01, Ian Hinder wrote:
On 3 Aug 2012, at 19:01, Erik Schnetter wrote:
isnan has been around since about 1977. The fact that std::isnan doesn't work with the C++ Intel compiler is either a compiler bug, or an installation problem. Of course, many people won't realise this until they try to build Cactus, so we have to provide a work-around.
Hi Erik,
I'm trying to understand what is going on here.
According to http://en.cppreference.com/w/cpp/numeric/math/isnan, as well as several other pages I found on the internet, std::isnan is a new feature in C++11 (previously called C++0x). By default, the Intel C++ compiler expects code conforming to C++98 (the original C++ standard) plus some GNU extensions. If you use std::isnan, then your code should only be expected to work if compiled in C++11 mode. For the Intel compiler, this requires the option
-std=c++0x
or
-std=gnu++0x
if you also want GNU extensions.
Well, that was the theory, now on to the practice...
It seems that even in C++98 mode, the Intel compiler allows std::isnan. The missing symbol errors are fixed by going from version 11.1.072 to 11.1.080 of the Intel compiler, indicating that it is, in fact, a bug/feature of that specific version of the compiler.
Even with the newer compiler, we still seem to need the -D__builtin_signbit=::signbit in CXXFLAGS for the signbit function. Can you shed some light on what __builtin_signbit actually is?
The signbit function returns and integer 1 or 0 for negative or positive values, respectively (the sign bit). "Builtin" functions are usually a compiler mechanism -- the compiler knows how to implement certain functions (e.g. add, subtract, multiply, absolute value, etc.), and instead of emitting a function call, produces directly the code implementing these functions. In many cases, builtin functions translated to a single machine instruction, plus surrounding fluff to move stuff from memory to registers.
As such, builtin functions do not really exist. They are declared, but their implementation is built into the compiler. The fact that the compiler creates a call to a builtin function means that something is seriously wrong. I assume that, on this system, gcc knows this builtin function, and math.h uses a macro to map signbit to __builtin_signbit (maybe depending on the type of the argument, there is probably also a __builtin_signbitf), expecting the compiler to know this builtin. Unfortunately, the Intel compiler doesn't seem to know about this function, and generates a function call.
If this is so, the "correct" solution is to use a gcc version / Linux version that is officially supported by the Intel compiler, probably a version that is a few months or years older than the one present. Of course, we don't want to do this, so we google for work-arounds, and this would be -D__builtin_signbit=std::signbit.
We should probably autoconf this; this problem has been around for quite some time and doesn't seem to be going away.
-erik
On Fri, Aug 3, 2012 at 7:15 PM, Ian Hinder ian.hinder@aei.mpg.de wrote:
On 4 Aug 2012, at 00:01, Ian Hinder wrote:
On 3 Aug 2012, at 19:01, Erik Schnetter wrote:
isnan has been around since about 1977. The fact that std::isnan doesn't work with the C++ Intel compiler is either a compiler bug, or an installation problem. Of course, many people won't realise this until they try to build Cactus, so we have to provide a work-around.
Hi Erik,
I'm trying to understand what is going on here.
According to http://en.cppreference.com/w/cpp/numeric/math/isnan, as well as several other pages I found on the internet, std::isnan is a new feature in C++11 (previously called C++0x). By default, the Intel C++ compiler expects code conforming to C++98 (the original C++ standard) plus some GNU extensions. If you use std::isnan, then your code should only be expected to work if compiled in C++11 mode. For the Intel compiler, this requires the option
-std=c++0xor
-std=gnu++0xif you also want GNU extensions.
Well, that was the theory, now on to the practice...
It seems that even in C++98 mode, the Intel compiler allows std::isnan. The missing symbol errors are fixed by going from version 11.1.072 to 11.1.080 of the Intel compiler, indicating that it is, in fact, a bug/feature of that specific version of the compiler.
Even with the newer compiler, we still seem to need the -D__builtin_signbit=::signbit in CXXFLAGS for the signbit function. Can you shed some light on what __builtin_signbit actually is?
-- Ian Hinder http://numrel.aei.mpg.de/people/hinder
users@lists.einsteintoolkit.org