Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation errors with XTB 6.6.0 when compiling from source code (error when building tblite) #977

Closed
samfux84 opened this issue Mar 1, 2024 · 3 comments
Labels
build Build system related issues (OS, compilers, meson)

Comments

@samfux84
Copy link

samfux84 commented Mar 1, 2024

Hi,

I am trying to build XTB 6.6.0 from source code on our HPC cluster running CentOS 7.9, because the precompiled binaries don't work (due to the GLIBC requirement, as CentOS 7.9 has 2.17, while the binaries require >=2.19) and we cannot use conda for multiple reasons (it does harm the parallel HPC file systems due to having a very large number of small files with an average size of KB).

For building the software, I use

  • GCC 8.2.0 (compiled from source)
  • CMake 3.26.3 (compiled from source)
  • OpenBLAS 0.3.20 (compiled from source)

The CMake configuration step works without problems. But when trying to build the software by running "make", then the build fails when trying to build the dependency tblite. The error message is:

[ 27%] Building Fortran object _deps/tblite-build/CMakeFiles/tblite-lib.dir/src/tblite/xtb/h0.f90.o
cd /cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-build && /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-6xqov2fhvbmehix42slain67vprec3fs/bin/gfortran -Dtblite_lib_EXPORTS -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-build/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/toml-f-build/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/mctc-lib-src/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/mctc-lib-build/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/dftd4-src/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/dftd4-build/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/multicharge-build/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/s-dftd3-src/include -I/cluster/scratch/sfux/xtb-6.6.1/build/_deps/s-dftd3-build/include -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none -fbacktrace -O2 -g -DNDEBUG -ftree-vectorize -march=core-avx2 -mavx2 -Jinclude -fPIC -fopenmp -c /cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90 -o CMakeFiles/tblite-lib.dir/src/tblite/xtb/h0.f90.o
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:428:0:

                nao = msao(bas%cgto(jsh, jzp)%ang)

Error: ‘msao’ not specified in enclosing ‘parallel’
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:394:0:

       do img = 1, list%nnl(iat)

Error: enclosing ‘parallel’
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:476:0:

          do iao = 1, msao(bas%cgto(ish, izp)%ang)

Error: ‘msao’ not specified in enclosing ‘parallel’
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:472:0:

       do ish = 1, bas%nsh_id(izp)

Error: enclosing ‘parallel’
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:236:0:

                nao = msao(bas%cgto(jsh, jzp)%ang)

Error: ‘msao’ not specified in enclosing ‘parallel’
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:215:0:

       do img = 1, list%nnl(iat)

Error: enclosing ‘parallel’
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:313:0:

             nao = msao(bas%cgto(jsh, izp)%ang)

Error: ‘msao’ not specified in enclosing ‘parallel’
/cluster/scratch/sfux/xtb-6.6.1/build/_deps/tblite-src/src/tblite/xtb/h0.f90:300:0:

       do ish = 1, bas%nsh_id(izp)

Error: enclosing ‘parallel’
make[2]: *** [_deps/tblite-build/CMakeFiles/tblite-lib.dir/build.make:1573: _deps/tblite-build/CMakeFiles/tblite-lib.dir/src/tblite/xtb/h0.f90.o] Error 1
make[2]: Leaving directory '/cluster/scratch/sfux/xtb-6.6.1/build'
make[1]: *** [CMakeFiles/Makefile2:2507: _deps/tblite-build/CMakeFiles/tblite-lib.dir/all] Error 2
make[1]: Leaving directory '/cluster/scratch/sfux/xtb-6.6.1/build'
make: *** [Makefile:149: all] Error 2
[sfux@eu-login-27 build]$

The make command is executed on a single core (no parallel build). Is this a known issue and is there any resolution for this?

If it helps, then I can also provide the complete logs.

Best regards and thank you for your help

Sam

@samfux84 samfux84 added the unconfirmed This report has not yet been confirmed by the developers label Mar 1, 2024
@awvwgk
Copy link
Member

awvwgk commented Mar 1, 2024

In older GFortran versions (<9) there are issues with the way OpenMP variables are detected, which leads to compile errors. Using a newer GFortran version should fix this.

@awvwgk awvwgk added build Build system related issues (OS, compilers, meson) and removed unconfirmed This report has not yet been confirmed by the developers labels Mar 1, 2024
@samfux84
Copy link
Author

samfux84 commented Mar 4, 2024

@awvwgk : Thank you for your reply.

Please note that the section

"Configure GCC build"

of

https://github.com/grimme-lab/xtb/blob/main/cmake/README.adoc

states:

"xtb can also be compiled with GCC version 8 or later."

This is a bit misleading if XTB requires GCC 9 or newer.

I will try with GCC 11.4.0.

Best regards

Sam

@samfux84
Copy link
Author

samfux84 commented Mar 4, 2024

Compiling XTB 6.6.1 with GCC 11.4.0 worked. Thank you for your help. It would be nice if you could update the documentation which states that XTB can be built with GCC 8, as this is no longer correct.

@samfux84 samfux84 closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system related issues (OS, compilers, meson)
Projects
None yet
Development

No branches or pull requests

2 participants