Closed FreemanTheMaverick closed 2 years ago
Your compiler is very old and therefore C++11 is probably not the default. Please add -std=c++11 in CXXFLAGS. If that still doesn’t work, please consider installing a newer compiler.
On Wed, Nov 10, 2021 at 11:01 PM FreemanTheMaverick < @.***> wrote:
Hi. I am trying installing Bagel on the server. Intel and Boost are already installed. I followed the installation manual strictly and entered the line ../configure --enable-mkl --with-boost=$BOOST_ROOT --with-mpi=intel CXXFLAGS=-DNDEBUG --with-include="-L/opt/ohpc/pub/compiler/intel/compilers_and_libraries_2020.1.217/linux/mkl/include" But when I make, the following error appeared. /usr/include/c++/4.8.5/bits/alloc_traits.h(64): error: expression must have a constant value bool = alloctr_rebind_helper<_Alloc, _Tp>::value> ^ /usr/include/c++/4.8.5/bits/alloc_traits.h(64): note: the value of member "std::alloctr_rebind_helper<_Alloc, _Tp>::value [with _Alloc=std::allocator<bagel::Civector<std::complex
>>, _Tp=std::_Sp_counted_ptr_inplace<bagel::Civector<std::complex >, std::allocator<bagel::Civector<std::complex >>, gnu_cxx::_S_atomic>]" (declared at line 57) cannot be used as a constant bool = alloctr_rebind_helper<_Alloc, _Tp>::value> ^ /usr/include/c++/4.8.5/bits/alloc_traits.h(202): error: incomplete type is not allowed using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::type; ^ /usr/include/c++/4.8.5/bits/alloc_traits.h(90): error: the global scope has no "value_type" typedef typename _Alloc::value_type value_type; ^ and many similar C++ errors. What can I do? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/qsimulate-open/bagel/issues/232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKDMIW7AI3KYAIBBOGD34TULM53NANCNFSM5HZQETMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Your compiler is very old and therefore C++11 is probably not the default. Please add -std=c++11 in CXXFLAGS. If that still doesn’t work, please consider installing a newer compiler. … On Wed, Nov 10, 2021 at 11:01 PM FreemanTheMaverick < @.***> wrote: Hi. I am trying installing Bagel on the server. Intel and Boost are already installed. I followed the installation manual strictly and entered the line ../configure --enable-mkl --with-boost=$BOOST_ROOT --with-mpi=intel CXXFLAGS=-DNDEBUG --with-include="-L/opt/ohpc/pub/compiler/intel/compilers_and_libraries_2020.1.217/linux/mkl/include" But when I make, the following error appeared. /usr/include/c++/4.8.5/bits/alloc_traits.h(64): error: expression must have a constant value bool = alloctr_rebind_helper<_Alloc, _Tp>::value> ^ /usr/include/c++/4.8.5/bits/alloc_traits.h(64): note: the value of member "std::alloctr_rebind_helper<_Alloc, _Tp>::value [with _Alloc=std::allocator<bagel::Civector<std::complex
>>, _Tp=std::_Sp_counted_ptr_inplace<bagel::Civector<std::complex >, std::allocator<bagel::Civector<std::complex >>, gnu_cxx::_S_atomic>]" (declared at line 57) cannot be used as a constant bool = alloctr_rebind_helper<_Alloc, _Tp>::value> ^ /usr/include/c++/4.8.5/bits/alloc_traits.h(202): error: incomplete type is not allowed using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::type; ^ /usr/include/c++/4.8.5/bits/alloc_traits.h(90): error: the global scope has no "value_type" typedef typename _Alloc::value_type value_type; ^ and many similar C++ errors. What can I do? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#232>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKDMIW7AI3KYAIBBOGD34TULM53NANCNFSM5HZQETMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Thank you for your timely response!
Following your advice, I updated GCC
to version 9.1.0. The error now becomes
`/opt/ohpc/pub/libs/intel/openmpi3/boost/1.71.0/include/boost/serialization/nvp.hpp(48): error: no instance of constructor "std::pair<_T1, _T2>::pair [with _T1=const char , _T2=int ()[3]]" matches the argument list
argument types are: (const char , int ()[3])
std::pair<const char , T >(name_, boost::addressof(t))
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(436): note: this candidate was rejected because mismatch in count of arguments
pair(tuple<_Args1...>&, tuple<_Args2...>&,
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(375): note: this candidate was rejected because mismatch in count of arguments
pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(370): note: this candidate was rejected because mismatch in count of arguments
explicit constexpr pair(pair<_U1, _U2>&& p)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(360): note: this candidate was rejected because mismatch in count of arguments
constexpr pair(pair<_U1, _U2>&& p)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(350): note: this candidate was rejected because at least one template argument could not be deduced
explicit constexpr pair(_U1&& x, _U2&& __y)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(341): note: this candidate was rejected because at least one template argument could not be deduced
constexpr pair(_U1&& x, _U2&& y)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(332): note: this candidate was rejected because at least one template argument could not be deduced
explicit pair(const _T1& __x, _U2&& y)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(325): note: this candidate was rejected because at least one template argument could not be deduced
constexpr pair(const _T1& x, _U2&& __y)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(318): note: this candidate was rejected because at least one template argument could not be deduced
explicit constexpr pair(_U1&& x, const _T2& y)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(311): note: this candidate was rejected because at least one template argument could not be deduced
constexpr pair(_U1&& __x, const _T2& y)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(304): note: this candidate was rejected because mismatch in count of arguments
constexpr pair(pair&&) = default;
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(303): note: this candidate was rejected because mismatch in count of arguments
constexpr pair(const pair&) = default;
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(300): note: this candidate was rejected because mismatch in count of arguments
explicit constexpr pair(const pair<_U1, _U2>& p)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(291): note: this candidate was rejected because mismatch in count of arguments
constexpr pair(const pair<_U1, _U2>& p)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(269): note: this candidate was rejected because at least one template argument could not be deduced
explicit constexpr pair(const _T1& a, const _T2& __b)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(260): note: this candidate was rejected because at least one template argument could not be deduced
constexpr pair(const _T1& a, const _T2& __b)
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(242): note: this candidate was rejected because mismatch in count of arguments
explicit constexpr pair()
^
/scratch/PI/yonghuang/gcc_9.1.0/include/c++/9.1.0/bits/stl_pair.h(229): note: this candidate was rejected because mismatch in count of arguments
_GLIBCXX_CONSTEXPR pair()
^
detected during:
instantiation of "boost::serialization::nvp
compilation aborted for ../../../src/wfn/reference.cc (code 2)
It seems that there is something wrong with
stl_pair.h`.
This issue looks similar to me #182. It appears to me that you are using the intel compiler? I don't have access to intel compilers and therefore cannot reproduce the issue at this point.
Probably you should set I_MPI_CXX=g++ so IntelMPI uses g++ as an underlying compiler. https://www.intel.com/content/www/us/en/develop/documentation/mpi-developer-reference-windows/top/environment-variable-reference/compilation-environment-variables.html
I solved this problem with this configuration setting:
I_MPI_ICC=mpiicc MPICC=mpiicc I_MPI_CXX=mpigcc MPICXX=mpigcc ../configure --enable-mkl --with-boost=$BOOST_ROOT CXXFLAGS="-DNDEBUG -std=c++11 -lstdc++" --with-mpi=intel --with-boost-libdir=$BOOST_LIB --prefix=/scratch/PI/yonghuang/bagel_1.2.2
The key is setting I_MPI_CXX
and MPICXX
to mpigcc
, which is the C++ compiler provided by Intel.
Hi. I am trying installing Bagel on the server. Intel and Boost are already installed. I followed the installation manual strictly and entered the line
../configure --enable-mkl --with-boost=$BOOST_ROOT --with-mpi=intel CXXFLAGS=-DNDEBUG --with-include="-L/opt/ohpc/pub/compiler/intel/compilers_and_libraries_2020.1.217/linux/mkl/include"
But when Imake
, the following error appeared./usr/include/c++/4.8.5/bits/alloc_traits.h(64): error: expression must have a constant value bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value> ^ /usr/include/c++/4.8.5/bits/alloc_traits.h(64): note: the value of member "std::__alloctr_rebind_helper<_Alloc, _Tp>::__value [with _Alloc=std::allocator<bagel::Civector<std::complex<double>>>, _Tp=std::_Sp_counted_ptr_inplace<bagel::Civector<std::complex<double>>, std::allocator<bagel::Civector<std::complex<double>>>, __gnu_cxx::_S_atomic>]" (declared at line 57) cannot be used as a constant bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value> ^
/usr/include/c++/4.8.5/bits/alloc_traits.h(202): error: incomplete type is not allowed using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type; ^
/usr/include/c++/4.8.5/bits/alloc_traits.h(90): error: the global scope has no "value_type" typedef typename _Alloc::value_type value_type; ^
and many similar C++ errors. What can I do?