|
|
@ -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) || defined(SLUD_VERSION_7)
|
|
|
|
#if (SLUD_VERSION_>=63)
|
|
|
|
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) || defined(SLUD_VERSION_7)
|
|
|
|
#if (SLUD_VERSION_>=63)
|
|
|
|
dScalePermstruct_t *ScalePermstruct;
|
|
|
|
dScalePermstruct_t *ScalePermstruct;
|
|
|
|
dLUstruct_t *LUstruct;
|
|
|
|
dLUstruct_t *LUstruct;
|
|
|
|
dSOLVEstruct_t SOLVEstruct;
|
|
|
|
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;
|
|
|
|
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_7) || defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
|
|
|
|
#if (SLUD_VERSION_>=50)
|
|
|
|
superlu_dist_options_t options;
|
|
|
|
superlu_dist_options_t options;
|
|
|
|
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
|
|
|
|
#elif (SLUD_VERSION_>=30)
|
|
|
|
superlu_options_t options;
|
|
|
|
superlu_options_t options;
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
choke_on_me;
|
|
|
|
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);
|
|
|
|
SLU_NR_loc, SLU_D, SLU_GE);
|
|
|
|
|
|
|
|
|
|
|
|
/* Initialize ScalePermstruct and LUstruct. */
|
|
|
|
/* 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));
|
|
|
|
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,11 +183,11 @@ 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) || defined(SLUD_VERSION_7)
|
|
|
|
#if (SLUD_VERSION_>=63)
|
|
|
|
dLUstructInit(n, LUstruct);
|
|
|
|
dLUstructInit(n, LUstruct);
|
|
|
|
#elif defined(SLUD_VERSION_4) || defined(SLUD_VERSION_5) || defined(SLUD_VERSION_6)
|
|
|
|
#elif (SLUD_VERSION_>=40)
|
|
|
|
LUstructInit(n, LUstruct);
|
|
|
|
LUstructInit(n, LUstruct);
|
|
|
|
#elif defined(SLUD_VERSION_3)
|
|
|
|
#elif (SLUD_VERSION_>=30)
|
|
|
|
LUstructInit(n,n, LUstruct);
|
|
|
|
LUstructInit(n,n, LUstruct);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
choke_on_me;
|
|
|
|
choke_on_me;
|
|
|
@ -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) || defined(SLUD_VERSION_7)
|
|
|
|
#if (SLUD_VERSION_>=63)
|
|
|
|
dScalePermstruct_t *ScalePermstruct;
|
|
|
|
dScalePermstruct_t *ScalePermstruct;
|
|
|
|
dLUstruct_t *LUstruct;
|
|
|
|
dLUstruct_t *LUstruct;
|
|
|
|
dSOLVEstruct_t SOLVEstruct;
|
|
|
|
dSOLVEstruct_t SOLVEstruct;
|
|
|
@ -259,9 +259,9 @@ 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_7) || defined(SLUD_VERSION_6) ||defined(SLUD_VERSION_5)
|
|
|
|
#if (SLUD_VERSION_>=50)
|
|
|
|
superlu_dist_options_t options;
|
|
|
|
superlu_dist_options_t options;
|
|
|
|
#elif defined(SLUD_VERSION_4)|| defined(SLUD_VERSION_3)
|
|
|
|
#elif (SLUD_VERSION_>=30)
|
|
|
|
superlu_options_t options;
|
|
|
|
superlu_options_t options;
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
choke_on_me;
|
|
|
|
choke_on_me;
|
|
|
@ -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) || defined(SLUD_VERSION_7)
|
|
|
|
#if (SLUD_VERSION_>=63)
|
|
|
|
dScalePermstruct_t *ScalePermstruct;
|
|
|
|
dScalePermstruct_t *ScalePermstruct;
|
|
|
|
dLUstruct_t *LUstruct;
|
|
|
|
dLUstruct_t *LUstruct;
|
|
|
|
dSOLVEstruct_t SOLVEstruct;
|
|
|
|
dSOLVEstruct_t SOLVEstruct;
|
|
|
@ -345,9 +345,9 @@ 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_7)||defined(SLUD_VERSION_6)||defined(SLUD_VERSION_5)
|
|
|
|
#if (SLUD_VERSION_>=50)
|
|
|
|
superlu_dist_options_t options;
|
|
|
|
superlu_dist_options_t options;
|
|
|
|
#elif defined(SLUD_VERSION_4)||defined(SLUD_VERSION_3)
|
|
|
|
#elif (SLUD_VERSION_>=30)
|
|
|
|
superlu_options_t options;
|
|
|
|
superlu_options_t options;
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
choke_on_me;
|
|
|
|
choke_on_me;
|
|
|
@ -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) || defined(SLUD_VERSION_7)
|
|
|
|
#if (SLUD_VERSION_>=63)
|
|
|
|
dScalePermstructFree(ScalePermstruct);
|
|
|
|
dScalePermstructFree(ScalePermstruct);
|
|
|
|
dLUstructFree(LUstruct);
|
|
|
|
dLUstructFree(LUstruct);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|