diff --git a/amgprec/impl/amg_cslu_interface.c b/amgprec/impl/amg_cslu_interface.c index 41e114e4..66f542a2 100644 --- a/amgprec/impl/amg_cslu_interface.c +++ b/amgprec/impl/amg_cslu_interface.c @@ -112,7 +112,7 @@ typedef struct { int amg_cslu_fact(int n, int nnz, #ifdef AMG_HAVE_SLU -#if defined(AMG_SLU_VERSION_7) +#if (AMG_SLU_VERSION >= 7) singlecomplex *values, #else complex *values, @@ -181,10 +181,10 @@ int amg_cslu_fact(int n, int nnz, panel_size = sp_ienv(1); relax = sp_ienv(2); -#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5) +#if (AMG_SLU_VERSION >= 7) || (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) +#elif (AMG_SLU_VERSION == 4) cgstrf(&options, &AC, relax, panel_size, etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); #else @@ -234,7 +234,7 @@ 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) +#if (AMG_SLU_VERSION == 7) singlecomplex *b, #else complex *b, diff --git a/amgprec/impl/amg_dslu_interface.c b/amgprec/impl/amg_dslu_interface.c index 829f3473..f8231996 100644 --- a/amgprec/impl/amg_dslu_interface.c +++ b/amgprec/impl/amg_dslu_interface.c @@ -171,10 +171,10 @@ int amg_dslu_fact(int n, int nnz, double *values, panel_size = sp_ienv(1); relax = sp_ienv(2); -#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5) +#if (AMG_SLU_VERSION >= 7) || (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) +#elif (AMG_SLU_VERSION == 4) dgstrf(&options, &AC, relax, panel_size, etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); #else diff --git a/amgprec/impl/amg_sslu_interface.c b/amgprec/impl/amg_sslu_interface.c index cb020909..0ccd0b80 100644 --- a/amgprec/impl/amg_sslu_interface.c +++ b/amgprec/impl/amg_sslu_interface.c @@ -172,10 +172,10 @@ int amg_sslu_fact(int n, int nnz, float *values, panel_size = sp_ienv(1); relax = sp_ienv(2); -#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5) +#if (AMG_SLU_VERSION >= 7) || (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) +#elif (AMG_SLU_VERSION == 4) sgstrf(&options, &AC, relax, panel_size, etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); #else diff --git a/amgprec/impl/amg_zslu_interface.c b/amgprec/impl/amg_zslu_interface.c index 63795a52..9db4475d 100644 --- a/amgprec/impl/amg_zslu_interface.c +++ b/amgprec/impl/amg_zslu_interface.c @@ -176,10 +176,10 @@ int amg_zslu_fact(int n, int nnz, panel_size = sp_ienv(1); relax = sp_ienv(2); -#if defined(AMG_SLU_VERSION_7) ||defined(AMG_SLU_VERSION_5) +#if (AMG_SLU_VERSION >= 7) || (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) +#elif (AMG_SLU_VERSION == 4) zgstrf(&options, &AC, relax, panel_size, etree, NULL, 0, perm_c, perm_r, L, U, &stat, &info); #else diff --git a/configure b/configure index 85dde08a..eb37d91e 100755 --- a/configure +++ b/configure @@ -10983,7 +10983,7 @@ if test "x$amg4psblas_cv_have_superlu" == "xyes" ; then SLU_FLAGS="-DAMG_SLU_VERSION_$pac_slu_version $SLU_INCLUDES" FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_SLU $FDEFINES" CHAVESLU="#define AMG_HAVE_SLU" - CSLUVERSION="#define AMG_SLU_VERSION_$pac_slu_version" + CSLUVERSION="#define AMG_SLU_VERSION $pac_slu_version" else SLU_FLAGS="" fi diff --git a/configure.ac b/configure.ac index 2fa0b3f6..19817452 100755 --- a/configure.ac +++ b/configure.ac @@ -792,7 +792,7 @@ if test "x$amg4psblas_cv_have_superlu" == "xyes" ; then SLU_FLAGS="-DAMG_SLU_VERSION_$pac_slu_version $SLU_INCLUDES" FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_SLU $FDEFINES" CHAVESLU="#define AMG_HAVE_SLU" - CSLUVERSION="#define AMG_SLU_VERSION_$pac_slu_version" + CSLUVERSION="#define AMG_SLU_VERSION $pac_slu_version" else SLU_FLAGS="" fi