|
|
|
@ -665,7 +665,6 @@ CUDA_INCLUDES
|
|
|
|
|
CUDA_DEFINES
|
|
|
|
|
CUDA_DIR
|
|
|
|
|
EXTRALDLIBS
|
|
|
|
|
SPGPU_DEFINES
|
|
|
|
|
SPGPU_LIBS
|
|
|
|
|
SPGPU_FLAGS
|
|
|
|
|
METISINCFILE
|
|
|
|
@ -1533,7 +1532,7 @@ Optional Packages:
|
|
|
|
|
--with-amddir=DIR Specify the directory for AMD library and includes.
|
|
|
|
|
--with-amdincdir=DIR Specify the directory for AMD includes.
|
|
|
|
|
--with-amdlibdir=DIR Specify the directory for AMD library.
|
|
|
|
|
--with-cuda=DIR Specify the directory for CUDA library and includes.
|
|
|
|
|
--with-cuda=DIR Specify the CUDA install directory.
|
|
|
|
|
--with-cudacc A comma-separated list of CCs to compile to, for
|
|
|
|
|
example, --with-cudacc=50,60,70,75
|
|
|
|
|
|
|
|
|
@ -10678,7 +10677,7 @@ CPPFLAGS="$SAVE_CPPFLAGS"
|
|
|
|
|
|
|
|
|
|
if test "x$pac_cv_have_cuda" == "xyes"; then
|
|
|
|
|
|
|
|
|
|
ac_ext=c
|
|
|
|
|
ac_ext=c
|
|
|
|
|
ac_cpp='$CPP $CPPFLAGS'
|
|
|
|
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|
|
|
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
|
|
|
@ -10809,17 +10808,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|
|
|
|
LIBS="$SAVE_LIBS"
|
|
|
|
|
CPPFLAGS="$SAVE_CPPFLAGS"
|
|
|
|
|
|
|
|
|
|
CUDA_VERSION="$pac_cv_cuda_version";
|
|
|
|
|
CUDA_SHORT_VERSION=$(expr $pac_cv_cuda_version / 1000);
|
|
|
|
|
if test "x$pac_cv_have_cuda" == "xyes" ; then
|
|
|
|
|
SPGPU_DEFINES="-DHAVE_SPGPU -DHAVE_GPU";
|
|
|
|
|
CUDA_VERSION="$pac_cv_cuda_version";
|
|
|
|
|
CUDA_SHORT_VERSION=$(expr $pac_cv_cuda_version / 1000);
|
|
|
|
|
HAVE_CUDA="yes";
|
|
|
|
|
SPGPU_LIBS="-lspgpu";
|
|
|
|
|
CUDAD=cudad;
|
|
|
|
|
CUDALD=cudald;
|
|
|
|
|
LCUDA="-lpsb_cuda";
|
|
|
|
|
EXTRALDLIBS="-lstdc++";
|
|
|
|
|
fi
|
|
|
|
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: At this point GPUTARGET is $CUDAD $CUDALD" >&5
|
|
|
|
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: At this point GPUTARGET is $CUDAD $CUDALD" >&5
|
|
|
|
|
printf "%s\n" "$as_me: At this point GPUTARGET is $CUDAD $CUDALD" >&6;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -10833,26 +10830,27 @@ else $as_nop
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if test "x$pac_cv_cudacc" == "x"; then
|
|
|
|
|
pac_cv_cudacc="30,35,37,50,60";
|
|
|
|
|
fi
|
|
|
|
|
CUDEFINES="--dopt=on";
|
|
|
|
|
for cc in `echo $pac_cv_cudacc|sed 's/,/ /gi'`
|
|
|
|
|
do
|
|
|
|
|
CUDEFINES="$CUDEFINES -gencode arch=compute_$cc,code=sm_$cc";
|
|
|
|
|
done
|
|
|
|
|
if test "x$pac_cv_cuda_version" != "xunknown"; then
|
|
|
|
|
CUDEFINES="$CUDEFINES -DCUDA_SHORT_VERSION=${CUDA_SHORT_VERSION} -DCUDA_VERSION=${CUDA_VERSION}"
|
|
|
|
|
FDEFINES="$FDEFINES -DCUDA_SHORT_VERSION=${CUDA_SHORT_VERSION} -DCUDA_VERSION=${CUDA_VERSION}"
|
|
|
|
|
CDEFINES="$CDEFINES -DCUDA_SHORT_VERSION=${CUDA_SHORT_VERSION} -DCUDA_VERSION=${CUDA_VERSION}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test "x$pac_cv_cudacc" == "x"; then
|
|
|
|
|
pac_cv_cudacc="50,60,70,75";
|
|
|
|
|
CUDA_CC="$pac_cv_cudacc";
|
|
|
|
|
fi
|
|
|
|
|
CUDEFINES="--dopt=on";
|
|
|
|
|
for cc in `echo $pac_cv_cudacc|sed 's/,/ /gi'`
|
|
|
|
|
do
|
|
|
|
|
CUDEFINES="$CUDEFINES -gencode arch=compute_$cc,code=sm_$cc";
|
|
|
|
|
done
|
|
|
|
|
if test "x$pac_cv_cuda_version" != "xunknown"; then
|
|
|
|
|
CUDEFINES="$CUDEFINES -DCUDA_SHORT_VERSION=${CUDA_SHORT_VERSION} -DCUDA_VERSION=${CUDA_VERSION}"
|
|
|
|
|
FDEFINES="$FDEFINES -DCUDA_SHORT_VERSION=${CUDA_SHORT_VERSION} -DCUDA_VERSION=${CUDA_VERSION}"
|
|
|
|
|
CDEFINES="$CDEFINES -DCUDA_SHORT_VERSION=${CUDA_SHORT_VERSION} -DCUDA_VERSION=${CUDA_VERSION}"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test "x$pac_cv_ipk_size" != "x4"; then
|
|
|
|
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: For CUDA I need psb_ipk_ to be 4 bytes but it is $pac_cv_ipk_size, disabling CUDA/SPGPU" >&5
|
|
|
|
|
printf "%s\n" "$as_me: For CUDA I need psb_ipk_ to be 4 bytes but it is $pac_cv_ipk_size, disabling CUDA/SPGPU" >&6;}
|
|
|
|
|
SPGPU_DEFINES="";
|
|
|
|
|
HAVE_CUDA="no";
|
|
|
|
|
CUDA_CC="";
|
|
|
|
|
SPGPU_LIBS="";
|
|
|
|
|
CUDAD="";
|
|
|
|
|
CUDALD="";
|
|
|
|
@ -10921,9 +10919,9 @@ UTILLIBNAME=libpsb_util.a
|
|
|
|
|
|
|
|
|
|
PSBLASRULES='
|
|
|
|
|
PSBLDLIBS=$(LAPACK) $(BLAS) $(METIS_LIB) $(AMD_LIB) $(LIBS)
|
|
|
|
|
CXXDEFINES=$(PSBCXXDEFINES) $(SPGPU_DEFINES) $(CUDA_DEFINES)
|
|
|
|
|
CDEFINES=$(PSBCDEFINES) $(SPGPU_DEFINES) $(CUDA_DEFINES)
|
|
|
|
|
FDEFINES=$(PSBFDEFINES) $(SPGPU_DEFINES) $(CUDA_DEFINES)
|
|
|
|
|
CXXDEFINES=$(PSBCXXDEFINES) $(CUDA_DEFINES)
|
|
|
|
|
CDEFINES=$(PSBCDEFINES) $(CUDA_DEFINES)
|
|
|
|
|
FDEFINES=$(PSBFDEFINES) $(CUDA_DEFINES)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# These should be portable rules, arent they?
|
|
|
|
@ -10957,7 +10955,6 @@ FDEFINES=$(PSBFDEFINES) $(SPGPU_DEFINES) $(CUDA_DEFINES)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
@ -12290,6 +12287,9 @@ fi
|
|
|
|
|
FCOPT : ${FCOPT}
|
|
|
|
|
CCOPT : ${CCOPT}
|
|
|
|
|
|
|
|
|
|
CUDA : ${HAVE_CUDA}
|
|
|
|
|
CUDA_CC : ${CUDA_CC}
|
|
|
|
|
|
|
|
|
|
BLAS : ${BLAS_LIBS}
|
|
|
|
|
|
|
|
|
|
METIS usable : ${psblas_cv_have_metis}
|
|
|
|
@ -12320,6 +12320,9 @@ printf "%s\n" "$as_me:
|
|
|
|
|
FCOPT : ${FCOPT}
|
|
|
|
|
CCOPT : ${CCOPT}
|
|
|
|
|
|
|
|
|
|
CUDA : ${HAVE_CUDA}
|
|
|
|
|
CUDA_CC : ${CUDA_CC}
|
|
|
|
|
|
|
|
|
|
BLAS : ${BLAS_LIBS}
|
|
|
|
|
|
|
|
|
|
METIS usable : ${psblas_cv_have_metis}
|
|
|
|
|