GROMACS version: 2022.5
CP2K Version: 2023.1
Compiler and library used: Intel compilers, mpi and mkl library
Dear Community Members,
I have followed the following website to install CP2K first:
https://docs.bioexcel.eu/qmmm_bpg/en/main/running_cp2k/building_cp2k.html#building-the-interface
CP2K Installation:
./install_cp2k_toolchain.sh --math-mode=mkl --mpi-mode=intelmpi --with-hdf5=no --with-sirius=no --with-libvori=no --with-gsl=no --with-spfft=no --with-spglib=no
The local.psmp file has the following contents:
CC = /home/Packages/intel/oneapi/mpi/2021.5.1/bin/mpiicc
CXX = /home/Packages/intel/oneapi/mpi/2021.5.1/bin/mpiicpc
AR = ar -r
FC = /home/Packages/intel/oneapi/mpi/2021.5.1/bin/mpiifort
LD = /home/Packages/intel/oneapi/mpi/2021.5.1/bin/mpiifortDFLAGS = -D__LIBXSMM -D__parallel -D__MKL -D__FFTW3 -D__SCALAPACK -D__LIBINT -D__LIBXC -D__COSMA -D__ELPA
WFLAGS =
FCDEBFLAGS =
CFLAGS = -fopenmp -fp-model precise -g -nofor-main -qopenmp-simd -traceback -wd279 -xHost $(PROFOPT) -m64 -I/home/Packages/intel/oneapi/mkl/2022.0.2/include -I/home/Packages/intel/oneapi/mkl/2022.0.2/include/fftw -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/libxc-6.0.0/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/libxsmm-1.17/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/COSMA-2.6.2/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/modules’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/elpa’ -std=c11 -Wall -Wextra -Werror -Wno-vla-parameter -Wno-deprecated-declarations $(DFLAGS)
FCFLAGS = -fopenmp -fp-model precise -g -nofor-main -qopenmp-simd -traceback -wd279 -xHost $(PROFOPT) -m64 -I/home/Packages/intel/oneapi/mkl/2022.0.2/include -I/home/Packages/intel/oneapi/mkl/2022.0.2/include/fftw -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/libxc-6.0.0/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/libxsmm-1.17/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/COSMA-2.6.2/include’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/modules’ -I’/home/Packages/cp2k/2023.1/tools/toolchain/install/elpa-2022.11.001/cpu/include/elpa_openmp-2022.11.001/elpa’ $(FCDEBFLAGS) $(WFLAGS) $(DFLAGS)
CXXFLAGS = -O2 -fPIC -fno-omit-frame-pointer -fopenmp -g -march=native -mtune=native --std=c++14 $(DFLAGS) -Wno-deprecated-declarationsLDFLAGS = $(FCFLAGS) -Wl,–enable-new-dtags -L’/home/Packages/intel/oneapi/mpi/2021.5.1/lib/release’ -Wl,-rpath,‘/home/Packages/intel/oneapi/mpi/2021.5.1/lib/release’ -L’/home/Packages/cp2k/2023.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib’ -L’/home/Packages/cp2k/2023.1/tools/toolchain/install/libxc-6.0.0/lib’ -Wl,-rpath,‘/home/Packages/cp2k/2023.1/tools/toolchain/install/libxc-6.0.0/lib’ -L’/home/Packages/cp2k/2023.1/tools/toolchain/install/libxsmm-1.17/lib’ -Wl,-rpath,‘/home/Packages/cp2k/2023.1/tools/toolchain/install/libxsmm-1.17/lib’ -L’/home/Packages/cp2k/2023.1/tools/toolchain/install/COSMA-2.6.2/lib’ -Wl,-rpath,‘/home/Packages/cp2k/2023.1/tools/toolchain/install/COSMA-2.6.2/lib’ -L’/home/Packages/cp2k/2023.1/tools/toolchain/install/elpa-2022.11.001/cpu/lib’ -Wl,-rpath,‘/home/Packages/cp2k/2023.1/tools/toolchain/install/elpa-2022.11.001/cpu/lib’
LIBS = -lelpa_openmp -lcosma_prefixed_pxgemm -lcosma -lcosta -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lmpi -lmpicxx -L/home/Packages/intel/oneapi/mkl/2022.0.2/lib/intel64 -Wl,-rpath,/home/Packages/intel/oneapi/mkl/2022.0.2/lib/intel64 -lmkl_scalapack_lp64 -Wl,–start-group -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 -Wl,–end-group -lpthread -lm -ldl -lstdc++
After that, I executed the following commands:
source install/setup
cp /home/Packages/cp2k_2023.1/tools/toolchain/install/arch/* …/…/arch/
cd …/…/arch
make -j 24 ARCH=local VERSION=“psmp”
make -j 24 ARCH=local VERSION=“psmp” libcp2k
It was successful. I could see the executables and the library files in the respective folders.
GROMACS Installation:
Patched with plumed 2.8.2 compiled using Intel mpi and compilers
FLAGS=“-xCORE-AVX512 -g -static-intel”; CFLAGS=$FLAGS CXXFLAGS=$FLAGS CC=mpiicc CXX=mpiicpc /home/Packages/cp2k/2023.1/tools/toolchain/install/cmake-3.25.1/bin/cmake … -DCMAKE_INSTALL_PREFIX=/home/Packages/gromacs/2022.5_cp2k_2023.1 -DGMX_MPI=ON -DBUILD_SHARED_LIBS=OFF -DGMX_PREFER_STATIC_LIBS=ON -DGMX_FFT_LIBRARY=mkl -DMKL_LIBRARIES=“/home/Packages/intel/oneapi/mkl/2022.0.2/lib/intel64/libmkl_scalapack_lp64.so;/home/Packages/intel/oneapi/mkl/2022.0.2/lib/intel64/libmkl_gf_lp64.so;/home/Packages/intel/oneapi/mkl/2022.0.2/lib/intel64/libmkl_sequential.so;/home/Packages/intel/oneapi/mkl/2022.0.2/lib/intel64/libmkl_core.so;/home/Packages/intel/oneapi/mkl/2022.0.2/lib/intel64/libmkl_blacs_intelmpi_lp64.so” -DMKL_INCLUDE_DIR=“/home/Packages/intel/oneapi/mkl/2022.0.2/include” -DGMX_GPU=OFF -DGMX_BUILD_HELP=OFF -DGMX_HWLOC=OFF -DGMX_SIMD=AVX_512 -DGMX_CP2K=ON -DCP2K_DIR=“/home/Packages/cp2k/2023.1/lib/local/psmp” -DGMX_LIBS_SUFFIX=_cp2k -DGMX_DEFAULT_SUFFIX=off -DGMX_BINARY_SUFFIX=_cp2k -DGMXAPI=OFF -DGMX_INSTALL_NBLIB_API=OFF -DGMX_DOUBLE=ON
The process is through up to 100%.
100%] Linking CXX static library …/…/lib/libgromacs_cp2k.a
[100%] Built target libgromacs
[100%] Linking CXX executable …/…/bin/gmx_cp2k
icpc: warning #10237: -lcilkrts linked in dynamically, static library not available
Thereafter I get a myriad of ‘undefined reference to’ statements. Below I am pasting a few of them.
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /home/Packages/cp2k/2023.1/lib/local/psmp/libcp2k.a(libcp2k.o): in function
cp2k_get_version': /home/Packages/cp2k/2023.1/src/start/libcp2k.F:73: undefined reference to
for_len_trim’
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /home/Packages/cp2k/2023.1/lib/local/psmp/libcp2k.a(libcp2k.o): in function `cp2k_create_force_env’
…
…
…
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: libxcf03.f90:(.text+0x2755): undefined reference toc_f_pointer_set_desc4' /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: libxcf03.f90:(.text+0x2818): undefined reference to
for_cpystr’
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: libxcf03.f90:(.text+0x283e): undefined reference to `for_cpystr’
make[2]: *** [src/programs/CMakeFiles/gmx.dir/build.make:110: bin/gmx_cp2k] Error 1
make[1]: *** [CMakeFiles/Makefile2:5966: src/programs/CMakeFiles/gmx.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Any help will be appreciated.
Thanks and regards,
Rajib