Building Cp2k with NVIDIA HPC SDK

134 views
Skip to first unread message

jona...@hotmail.com

unread,
Jul 28, 2025, 2:52:36 PM7/28/25
to cp2k
I'm trying to build cp2k with NVIDIA HPC SDK using this toolchain command:" 
./install_cp2k_toolchain.sh --install-all --with-tblite=no --with-ace=no --with-gcc=no --math-mode=openblas --mpi-mode=openmpi --enable-cuda --gpu-ver=A100 --target-cpu=znver2 -j 32". 
Everything installs well except ELPA. ELPA's configure script has an internal flag:"with_cuda_sdk_path" which should detect the SDK from my build environment:" export MODULEPATH=/opt/nvidia/hpc_sdk/modulefiles:$MODULEPATH
module load nvhpc/25.3" via the toolchain --enable-cuda. 

However, it does not find cublas as shown in the following error:" checking for library containing cublasDgemm... no
configure: error: Could not link cublas; try to set the cuda-path or disable Nvidia GPU support". 

The only reason for this as I can see is that ELPA does not know to look inside math_libs/lib64, which is wired as it should for SDK. I have confirmed that libcublas.so are present there and not in cuda/lib64, and have confirmed that my build environment are pointing to both the lib64 files. 

Would appreciate all the help I can get to solve this! :) 

Best regards,
Jonas Båtnes

jona...@hotmail.com

unread,
Jul 28, 2025, 2:57:39 PM7/28/25
to cp2k
Or maybe my assumption are wrong. 
Is it possible to build Cp2k with standard cuda-12.8 and afterwards build and link Gromacs with NVIDIA HPC SDK?

Frederick Stein

unread,
Jul 29, 2025, 5:09:13 AM7/29/25
to cp2k
Dear Jonas,
AFAICT, CUDA should not be the issue. I am more worried about the NVIDIA toolkit as it is AFAIK not yet possible to build CP2K with NVIDIA HPC SDK and the module files created by GCC are not necessarily compatible with the ones from the NVIDIA compilers. I am not sure how much of CP2K can be compiled and runs flawlessly with the current or even the next version.
Best,
Frederick

朱雀

unread,
Jul 30, 2025, 5:10:49 AM7/30/25
to cp2k
Hello, maybe you should check whether elpa supports GPU compilation
Reply all
Reply to author
Forward
0 new messages