ALPSCore/CT-HYB

Compilation errors on a cray system

Closed this issue · 2 comments

I got some feedbacks from fasohn.
The build of CT-HYB fails on a cray system.

He built ALPSCore with intel compiler + boost 1.61.
The problem is that the intel compiler complains when he tries to build the CT-HYB solver (especially tests).
A typical error is the following.
Its seems that this error has something to do with this report (GCC extension issue):
google/googletest#100

I am wondering how ALPSCore avoids this issue.

[ 63%] Building CXX object CMakeFiles/unittest_solver.dir/test/unittest_solver.cpp.o
/opt/cray/craype/2.4.2/bin/CC -I/home/h/nipfsohn/programs/CTHYB/build -I/home/h/nipfsohn/programs/CTHYB/CT-HYB -I/home/h/nipfsohn/programs/source/eigen/eigen-eigen-07105f7124f9 -I/home/h/nipfsohn/programs/CTHYB/CT-HYB/include -I/home/h/nipfsohn/programs/CTHYB/CT-HYB/test -isystem /home/h/nipfsohn/programs/install/include -isystem /home/h/nipfsohn/programs/ALPSCore/install/include -isystem /opt/cray/hdf5-parallel/1.8.16/INTEL/15.0/include -DBOOST_DISABLE_ASSERTS -DNDEBUG -o CMakeFiles/unittest_solver.dir/test/unittest_solver.cpp.o -c /home/h/nipfsohn/programs/CTHYB/CT-HYB/test/unittest_solver.cpp
In file included from /home/h/nipfsohn/programs/CTHYB/CT-HYB/test/gtest.h(1704),
from /home/h/nipfsohn/programs/CTHYB/CT-HYB/test/unittest_solver.hpp(8),
from /home/h/nipfsohn/programs/CTHYB/CT-HYB/test/unittest_solver.cpp(1):
/usr/include/c++/4.3/tr1/tuple(74): error: expected an identifier
template<int _Idx, typename... _Elements>
^

egull commented

Not sure about this. @galexv , any ideas?
Apart from fixing it, there may be a way of temporarily
avoiding it: it seems to me though that you're using cray's CC based on gcc. There's usually a way to switch prgEnv from gnu to intel and use the intel compilers instead. Is that an option, @fsohn ?

fsohn commented

@egull Yes it is possible to switch between Cray, Intel and GNU compiler environments, but each of these compilers produces a different error. CC is the wrapper command for the C++ compiler depending on the active programming environment.
At least for the Intel compiler we solved the problem by adding “-DGTEST_HAS_TR1_TUPLE=0” or “-DGTEST_USE_OWN_TR1_TUPLE” to the cmake command options for building CTHYB, pointed out by @shinaoka Thanks