Errors in Compiling CP2K 9.1

265 views
Skip to first unread message

Lenard Carroll

unread,
Jun 11, 2024, 7:54:30 AM6/11/24
to cp2k
Good day, I am trying to compile CP2K 9.1 for use with an AIMD Ryzen-3960X and 2 RTX 3070 Ti GPUs. Ubuntu 20.04

I started off by editing the install_cp2k_toolchain.sh to not use MKL or ELPA. To use OpenMPI, GPU version V100, to enable CUDA and to install a few libraries/packages. Many of them I also compiled manually because I was getting many errors doing it through CP2K's toolchain. I am including the toolchain file just in case.

Unfortunately I have obtained several errors.

The toolchain process goes smoothly, it is the make process that is not going well:

I have included the output of the make process

local_cuda.psmp
install_cp2k_toolchain.sh
makefile_output.txt

Lenard Carroll

unread,
Jun 11, 2024, 8:04:13 AM6/11/24
to cp2k
To add on to this:
I did not alter the arch files and this is via WSL Ubuntu 20.04

Frederick Stein

unread,
Jun 11, 2024, 8:13:42 AM6/11/24
to cp2k
Dear Lenard,
The Toolchain script has several options which you may check by running "./install_cp2k_toolchain.sh -h". It should tell you that you can turn off features such as MKL or ELPA with flags like "--with-mkl=no" or "--with-elpa=no". I kindly ask you to consider the other available options as well.
If you have rerun the original toolchain script setting the relevant options, post the respective commands+outputs here, if it still fails.
Best,
Frederick

Lenard Carroll

unread,
Jun 11, 2024, 8:16:57 AM6/11/24
to cp2k
Hi Frederick

I have done this before, but the .sh script wouldn't accept my arguments. I will try this with version 9.1 again, and post the update

Frederick Stein

unread,
Jun 11, 2024, 8:19:03 AM6/11/24
to cp2k
What does it print?
Why do you actually stick to version 9.1? There is already a version 2024.1.

Lenard Carroll

unread,
Jun 11, 2024, 8:31:07 AM6/11/24
to cp2k
I am sticking to version 9.1 for consistency purposes with other work I have done, and because I have managed to compile it before. The newest version gave me problems with arguments in the bash file, not 9.1.

For what it prints, it complained about any argument I would use, such as --gpu-ver=V100 or --enable-cuda=yes

Frederick Stein

unread,
Jun 11, 2024, 8:51:47 AM6/11/24
to cp2k
Firstly, what is the actual system configuration? Is it a native Ubuntu or a subsytem like Ubuntu under WSL? I am asking because of the "/mnt/c" path. If it is WSL, can you copy/move the files to your subsystem directory like your home or a scratch directory?

Secondly, what was the exact run command to start the toolchain (not a description)? What was the exact output (not a description)?

Thirdly, I do not recommend to run your code on a consumer GPU like an RTX card. They perform well with single precision numbers but are not better than CPUs in case of double precision operations which are employed in 99 % of the cases of CP2K. This means, we usually do not expect a performance boost on consumer GPUs in contrast to high-performance GPUs.

Frederick Stein

unread,
Jun 11, 2024, 8:53:33 AM6/11/24
to cp2k
Sorry, I haven't read the WSL, but can you just move the files to your home directory insteady of your host system? Maybe our toolchain script was not ready for WSL at that time. I can run everything under WSL on my machine.

Krack Matthias

unread,
Jun 11, 2024, 9:17:09 AM6/11/24
to cp...@googlegroups.com

Hi

 

The How to Compile CP2K on Windows was introduced and tested for the first time with CP2K version 2023.2 under Windows10 (22H2) using Ubuntu 22.04 with WSL. This does not mean that earlier versions won’t work, but there is a high probability to encounter problems. Building a parallel CP2K binary with GPU support using WSL might cause further problems and, as already said, it will not pay back performance-wise with a consumer graphics card.

 

Best

 

Matthias

 

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/016f4290-8e73-49a6-a40d-3bc901803fa7n%40googlegroups.com.

Lenard Carroll

unread,
Jun 11, 2024, 10:37:53 AM6/11/24
to cp2k
I have now avoided editing the bash file, and went with the following:
./install_cp2k_toolchain.sh -j 20 --mpi-mode=openmpi --math-mode=openblas --with-gcc=system --with-intel=no --with-cmake=system --with-openmpi=system --with-mpich=no --with-intelmpi=no --with-openblas=system --with-elpa=no --with-spfft=system --with-spla=system --with-cosma=system --with-mkl=no

make -j 20 ARCH=local VERSION="psmp"

I have also gone with version 2024.1

I installed it in home. The compilation does not succeed, and I get the error messages attached
errors.txt

Frederick Stein

unread,
Jun 11, 2024, 10:44:18 AM6/11/24
to cp2k
Make cannot find the COSMA library. You have told the toolchain to pick it up from your system. You have to add the respective paths either to your PATH variable or to your arch file or, if you do not want to use COSMA, remove the "-D__COSMA" flag from your arch files and recompile.

Lenard Carroll

unread,
Jun 11, 2024, 10:53:47 AM6/11/24
to cp2k
I assumed it would find the path immediately, since it is in my bashrc. In any case, I am now recompiling but letting cp2k install cosma

Lenard Carroll

unread,
Jun 13, 2024, 2:14:24 AM6/13/24
to cp2k
I have managed to compile it. I compiled it in home, removed the GPU information and had CP2K compile cosma for me:

/install_cp2k_toolchain.sh -j 20 --mpi-mode=openmpi --math-mode=openblas --with-gcc=system --with-intel=no --with-cmake=system --with-openmpi=system --with-mpich=no --with-intelmpi=no --with-openblas=system --with-elpa=no --with-spfft=system --with-spla=system --with-cosma=system --with-mkl=no

Thank you.
Reply all
Reply to author
Forward
0 new messages