qsimulate-open / bagel

Brilliantly Advanced General Electronic-structure Library
GNU General Public License v3.0
96 stars 43 forks source link

Compiling error bagel.1.1.1 with intel2017 #143

Closed AndreyShtyrov closed 5 years ago

AndreyShtyrov commented 5 years ago

I have try compile bagel v 1.1.1 and 1.2.0 on another machine with intel 2017.1 with intel mpi but it fault with this error.

../../../../src/util/parallel/mpi_interface.cc(236): error: class "std::map<int, std::vector<MPI_Request={int}, std::allocator>, std::less, std::allocator<std::pair<const int, std::vector<MPI_Request={int}, std::allocator>>>>" has no member "emplace" request.emplace(cnt, rq); ^

shiozaki commented 5 years ago

std::map::emplace is defined in C++11. https://en.cppreference.com/w/cpp/container/map/emplace Somehow your compiler does not seem to compile C++11 code. You may need to add

--std=c++11

to CXXFLAGS? (This is a default mode in g++, but may not be the case with your compiler). If this does not work, can you compile the following code with your compiler and see if it works?

#include<map>
int main() {
std::map<int, int> a;
a.emplace(1, 1);
return 0;
}
AndreyShtyrov commented 5 years ago

I found out that I need to load a module gcc in which, there are missing libraries. But I met a new mistake.

./.libs/libbagel.so: undefined reference to `boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::char_traits >::save(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'

when mpiicpc try to make -o .libs/BAGEL

shiozaki commented 5 years ago

This is due to failing to link with libboost_serialization.a/so. Make sure that a proper version of Boost is loaded.

AndreyShtyrov commented 5 years ago

I have installed boost.1.68. But it problem that in /usr/lib exist another boost library that older then 1.53. At configure stage it write next messages.

checking for boostlib >= 1.53... yes checking whether the Boost::Regex library is available... yes checking for exit in -lboost_regex-mt... yes checking whether the Boost::Unit_Test_Framework library is available... yes configure: WARNING: BOOST_CPPFLAGS -I/usr/include

I afraid that on compiling stage it use boost from /usr/lib

shiozaki commented 5 years ago

What is the configure option? and also show me your LD_LIBRARY_PATH environmental variable.

On Dec 8, 2018, at 10:20 AM, AndreyShtyrov notifications@github.com wrote:

I have installed boost.1.68. But it problem that in /usr/lib exist another boost library that older then 1.53. At configure stage it write next messages.

checking for boostlib >= 1.53... yes checking whether the Boost::Regex library is available... yes checking for exit in -lboost_regex-mt... yes checking whether the Boost::Unit_Test_Framework library is available... yes configure: WARNING: BOOST_CPPFLAGS -I/usr/include

I afraid that on compiling stage it use boost from /usr/lib

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

AndreyShtyrov commented 5 years ago

../configure --enable-mkl CXXFLAGS=”-DNDEBUG --std=c++11 -O3 -mavx” LDFLAGS=-L$BOOST_ROOT/lib --with-include=-I$BOOST_ROOT/include --with-mpi=intel --exec-prefix=$HOME/_scratch/local/bagel

LD_LIBRARY_PATH

$HOME/_scratch/local/BOOST/lib:$HOME/local/libtool/lib:/opt/software/gcc-5.5/lib64:/opt/slurm/2.5.6/lib:/opt/intel/itac/2017.1.024/mic/slib:/opt/intel/itac/2017.1.024/intel64/slib:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/tbb/lib/intel64/gcc4.7:/opt/intel/debugger_2017/iga/lib:/opt/intel/debugger_2017/libipt/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/mkl/lib/intel64_lin

shiozaki commented 5 years ago

Please use --with-boost=/path instead of specifying LDFLAGS and CXXFLAGS manually. Should be solved if you do.

On Dec 8, 2018, at 12:15 PM, AndreyShtyrov notifications@github.com wrote:

../configure --enable-mkl CXXFLAGS=”-DNDEBUG --std=c++11 -O3 -mavx” LDFLAGS=-L$BOOST_ROOT/lib --with-include=-I$BOOST_ROOT/include --with-mpi=intel --exec-prefix=$HOME/_scratch/local/bagel

LD_LIBRARY_PATH

$HOME/_scratch/local/BOOST/lib:$HOME/local/libtool/lib:/opt/software/gcc-5.5/lib64:/opt/slurm/2.5.6/lib:/opt/intel/itac/2017.1.024/mic/slib:/opt/intel/itac/2017.1.024/intel64/slib:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/tbb/lib/intel64/gcc4.7:/opt/intel/debugger_2017/iga/lib:/opt/intel/debugger_2017/libipt/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/mkl/lib/intel64_lin

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nubakery/bagel/issues/143#issuecomment-445474816, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQ2IkSdDnwRo-d2VLLGlANks4Iu55JIks5u2_PBgaJpZM4ZGsG8.

AndreyShtyrov commented 5 years ago

I have compiled with --with-boost=. It's finished without errors, but when i tried to start BAGEL i fault with: illegal instruction (core dumped).

After that i try to recompile with setting gdb traceback
../configure --enable-mkl CXXFLAGS="-ggdb --std=c++11 -O0 -mavx" --with-boost=/mnt/data/users/dm4/vol12/mikhailnryazantsev_1772/_scratch/local/BOOST --with-mpi=intel --prefix=...

But it fault with next message ftware/gcc-5.5/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/crtendS.o /usr/lib/../lib64/crtn.o -ggdb -O0 -mavx -Wl,-soname -Wl,libbagel.so.0 -o .libs/libbagel.so.0.0.0

/opt/xalt/bin/ld: line 185: 18937 Killed $MY_CMD $STRIP --unresolved-symbols=report-all -o /dev/null > $FUNCRAW 2>&1 /opt/xalt/bin/ld: line 197: 18936 Killed $MY_CMD "${argA[@]}" $OBJ -t > $LINKLINE_OUT

shiozaki commented 5 years ago

This is due to your runtime environmental variables being messed up (and not bagel). I suggest you compile boost and install it in your home and avoid using modules. I’ll close this issue.

On Dec 10, 2018, at 5:46 AM, AndreyShtyrov notifications@github.com wrote:

I have compiled with --with-boost=. It finished without error, but when i tried start BAGEL i fault with illegal instruction (core dumped).

After that i try to recompile with ../configure --enable-mkl CXXFLAGS="-ggdb --std=c++11 -O0 -mavx" --with-boost=/mnt/data/users/dm4/vol12/mikhailnryazantsev_1772/_scratch/local/BOOST --with-mpi=intel --prefix=...

But it fault with next message ftware/gcc-5.5/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/crtendS.o /usr/lib/../lib64/crtn.o -ggdb -O0 -mavx -Wl,-soname -Wl,libbagel.so.0 -o .libs/libbagel.so.0.0.0

/opt/xalt/bin/ld: line 185: 18937 Killed $MY_CMD $STRIP --unresolved-symbols=report-all -o /dev/null > $FUNCRAW 2>&1 /opt/xalt/bin/ld: line 197: 18936 Killed $MY_CMD "${argA[@]}" $OBJ -t > $LINKLINE_OUT

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.