Fix defines for SLUD v7

fix-sludist7
Salvatore Filippone 3 years ago
parent 4f9254ebb0
commit 7e48a0a742

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

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

Loading…
Cancel
Save