CP2K non zero-code detected

267 views
Skip to first unread message

Moser Mario

unread,
Mar 14, 2022, 2:02:23 PM3/14/22
to cp2k
Hello dear cp2k users,
im encountering a problem when trying to install the latest version of CP2K 9.1, i get  an  error message when using the  sudo /.install_cp2k_toolchain.sh.

Do you know what i could do to fix this ? (configure.log file attached)
these are the last few lines of the log file :

checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for ranlib... (cached) ranlib
checking for ocamlbuild... no
checking for mpicc... mpicc
checking for MPI_Init... no
checking for MPI_Init in -lmpi... no
checking for MPI_Init in -lmpich... no
configure: error: could not find mpi library for --enable-mpi

Im trying to install GROMACS/CP2K interface to be able to perform QM/MM biomolecular simulations but im stuck on installation...

Best regards looking forward to any advice you could give me.

Mario
configure.log
sudo_install_nonzero.png

Krack Matthias (PSI)

unread,
Mar 15, 2022, 4:32:48 AM3/15/22
to cp...@googlegroups.com

Hi Mario

 

Instead of the system installation, you can try to install mpich (or openmpi) with the toolchain by adding the flag --with-mpich=install (or --with-openmpi=install).

 

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/25222b36-3c80-4e98-acef-eedcc8336f48n%40googlegroups.com.

Moser Mario

unread,
Mar 21, 2022, 6:44:11 PM3/21/22
to cp2k
Thank you very much that actually helped.

I had a successfull toolchain script message at the end (attached).
So now i created a cp2k/arch directory in my /home/moser and i was about to proceed and follow the steps after the toolchain script.
But to build cp2k you have to enter this :  make –j 16 ARCH=Linux-x86-64-gfortran VERSION=popt but -j# gives the number of cpu cores and i
would like to use cp2k with gpu (my goal is to install CP2K first then link it with GROMACS to have the new GROMACS/CP2K interface from CP2K 9.1)

where i have to enter all these instructions (is it in prompt or do i have to modify a file ?). Also is it necessary to do all of this if i want to perform gpu calculations with GROMACS/CP2K
or after linking GROMACS with CP2K i will be able to use gpu with standard GROMACS commands ?

Sorry for the troubles, im not used to install QM softwares.

Best regards.

Mario
toolchain_script_great_success.png

Krack Matthias (PSI)

unread,
Mar 22, 2022, 5:05:53 AM3/22/22
to cp...@googlegroups.com

Hi Mario

 

If you want to build CP2K with GPU support enabled, then you have to specify that already with the install_cp2k_toolchain.sh command by adding the appropriate flags like –enable-cuda and/or ---gpu-ver=<your GPU>. The arch files for the make run will then be created for such a target platform.

 

HTH

 

Matthias

Moser Mario

unread,
Mar 22, 2022, 9:53:23 AM3/22/22
to cp2k
Hello again,
i tried and it doesn't work i get error messages when using --enable-cuda  (i enter : sudo ./install_cp2k_toolchain.sh  --enable-cuda), it says i have to specify "--gpu-ver".
In the list of gpu options i don't know which one to use (i have a 2080Ti at the lab) but i don't know how to find out which one has a similar architecture with it ( Available options are: K20X, K40, K80, P100, V100, Mi50, Mi100, no.).
I can't chose "no" option because the script literally says "if Cuda = true and gpu-ver = no, then exit".

Best regards.

Mario

Krack Matthias (PSI)

unread,
Mar 22, 2022, 10:15:49 AM3/22/22
to cp...@googlegroups.com

Hi

 

You can try V100 (though you have Turing GPU). No clue, if that will work. I suggest to compile without GPU support in the first step. If you have just one consumer graphics card, it is most likely not worth the effort.

Moser Mario

unread,
Mar 22, 2022, 11:01:49 AM3/22/22
to cp2k
I just did , it started fine but i ended up with my initial problem that is : CP2K non zero-code detected   (configure.log attached)
i understand what you mean but i really need to be able to install with gpu because my next step after successfully running it on my station with the Turing GPU(i want to do some tutorials before trying out bigger systems)
 i will need to install this on a GPU cluster that have nvidia A4 cards.

So you reckon i can compile it with cpu only and still link it to gromacs after ? (im really looking forward to be able to do simulations, i hope we can find a solution)
configure.log

Krack Matthias (PSI)

unread,
Mar 22, 2022, 11:28:21 AM3/22/22
to cp...@googlegroups.com

It’s strange that you get again the same error. Did you add the –with-mpich=install flag?

I would first try to get a CPU version of CP2K alone and then one with GROMACS working before building with GPU support.

 

M.

Message has been deleted
Message has been deleted

Moser Mario

unread,
Mar 22, 2022, 2:26:04 PM3/22/22
to cp2k
My last tentative using sudo ./install_cp2k_toolchain.sh  --enable-cuda --gpu-ver=V100 --with-openmpi=install
resulted with Non-zero error again, log file attached this is the main problem i reckon  : nvcc fatal   : redefinition of argument 'std'

Did you ever stumble upon that error, would you know how to fix this ?

Thanks again for your time and help.

Mario
CMakeOutput.log
unknown.png
CMakeError.log
Reply all
Reply to author
Forward
Message has been deleted
0 new messages