Building LSDalton with devtoolset

Problems with Dalton installation? Find answers or ask for help here
Post Reply
atrummal
Posts: 3
Joined: 04 Nov 2019, 09:20
First name(s): Aleksander
Last name(s): Trummal
Affiliation: National Institute of Chemical Physics and Biophysics
Country: Estonia

Building LSDalton with devtoolset

Post by atrummal » 04 Nov 2019, 11:11

Hello!
I’m in the middle of upgrading of Dalton2015 and LSDalton2015 running on RHEL6 server to the latest stable 2018 release. For the former package, compilation and testing went relatively smoothly with only few failed tests (dft with dispersion corrections and benchmarks), the RHEL6 native gcc/gfortran version 4.4.7 performed flawlessly. For LSDalton, however, the upgrade of gfortran was unavoidable because version 4.4.7 does not support pointer bounds remapping used in ThermiteTensor. Therefore, I installed and enabled the devtoolset-6 with gcc/gfortran 6.3.1 package and compiled LSDalton using regular procedure. Compilation was successful; the executable was built as expected without errors. However, all LSDalton tests failed. Some debugging revealed that the code crashed with segfault while processing the input files. The precise point of failure was during the second pass of subroutine lsclose at INQUIRE line, with multiple references to libgfortran.so.3 and one reference to libc.so.6. I also noticed that Dalton code compiled with devtoolset-6 crashed with segfault as well.
The question is whether there is something wrong with gcc/gfortran 6.3.1 itself or, otherwise, whether the building procedure should be specifically adapted for compilation with devtoolset?
I would appreciate any comments and suggestions regarding this issue.

User avatar
magnus
Posts: 479
Joined: 27 Jun 2013, 16:32
First name(s): Jógvan Magnus
Middle name(s): Haugaard
Last name(s): Olsen
Affiliation: Hylleraas Centre, UiT The Arctic University of Norway
Country: Norway

Re: Building LSDalton with devtoolset

Post by magnus » 04 Nov 2019, 11:57

Difficult to say exactly what is the reason without more information. I can say that LSDalton is tested nightly using GCC 4.9.2, 5.4.0, and 6.4.0 as you can see here: https://testboard.org/cdash/index.php?project=LSDalton

atrummal
Posts: 3
Joined: 04 Nov 2019, 09:20
First name(s): Aleksander
Last name(s): Trummal
Affiliation: National Institute of Chemical Physics and Biophysics
Country: Estonia

Re: Building LSDalton with devtoolset

Post by atrummal » 05 Nov 2019, 08:38

Dear Magnus,

Thank you for the prompt reply. Some additional details are as follows:
libgfortran and the whole gcc package was upgraded from the original version 4.4.1 to 4.4.7, glibc version was 2.12, in compliance with devtoolset-6 requirements. So I assume that devtoolset which is the suggested way of upgrading gcc was installed correctly. Regarding the compilers, my only further option would be to upgrade to devtoolset-7 which brings in probably untested version of compilers. Are there any other details that could reveal the core of the problem?

User avatar
magnus
Posts: 479
Joined: 27 Jun 2013, 16:32
First name(s): Jógvan Magnus
Middle name(s): Haugaard
Last name(s): Olsen
Affiliation: Hylleraas Centre, UiT The Arctic University of Norway
Country: Norway

Re: Building LSDalton with devtoolset

Post by magnus » 05 Nov 2019, 12:13

I know that GCC 4.4 is not supported because gfortran does not support some more modern fortran features that are used in LSDalton (as you noticed). I don't see any problem in using GCC 7 (which I assume is the version used in devtoolset-7). That said, it should also work with both GCC 5 and 6. Perhaps you could provide the output from the setup / cmake, just to see if someone can spot an inconsistency?

atrummal
Posts: 3
Joined: 04 Nov 2019, 09:20
First name(s): Aleksander
Last name(s): Trummal
Affiliation: National Institute of Chemical Physics and Biophysics
Country: Estonia

Re: Building LSDalton with devtoolset

Post by atrummal » 05 Nov 2019, 13:48

Actually, there is nothing suspicious in setup/cmake output. My present understanding is that there may be limitations in certain procedures implemented in RHEL6 native shared libraries, leading to random exceptions when called from the objects created within devtoolset-6 environment, which is otherwise intended to be normal behavior by devtoolset design. The present LSDalton traceback points to libgfortran which in turn calls glibc 2.12 leading to segfault. When the same sequence of library calls to glibc 2.12 is initiated by Dalton compiled with native gcc 4.4 package everything works fine. As devtoolset-7 relies on the same glibc 2.12 I really wouldn’t expect different outcome as compared to devtoolset-6. One possible workaround could be to statically link glibc (and possibly gfortran as well) while building LSDalton with devtoolset, however, I did not find the suitable libraries for this procedure. I would be interested in learning your comments on that. Also, please let me know whether building of fully operational LSDalton code with devtoolset on RHEL6 is indeed impossible regardless of chosen configuration options. If true, I would like to ask for any suggestions of alternative ways of upgrading the gcc 4.4 environment on RHEL6.

User avatar
magnus
Posts: 479
Joined: 27 Jun 2013, 16:32
First name(s): Jógvan Magnus
Middle name(s): Haugaard
Last name(s): Olsen
Affiliation: Hylleraas Centre, UiT The Arctic University of Norway
Country: Norway

Re: Building LSDalton with devtoolset

Post by magnus » 05 Nov 2019, 14:03

I'm sorry but I'm not familiar with devtoolset. I've been a Fedora user for a long time now and last time I used RHEL it was possible to "yum install gcc-6" or something like that, which worked well with Dalton.

The only alterntive I can think is to use https://spack.io/ or something similar.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests