- changed status to invalid
Intel compiler does not accept some c++11 code
Somewhat annoyingly, the intel compiler suite 14.0.3 (latest version) still does not accept certain c++11 code, so will need some workarounds.
I propose to put a couple of #ifdef __INTEL_COMPILER
lines to fix this for now.
compilation aborted for /scratch/fenics/fenics-stable/src/dolfin/dolfin/fem/DofMap.cpp (code 2)
make[2]: *** [dolfin/CMakeFiles/dolfin.dir/fem/DofMap.cpp.o] Error 2
make[2]: *** Waiting for unfinished jobs....
/scratch/fenics/fenics-stable/src/dolfin/dolfin/fem/DofMapBuilder.cpp(696): error: namespace "std" has no member "default_random_engine"
std::default_random_engine random_engine(seed);
^
/scratch/fenics/fenics-stable/src/dolfin/dolfin/fem/DofMapBuilder.cpp(698): error: namespace "std" has no member "shuffle"
std::shuffle(p->second.begin(), p->second.end(), random_engine);
^
compilation aborted for /scratch/fenics/fenics-stable/src/dolfin/dolfin/fem/DofMapBuilder.cpp (code 2)
make[2]: *** [dolfin/CMakeFiles/dolfin.dir/fem/DofMapBuilder.cpp.o] Error 2
make[1]: *** [dolfin/CMakeFiles/dolfin.dir/all] Error 2
make: *** [all] Error 2
Comments (7)
-
-
Apparently it can't be too new either: Intel 2013sp1 + gcc 4.9.1 fails as follows:
[ 1%] Building CXX object dolfin/CMakeFiles/dolfin.dir/adaptivity/AdaptiveLinearVariationalSolver.cpp.o In file included from /apps/gcc/4.9.1/include/c++/4.9.1/ext/alloc_traits.h(36), from /apps/gcc/4.9.1/include/c++/4.9.1/bits/stl_construct.h(61), from /apps/gcc/4.9.1/include/c++/4.9.1/memory(64), from /home/op2-devel/dolfin/master/dolfin/common/NoDeleter.h(26), from /home/op2-devel/dolfin/master/dolfin/adaptivity/AdaptiveLinearVariationalSolver.cpp(24): /apps/gcc/4.9.1/include/c++/4.9.1/bits/alloc_traits.h(248): error: expected a ">" = typename __construct_helper<_Tp, _Args...>::type;
and many more errors of that type.
-
To elaborate: On the Imperial cx1 cluster we have a choice between the (default) gcc 4.4.7 or gcc 4.9.1, neither of which works with DOLFIN master. Any ideas @garth-wells @chris_richardson?
-
@frathgeber Ask your sys admins to install more gcc versions. The combinations they offer are not very clever; 4.4.7 is very old, and the likelihood that the Intel 2013 compiler won't work with gcc 4.9 STL is high because gcc 4.9 was released after the Intel 2013 sp1 compilers.
I use Intel 14.0.3 + gcc 4.8.1. Watch out for Intel MPI 5, which has bugs that stop PETSc from building.
-
@garth-wells Finally managed to build with Intel 2015 + gcc 4.9.1 + boost 1.57.0.
However trying to use
libdolfin.so
fails becauselibdolfin.so.1.4.0: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by libdolfin.so.1.4.0) libdolfin.so.1.4.0: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by libdolfin.so.1.4.0) libdolfin.so.1.4.0: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by libdolfin.so.1.4.0)
The RPATH for
libdolfin.so
is set correctly for gcc 4.9.1, however it seems to still pick up the wrong libstdc++.so. What could go wrong here? -
Another update on this: Seems that Intel 2015 doesn't work with gcc 4.9.1 (yet). I was finally successful with Intel 2015 + gcc 4.7.2 + boost 1.57.0.
-
Intel say to use gcc 4.8 for full c++11 support:
https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler
(see 'note 1')
- Log in to comment
I remember the cause of this now. You need to have a recent gcc in your path. Intel uses the STL from the gcc compiler.