[CP2K-user] Compiling problems libfftw3_threads

Luis Fernandez Menchero luis... at gmail.com
Fri Jul 2 09:33:48 UTC 2021


El viernes, 2 de julio de 2021 a las 10:33:16 UTC+1, Luis Fernandez 
Menchero escribió:

>   Hello all,
>
> I am trying to compile cp2k in our HPC cluster, Kelvin2
>
> https://www.ni-hpc.ac.uk/
>
> The architecture is AMD-64, with Infiniband connection. I am using to 
> compile the gcc version 9.3.0, with OpenMPI 4.0.4. We do not use 
> multi-thread OMP.
>
> I have installed all the toolchain and dependencies, and I have selected 
> the architecture file 
> Linux-x86-64-gfortran.psmp
> I think this is the one that adjust the best to our architecture. I 
> modified the file to get the paths of the dependencies in our cluster.
>
> I receive the following error during the installation:
>
> gfortran: error: 
> /opt/apps/cp2k/2.1.4/gcc-9.3.0+openmpi-4.0.4+openblas-0.3.15+scalapack-2.1.0+plumed2-2.6.1/cp2k/tools/toolchain/install/fftw-3.3.8/lib/libfftw3_threads.a: 
> No such file or directory
> make[3]: *** 
> [/opt/apps/cp2k/2.1.4/gcc-9.3.0+openmpi-4.0.4+openblas-0.3.15+scalapack-2.1.0+plumed2-2.6.1/cp2k/exe/Linux-x86-64-gfortran/memory_utilities_unittest.psmp] 
> Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [psmp] Error 2
> make: *** [all] Error 2
>
> I think it is not choosing properly the fftw3 library, it should not chose 
> the threaded option.
> Should I select a different architecture file?
> Should I set any flag?
>
> I attach the step-by-step description of the process, the complete error 
> output, the modified architecture file, and the Makefile.
>
> Thanks for your help.
> Luis.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210702/04b60e26/attachment.htm>
-------------- next part --------------
CP2K

https://www.cp2k.org/about
https://github.com/cp2k/cp2k

Download
$ git clone https://github.com/cp2k/cp2k.git

Readme file
https://github.com/cp2k/cp2k#readme

Installation instructions
https://github.com/cp2k/cp2k/blob/master/INSTALL.md

Requirements
- GNU make
- Python 3.5 or later
- Fortran and C compiler
- BLAS and LAPACK
- MPI and SCALAPACK
Optional prerequisites
- FFTW +
- LIBINT
- libsmm
- libxsmm
- libxc
- ELPA
- PEXSI
- QUIP
- PLUMED +
- spglib
- SIRIUS
- FPGA
- COSMA
- LibVori
- CUDA, if you want to activate GPU features

Go to an AMD node, book several nodes for the parallel compilation
$ srun --pty --partition=k2-hipri --ntasks=128 bash

Install prerequisites: toolchain

Instructions installing toolchain
https://github.com/cp2k/cp2k/blob/master/tools/toolchain/README.md

$ module load compilers/gcc/9.3.0
$ module load mpi/openmpi/4.0.4/gcc-9.3.0
$ module load apps/cmake/3.18.4/gcc-9.3.0
$ module load apps/perl/5.32.0
$ export LANGUAGE=en_US.UTF-8
$ export LANG=en_US.UTF-8
$ export LC_ALL=en_US.UTF-8
$ module load apps/python3/3.8.5/gcc-4.8.5
$ module load libs/openblas/0.3.15/gcc-4.8.5
$ module load libs/scalapack_atlasshared/2.1.0/gcc-4.8.5+openmpi-4.0.0+atlas-3.10.3
$ module load plumed2/2.6.1/gcc-9.3.0+openmpi-4.0.4+lapack-3.5.0+blas-4.8.5

It is necessary to work directly in the installation directory, so as root do
# mkdir /opt/apps/cp2k/2.1.4/gcc-9.3.0+openmpi-4.0.4+openblas-0.3.15+scalapack-2.1.0+plumed2-2.6.1
# chmod -R a+w /opt/apps/cp2k

Clone the repository here, as user
$ cd /opt/apps/cp2k/2.1.4/gcc-9.3.0+openmpi-4.0.4+openblas-0.3.15+scalapack-2.1.0+plumed2-2.6.1
$ git clone https://github.com/cp2k/cp2k.git
$ cd cp2k

Install toolchains
$ cd tools/toolchain
$ ./install_cp2k_toolchain.sh --help
$ ./install_cp2k_toolchain.sh -j 16 --install-all --mpi-mode=openmpi \
> --with-gcc=/opt/gridware/depots/54e7fb3c/el7/pkg/compilers/gcc/9.3.0 \
> --with-openmpi=/opt/gridware/depots/54e7fb3c/el7/pkg/mpi/openmpi/4.0.4/gcc-9.3.0 \
> --with-cmake=/opt/gridware/depots/54e7fb3c/el7/pkg/apps/cmake/3.18.4/gcc-9.3.0 \
> --with-openblas=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/openblas/0.3.15/gcc-4.8.5 \
> --with-scalapack=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/scalapack_atlasshared/2.1.0/gcc-4.8.5+openmpi-4.0.0+atlas-3.10.3 \
> --with-plumed=/opt/apps/plumed2/2.6.1/gcc-9.3.0+openmpi-4.0.4+lapack-3.5.0+blas-4.8.5 \
> --with-mkl=no --with-acml=no --with-libxsmm=no --with-elpa=no

Install cp2k

Change to base directory of cp2k
$ cd /opt/apps/cp2k/2.1.4/gcc-9.3.0+openmpi-4.0.4+openblas-0.3.15+scalapack-2.1.0+plumed2-2.6.1/cp2k
$ git submodule update --init --recursive

Edit the file 
Linux-x86-64-gfortran.psmp
And set all the paths to the libraries. Change also the compilers (mpif90) and the flags.
Finally, run make
$ make -j 16 ARCH=Linux-x86-64-gfortran VERSION=psmp


More information about the CP2K-user mailing list