qsimulate-open / bagel

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

Problem with configure: error: Could not link against boost_regex ! #275

Closed EvGeGr closed 7 months ago

EvGeGr commented 7 months ago

Hello,

I am trying to compile bagel but facing problems with configure. If I do the following configure:

../configure CXXFLAGS="-DNDEBUG" --enable-mkl --with-mpi=mvapich --with-boost=$BOOST_ROOT

I get the error:

... checking for boostlib >= 1.53... yes checking whether the Boost::Regex library is available... yes checking for exit in -lboost_regex... no checking for exit in -lboost_regex... (cached) no configure: error: Could not link against boost_regex !

If I remove --with-mpi=mvapich, i.e. do the following configure:

../configure CXXFLAGS="-DNDEBUG" --enable-mkl --with-boost=$BOOST_ROOT

then there is no above error but I get the error:

... checking for boostlib >= 1.53... yes checking whether the Boost::Regex library is available... yes checking for exit in -lboost_regex... yes checking whether the Boost::Unit_Test_Framework library is available... yes configure: WARNING: BOOST_CPPFLAGS -I/home/egromov/prog/boost_1_84_0/install/include checking whether the Boost::Serialization library is available... yes checking for exit in -lboost_serialization... yes configure: error: "SMITH requires MPI"

I wonder why there is an error with --with-mpi? I specify --with-mpi=mvapich, although in fact I have mpich2:

/usr/local/mpich2-new/bin/mpicxx

I am also wondering what SMITH is? What is it needed for? Thanks!

Kind regards, Evgeniy

shiozaki commented 7 months ago

The first step in troubleshooting is to take a look at config.log.

SMITH is the engine for CASPT2 which requires MPI.

With-MPI values are only used for determining which MKL libraries to link, so mvapich is the right value if you are using mpich.

EvGeGr commented 7 months ago

Thank you for your response! After switching to openmpi the configure worked out and the compilation ran fine. However I cannot make check, getting the error:

/software/openmpi-4.1.1/lib/libmpi.so: error adding symbols: File in wrong format

I am stumped with that ...

Also, I tried to run

BAGEL path_to_bagel/test/benzene_svp_mp2.json

but it crashes in the very beginning saying:

ERROR: EXCEPTION RAISED: svp cannot be opened. Please see if the file is in /usr/local/bagel/share. You can also specify the full path to the basis file.

Is the file with bases is missing? Where is it located?

shiozaki commented 7 months ago

The former is your OpenMPI installation problem, so you would want to discuss it with your computer administrator.

The latter says "Please see if the file is in /usr/local/bagel/share". If you don't see files there, it probably means that you haven't done 'make install', or 'make install' failed. Good luck

EvGeGr commented 7 months ago

Yes, I did make install. How can I redirect bagel to the directory where I installed it. I have defined BAGEL_DIR, BAGEL_BIN, BAGEL_LIB and BAGEL_SHARE variables but it didn't help :( - I still get the same error as above ...

EvGeGr commented 7 months ago

OK, everything works now, after adding openmpi/bin to the PATH :) - can be closed