Update configure and interfaces for SUPERLU version 7.

gpucinterfaces
sfilippone 5 months ago
parent 498f8bd482
commit a6267d8e67

@ -112,7 +112,11 @@ typedef struct {
int amg_cslu_fact(int n, int nnz,
#ifdef AMG_HAVE_SLU
#if defined(AMG_SLU_VERSION_7)
singlecomplex *values,
#else
complex *values,
#endif
#else
void *values,
#endif
@ -177,7 +181,7 @@ int amg_cslu_fact(int n, int nnz,
panel_size = sp_ienv(1);
relax = sp_ienv(2);
#if defined(AMG_SLU_VERSION_5)
#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5)
cgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(AMG_SLU_VERSION_4)
@ -230,7 +234,11 @@ int amg_cslu_fact(int n, int nnz,
int amg_cslu_solve(int itrans, int n, int nrhs,
#ifdef AMG_HAVE_SLU
#if defined(AMG_SLU_VERSION_7)
singlecomplex *b,
#else
complex *b,
#endif
#else
void *b,
#endif

@ -171,7 +171,7 @@ int amg_dslu_fact(int n, int nnz, double *values,
panel_size = sp_ienv(1);
relax = sp_ienv(2);
#if defined(AMG_SLU_VERSION_5)
#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5)
dgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(AMG_SLU_VERSION_4)

@ -172,7 +172,7 @@ int amg_sslu_fact(int n, int nnz, float *values,
panel_size = sp_ienv(1);
relax = sp_ienv(2);
#if defined(AMG_SLU_VERSION_5)
#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5)
sgstrf(&options, &AC, relax, panel_size,
etree, NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(AMG_SLU_VERSION_4)

@ -176,7 +176,7 @@ int amg_zslu_fact(int n, int nnz,
panel_size = sp_ienv(1);
relax = sp_ienv(2);
#if defined(AMG_SLU_VERSION_5)
#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5)
zgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(AMG_SLU_VERSION_4)

@ -749,21 +749,40 @@ if test "x$pac_slu_header_ok" == "xyes" ; then
AC_MSG_RESULT($pac_slu_lib_ok)
fi
if test "x$pac_slu_header_ok" == "xyes" ; then
AC_MSG_CHECKING([for superlu version 5])
AC_MSG_CHECKING([for superlu version 7])
AC_LANG_PUSH([C])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[#include "slu_ddefs.h"
int testdslu()
[AC_LANG_SOURCE([[#include "slu_cdefs.h"
int testcslu()
{ SuperMatrix AC, *L, *U;
int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info;
superlu_options_t options; SuperLUStat_t stat;
singlecomplex *x;
GlobalLU_t Glu;
dgstrf(&options, &AC, relax, panel_size, etree,
cgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
}]])],
[ AC_MSG_RESULT([yes]); pac_slu_version="5";],
[ AC_MSG_RESULT([no]); pac_slu_version="4";])
[ AC_MSG_RESULT([yes]); pac_slu_version="7";],
[ AC_MSG_RESULT([no]); pac_slu_version="";])
if test "x$pac_slu_version" == "x" ; then
AC_MSG_CHECKING([for superlu version 5])
AC_LANG_PUSH([C])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[#include "slu_ddefs.h"
int testdslu()
{ SuperMatrix AC, *L, *U;
int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info;
superlu_options_t options; SuperLUStat_t stat;
GlobalLU_t Glu;
dgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
}]])],
[ AC_MSG_RESULT([yes]); pac_slu_version="5";],
[ AC_MSG_RESULT([no]); pac_slu_version="4";])
AC_LANG_POP([C])
fi
AC_LANG_POP([C])
fi

50
configure vendored

@ -10891,8 +10891,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
printf "%s\n" "$pac_slu_lib_ok" >&6; }
fi
if test "x$pac_slu_header_ok" == "xyes" ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for superlu version 5" >&5
printf %s "checking for superlu version 5... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for superlu version 7" >&5
printf %s "checking for superlu version 7... " >&6; }
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@ -10901,18 +10901,51 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "slu_ddefs.h"
int testdslu()
#include "slu_cdefs.h"
int testcslu()
{ SuperMatrix AC, *L, *U;
int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info;
superlu_options_t options; SuperLUStat_t stat;
singlecomplex *x;
GlobalLU_t Glu;
dgstrf(&options, &AC, relax, panel_size, etree,
cgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }; pac_slu_version="7";
else case e in #(
e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }; pac_slu_version=""; ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
if test "x$pac_slu_version" == "x" ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for superlu version 5" >&5
printf %s "checking for superlu version 5... " >&6; }
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'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "slu_ddefs.h"
int testdslu()
{ SuperMatrix AC, *L, *U;
int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info;
superlu_options_t options; SuperLUStat_t stat;
GlobalLU_t Glu;
dgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }; pac_slu_version="5";
@ -10922,6 +10955,13 @@ printf "%s\n" "no" >&6; }; pac_slu_version="4"; ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
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'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

Loading…
Cancel
Save