Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xiaoyeli/superlu_dist
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyangzhuan committed Feb 24, 2025
2 parents 1a7d46b + 8ef3f7f commit ff2af7f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion PYTHON/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ get_target_property(superlu_dist_soversion superlu_dist SOVERSION)
set_target_properties(superlu_dist_python PROPERTIES VERSION ${superlu_dist_version})
set_target_properties(superlu_dist_python PROPERTIES SOVERSION ${superlu_dist_soversion})
target_link_libraries(superlu_dist_python superlu_dist)
add_dependencies(superlu_dist_python config_f)
# add_dependencies(superlu_dist_python config_f)

set(PY_SCRIPT_SOURCE ${CMAKE_SOURCE_DIR}/PYTHON/pddrive.py)
set(PY_SCRIPT_DEST ${CMAKE_BINARY_DIR}/PYTHON/pddrive.py)
Expand Down
10 changes: 6 additions & 4 deletions SRC/complex16/pzgssvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,9 +1127,10 @@ pzgssvx(superlu_dist_options_t *options, SuperMatrix *A,
if (symb_comm != MPI_COMM_NULL) MPI_Comm_free (&symb_comm);

/* Distribute entries of A into L & U data structures. */
//if (parSymbFact == NO || ???? Fact == SamePattern_SameRowPerm) {
if ( parSymbFact == NO ) {
/* CASE OF SERIAL SYMBOLIC */
if (parSymbFact == NO || Fact == SamePattern_SameRowPerm) {
//if ( parSymbFact == NO ) {
/* Case of serial symbolic,
or parallel symbolic and reuse L&U structure, only redistribute A */
/* Apply column permutation to the original distributed A */
for (j = 0; j < nnz_loc; ++j) colind[j] = perm_c[colind[j]];

Expand Down Expand Up @@ -1390,7 +1391,7 @@ pzgssvx(superlu_dist_options_t *options, SuperMatrix *A,



/* nvshmem related. */
/* nvshmem related */
#ifdef HAVE_NVSHMEM
nsupers = Glu_persist->supno[n-1] + 1;
int nc = CEILING( nsupers, grid->npcol);
Expand All @@ -1405,6 +1406,7 @@ pzgssvx(superlu_dist_options_t *options, SuperMatrix *A,
if (get_acc_solve()){
nv_init_wrapper(grid->comm);
zprepare_multiGPU_buffers(flag_bc_size,flag_rd_size,ready_x_size,ready_lsum_size,my_flag_bc_size,my_flag_rd_size);

}
#endif

Expand Down
13 changes: 8 additions & 5 deletions SRC/double/pdgssvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,9 +1126,10 @@ pdgssvx(superlu_dist_options_t *options, SuperMatrix *A,
if (symb_comm != MPI_COMM_NULL) MPI_Comm_free (&symb_comm);

/* Distribute entries of A into L & U data structures. */
//if (parSymbFact == NO || ???? Fact == SamePattern_SameRowPerm) {
if ( parSymbFact == NO ) {
/* CASE OF SERIAL SYMBOLIC */
if (parSymbFact == NO || Fact == SamePattern_SameRowPerm) {
//if ( parSymbFact == NO ) {
/* Case of serial symbolic,
or parallel symbolic and reuse L&U structure, only redistribute A */
/* Apply column permutation to the original distributed A */
for (j = 0; j < nnz_loc; ++j) colind[j] = perm_c[colind[j]];

Expand Down Expand Up @@ -1165,6 +1166,7 @@ pdgssvx(superlu_dist_options_t *options, SuperMatrix *A,

/*if (!iam) printf ("\tDISTRIBUTE time %8.2f\n", stat->utime[DIST]);*/


/* Perform numerical factorization in parallel. */
t = SuperLU_timer_();
// #pragma omp parallel
Expand Down Expand Up @@ -1384,7 +1386,7 @@ pdgssvx(superlu_dist_options_t *options, SuperMatrix *A,



/* nvshmem related. */
/* nvshmem related */
#ifdef HAVE_NVSHMEM
nsupers = Glu_persist->supno[n-1] + 1;
int nc = CEILING( nsupers, grid->npcol);
Expand All @@ -1397,8 +1399,9 @@ pdgssvx(superlu_dist_options_t *options, SuperMatrix *A,
int ready_x_size = maxrecvsz*nc;
int ready_lsum_size = 2*maxrecvsz*nr;
if (get_acc_solve()){
nv_init_wrapper(grid->comm);
nv_init_wrapper(grid->comm);
dprepare_multiGPU_buffers(flag_bc_size,flag_rd_size,ready_x_size,ready_lsum_size,my_flag_bc_size,my_flag_rd_size);

}
#endif

Expand Down
11 changes: 6 additions & 5 deletions SRC/single/psgssvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,9 +1126,10 @@ psgssvx(superlu_dist_options_t *options, SuperMatrix *A,
if (symb_comm != MPI_COMM_NULL) MPI_Comm_free (&symb_comm);

/* Distribute entries of A into L & U data structures. */
//if (parSymbFact == NO || ???? Fact == SamePattern_SameRowPerm) {
if ( parSymbFact == NO ) {
/* CASE OF SERIAL SYMBOLIC */
if (parSymbFact == NO || Fact == SamePattern_SameRowPerm) {
//if ( parSymbFact == NO ) {
/* Case of serial symbolic,
or parallel symbolic and reuse L&U structure, only redistribute A */
/* Apply column permutation to the original distributed A */
for (j = 0; j < nnz_loc; ++j) colind[j] = perm_c[colind[j]];

Expand Down Expand Up @@ -1385,7 +1386,7 @@ psgssvx(superlu_dist_options_t *options, SuperMatrix *A,



/* nvshmem related.*/
/* nvshmem related */
#ifdef HAVE_NVSHMEM
nsupers = Glu_persist->supno[n-1] + 1;
int nc = CEILING( nsupers, grid->npcol);
Expand All @@ -1400,10 +1401,10 @@ psgssvx(superlu_dist_options_t *options, SuperMatrix *A,
if (get_acc_solve()){
nv_init_wrapper(grid->comm);
sprepare_multiGPU_buffers(flag_bc_size,flag_rd_size,ready_x_size,ready_lsum_size,my_flag_bc_size,my_flag_rd_size);

}
#endif


} /* end if (!factored) */

if ( options->Fact == DOFACT || options->Fact == SamePattern ) {
Expand Down

0 comments on commit ff2af7f

Please sign in to comment.