Compilation errors of CP2K on ubuntu

126 views
Skip to first unread message

Jibiao Li

unread,
Jun 21, 2023, 4:05:20 AM6/21/23
to cp2k
Hi, all

I am new to LINUX and CP2K. I tried to get the code using the command:
git clone -b support/v2023.1 --recursive https://github.com/cp2k/cp2k.git cp2k

then I tried to make the code using the command:
make -j 8 ARCH=Linux-intel-x86_64 VERSION=psmp

but errors appeared:

Resolving dependencies ...
/usr/bin/env python3 /home/jibiaoli/codes/cp2k/exts/dbcsr/tools/build_utils/fypp/bin/fypp -n /home/jibiaoli/codes/cp2k/exts/dbcsr/src/base/dbcsr_machine.F dbcsr_machine.F90
mpiifort -c -O2 -fopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback -xHost -I/home/jibiaoli/codes/cp2k/tools/toolchain/install/libxc-6.0.0/include -I/home/jibiaoli/codes/cp2k/tools/toolchain/install/libxsmm-1.17/include -D__parallel -D__SCALAPACK -D__MKL -D__FFTW3 -D__LIBXSMM -D__MAX_CONTR=4 -D__LIBXC -D__LIBXSMM -I/home/jibiaoli/intel/oneapi/mkl/2022.1.0/include -I/home/jibiaoli/intel/oneapi/mkl/2022.1.0/include/fftw -diag-disable=8291 -diag-disable=8293 -fpp -free -D__SHORT_FILE__="\"dbcsr_machine.F\"" -I'/home/jibiaoli/codes/cp2k/exts/dbcsr/src/base/' -I'/home/jibiaoli/codes/cp2k/exts/dbcsr/src' dbcsr_machine.F90
/home/jibiaoli/codes/cp2k/exts/dbcsr/src/base/dbcsr_machine.F(62): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [LIBXSMM]
      USE libxsmm, ONLY: libxsmm_timer_tick, libxsmm_timer_duration
----------^
/home/jibiaoli/codes/cp2k/exts/dbcsr/src/base/dbcsr_machine.F(67): error #6406: Conflicting attributes or multiple declaration of name.   [LIBXSMM_TIMER_DURATION]
      wt = libxsmm_timer_duration(0_int_8, libxsmm_timer_tick())
-----------^
/home/jibiaoli/codes/cp2k/exts/dbcsr/src/base/dbcsr_machine.F(62): error #6580: Name in only-list does not exist or is not accessible.   [LIBXSMM_TIMER_TICK]
      USE libxsmm, ONLY: libxsmm_timer_tick, libxsmm_timer_duration
-------------------------^
/home/jibiaoli/codes/cp2k/exts/dbcsr/src/base/dbcsr_machine.F(62): error #6580: Name in only-list does not exist or is not accessible.   [LIBXSMM_TIMER_DURATION]
      USE libxsmm, ONLY: libxsmm_timer_tick, libxsmm_timer_duration
---------------------------------------------^
compilation aborted for dbcsr_machine.F90 (code 1)
make[4]: *** [/home/jibiaoli/codes/cp2k/exts/build_dbcsr//Makefile:258: dbcsr_machine.o] Error 1
make[3]: *** [/home/jibiaoli/codes/cp2k/exts/build_dbcsr/Makefile:179: libdbcsr] Error 2
make[2]: *** [/home/jibiaoli/codes/cp2k/exts/Makefile.inc:38: dbcsr] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/jibiaoli/codes/cp2k/Makefile:128: psmp] Error 2
make: *** [Makefile:123: all] Error 2

Your help is highly required!

Regards

Jibiao Li
Chongqing, China

Jibiao Li

unread,
Jun 21, 2023, 4:19:22 AM6/21/23
to cp2k
 Hi, all

I just found that the file under /home/jibiaoli/codes/cp2k/exts/dbcsr/src/base is "dbcsr_machine.F" rather than "dbcsr_machine.F90". So I changed to the file name from the former to the latter. 
Now I try to run the command :  make -j 8 ARCH=Linux-intel-x86_64 VERSION=psmp

It gives the following message:
Discovering programs ...
make -C /home/jibiaoli/codes/cp2k/exts/dbcsr -f /home/jibiaoli/codes/cp2k/exts/build_dbcsr/Makefile \
   ARCHFILE=/home/jibiaoli/codes/cp2k/arch/Linux-intel-x86_64.psmp \
   LIBDIR=/home/jibiaoli/codes/cp2k/lib/Linux-intel-x86_64/psmp/exts/dbcsr \
   OBJDIR=/home/jibiaoli/codes/cp2k/obj/Linux-intel-x86_64/psmp/exts/dbcsr \
   USE_ACCEL="" \
   ACC="" \
   ACCFLAGS=""
Removing stale archives for psmp ...
Resolving dependencies for psmp ...
Removing stale archives ...
Resolving dependencies ...
makedep error: Circular package dependency: libdbcsr -> libdbcsr -> libdbcsr
make[3]: *** [/home/jibiaoli/codes/cp2k/exts/build_dbcsr/Makefile:228: makedep] Error 1

make[2]: *** [/home/jibiaoli/codes/cp2k/exts/Makefile.inc:38: dbcsr] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/jibiaoli/codes/cp2k/Makefile:128: psmp] Error 2
make: *** [Makefile:123: all] Error 2

I need your help to resolve this problem as I am completely new to LINUX and CP2K.

Regards

Jibiao Li

Matt Watkins

unread,
Jun 21, 2023, 5:14:00 AM6/21/23
to cp2k
Hi,
quick suggestions to check before looking any deeper:
(i) clean your distribution (make distclean) so there are no old files left around
(ii) update files (git pull) just in case
then try again.
Matt

fabia...@gmail.com

unread,
Jun 21, 2023, 5:17:20 AM6/21/23
to cp2k
Hi Jibiao,

You are missing some libraries that cp2k depends on. I suggest you read the howto
and follow it step by step.

Also, you should not rename any source files as that will break the compilation.

Cheers,
Fabian

Jibiao Li

unread,
Jun 21, 2023, 8:48:59 PM6/21/23
to cp...@googlegroups.com
Hi, Matt

I updated the files by using git pull. The error disappeared. However the command "make -j 104 ARCH=local VERSION="ssmp sdbg psmp pdbg"" ran into another error in the end :

... ...  
-L/home/jibiaoli/intel/oneapi/mkl/2022.1.0/lib/intel64 -Wl,-rpath,/home/jibiaoli/intel/oneapi/mkl/2022.1.0/lib/intel64  -Wl,--start-group -lmkl_gf_lp64 -lmkl_sequential -lmkl_core  -Wl,--end-group -lpthread -lm -ldl -lvori -lstdc++ -lstdc++
cd /home/jibiaoli/codes/cp2k/exe/local; ln -sf cp2k.ssmp cp2k_shell.ssmp
cd /home/jibiaoli/codes/cp2k/exe/local; ln -sf cp2k.ssmp cp2k.sopt
make: *** [Makefile:123: all] Error 2

Your help is highly required to remove the errors

Regards

Jibiao Li

--
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/b0210cd6-1c2a-467c-a050-39d5ad9d4c43n%40googlegroups.com.

Matt Watkins

unread,
Jun 22, 2023, 3:00:34 AM6/22/23
to cp2k
Please follow Fabien's suggestion.
You should see some actual error message earlier in the output. As Fabien suggests, you probably need to install some libraries.

Reply all
Reply to author
Forward
0 new messages