C++ errors in hpddm during PETSc make with devtoolset-9 on centos-7
Hi,
I am struggling to configure + compile PETSc in a centos-7.9 environment with compilers from devtoolset-9
.
Configure is all fine but make is giving errors in c++ compilation:
CC arch-linux-c-debug/obj/ksp/pc/impls/tfs/gs.o
CC arch-linux-c-debug/obj/ksp/pc/impls/tfs/tfs.o
CXX arch-linux-c-debug/obj/ksp/pc/impls/hpddm/pchpddm.o
In file included from /opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM.hpp:264,
from /tmp/t/petsc-3.18.1-debug/include/petsc/private/petschpddm.h:62,
from /tmp/t/petsc-3.18.1-debug/src/ksp/pc/impls/hpddm/pchpddm.cxx:3:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp: In static member function ‘static constexpr __float128 std::numeric_limits<__float128>::min()’:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:54:57: error: unable to find numeric literal operator ‘operator""Q’
54 | static constexpr __float128 min() noexcept { return FLT128_MIN; }
| ^~~~~~~~~~
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:54:57: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp: In static member function ‘static constexpr __float128 std::numeric_limits<__float128>::max()’:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:55:57: error: unable to find numeric literal operator ‘operator""Q’
55 | static constexpr __float128 max() noexcept { return FLT128_MAX; }
| ^~~~~~~~~~
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:55:57: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp: In static member function ‘static constexpr __float128 std::numeric_limits<__float128>::epsilon()’:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:59:61: error: unable to find numeric literal operator ‘operator""Q’
59 | static constexpr __float128 epsilon() noexcept { return FLT128_EPSILON; }
| ^~~~~~~~~~~~~~
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:59:61: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
gmake[3]: *** [gmakefile:201: arch-linux-c-debug/obj/ksp/pc/impls/hpddm/pchpddm.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
CXX arch-linux-c-debug/obj/ksp/ksp/impls/hpddm/hpddm.o
In file included from /opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM.hpp:264,
from /tmp/t/petsc-3.18.1-debug/include/petsc/private/petschpddm.h:62,
from /tmp/t/petsc-3.18.1-debug/src/ksp/ksp/impls/hpddm/hpddm.cxx:2:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp: In static member function ‘static constexpr __float128 std::numeric_limits<__float128>::min()’:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:54:57: error: unable to find numeric literal operator ‘operator""Q’
54 | static constexpr __float128 min() noexcept { return FLT128_MIN; }
| ^~~~~~~~~~
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:54:57: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp: In static member function ‘static constexpr __float128 std::numeric_limits<__float128>::max()’:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:55:57: error: unable to find numeric literal operator ‘operator""Q’
55 | static constexpr __float128 max() noexcept { return FLT128_MAX; }
| ^~~~~~~~~~
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:55:57: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp: In static member function ‘static constexpr __float128 std::numeric_limits<__float128>::epsilon()’:
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:59:61: error: unable to find numeric literal operator ‘operator""Q’
59 | static constexpr __float128 epsilon() noexcept { return FLT128_EPSILON; }
| ^~~~~~~~~~~~~~
/opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM_specifications.hpp:59:61: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
In file included from /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/stl_algo.h:61,
from /opt/rh/devtoolset-9/root/usr/include/c++/9/algorithm:62,
from /opt/petsc-3.18.1_debug_mpich-4.0.3_debug_devtset-9/include/HPDDM.hpp:102,
from /tmp/t/petsc-3.18.1-debug/include/petsc/private/petschpddm.h:62,
from /tmp/t/petsc-3.18.1-debug/src/ksp/ksp/impls/hpddm/hpddm.cxx:2:
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/stl_heap.h: In function ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<short unsigned int, std::complex<float> >*, std::vector<std::pair<short unsigned int, std::complex<float> >, std::allocator<std::pair<short unsigned int, std::complex<float> > > > >; _Distance = long int; _Tp = std::pair<short unsigned int, std::complex<float> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<HPDDM::selectNu(short unsigned int, std::vector<std::pair<short unsigned int, typename HPDDM::complex_spec<typename HPDDM::underlying_type_spec<T>::type>::type> >&, short unsigned int, const K*, const K*, const K*) [with K = float]::<lambda(type, type)> >]’:
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/stl_heap.h:214:5: note: the ABI of passing structure with complex float member has changed in GCC 4.4
214 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
| ^~~~~~~~~~~~~
gmake[3]: *** [gmakefile:201: arch-linux-c-debug/obj/ksp/ksp/impls/hpddm/hpddm.o] Error 1
CC arch-linux-c-debug/obj/ksp/pc/impls/redundant/ftn-auto/redundantf.o
CC arch-linux-c-debug/obj/ksp/pc/impls/is/pcis.o
CC arch-linux-c-debug/obj/ksp/pc/impls/kaczmarz/kaczmarz.o
CC arch-linux-c-debug/obj/ksp/pc/impls/is/nn/nn.o
CC arch-linux-c-debug/obj/ksp/pc/impls/composite/ftn-custom/zcompositef.o
CC arch-linux-c-debug/obj/ksp/pc/impls/composite/ftn-auto/compositef.o
CC arch-linux-c-debug/obj/ksp/pc/impls/lsc/lsc.o
CC arch-linux-c-debug/obj/ksp/pc/impls/composite/composite.o
CC arch-linux-c-debug/obj/ksp/pc/impls/redundant/redundant.o
CC arch-linux-c-debug/obj/ksp/pc/impls/bddc/bddcprivate.o
gmake[2]: *** [/tmp/t/petsc-3.18.1-debug/lib/petsc/conf/rules:56: libs] Error 2
**************************ERROR*************************************
Error during compile, check arch-linux-c-debug/lib/petsc/conf/make.log
Send it and arch-linux-c-debug/lib/petsc/conf/configure.log to petsc-maint@mcs.anl.gov
********************************************************************
gmake[1]: *** [makefile:34: all] Error 1
make: *** [GNUmakefile:9: all] Error 2
I see this strange thing in the error message:
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/stl_heap.h:214:5: note: the ABI of passing structure with complex float member has changed in GCC 4.4
The "default" compiler is gcc-4.8.5 but it should not be used here...
see the attached files for full logs.
Thanks,
Eric