Hello! I have been struggling to build CP2K 7.1 on our clusters on one of our HPC clusters and I was wondering if people have had success with builds, depending on their toolchain.
Without getting into incredible detail of all the things I’ve tried, here is the build script I’ve put together (the modules loaded should be self explanatory). I should note that the CP2k 7.1 tarball was decompressed under /sw/apps/cp2k/7.1-gcc-mpich/.
#!/bin/bash
module load compilers/intel/2019 # for mkl
module load compilers/devtoolset/7 # gcc 7.3.0
module load mpi/mpich/3.0.4-gnu-nodep
module load utility/standard/cmake/3.16.2
mkdir -p /sw/BUILD/scratch/apps/cp2k/build
rm -rf /sw/apps/cp2k/7.1-gcc-mpich/tools/toolchain/build/
rm -rf /sw/apps/cp2k/7.1-gcc-mpich/tools/toolchain/install/
ulimit -s unlimited
export MAKEFLAGS='-j 12'
echo "Installing Toolchain"
cd /sw/apps/cp2k/7.1-gcc-mpich/tools/toolchain
bash install_cp2k_toolchain.sh --with-gcc=system --with-cmake=system --with-libxsmm=install --with-openblas=install --with-mpich=system \
--with-fftw=install --with-libxc=install --with-hdf5=install --with-elpa=install --with-reflapack=no --with-mkl=system --enable-omp --with-libxc=install --with-sirius=install
echo "Copying toolchain build over to arch"
cp /sw/apps/cp2k/7.1-gcc-mpich/tools/toolchain/install/arch/* /sw/apps/cp2k/7.1-gcc-mpich/arch/
#echo "Sourcing toolchain setup"
source /sw/apps/cp2k/7.1-gcc-mpich/tools/toolchain/install/setup
#echo "Building CP2K"
cd /sw/apps/cp2k/7.1-gcc-mpich
make ARCH=local VERSION="sopt sdbg ssmp popt pdbg psmp"
The toolchain builds fine, but I get an internal compiler error during the final build related to gfortran:
Error: The element in the structure constructor at (1), for pointer component ‘’ should be a POINTER or a TARGET
/beegfs/x86_64/sw/apps/cp2k/7.1-gcc-mpich/exts/dbcsr/src/utils/dbcsr_btree.F:31:46:
$:ts
1
Error: Pointer initialization target at (1) must have the SAVE attribute
gfortran: internal compiler error: Killed (program f951)
Note that the error above, may not be 1:1 with the build script I shared. It’s just one of cases that come up.
This seems to be related to this error:
[Bug fortran/89219] New: [gfortran 7.3] compiler throws internal compiler error: segmentation fault
I should note I’m trying to build this on a Skylake based nodes (e.g. Intel(R) Xeon(R) Gold 6148 CPU) if this helps with suggestions.
I’ve tried a newer version of GCC, as well as our system builds of OpenMPI, with all varying degrees of errors. Just wanted to some suggestions from folks who’ve had success building this program! Thanks!