Skip to content

Commit

Permalink
fixing errors with pddrive_ABglobal
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyangzhuan committed Jan 9, 2025
1 parent 95c8828 commit 46a2e83
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 18 deletions.
2 changes: 1 addition & 1 deletion SRC/complex16/pzdistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -2325,7 +2325,7 @@ if ( !iam) printf(".. Construct Reduce tree for U: %.2f\t\n", t);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
ztrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}

Expand Down
4 changes: 2 additions & 2 deletions SRC/complex16/pzdistribute3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,13 +1126,13 @@ pzdistribute3d(superlu_dist_options_t *options, int_t n, SuperMatrix *A,
// /* Compute communication structure for trisolve. */
if (get_new3dsolve()){
ztrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, trf3Dpart->supernodeMask, grid);
trf3Dpart->supernodeMask, grid);
}else{
int* supernodeMask = int32Malloc_dist(nsupers);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
ztrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}
}
Expand Down
1 change: 0 additions & 1 deletion SRC/complex16/pzgstrs3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ doublecomplex *zready_x, *zready_lsum;
// #endif

int ztrs_compute_communication_structure(superlu_dist_options_t *options, int_t n, zLUstruct_t * LUstruct,
zScalePermstruct_t * ScalePermstruct,
int* supernodeMask, gridinfo_t *grid)
{
Glu_persist_t *Glu_persist = LUstruct->Glu_persist;
Expand Down
2 changes: 1 addition & 1 deletion SRC/complex16/pzsymbfact_distdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -3319,7 +3319,7 @@ doublecomplex *dense, *dense_col; /* SPA */
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
ztrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}

Expand Down
14 changes: 14 additions & 0 deletions SRC/complex16/zdistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,20 @@ if ( !iam) printf(".. Construct Reduce tree for U: %.2f\t\n", t);

} /* else fact != SamePattern_SameRowPerm */

if ( options->Fact != SamePattern_SameRowPerm ) {
// /* Flatten L metadata into one buffer. */
pzflatten_LDATA(options, n, LUstruct, grid);

// /* Compute communication structure for trisolve. */
int* supernodeMask = int32Malloc_dist(nsupers);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
ztrs_compute_communication_structure(options, n, LUstruct,
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}


#if ( DEBUGlevel>=1 )
/* Memory allocated but not freed:
ilsum, fmod, fsendx_plist, bmod, bsendx_plist */
Expand Down
15 changes: 15 additions & 0 deletions SRC/double/ddistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,21 @@ if ( !iam) printf(".. Construct Reduce tree for U: %.2f\t\n", t);

} /* else fact != SamePattern_SameRowPerm */


if ( options->Fact != SamePattern_SameRowPerm ) {
// /* Flatten L metadata into one buffer. */
pdflatten_LDATA(options, n, LUstruct, grid);

// /* Compute communication structure for trisolve. */
int* supernodeMask = int32Malloc_dist(nsupers);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
dtrs_compute_communication_structure(options, n, LUstruct,
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}


#if ( DEBUGlevel>=1 )
/* Memory allocated but not freed:
ilsum, fmod, fsendx_plist, bmod, bsendx_plist */
Expand Down
2 changes: 1 addition & 1 deletion SRC/double/pddistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ if ( !iam) printf(".. Construct Reduce tree for U: %.2f\t\n", t);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
dtrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}

Expand Down
4 changes: 2 additions & 2 deletions SRC/double/pddistribute3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -2459,13 +2459,13 @@ pddistribute3d(superlu_dist_options_t *options, int_t n, SuperMatrix *A,
// /* Compute communication structure for trisolve. */
if (get_new3dsolve()){
dtrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, trf3Dpart->supernodeMask, grid);
trf3Dpart->supernodeMask, grid);
}else{
int* supernodeMask = int32Malloc_dist(nsupers);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
dtrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}
}
Expand Down
1 change: 0 additions & 1 deletion SRC/double/pdgstrs3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ double *dready_x, *dready_lsum;
// #endif

int dtrs_compute_communication_structure(superlu_dist_options_t *options, int_t n, dLUstruct_t * LUstruct,
dScalePermstruct_t * ScalePermstruct,
int* supernodeMask, gridinfo_t *grid)
{
Glu_persist_t *Glu_persist = LUstruct->Glu_persist;
Expand Down
2 changes: 1 addition & 1 deletion SRC/double/pdsymbfact_distdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -3317,7 +3317,7 @@ double *dense, *dense_col; /* SPA */
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
dtrs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}

Expand Down
1 change: 0 additions & 1 deletion SRC/include/superlu_ddefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ extern int_t dleafForestForwardSolve3d(superlu_dist_options_t *options, int_t tr


extern int dtrs_compute_communication_structure(superlu_dist_options_t *options, int_t n, dLUstruct_t * LUstruct,
dScalePermstruct_t * ScalePermstruct,
int* supernodeMask, gridinfo_t *grid);
extern int_t dreduceSolvedX_newsolve(int_t treeId, int_t sender, int_t receiver, double* x, int nrhs,
dtrf3Dpartition_t* trf3Dpartition, dLUstruct_t* LUstruct, gridinfo3d_t* grid3d, double* recvbuf, xtrsTimer_t *xtrsTimer);
Expand Down
1 change: 0 additions & 1 deletion SRC/include/superlu_sdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ extern int_t sleafForestForwardSolve3d(superlu_dist_options_t *options, int_t tr


extern int strs_compute_communication_structure(superlu_dist_options_t *options, int_t n, sLUstruct_t * LUstruct,
sScalePermstruct_t * ScalePermstruct,
int* supernodeMask, gridinfo_t *grid);
extern int_t sreduceSolvedX_newsolve(int_t treeId, int_t sender, int_t receiver, float* x, int nrhs,
strf3Dpartition_t* trf3Dpartition, sLUstruct_t* LUstruct, gridinfo3d_t* grid3d, float* recvbuf, xtrsTimer_t *xtrsTimer);
Expand Down
1 change: 0 additions & 1 deletion SRC/include/superlu_zdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ extern int_t zleafForestForwardSolve3d(superlu_dist_options_t *options, int_t tr


extern int ztrs_compute_communication_structure(superlu_dist_options_t *options, int_t n, zLUstruct_t * LUstruct,
zScalePermstruct_t * ScalePermstruct,
int* supernodeMask, gridinfo_t *grid);
extern int_t zreduceSolvedX_newsolve(int_t treeId, int_t sender, int_t receiver, doublecomplex* x, int nrhs,
ztrf3Dpartition_t* trf3Dpartition, zLUstruct_t* LUstruct, gridinfo3d_t* grid3d, doublecomplex* recvbuf, xtrsTimer_t *xtrsTimer);
Expand Down
2 changes: 1 addition & 1 deletion SRC/single/psdistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ if ( !iam) printf(".. Construct Reduce tree for U: %.2f\t\n", t);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
strs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}

Expand Down
4 changes: 2 additions & 2 deletions SRC/single/psdistribute3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,13 +1128,13 @@ psdistribute3d(superlu_dist_options_t *options, int_t n, SuperMatrix *A,
// /* Compute communication structure for trisolve. */
if (get_new3dsolve()){
strs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, trf3Dpart->supernodeMask, grid);
trf3Dpart->supernodeMask, grid);
}else{
int* supernodeMask = int32Malloc_dist(nsupers);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
strs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}
}
Expand Down
1 change: 0 additions & 1 deletion SRC/single/psgstrs3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ float *sready_x, *sready_lsum;
// #endif

int strs_compute_communication_structure(superlu_dist_options_t *options, int_t n, sLUstruct_t * LUstruct,
sScalePermstruct_t * ScalePermstruct,
int* supernodeMask, gridinfo_t *grid)
{
Glu_persist_t *Glu_persist = LUstruct->Glu_persist;
Expand Down
2 changes: 1 addition & 1 deletion SRC/single/pssymbfact_distdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -3321,7 +3321,7 @@ float *dense, *dense_col; /* SPA */
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
strs_compute_communication_structure(options, n, LUstruct,
ScalePermstruct, supernodeMask, grid);
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}

Expand Down
15 changes: 15 additions & 0 deletions SRC/single/sdistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,21 @@ if ( !iam) printf(".. Construct Reduce tree for U: %.2f\t\n", t);

} /* else fact != SamePattern_SameRowPerm */


if ( options->Fact != SamePattern_SameRowPerm ) {
// /* Flatten L metadata into one buffer. */
psflatten_LDATA(options, n, LUstruct, grid);

// /* Compute communication structure for trisolve. */
int* supernodeMask = int32Malloc_dist(nsupers);
for(int ii=0; ii<nsupers; ii++)
supernodeMask[ii]=1;
strs_compute_communication_structure(options, n, LUstruct,
supernodeMask, grid);
SUPERLU_FREE(supernodeMask);
}


#if ( DEBUGlevel>=1 )
/* Memory allocated but not freed:
ilsum, fmod, fsendx_plist, bmod, bsendx_plist */
Expand Down

0 comments on commit 46a2e83

Please sign in to comment.