Problem in Compiling CUDA Version of CP2K 4.1

Chi-Duen Poon cdp... at gmail.com
Tue Oct 25 19:27:43 UTC 2016


I have no problem compiling sopt and ssmp of CP2K 4.1 in CentOS 7.2. 
 However, I am getting the following error to add CUDA support.  CUDA is at 
version 8.0.

<command-line>:0:0: warning: "__GNUC_MINOR__" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
1 error detected in the compilation of 
"/tmp/tmpxft_000031e7_00000000-5_libcusmm_part03.cpp4.ii".
make[3]: *** [libcusmm_part03.o] Error 2
/nas02/data/thl/packages/el7/BUILD/x86_64/cp2k-4.1/src/dbcsr/libsmm_acc/libcusmm/./kernels/cusmm_common.h(15): 
error: function "atomicAdd(double *, double)" has already been defined

/nas02/data/thl/packages/el7/BUILD/x86_64/cp2k-4.1/src/dbcsr/libsmm_acc/libcusmm/./kernels/cusmm_common.h(15): 
error: function "atomicAdd(double *, double)" has already been defined

/nas02/data/thl/packages/el7/BUILD/x86_64/cp2k-4.1/src/dbcsr/libsmm_acc/libcusmm/./kernels/cusmm_common.h(15): 
error: function "atomicAdd(double *, double)" has already been defined

1 error detected in the compilation of 
"/tmp/tmpxft_0000321b_00000000-5_libcusmm_part05.cpp4.ii".
make[3]: *** [libcusmm_part05.o] Error 2
1 error detected in the compilation of 
"/tmp/tmpxft_000031fc_00000000-5_libcusmm_part04.cpp4.ii".
make[3]: *** [libcusmm_part04.o] Error 2
1 error detected in the compilation of 
"/tmp/tmpxft_00003223_00000000-5_libcusmm_part06.cpp4.ii".
make[3]: *** [libcusmm_part06.o] Error 2
make[2]: *** [all] Error 2
make[1]: *** [ssmp] Error 2
make: *** [all] Error 2

The arch file has the following listing.

CC          = gcc
CXX         = g++
CPP         =
AR          = ar -r
FC          = gfortran
LD          = gfortran
#
DFLAGS      = -D__ACC -D__DBCSR_ACC -D__PW_CUDA  -D__LIBXSMM  -D__FFTW3 
 -D__LIBINT -D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5 -D__LIBXC  
#
WFLAGS      = -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  
#
FCDEBFLAGS  = -ffree-form -std=f2003 -fimplicit-none 
CFLAGS      = -march=native -fno-omit-frame-pointer -g  -O3 -funroll-loops 
-ffast-math $(PROFOPT) -fopenmp $(DFLAGS)
FCFLAGS     = -march=native -fno-omit-frame-pointer -g  -O3 -funroll-loops 
-ffast-math $(PROFOPT) -fopenmp $(FCDEBFLAGS) $(WFLAGS) $(DFLAGS) 
-I'/usr/lib64/gfortran/modules'
#
LDFLAGS     = $(FCFLAGS) -Wl,--enable-new-dtags
CUDAPATH    = /usr/local/cuda/lib64/
LIBS        = -lxsmmf -lxsmm -lxcf90 -lxc -lderiv -lint -lfftw3 -lfftw3_omp 
-lopenblaso -lstdc++ $(CUDAPATH)/libcudart.so $(CUDAPATH)/libcufft.so 
$(CUDAPATH)/libcublas.so -lrt 
#
NVCC        = /usr/local/cuda/bin/nvcc -D__GNUC__=4 -D__GNUC_MINOR__=9 
-Xcompiler=--std=gnu++98
NVFLAGS     = -arch sm_35 $(DFLAGS)

Has anyone seen this before?  If you have, how would you fix the problem? 
 It looks like it has something to do with libcusmm.

CD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20161025/62930387/attachment.htm>


More information about the CP2K-user mailing list