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

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

@ -176,7 +176,7 @@ int amg_zslu_fact(int n, int nnz,
panel_size = sp_ienv(1); panel_size = sp_ienv(1);
relax = sp_ienv(2); 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, zgstrf(&options, &AC, relax, panel_size, etree,
NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info); NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
#elif defined(AMG_SLU_VERSION_4) #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) AC_MSG_RESULT($pac_slu_lib_ok)
fi fi
if test "x$pac_slu_header_ok" == "xyes" ; then 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_LANG_PUSH([C])
AC_COMPILE_IFELSE( AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[#include "slu_ddefs.h" [AC_LANG_SOURCE([[#include "slu_cdefs.h"
int testdslu() int testcslu()
{ SuperMatrix AC, *L, *U; { SuperMatrix AC, *L, *U;
int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info; int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info;
superlu_options_t options; SuperLUStat_t stat; superlu_options_t options; SuperLUStat_t stat;
singlecomplex *x;
GlobalLU_t Glu; 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); NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
}]])], }]])],
[ AC_MSG_RESULT([yes]); pac_slu_version="5";], [ AC_MSG_RESULT([yes]); pac_slu_version="7";],
[ AC_MSG_RESULT([no]); pac_slu_version="4";]) [ 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]) AC_LANG_POP([C])
fi 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; } printf "%s\n" "$pac_slu_lib_ok" >&6; }
fi fi
if test "x$pac_slu_header_ok" == "xyes" ; then 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\n" "$as_me:${as_lineno-$LINENO}: checking for superlu version 7" >&5
printf %s "checking for superlu version 5... " >&6; } printf %s "checking for superlu version 7... " >&6; }
ac_ext=c ac_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include "slu_ddefs.h" #include "slu_cdefs.h"
int testdslu() int testcslu()
{ SuperMatrix AC, *L, *U; { SuperMatrix AC, *L, *U;
int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info; int *perm_r, *perm_c, *etree, panel_size, permc_spec, relax, info;
superlu_options_t options; SuperLUStat_t stat; superlu_options_t options; SuperLUStat_t stat;
singlecomplex *x;
GlobalLU_t Glu; 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); NULL, 0, perm_c, perm_r, L, U, &Glu, &stat, &info);
} }
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO" 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 : then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }; pac_slu_version="5"; printf "%s\n" "yes" >&6; }; pac_slu_version="5";
@ -10922,6 +10955,13 @@ printf "%s\n" "no" >&6; }; pac_slu_version="4"; ;;
esac esac
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 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_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

Loading…
Cancel
Save