Issue Compiling CP2K(POPT) - MPI + CUDA

349 views
Skip to first unread message

Abhishek Bagusetty

unread,
Oct 10, 2014, 8:46:25 AM10/10/14
to cp...@googlegroups.com
Hi Users and Developers,

I am getting a compile-time error at some of the CUDA instances while building the POPT version of CP2K.

Frank-mpi-cuda/popt/libcp2k_lib.a(cuda_memory.o): In function `cuda_memory_mp_cuda_device_mem_release_':
cuda_memory.f90:(.text+0x12): undefined reference to `fftcu_release_'

make: *** [build] Error 2

I don't understand how to fix this linking issue. It would be great if some one has any suggestions on this . Please find the input file summarized below. Appreciate for your time and effort.

#module purge
#module load intel/2013.0
#module load openmpi/1.8.1-intel
#module load mkl/2013.0/icc-st-openmpi
#module load fftw/3.3.2-intel13
#module load cuda/5.5-rhel
PERL     = perl
CC       = mpicc
CPP      = cpp
NVCC     = nvcc -arch=compute_30
FC       = mpifort
LD       = $(FC)
AR       = ar -r
CFLAGS   = -O2
CPPFLAGS = -traditional -C $(DFLAGS) -P -I$(MKL_ROOT)/include/fftw
DFLAGS   = -D__INTEL -D__FFTSG  -D__parallel -D__SCALAPACK -D__BLACS -D__CUADPW -D__DBCSR_CUDA -D__FFTW3 -D__FFTCU -D__CUBLASDP
FCFLAGS  = $(DFLAGS) -I$(INTEL_INC) -O3 -msse2 -heap-arrays 64 -funroll-loops -fpp -free
NVFLAGS  = $(DFLAGS)
LDFLAGS  = $(FCFLAGS)
INTEL_INC = /opt/sam/intel/composer_xe_2013.0.079/mkl/include
MKLPATH  = $(MKL_ROOT)/lib/intel64
CUDAPATH = /opt/sam/rhel6/cuda/5.5/lib64/
LIBS     = -L$(MKLPATH) \
           $(MKLPATH)/libmkl_rt.so \
           $(MKLPATH)/libmkl_lapack95_lp64.a \
           $(MKLPATH)/libmkl_scalapack_lp64.a \
           $(MKLPATH)/libmkl_intel_lp64.a\
           $(MKLPATH)/libmkl_sequential.a\
           $(MKLPATH)/libmkl_core.a\
           $(MKLPATH)/libmkl_blacs_openmpi_lp64.a \
           $(CUDAPATH)/libcudart.so\
           $(CUDAPATH)/libcufft.so\
           $(CUDAPATH)/libcublas.so\
           $(FFTW_ROOT)/lib/libfftw3f.so.3\
           -lpthread -lrt

OBJECTS_ARCHITECTURE = machine_intel.o


Abhishek


-----------------------------------------------------------------------------------------------------------
Abhishek Bagusetty
PhD Student, Computational Modeling & Simulation
Center for Simulation and Modeling
Department of Chemical & Petroleum Engineering
University of Pittsburgh
Pittsburgh, PA - 15261
Office : 920 Benedum Hall
-----------------------------------------------------------------------------------------------------------

Vedran Miletić

unread,
Nov 4, 2014, 4:55:45 PM11/4/14
to cp...@googlegroups.com
You might be mising -lcufft (and possibly also -lcublas and -lcudart).

Regards,
Vedran Miletić

Andreas Glöss

unread,
Apr 16, 2015, 6:45:11 AM4/16/15
to cp...@googlegroups.com
Please note, besides the missing libraries you have a typo in the preprocessor flags.
It should be: -D__CUDAPW , instead of -D__CUADPW.

I assume you compile a version < 2.6.0, otherwise you will have to use different flags. Please check the INSTALL file for 'CUDA'.

Best regards,
Andreas

Reply all
Reply to author
Forward
0 new messages