cuda compilation updates

This commit is contained in:
Edoardo Apra 2017-11-18 01:38:40 +00:00
parent 6c2f2deba8
commit 7e629ca369
2 changed files with 10 additions and 4 deletions

View file

@ -2707,8 +2707,14 @@ else
CUDA_ARCH = -arch=sm_35
endif
CUDA_FLAGS = -O3 -Xcompiler -std=c++11 -DNOHTIME -Xptxas --warn-on-spills $(CUDA_ARCH)
ifdef TCE_CUDA
CUDA_VERS_GE8=$(shell nvcc --version|egrep rel| awk '/release 9/ {print "Y";exit}; /release 8/ {print "Y";exit};{print "N"}')
ifeq ($(CUDA_VERS_GE8),N)
CUDA_FLAGS = -O3 -Xcompiler -std=c++11 -DNOHTIME -Xptxas --warn-on-spills $(CUDA_ARCH)
else
CUDA_FLAGS = -O3 -std=c++11 -DNOHTIME -Xptxas --warn-on-spills $(CUDA_ARCH)
endif
endif
(%.o): %.cu
$(CUDA) -c $(CUDA_FLAGS) $(CUDA_INCLUDE) -I$(NWCHEM_TOP)/src/tce/ttlg/includes -o $% $<

View file

@ -1,4 +1,4 @@
MAKEFLAGS +=" -j1 -l0.001"
#ifdef TCE_CUDA # not really needed, but keep the guard for now.
OBJ_OPTIMIZE = fvimatchl32.o fvimatchg32_blocking.o \
@ -23,4 +23,4 @@ HEADERS =
include ../../config/makefile.h
include ../../config/makelib.h
#endif
#endif