Fix for new SuperLU_Dist version, change configure

fix-sludist7
Salvatore Filippone 3 years ago
parent 7e48a0a742
commit 425743939c

@ -94,7 +94,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define HANDLE_SIZE 8
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
typedef struct {
SuperMatrix *A;
dLUstruct_t *LUstruct;
@ -135,7 +135,7 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
SuperMatrix *A;
NRformat_loc *Astore;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
dScalePermstruct_t *ScalePermstruct;
dLUstruct_t *LUstruct;
dSOLVEstruct_t SOLVEstruct;
@ -148,9 +148,9 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
int i, panel_size, permc_spec, relax, info;
trans_t trans;
double drop_tol = 0.0, b[1], berr[1];
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7) || defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
#if (SLUD_VERSION_>=50)
superlu_dist_options_t options;
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
superlu_options_t options;
#else
choke_on_me;
@ -174,7 +174,7 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
SLU_NR_loc, SLU_D, SLU_GE);
/* Initialize ScalePermstruct and LUstruct. */
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
ScalePermstruct = (dScalePermstruct_t *) SUPERLU_MALLOC(sizeof(dScalePermstruct_t));
LUstruct = (dLUstruct_t *) SUPERLU_MALLOC(sizeof(dLUstruct_t));
dScalePermstructInit(n,n, ScalePermstruct);
@ -183,11 +183,11 @@ int amg_dsludist_fact(int n, int nl, int nnzl, int ffstr,
LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t));
ScalePermstructInit(n,n, ScalePermstruct);
#endif
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
dLUstructInit(n, LUstruct);
#elif defined(SLUD_VERSION_4) || defined(SLUD_VERSION_5) || defined(SLUD_VERSION_6)
#elif (SLUD_VERSION_>=40)
LUstructInit(n, LUstruct);
#elif defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
LUstructInit(n,n, LUstruct);
#else
choke_on_me;
@ -245,7 +245,7 @@ int amg_dsludist_solve(int itrans, int n, int nrhs,
*/
#ifdef Have_SLUDist_
SuperMatrix *A;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
dScalePermstruct_t *ScalePermstruct;
dLUstruct_t *LUstruct;
dSOLVEstruct_t SOLVEstruct;
@ -259,9 +259,9 @@ int amg_dsludist_solve(int itrans, int n, int nrhs,
trans_t trans;
double drop_tol = 0.0;
double *berr;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7) || defined(SLUD_VERSION_6) ||defined(SLUD_VERSION_5)
#if (SLUD_VERSION_>=50)
superlu_dist_options_t options;
#elif defined(SLUD_VERSION_4)|| defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
superlu_options_t options;
#else
choke_on_me;
@ -331,7 +331,7 @@ int amg_dsludist_free(void *f_factors)
*/
#ifdef Have_SLUDist_
SuperMatrix *A;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
dScalePermstruct_t *ScalePermstruct;
dLUstruct_t *LUstruct;
dSOLVEstruct_t SOLVEstruct;
@ -345,9 +345,9 @@ int amg_dsludist_free(void *f_factors)
trans_t trans;
double drop_tol = 0.0;
double *berr;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)||defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
#if (SLUD_VERSION_>=50)
superlu_dist_options_t options;
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
superlu_options_t options;
#else
choke_on_me;
@ -368,7 +368,7 @@ int amg_dsludist_free(void *f_factors)
// we either have a leak or a segfault here.
// To be investigated further.
//Destroy_CompRowLoc_Matrix_dist(A);
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
dScalePermstructFree(ScalePermstruct);
dLUstructFree(LUstruct);
#else

@ -94,7 +94,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define HANDLE_SIZE 8
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
typedef struct {
SuperMatrix *A;
zLUstruct_t *LUstruct;
@ -142,7 +142,7 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
SuperMatrix *A;
NRformat_loc *Astore;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
zScalePermstruct_t *ScalePermstruct;
zLUstruct_t *LUstruct;
zSOLVEstruct_t SOLVEstruct;
@ -155,9 +155,9 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
int i, panel_size, permc_spec, relax, info;
trans_t trans;
double drop_tol = 0.0,berr[1];
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7) || defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
#if (SLUD_VERSION_>=50)
superlu_dist_options_t options;
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
superlu_options_t options;
#else
choke_on_me;
@ -181,7 +181,7 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
SLU_NR_loc, SLU_Z, SLU_GE);
/* Initialize ScalePermstruct and LUstruct. */
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
ScalePermstruct = (zScalePermstruct_t *) SUPERLU_MALLOC(sizeof(zScalePermstruct_t));
LUstruct = (zLUstruct_t *) SUPERLU_MALLOC(sizeof(zLUstruct_t));
zScalePermstructInit(n,n, ScalePermstruct);
@ -190,11 +190,11 @@ int amg_zsludist_fact(int n, int nl, int nnzl, int ffstr,
LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t));
ScalePermstructInit(n,n, ScalePermstruct);
#endif
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
zLUstructInit(n, LUstruct);
#elif defined(SLUD_VERSION_4) || defined(SLUD_VERSION_5) || defined(SLUD_VERSION_6)
#elif (SLUD_VERSION_>=40)
LUstructInit(n, LUstruct);
#elif defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
LUstructInit(n,n, LUstruct);
#else
choke_on_me;
@ -257,7 +257,7 @@ int amg_zsludist_solve(int itrans, int n, int nrhs,
*/
#ifdef Have_SLUDist_
SuperMatrix *A;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
zScalePermstruct_t *ScalePermstruct;
zLUstruct_t *LUstruct;
zSOLVEstruct_t SOLVEstruct;
@ -271,9 +271,9 @@ int amg_zsludist_solve(int itrans, int n, int nrhs,
trans_t trans;
double drop_tol = 0.0;
double *berr;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7) || defined(SLUD_VERSION_6) ||defined(SLUD_VERSION_5)
#if (SLUD_VERSION_>=50)
superlu_dist_options_t options;
#elif defined(SLUD_VERSION_4)|| defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
superlu_options_t options;
#else
choke_on_me;
@ -343,7 +343,7 @@ int amg_zsludist_free(void *f_factors)
*/
#ifdef Have_SLUDist_
SuperMatrix *A;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
zScalePermstruct_t *ScalePermstruct;
zLUstruct_t *LUstruct;
zSOLVEstruct_t SOLVEstruct;
@ -357,9 +357,9 @@ int amg_zsludist_free(void *f_factors)
trans_t trans;
double drop_tol = 0.0;
double *berr;
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)||defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
#if (SLUD_VERSION_>=50)
superlu_dist_options_t options;
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
#elif (SLUD_VERSION_>=30)
superlu_options_t options;
#else
choke_on_me;
@ -380,7 +380,7 @@ int amg_zsludist_free(void *f_factors)
// we either have a leak or a segfault here.
// To be investigated further.
//Destroy_CompRowLoc_Matrix_dist(A);
#if defined(SLUD_VERSION_63) || defined(SLUD_VERSION_7)
#if (SLUD_VERSION_>=63)
zScalePermstructFree(ScalePermstruct);
zLUstructFree(LUstruct);
#else

10
configure vendored

@ -9307,14 +9307,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$amg4psblas_cv_have_superludist" == "xyes" ; then
pac_sludist_version="$amg4psblas_cv_superludist_major";
if (($amg4psblas_cv_superludist_major==6)); then
if (($amg4psblas_cv_superludist_minor>=3)); then
pac_sludist_version="63";
fi
fi
pac_sludist_version="$amg4psblas_cv_superludist_major$amg4psblas_cv_superludist_minor";
SLUDIST_FLAGS=""
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_$pac_sludist_version $SLUDIST_INCLUDES"
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_="$pac_sludist_version" $SLUDIST_INCLUDES"
FDEFINES="$amg_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
else
SLUDIST_FLAGS=""

@ -707,14 +707,10 @@ fi
PAC_CHECK_SUPERLUDIST()
if test "x$amg4psblas_cv_have_superludist" == "xyes" ; then
pac_sludist_version="$amg4psblas_cv_superludist_major";
if (($amg4psblas_cv_superludist_major==6)); then
if (($amg4psblas_cv_superludist_minor>=3)); then
pac_sludist_version="63";
fi
fi
pac_sludist_version="$amg4psblas_cv_superludist_major$amg4psblas_cv_superludist_minor";
SLUDIST_FLAGS=""
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_$pac_sludist_version $SLUDIST_INCLUDES"
SLUDIST_FLAGS="-DHave_SLUDist_ -DSLUD_VERSION_="$pac_sludist_version" $SLUDIST_INCLUDES"
FDEFINES="$amg_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
else
SLUDIST_FLAGS=""

Loading…
Cancel
Save