diff --git a/src/config/makefile.h b/src/config/makefile.h index debd12086c..f7b138972f 100644 --- a/src/config/makefile.h +++ b/src/config/makefile.h @@ -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 $% $< diff --git a/src/tce/ttlg/GNUmakefile b/src/tce/ttlg/GNUmakefile index 7979e89d74..b070738c5d 100644 --- a/src/tce/ttlg/GNUmakefile +++ b/src/tce/ttlg/GNUmakefile @@ -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 \ No newline at end of file +#endif