Pointers for building under Linux

49 views
Skip to first unread message

Mike Pacey

unread,
Aug 20, 2025, 10:49:22 AMAug 20
to cp2k
Hi folks,

Has anyone managed to get this to build to MPI under Linux and can advise what compiler and MPI versions work (for reference I'm building on Rocky 8)

I've tried various version of Intel MPI, but one of the packages generates an error related to support for the c++17 standard, so I tried to switching to Gnu and OpenMPI

Older version of GNU (8.2.0 and 10.2.) both fail when building ELSA with an error "Your MPI implementation does not provide a sufficient threading level for OpenMP". Building a modern version (OpenMPI 5.0.8 with Gnu 15.2.0) fails with one of packages missing include <cstdint> statements - which seems to be a change in header files from earlier versions.

I'm hoping someone can provide a pointer so I can avoid having to install different versions of GNU until I find one that works!

Frederick Stein

unread,
Aug 20, 2025, 11:01:15 AMAug 20
to cp2k
Dear Mike,
The configurations we use for testing can be checked under https://dashboard.cp2k.org/index.html and https://github.com/cp2k/cp2k/tree/master/tools/docker .
HTH,
Frederick

Konstantin Tokarev

unread,
Aug 20, 2025, 3:10:38 PMAug 20
to cp2k


среда, 20 августа 2025 г. в 17:49:22 UTC+3, Mike Pacey:

Hi Mike,

I'm using build instructions from https://github.com/cp2k/cp2k/blob/master/INSTALL.md

install_cp2k_toolchain.sh script can automatically download and build almost all dependencies of CP2K, including OpenMPI and even GCC itself, which is especially useful when dealing with older Linux distributions on modern hardware.

Mike Pacey

unread,
Aug 21, 2025, 11:38:49 AMAug 21
to cp2k
Thanks to both for the pointers. The dashboard link confirms that I should be able to build with OpenMPI-5.0.8 and GCC 14 so I built GCC 14.3.0 overnight and created a new OpenMPI 5.0.8 built with it. I'm now passed the point I was stalling at previously (ELSA). Still a little way to go (DBSR doesn't seem to like me using MKL) but knowing what build packages have worked for others was the pointer I needed.

Regards,
Mike

Mike Pacey

unread,
Aug 27, 2025, 8:43:31 AM (10 days ago) Aug 27
to cp2k
Back again after some more fettling. I've managed to get the following command to now run without errors:

./install_cp2k_toolchain.sh --mpi-mode=openmpi \
   --libint-lmax=7 

I've then followed the instructions at the end of that run top copy the arch files to the main arch directory, source the recommended file, and then run:

make -j 16 ARCH=local VERSION="ssmp sdbg psmp pdbg"

from the top level directory. That fails almost straight away with:

/mmfs1/shared_apps/packages/src/cp2k-2025.2/exts/Makefile.inc:2: *** "No DBCSR submodule available, please run 'git submodule update --init --recursive'".  Stop.

It looks like I could fix that simply by running the recommended command, but DBCSR was already built as part of the toolchain - I can see files in both ./tools/toolchain/build/dbcsr-2.8.0 and ./tools/toolchain/install/dbcsr-2.8.0, and there's no sign of errors in the log files under ./tools/toolchain/build/dbcsr-2.8.0/build-cpu. So the fact that the Makefile is looking in the wrong place for dbcsr suggests something went wrong with the build?

Reply all
Reply to author
Forward
0 new messages