SP: Fixed RAJA makefile templates
Setting runtime directory path works now. Use -Xlinker instead of -Wl
Setting correct CUDA runtime library.
Setting correct RAJA lib directory
RAJA required compiler flags hard-wired into the template for now.
@@ -27,15 +27,20 @@ includedir = @includedir@
libdir = @libdir@
NVCC = @CUDA_NVCC_EXECUTABLE@
-NVCCFLAGS = @CUDA_NVCC_FLAGS@
+NVCCFLAGS =
+RAJAFLAGS = -std=c++11 --expt-extended-lambda
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+CUDALIBS = @CUDA_CUDART_LIBRARY@
+RAJALIBDIR = @RAJA_LIB_DIR@
-#LINKFLAGS = -Wl,-rpath,@libdir@
+INCLUDES_RAJA = @RAJA_INCLUDE_DIR@
+
+LINKFLAGS = -Xlinker ,-rpath,@libdir@
LIBRARIES_BLAS = @BLAS_LIBS@
LIBRARIES_LAPACK = @LAPACK_LIBS@
@@ -49,9 +54,9 @@ LIBRARIES_KLU = @KLU_LIBS@
INCLUDES_PETSC = @PETSC_INCLUDE_DIR@
LIBRARIES_PETSC = @PETSC_LIBRARIES@
-TMP_INCS = ${includedir} ${INCLUDES_SLUMT} ${INCLUDES_KLU} ${INCLUDES_PETSC}
+TMP_INCS = ${includedir} ${INCLUDES_SLUMT} ${INCLUDES_KLU} ${INCLUDES_PETSC} ${INCLUDES_RAJA}
INCLUDES = $(addprefix -I, ${TMP_INCS})
-LIBRARIES = -l@SOLVER_LIB@ -lsundials_nveccuda ${LIBS} ${LIBRARIES_BLAS} ${LIBRARIES_LAPACK} ${LIBRARIES_SLUMT} ${LIBRARIES_KLU} ${LIBRARIES_PETSC}
+LIBRARIES = -l@SOLVER_LIB@ -lsundials_nvecraja -lRAJA ${CUDALIBS} ${LIBS} ${LIBRARIES_BLAS} ${LIBRARIES_LAPACK} ${LIBRARIES_SLUMT} ${LIBRARIES_KLU} ${LIBRARIES_PETSC}
EXAMPLES = @EXAMPLES@ @EXAMPLES_BL@
EXAMPLES_DEPENDENCIES = @EXAMPLES_DEPENDENCIES@
@@ -64,17 +69,17 @@ OBJECTS_DEPENDENCIES = ${EXAMPLES_DEPENDENCIES:=.o}
.SUFFIXES : .o .cu
.c.o :
- ${NVCC} ${CPPFLAGS} ${CXXFLAGS} ${INCLUDES} -c $<
+ ${NVCC} ${CXXFLAGS} ${RAJAFLAGS} ${INCLUDES} -c $<
.cu.o :
- ${NVCC} ${CPPFLAGS} ${CXXFLAGS} ${INCLUDES} -c $<
+ ${NVCC} ${NVCCFLAGS} ${CXXFLAGS} ${RAJAFLAGS} ${INCLUDES} -c $<
# -----------------------------------------------------------------------------------------
all: ${OBJECTS}
@for i in ${EXAMPLES} ; do \
echo "${NVCC} -o $${i} $${i}.o ${OBJECTS_DEPENDENCIES} ${NVCCFLAGS} ${LDFLAGS} ${INCLUDES} -L${libdir} ${LIBRARIES} ${LINKFLAGS}" ; \
- ${NVCC} -o $${i} $${i}.o ${OBJECTS_DEPENDENCIES} ${NVCCFLAGS} ${LDFLAGS} ${INCLUDES} -L${libdir} ${LIBRARIES} ${LINKFLAGS} ; \
+ ${NVCC} -o $${i} $${i}.o ${OBJECTS_DEPENDENCIES} ${NVCCFLAGS} ${LDFLAGS} ${INCLUDES} -L${libdir} -L${RAJALIBDIR} ${LIBRARIES} ${LINKFLAGS} ; \
done
${OBJECTS}: ${OBJECTS_DEPENDENCIES}
