mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-06 22:55:08 +00:00
Fix configure for OpenACC (added warning message)
This commit is contained in:
@@ -2234,56 +2234,6 @@ AC_HELP_STRING([--with-cudacc], [A comma-separated list of CCs to compile to, fo
|
||||
[pac_cv_cudacc=''])
|
||||
])
|
||||
|
||||
AC_DEFUN(PAC_ARG_WITH_LIBRSB,
|
||||
[SAVE_LIBS="$LIBS"
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
AC_ARG_WITH(librsb,
|
||||
AC_HELP_STRING([--with-librsb], [The directory for LIBRSB, for example,
|
||||
--with-librsb=/opt/packages/librsb]),
|
||||
[pac_cv_librsb_dir=$withval],
|
||||
[pac_cv_librsb_dir=''])
|
||||
|
||||
if test "x$pac_cv_librsb_dir" != "x"; then
|
||||
LIBS="-L$pac_cv_librsb_dir $LIBS"
|
||||
RSB_INCLUDES="-I$pac_cv_librsb_dir"
|
||||
# CPPFLAGS="$GPU_INCLUDES $CUDA_INCLUDES $CPPFLAGS"
|
||||
RSB_LIBDIR="-L$pac_cv_librsb_dir"
|
||||
fi
|
||||
#AC_MSG_CHECKING([librsb dir $pac_cv_librsb_dir])
|
||||
AC_CHECK_HEADER([$pac_cv_librsb_dir/rsb.h],
|
||||
[pac_rsb_header_ok=yes],
|
||||
[pac_rsb_header_ok=no; RSB_INCLUDES=""])
|
||||
|
||||
if test "x$pac_rsb_header_ok" == "xyes" ; then
|
||||
RSB_LIBS="-lrsb $RSB_LIBDIR"
|
||||
# LIBS="$GPU_LIBS $CUDA_LIBS -lm $LIBS";
|
||||
# AC_MSG_CHECKING([for spgpuCreate in $GPU_LIBS])
|
||||
# AC_TRY_LINK_FUNC(spgpuCreate,
|
||||
# [pac_cv_have_spgpu=yes;pac_gpu_lib_ok=yes; ],
|
||||
# [pac_cv_have_spgpu=no;pac_gpu_lib_ok=no; GPU_LIBS=""])
|
||||
# AC_MSG_RESULT($pac_gpu_lib_ok)
|
||||
# if test "x$pac_cv_have_spgpu" == "xyes" ; then
|
||||
# AC_MSG_NOTICE([Have found SPGPU])
|
||||
RSBLIBNAME="librsb.a";
|
||||
LIBRSB_DIR="$pac_cv_librsb_dir";
|
||||
# SPGPU_DEFINES="-DHAVE_SPGPU";
|
||||
LIBRSB_INCDIR="$LIBRSB_DIR";
|
||||
LIBRSB_INCLUDES="-I$LIBRSB_INCDIR";
|
||||
LIBRSB_LIBS="-lrsb -L$LIBRSB_DIR";
|
||||
# CUDA_DIR="$pac_cv_cuda_dir";
|
||||
LIBRSB_DEFINES="-DHAVE_RSB";
|
||||
LRSB=-lpsb_rsb
|
||||
# CUDA_INCLUDES="-I$pac_cv_cuda_dir/include"
|
||||
# CUDA_LIBDIR="-L$pac_cv_cuda_dir/lib64 -L$pac_cv_cuda_dir/lib"
|
||||
FDEFINES="$LIBRSB_DEFINES $psblas_cv_define_prepend $FDEFINES";
|
||||
CDEFINES="$LIBRSB_DEFINES $CDEFINES";#CDEFINES="-DHAVE_SPGPU -DHAVE_CUDA $CDEFINES";
|
||||
fi
|
||||
# fi
|
||||
LIBS="$SAVE_LIBS"
|
||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||
])
|
||||
dnl
|
||||
|
||||
dnl @synopsis PAC_CHECK_CUDA_VERSION
|
||||
dnl
|
||||
|
||||
@@ -653,6 +653,12 @@ ac_subst_vars='am__EXEEXT_FALSE
|
||||
am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
LRSB
|
||||
LIBRSB_DEFINES
|
||||
LIBRSB_DIR
|
||||
LIBRSB_INCDIR
|
||||
LIBRSB_INCLUDES
|
||||
LIBRSB_LIBS
|
||||
LCUDA
|
||||
CUDALD
|
||||
CUDAD
|
||||
@@ -5841,7 +5847,7 @@ fi
|
||||
|
||||
# we just gave the user the chance to append values to these variables
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
@@ -10985,6 +10991,27 @@ fi
|
||||
#FLINK="$FLINK $FCOPENACC";
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
LIBRSB_DIR="$pac_cv_librsb_dir";
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBRSB install dir" >&5
|
||||
printf %s "checking for LIBRSB install dir... " >&6; }
|
||||
case $LIBRSB_DIR in
|
||||
/*) ;;
|
||||
*) esac
|
||||
pac_cv_status_file="$LIBRSB_DIR/librsb.a"
|
||||
if test ! -f "$pac_cv_status_file" ; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
#AC_MSG_ERROR([Could not find an installation in $LIBRSB_DIR.])
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBRSB_DIR" >&5
|
||||
printf "%s\n" "$LIBRSB_DIR" >&6; }
|
||||
RSBTARGETLIB=rsbd;
|
||||
RSBTARGETOBJ=rsbobj;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -11082,6 +11109,12 @@ FDEFINES=$(PSBFDEFINES) $(CUDA_DEFINES)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12422,6 +12455,9 @@ fi
|
||||
CUDA : ${HAVE_CUDA}
|
||||
CUDA_CC : ${pac_cv_cudacc}
|
||||
|
||||
OPENACC : ${pac_cv_openacc}
|
||||
FCOPENACC : ${FCOPENACC}
|
||||
|
||||
BLAS : ${BLAS_LIBS}
|
||||
|
||||
METIS usable : ${psblas_cv_have_metis}
|
||||
@@ -12455,6 +12491,9 @@ printf "%s\n" "$as_me:
|
||||
CUDA : ${HAVE_CUDA}
|
||||
CUDA_CC : ${pac_cv_cudacc}
|
||||
|
||||
OPENACC : ${pac_cv_openacc}
|
||||
FCOPENACC : ${FCOPENACC}
|
||||
|
||||
BLAS : ${BLAS_LIBS}
|
||||
|
||||
METIS usable : ${psblas_cv_have_metis}
|
||||
@@ -12471,6 +12510,16 @@ printf "%s\n" "$as_me:
|
||||
If you are satisfied, run 'make' to build ${PACKAGE_NAME} and its documentation; otherwise
|
||||
type ./configure --help=short for a complete list of configure options specific to ${PACKAGE_NAME}.
|
||||
" >&6;}
|
||||
if test x"${pac_cv_openacc}" == x"yes" ; then
|
||||
if test x"${FCOPENACC}" == x ; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:
|
||||
WARNING: OpenACC enabled, but no choice for FCOPENACC compile flag.
|
||||
You may want to rerun configure with --with-fcopenacc= " >&5
|
||||
printf "%s\n" "$as_me:
|
||||
WARNING: OpenACC enabled, but no choice for FCOPENACC compile flag.
|
||||
You may want to rerun configure with --with-fcopenacc= " >&6;}
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
+11
-1
@@ -860,7 +860,7 @@ if test x"$pac_cv_openacc" == x"yes" ; then
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
PAC_ARG_WITH_LIBRSB
|
||||
dnl PAC_ARG_WITH_LIBRSB()
|
||||
LIBRSB_DIR="$pac_cv_librsb_dir";
|
||||
AC_MSG_CHECKING([for LIBRSB install dir])
|
||||
case $LIBRSB_DIR in
|
||||
@@ -1023,6 +1023,9 @@ AC_MSG_NOTICE([
|
||||
CUDA : ${HAVE_CUDA}
|
||||
CUDA_CC : ${pac_cv_cudacc}
|
||||
|
||||
OPENACC : ${pac_cv_openacc}
|
||||
FCOPENACC : ${FCOPENACC}
|
||||
|
||||
BLAS : ${BLAS_LIBS}
|
||||
|
||||
METIS usable : ${psblas_cv_have_metis}
|
||||
@@ -1042,6 +1045,13 @@ dnl Note : we should use LDLIBS sooner or later!
|
||||
dnl To install the program and its documentation, run 'make install' if you are root,
|
||||
dnl or run 'su -c "make install"' if you are not root.
|
||||
])
|
||||
if test x"${pac_cv_openacc}" == x"yes" ; then
|
||||
if test x"${FCOPENACC}" == x ; then
|
||||
AC_MSG_NOTICE([
|
||||
WARNING: OpenACC enabled, but no choice for FCOPENACC compile flag.
|
||||
You may want to rerun configure with --with-fcopenacc= ])
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user