Compiling LSDalton with PCM Solver

Problems with Dalton installation? Find answers or ask for help here
Post Reply
esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Compiling LSDalton with PCM Solver

Post by esmuigors » 14 Apr 2019, 20:30

Dear all,

I am trying to compile LSDalton with

Code: Select all

-DENABLE_PCMSOLVER
, but facing a problem: make complains about redefined structures (enable_if, enable_if_c, disable_if, disable_if_c) for the boost library. I am aware there are multiple versions of this library because of changing standard of C/C++; I have installed Debian packages libboost-all-dev (v. 1.62.0.1) and available packages of libboost 1.67.0. Do I need some other libboost version, or is the problem elsewhere?

Setup command was ./setup --mpi --omp --mkl parallel --prefix=/opt -D ENABLE_PCMSOLVER=ON
System is Debian 9.

With deep gratitude,
Igors
Attachments
make_err.log
(214.18 KiB) Downloaded 10 times
make.log
(6.86 KiB) Downloaded 10 times

rob
Posts: 22
Joined: 15 Oct 2014, 13:43
First name(s): Roberto
Last name(s): Di Remigio
Affiliation: CTCC
Country: Norway

Re: Compiling LSDalton with PCM Solver

Post by rob » 15 Apr 2019, 14:24

Hi, Boost 1.55.0 and later are fine with PCMSolver. I am confused as to what version of Boost you actually have installed and is picked up by CMake. I cannot find this information in the logs you posted. So, few questions to help you troubleshoot:
1. Which compilers are you using? Do they support C++11?
2. Can you run a clean

Code: Select all

./setup --mpi --omp --mkl parallel --prefix=/opt -D ENABLE_PCMSOLVER=ON
and post the output?
3. Can you re-run the build in serial and verbosely

Code: Select all

env VERBOSE=1 make
and post the output?
Thank you! Roberto

esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Re: Compiling LSDalton with PCM Solver

Post by esmuigors » 17 Apr 2019, 09:23

This shines some light, as I am using Debian ("rock stable" hence outdated a bit system) and g++ (version 6.3.0) requires parameter -std=c++11. How should I include that? Just putting a complex parameter (even in single quotes) after the --cxx option brings up the following error:

Code: Select all

/bin/sh: 1: -std=c++11: not found
so I guess this is not interpreted as intended by me.

The LSDalton manual which the page daltonprogram.org points to still cites using ./configure instead of ./setup, and there is no Makefile.config so I do not know which file to put this option into.

rob
Posts: 22
Joined: 15 Oct 2014, 13:43
First name(s): Roberto
Last name(s): Di Remigio
Affiliation: CTCC
Country: Norway

Re: Compiling LSDalton with PCM Solver

Post by rob » 17 Apr 2019, 15:54

Hi again, you need to edit this file:

Code: Select all

src/pcm/CMakeLists.txt
and set

Code: Select all

-DENABLE_CXX11_SUPPORT=ON
at line 23. The PCMSolver submodule own CMake system will check whether your compiler really supports C++11 (GCC 6.3.0 is fully compliant) and enable it.
Being 2019, I should probably set C++11 on by default...

esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Re: Compiling LSDalton with PCM Solver

Post by esmuigors » 17 Apr 2019, 16:24

For now, I have created a specs file in the build directory (I guess it should go there?) with the -std=c++11 option after *cc1plus:, as suggested here. The ./setup and make outputs are attached. Thank You for taking Your time to help!
Attachments
SETUP_OUTPUT.log
(4.11 KiB) Downloaded 8 times
make_stserr.log
(2.56 KiB) Downloaded 9 times
make_stdout.log
(726.98 KiB) Downloaded 9 times

esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Re: Compiling LSDalton with PCM Solver

Post by esmuigors » 17 Apr 2019, 16:28

Sorry, the prrevious answer was prepared some time ago and I was distracted by other tasks! Now I am compiling with the option adveised by You. No errors so forth.

rob
Posts: 22
Joined: 15 Oct 2014, 13:43
First name(s): Roberto
Last name(s): Di Remigio
Affiliation: CTCC
Country: Norway

Re: Compiling LSDalton with PCM Solver

Post by rob » 17 Apr 2019, 16:31

That's neat, but it won't do. The C++11 availability check in PCMSolver will err on the side of not enabling C++11 unless you tell it to explicitly. Indeed, in the standard output you can see that it is still preferring C++98:

Code: Select all

cd /home/igors/lsdalton/lsdalton/build/external/pcmsolver-build/src/green && /opt/openmpi-2.1.5/bin/mpicxx   -DPCMSolver_EXPORTS -DTAYLOR_CXXIO -I/home/igors/lsdalton/lsdalton/build/external/pcmsolver-build/modules -I/home/igors/lsdalton/lsdalton/external/pcmsolver/api -isystem /home/igors/lsdalton/lsdalton/external/pcmsolver/external/eigen3/include/eigen3 -isystem /home/igors/lsdalton/lsdalton/external/pcmsolver/external/libtaylor -I/home/igors/lsdalton/lsdalton/external/pcmsolver/src -I/home/igors/lsdalton/lsdalton/build/external/pcmsolver-build/include -I/home/igors/lsdalton/lsdalton/external/pcmsolver/include -isystem /home/igors/lsdalton/lsdalton/external/pcmsolver/src/utils/getkw -I/home/igors/lsdalton/lsdalton/external/pcmsolver/src/dielectric_profile  -std=gnu++98 -O3 -DNDEBUG -Wno-unused -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -o CMakeFiles/green.dir/UniformDielectric.cpp.o -c /home/igors/lsdalton/lsdalton/external/pcmsolver/src/green/UniformDielectric.cpp

esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Re: Compiling LSDalton with PCM Solver

Post by esmuigors » 17 Apr 2019, 17:51

OK, now I do not have this error, but rather:

Code: Select all

gfortran: error: unrecognized command line option ‘-mkl=parallel’
??????

Files are attached. Thank You!
Attachments
SETUP_OUTPUT3.log
(4.18 KiB) Downloaded 8 times
make_stdout3.log
(744.85 KiB) Downloaded 8 times
make_stderr3.log
(3.65 KiB) Downloaded 8 times

esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Re: Compiling LSDalton with PCM Solver

Post by esmuigors » 17 Apr 2019, 17:53

Now I also used the flag

Code: Select all

-DENABLE_CXX11_SUPPORT=ON
for ./setup script itself.

esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Re: Compiling LSDalton with PCM Solver

Post by esmuigors » 17 Apr 2019, 17:57

Sorry, I have found this tread:
viewtopic.php?f=8&t=1001&p=6286&hilit=m ... llel#p6286

So it means I had better remove MKL parallelism from the compilation setup? No --omp and using --mkl sequential?

rob
Posts: 22
Joined: 15 Oct 2014, 13:43
First name(s): Roberto
Last name(s): Di Remigio
Affiliation: CTCC
Country: Norway

Re: Compiling LSDalton with PCM Solver

Post by rob » 17 Apr 2019, 21:36

Ooops! Sorry, should have seen that inconsistency before. The GNU compilers do not recognize the -mkl option, only the Intel compilers do. You can still use MKL with the GNU compilers though. Just make sure that you set the MATH_ROOT environment variable to the install folder for MKL and CMake should pick it up automatically. The documentation at this link should hopefully still be relevant: https://dalton-installation.readthedocs ... /math.html

esmuigors
Posts: 19
Joined: 14 Nov 2018, 17:54
First name(s): Igors
Middle name(s): N.
Last name(s): Mihailovs
Affiliation: Institute of Solid State Physics, University of Latvia
Country: Latvia

Re: Compiling LSDalton with PCM Solver

Post by esmuigors » 18 Apr 2019, 20:59

Now I have exported MATH_ROOT=/usr/lib and removed --mkl option altogether. Then I successfully compiled LSDalton. Make output actually contains mentions of mkl_sequential, so I hope everything is good, as I will not be able for some time to check if the program runs. Thank You very much for Your help, Dr. Di Remigio!
Attachments
make_stdout7.log
(1.08 MiB) Downloaded 4 times
make_stderr7.log
(6.05 KiB) Downloaded 3 times

rob
Posts: 22
Joined: 15 Oct 2014, 13:43
First name(s): Roberto
Last name(s): Di Remigio
Affiliation: CTCC
Country: Norway

Re: Compiling LSDalton with PCM Solver

Post by rob » 18 Apr 2019, 21:06

Yes, this should be fine. Try running:

Code: Select all

ctest --output-on-failure -L ContinousIntegration
to run a subset of the tests and report any errors.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest