CP2K 4.0-dev version compilation fail with CUDA (cannot find -lcudart -lcufft -lcublas)

Yongchul G. Chung yxc... at case.edu
Thu May 26 02:44:46 UTC 2016


I am trying to install cuda-enabled version of CP2K on CentOS 7.2. My 
machine has NVIDIA Quadro M4000 8GB and dual Intel xenon E5-2640 v3.

I am using toolchain script to install dependency libraries with the 
following command.

./install_cp2k_toolchain.sh --enable-cuda=yes

After the dependencies install successfully, I get the following prompt.

Now copy:
  cp /home/nexus/cp2k/cp2k/tools/toolchain/install/arch/* to the cp2k/arch/ 
To use the installed tools and libraries and cp2k version
compiled with it you will first need to execute at the prompt:
  source /home/nexus/cp2k/cp2k/tools/toolchain/install/setup
To build CP2K you should change directory:
  cd cp2k/makefiles/
  make -j 16 ARCH=local VERSION="sopt sdbg ssmp"

arch files for GPU enabled CUDA versions are named "local_cuda.*"
arch files for valgrind versions are named "local_valgrind.*"
arch files for coverage versions are named "local_coverage.*"

After copying the generated arch files and issuing source 
/home/nexus/cp2k/cp2k/tools/toolchain/install/setup, I go to the makefile 
directory and issue the following command which results in an error.

>> make -j 16 ARCH=local_cuda VERSION=ssmp

gfortran -c -march=native -fno-omit-frame-pointer -g -O3 -funroll-loops 
-ffast-math  -fopenmp  
-ffree-form -std=f2003 -fimplicit-none  -Werror=aliasing -Werror=ampersand 
-Werror=c-binding-type -Werror=intrinsic-shadow -Werror=intrinsics-std 
-Werror=line-truncation -Werror=tabs -Werror=realloc-lhs-all 
-Werror=target-lifetime -Werror=underflow -Werror=unused-but-set-variable 
-Werror=unused-variable -Werror=unused-dummy-argument -Werror=conversion 
-Werror=uninitialized -Wno-maybe-uninitialized   -D__ACC -D__DBCSR_ACC 
-D__LIBDERIV_MAX_AM1=5 -D__LIBXC   -D__COMPILE_ARCH="\"local_cuda\"" 
-D__COMPILE_DATE="\"Thu May 26 11:32:39 KST 2016\"" 
/usr/bin/ld: cannot find -lcudart
/usr/bin/ld: cannot find -lcufft
/usr/bin/ld: cannot find -lcublas
collect2: error: ld returned 1 exit status
make[3]: *** [/home/nexus/cp2k/cp2k/exe/local_cuda/libcusmm_unittest.ssmp] 
Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [ssmp] Error 2
make: *** [all] Error 2
[nexus at localhost makefiles]$ 

Note that I was able to compile binary without CUDA support (make -j 16 
ARCH=local VERSION=ssmp), but it looks like there is something wrong with 
CUDA support. This probably has to do with the location of dependency 
libraries (or lack there of?), but would appreciate if anyone can help me 
with resolving this issue.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20160525/3667b5c4/attachment.htm>

More information about the CP2K-user mailing list