# modules: CrayGNU cray-fftw cray-python cudatoolkit 
GPUVER   = P100
NVCC     = nvcc
CC       = cc
CPP      = 
FC       = ftn
LD       = ftn
AR       = ar -r

CP2K_ROOT=/scratch/snx3000/hjudge/CP2K/build

DFLAGS   = -D__FFTW3 -D__parallel -D__SCALAPACK -D__ACC -D__DBCSR_ACC -D__LIBINT -D__GFORTRAN -D__HAS_smm_dnn -D__LIBXC -D__ELPA
CFLAGS   = $(DFLAGS)  -I$(CRAY_CUDATOOLKIT_DIR)/include -g -O3 -mavx -fopenmp
CXXFLAGS = $(CFLAGS)
FCFLAGS  = $(DFLAGS) -O3 -mavx -fopenmp -funroll-loops -ftree-vectorize -ffree-form -ffree-line-length-512
FCFLAGS  += -I$(CP2K_ROOT)/libs/libint/include 
FCFLAGS  += -I$(CP2K_ROOT)/libs/libxc/include -I$(CP2K_ROOT)/libs/elpa-openmp/include/elpa_openmp-2020.05.001/modules -I$(CP2K_ROOT)/libs/elpa-openmp/include/elpa_openmp-2020.05.001/elpa
LDFLAGS  = $(FCFLAGS)
NVFLAGS  = $(DFLAGS) -O3 -arch sm_60
LIBS   	 = -lfftw3 -lfftw3_threads -lcudart -lcublas -lcufft -lrt -lnvrtc
LIBS     += -L$(CP2K_ROOT)/libs/elpa-openmp/lib -lelpa_openmp
LIBS     += -L$(CP2K_ROOT)/libs/libint/lib -lint2 -lstdc++ 
LIBS     += -L$(CP2K_ROOT)/libs/libxc/lib -lxcf03 -lxc
LIBS     += /apps/common/UES/easybuild/sources/c/CP2K/libsmm_dnn_cray.gnu.a
