|
|
@ -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
|
|
|
|