Hi,<br><br>I'm compiling cp2k 4.1 with CUDA 8.0 using gnu compiler gfortran 4.8.5 on a CentOS 7.3 machine.<br>For the compilation going on smoothly, I have made some modifications to the relevant source <br>code:<br>1. change syncthreads() to __syncthreads()<br>2. added condition to support native atomicAdd() in CUDA 8.0<br>3. change FFT_ALIGNMENT to CUFFT_COMPATIBILITY_FFTW_PADDING<br><br>The compilation went almost OK, except the last step of creating cp2k.ssmp. I got following error.<br>Actually, all undefined references are defined in pw/pw_cuda.F, am I wrong somewhere in my <br>configuration (refer to the attached)? <br><br>Thanks in advance!<br><br>PS: I can run dbcsr_unittest.ssmp, libcusmm_unittest.ssmp without any problem.<br><br>Huiqun Zhou<br>@Earth Sciences, Nanjing University, China<br><br>======================= snippet of screen output ==========================================<br>gfortran -I/usr/local/include -I/usr/local/cuda/include -I/usr/local/libint/include -I/usr/local/libxc/include -D__GRID_CORE=2 -D__PILAENV_BLOCKSIZE=1024 -D__ACC -D__DBCSR_ACC -D__PW_CUDA -D__LIBXC2 -D__LIBINT -D__LIBINT_MAX_AM=6 -D__LIBDERIV_MAX_AM1=5 -D__MAX_CONTR=4 -O2 -ffast-math -ffree-form -ffree-line-length-none -fopenmp -ftree-vectorize -funroll-loops -mtune=native -I/usr/local/include -I/usr/local/cuda/include -I/usr/local/libint/include -I/usr/local/libxc/include -D__COMPILE_ARCH="\"unclecuda-gnu\"" -D__COMPILE_DATE="\"Thu Jul 27 14:08:24 CST 2017\"" -D__COMPILE_HOST="\"unclecuda\"" -D__COMPILE_REVISION="\"svn:17462\"" -D__DATA_DIR="\"/home/zhou_huiqun/Cookplate/cp2k-4.1/data\"" -L/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp -o /home/zhou_huiqun/Cookplate/cp2k-4.1/exe/unclecuda-gnu/cp2k.ssmp cp2k.o  -lcp2kstart -lcp2kmc -lcp2kswarm -lcp2kmotion -lcp2kthermostat -lcp2kemd -lcp2ktmc -lcp2kmain -lcp2keri_mme -lcp2kminimax -lcp2khfxbase -lcp2ksubsys -lcp2kxc -lcp2kao -lcp2kinput -lcp2kpw -lcp2kpwcuda -lcp2kfft -lcp2kdbcsrwrap -ldbcsr -ldbcsrarnoldi -ldbcsrvec -ldbcsrmm -ldbcsrops -ldbcsrbblock -ldbcsrbdist -ldbcsrbase -ldbcsrdata -ldbcsrerr -lmicsmm -lclsmm -lcusmm -lcp2kacc -lcp2kaccmic -lcp2kaccopencl -lcp2kacccuda -lcp2kfm -lcp2kcommon -lcp2kmpiwrap -lcp2kgrid -lcp2kbase -L/usr/local/cuda/lib64 -lcudart -lcublas -lcufft -lrt /usr/lib64/libopenblas.a /usr/local/libxc/lib/libxcf90.a /usr/local/libxc/lib/libxc.a /usr/local/libint/lib/libderiv.a /usr/local/libint/lib/libint.a<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_f':<br>pw_cuda.F:(.text+0x6c): undefined reference to `pw_cuda_f_z_'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_sf':<br>pw_cuda.F:(.text+0x1ef): undefined reference to `pw_cuda_sf_z_'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_fg':<br>pw_cuda.F:(.text+0x36e): undefined reference to `pw_cuda_fg_z_'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_c1dr3d_3d_ps':<br>pw_cuda.F:(.text+0x3673): undefined reference to `pw_cuda_fc_z_'<br>pw_cuda.F:(.text+0x3b6e): undefined reference to `pw_cuda_ffc_z_'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_r3dc1d_3d_ps':<br>pw_cuda.F:(.text+0x6ca5): undefined reference to `pw_cuda_cf_z_'<br>pw_cuda.F:(.text+0x7336): undefined reference to `pw_cuda_cff_z_'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_c1dr3d_3d':<br>pw_cuda.F:(.text+0x779c): undefined reference to `pw_cuda_sfffc_z_'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_r3dc1d_3d':<br>pw_cuda.F:(.text+0x79d0): undefined reference to `pw_cuda_cfffg_z_'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_init':<br>pw_cuda.F:(.text+0x7a55): undefined reference to `pw_cuda_init'<br>/home/zhou_huiqun/Cookplate/cp2k-4.1/lib/unclecuda-gnu/ssmp/libcp2kpw.a(pw_cuda.o): In function `__pw_cuda_MOD_pw_cuda_finalize':<br>pw_cuda.F:(.text+0x7a41): undefined reference to `pw_cuda_finalize'<br>collect2: error: ld returned 1 exit status<br><div><tincludetail></tincludetail></div><!--<![endif]-->