diff --git a/EXAMPLE/Makefile b/EXAMPLE/Makefile index e8e57197..f4ce2168 100644 --- a/EXAMPLE/Makefile +++ b/EXAMPLE/Makefile @@ -31,8 +31,8 @@ include ../make.inc SEXM = psdrive.o screate_matrix.o dcreate_matrix.o screate_A_x_b.o \ - psgssvx_tracking.o psgsrfs_tracking.o \ - psutil.o sdistribute.o + psgssvx_tracking.o psgsrfs_tracking.o + # psutil.o sdistribute.o # psgssvx_d2.o psgsrfs_d2.o sutil_dist.o psgsequb.o DEXM = pddrive.o dcreate_matrix.o diff --git a/EXAMPLE/pddrive.c b/EXAMPLE/pddrive.c index 6ee9a384..e1d564e8 100755 --- a/EXAMPLE/pddrive.c +++ b/EXAMPLE/pddrive.c @@ -117,6 +117,8 @@ int main(int argc, char *argv[]) */ set_default_options_dist(&options); #if 0 + options.ParSymbFact = YES; + options.ColPerm = PARMETIS; options.RowPerm = LargeDiag_HWPM; options.IterRefine = NOREFINE; options.ColPerm = NATURAL; diff --git a/SRC/communication_aux.c b/SRC/communication_aux.c index aa51f729..1dc95815 100644 --- a/SRC/communication_aux.c +++ b/SRC/communication_aux.c @@ -40,7 +40,7 @@ int_t Wait_LSend for (int_t pj = 0; pj < Pc; ++pj) { /* Wait for Isend to complete before using lsub/lusup. */ - if (ToSendR[lk][pj] != EMPTY && pj != mycol) + if (ToSendR[lk][pj] != SLU_EMPTY && pj != mycol) { MPI_Wait (&send_req[pj], &status); MPI_Wait (&send_req[pj + Pc], &status); diff --git a/SRC/dcommunication_aux.c b/SRC/dcommunication_aux.c index ef9d6da6..9c1c6b12 100644 --- a/SRC/dcommunication_aux.c +++ b/SRC/dcommunication_aux.c @@ -47,7 +47,7 @@ int_t dIBcast_LPanel for (int_t pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) + if (ToSendR[lk][pj] != SLU_EMPTY) { @@ -89,7 +89,7 @@ int_t dBcast_LPanel for (int_t pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) + if (ToSendR[lk][pj] != SLU_EMPTY) { diff --git a/SRC/ddistribute.c b/SRC/ddistribute.c index de7f77f8..bb3cab50 100644 --- a/SRC/ddistribute.c +++ b/SRC/ddistribute.c @@ -384,7 +384,7 @@ ddistribute(superlu_dist_options_t *options, mem_use += (float) k*sizeof(int_t*) + (j + nsupers)*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; k = CEILING( nsupers, grid->nprow ); /* Number of local block rows */ @@ -610,14 +610,14 @@ ddistribute(superlu_dist_options_t *options, len = k * grid->nprow; if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for fsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(k*sizeof(int*))) ) ABORT("Malloc fails for bsendx_plist[]."); if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for bsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; @@ -675,7 +675,7 @@ ddistribute(superlu_dist_options_t *options, pr = PROW( gb, grid ); if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - bsendx_plist[ljb][pr] == EMPTY ) { + bsendx_plist[ljb][pr] == SLU_EMPTY ) { bsendx_plist[ljb][pr] = YES; ++nbsendx; } @@ -742,7 +742,7 @@ ddistribute(superlu_dist_options_t *options, pr = PROW( gb, grid ); /* Process row owning this block */ if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - fsendx_plist[ljb][pr] == EMPTY /* first time */ ) { + fsendx_plist[ljb][pr] == SLU_EMPTY /* first time */ ) { fsendx_plist[ljb][pr] = YES; ++nfsendx; } @@ -1313,7 +1313,7 @@ ddistribute(superlu_dist_options_t *options, if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -1651,7 +1651,7 @@ if ( !iam) printf(".. Construct Reduce tree for L: %.2f\t\n", t); for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/dlook_ahead_update.c b/SRC/dlook_ahead_update.c index bb7c7e95..05b4bdba 100644 --- a/SRC/dlook_ahead_update.c +++ b/SRC/dlook_ahead_update.c @@ -250,7 +250,7 @@ while (j < nub && perm_u[2 * j] <= k0 + num_look_aheads) scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif @@ -271,7 +271,7 @@ while (j < nub && perm_u[2 * j] <= k0 + num_look_aheads) iam, kk, msgcnt[0], msgcnt[1], pj, SLU_MPI_TAG(0,kk0), SLU_MPI_TAG(1,kk0)); #endif - } /* end if ( ToSendR[lk][pj] != EMPTY ) */ + } /* end if ( ToSendR[lk][pj] != SLU_EMPTY ) */ } /* end for pj ... */ } /* end if( look_ahead[kk] == k0 && kcol == mycol ) */ } /* end while j < nub and perm_u[j] num_procs_to_send = EMPTY; // No X(2d) -> X(3d) comm. schedule yet + A3d->num_procs_to_send = SLU_EMPTY; // No X(2d) -> X(3d) comm. schedule yet A2d = SUPERLU_MALLOC(sizeof(NRformat_loc)); // find number of nnzs @@ -364,11 +364,11 @@ int dScatter_B3d(NRformat_loc3d *A3d, // modified In the most general case, block rows of B are not of even size, then the Layer 0 partition may overlap with 3D partition in an arbitrary manner. For example: - P0 P1 P2 P3 + P0 P1 P2 P3 X on grid-0: |___________|__________|_________|________| X on 3D: |___|____|_____|____|__|______|_____|_____| - P0 P1 P2 P3 P4 P5 P6 P7 + P0 P1 P2 P3 P4 P5 P6 P7 */ MPI_Status recv_status; int pxy = grid2d->nprow * grid2d->npcol; @@ -412,14 +412,14 @@ int dScatter_B3d(NRformat_loc3d *A3d, // modified for (p = 0; p < nprocs; ++p) { x_send_counts[p] = 0; x_recv_counts[p] = 0; - procs_to_send_list[p] = EMPTY; // (-1) - procs_recv_from_list[p] = EMPTY; + procs_to_send_list[p] = SLU_EMPTY; // (-1) + procs_recv_from_list[p] = SLU_EMPTY; } /* All procs participate */ MPI_Allgather(&(A3d->m_loc), 1, MPI_INT, m_loc_3d_counts, 1, MPI_INT, grid3d->comm); - + /* Layer 0 set up sends info. The other layers have 0 send counts. */ if (grid3d->zscp.Iam == 0) { int x_fst_row = A2d->fst_row; // start from a layer 0 boundary @@ -461,7 +461,7 @@ int dScatter_B3d(NRformat_loc3d *A3d, // modified x_recv_counts matrix */ MPI_Alltoall(x_send_counts, 1, MPI_INT, x_recv_counts, 1, MPI_INT, grid3d->comm); - + j = 0; // tracking number procs to receive from for (p = 0; p < nprocs; ++p) { if (x_recv_counts[p]) { @@ -469,7 +469,7 @@ int dScatter_B3d(NRformat_loc3d *A3d, // modified recv_count_list[j] = x_recv_counts[p]; src = p; tag = iam; ++j; -#if 0 +#if 0 printf("RECV: src %d -> iam %d, x_recv_counts[p] %d, tag %d\n", src, iam, x_recv_counts[p], tag); fflush(stdout); diff --git a/SRC/get_perm_c_parmetis.c b/SRC/get_perm_c_parmetis.c index b08c35ab..fbc6c7f7 100644 --- a/SRC/get_perm_c_parmetis.c +++ b/SRC/get_perm_c_parmetis.c @@ -605,8 +605,8 @@ a_plus_at_CompRow_loc THIS COUNTS FOR TWO PASSES OF THE LOCAL ROWS OF A AND T. ------------------------------------------------------------------ */ - /* Reset marker to EMPTY */ - for (i = 0; i < n; ++i) marker[i] = EMPTY; + /* Reset marker to SLU_EMPTY */ + for (i = 0; i < n; ++i) marker[i] = SLU_EMPTY; /* save rdispls information */ for (p = 0; p < nprocs_i; p++) sdispls[p] = rdispls[p]; @@ -654,8 +654,8 @@ a_plus_at_CompRow_loc if (apat_mem > apat_mem_max) apat_mem_max = apat_mem; - /* Reset marker to EMPTY */ - for (i = 0; i < n; i++) marker[i] = EMPTY; + /* Reset marker to SLU_EMPTY */ + for (i = 0; i < n; i++) marker[i] = SLU_EMPTY; /* restore rdispls information */ for (p = 0; p < nprocs_i; p++) rdispls[p] = sdispls[p]; diff --git a/SRC/pddistribute.c b/SRC/pddistribute.c index fab2019a..366eff4f 100644 --- a/SRC/pddistribute.c +++ b/SRC/pddistribute.c @@ -695,7 +695,7 @@ pddistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, mem_use += (float) k*sizeof(int_t*) + (j + nsupers)*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; k = CEILING( nsupers, grid->nprow ); /* Number of local block rows */ @@ -924,14 +924,14 @@ pddistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, len = k * grid->nprow; if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for fsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(k*sizeof(int*))) ) ABORT("Malloc fails for bsendx_plist[]."); if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for bsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; /* -------------------------------------------------------------- */ @@ -990,7 +990,7 @@ pddistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, pr = PROW( gb, grid ); if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - bsendx_plist[ljb][pr] == EMPTY ) { + bsendx_plist[ljb][pr] == SLU_EMPTY ) { bsendx_plist[ljb][pr] = YES; ++nbsendx; } @@ -1056,7 +1056,7 @@ pddistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, pr = PROW( gb, grid ); /* Process row owning this block */ if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - fsendx_plist[ljb][pr] == EMPTY /* first time */ ) { + fsendx_plist[ljb][pr] == SLU_EMPTY /* first time */ ) { fsendx_plist[ljb][pr] = YES; ++nfsendx; } @@ -1630,7 +1630,7 @@ pddistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -1974,7 +1974,7 @@ if ( !iam) printf(".. Construct Reduce tree for L: %.2f\t\n", t); for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/pdgsmv.c b/SRC/pdgsmv.c index 1b2882f4..01bafebf 100644 --- a/SRC/pdgsmv.c +++ b/SRC/pdgsmv.c @@ -127,11 +127,11 @@ void pdgsmv_init } /* Build SPA to aid global to local translation. */ - for (i = 0; i < n; ++i) spa[i] = EMPTY; + for (i = 0; i < n; ++i) spa[i] = SLU_EMPTY; for (i = 0; i < m_loc; ++i) { /* Loop through each row of A */ for (j = rowptr[i]; j < rowptr[i+1]; ++j) { jcol = colind[j]; - if ( spa[jcol] == EMPTY ) { /* First time see this index */ + if ( spa[jcol] == SLU_EMPTY ) { /* First time see this index */ p = row_to_proc[jcol]; if ( p == iam ) { /* Local */ /*assert(jcol>=fst_row);*/ diff --git a/SRC/pdgstrf.c b/SRC/pdgstrf.c index ee819ad2..141d2cb5 100644 --- a/SRC/pdgstrf.c +++ b/SRC/pdgstrf.c @@ -1030,7 +1030,7 @@ pdgstrf(superlu_dist_options_t * options, int m, int n, double anorm, } for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif @@ -1155,7 +1155,7 @@ pdgstrf(superlu_dist_options_t * options, int m, int n, double anorm, } scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { lusup1 = Lnzval_bc_ptr[lk]; #if ( PROFlevel>=1 ) TIC (t1); @@ -1377,7 +1377,7 @@ pdgstrf(superlu_dist_options_t * options, int m, int n, double anorm, #endif for (pj = 0; pj < Pc; ++pj) { /* Wait for Isend to complete before using lsub/lusup buffer. */ - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { MPI_Wait (&send_req[pj], &status); MPI_Wait (&send_req[pj + Pc], &status); } @@ -1704,7 +1704,7 @@ pdgstrf(superlu_dist_options_t * options, int m, int n, double anorm, scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif diff --git a/SRC/pdgstrs1.c b/SRC/pdgstrs1.c index 7ee8d96b..fde44a20 100644 --- a/SRC/pdgstrs1.c +++ b/SRC/pdgstrs1.c @@ -338,7 +338,7 @@ void pdgstrs1(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -454,7 +454,7 @@ void pdgstrs1(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -764,7 +764,7 @@ void pdgstrs1(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -855,7 +855,7 @@ void pdgstrs1(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, diff --git a/SRC/pdgstrs_Bglobal.c b/SRC/pdgstrs_Bglobal.c index c52165b3..eeb3e16d 100644 --- a/SRC/pdgstrs_Bglobal.c +++ b/SRC/pdgstrs_Bglobal.c @@ -362,7 +362,7 @@ pdgstrs_Bglobal(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -487,7 +487,7 @@ pdgstrs_Bglobal(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -798,7 +798,7 @@ pdgstrs_Bglobal(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) { - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -895,7 +895,7 @@ pdgstrs_Bglobal(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) { - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, diff --git a/SRC/pdgstrs_lsum.c b/SRC/pdgstrs_lsum.c index 5d271efd..f38b14f7 100644 --- a/SRC/pdgstrs_lsum.c +++ b/SRC/pdgstrs_lsum.c @@ -200,7 +200,7 @@ void dlsum_fmod * Send Xk to process column Pc[k]. */ for (p = 0; p < grid->nprow; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, ikcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], iknsupc * nrhs + XK_H, @@ -364,7 +364,7 @@ void dlsum_bmod * Send Xk to process column Pc[k]. */ for (p = 0; p < grid->nprow; ++p) { - if ( bsendx_plist[lk1][p] != EMPTY ) { + if ( bsendx_plist[lk1][p] != SLU_EMPTY ) { pi = PNUM( p, gikcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], iknsupc * nrhs + XK_H, diff --git a/SRC/pdsymbfact_distdata.c b/SRC/pdsymbfact_distdata.c index d7a58ebf..f530a27b 100644 --- a/SRC/pdsymbfact_distdata.c +++ b/SRC/pdsymbfact_distdata.c @@ -275,7 +275,7 @@ dist_symbLU (superlu_dist_options_t *options, int_t n, THEN ALLOCATE SPACE. THIS ACCOUNTS FOR THE FIRST PASS OF L and U. ------------------------------------------------------------*/ - gb = EMPTY; + gb = SLU_EMPTY; for (i = 0; i < n; i++) { if (gb != supno_n[i]) { /* a new supernode starts */ @@ -1467,7 +1467,7 @@ double *dense, *dense_col; /* SPA */ } memNLU += j*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; /* Auxiliary arrays used to set up L and U block data structures. @@ -1661,7 +1661,7 @@ double *dense, *dense_col; /* SPA */ fprintf(stderr, "Malloc fails for fsendx_plist[0]"); return (memDist + memNLU + memTRS); } - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < nsupers_j; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(nsupers_j*sizeof(int*))) ) { @@ -1672,7 +1672,7 @@ double *dense, *dense_col; /* SPA */ fprintf(stderr, "Malloc fails for bsendx_plist[0]"); return (memDist + memNLU + memTRS); } - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < nsupers_j; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; /* -------------------------------------------------------------- */ @@ -1918,7 +1918,7 @@ double *dense, *dense_col; /* SPA */ irow = lsub[i]; gb = BlockNum( irow ); /* Global block number */ pr = PROW( gb, grid ); /* Process row owning this block */ - if ( pr != jbrow && fsendx_plist[ljb_j][pr] == EMPTY && + if ( pr != jbrow && fsendx_plist[ljb_j][pr] == SLU_EMPTY && myrow == jbrow) { fsendx_plist[ljb_j][pr] = YES; ++nfsendx; @@ -1949,12 +1949,12 @@ double *dense, *dense_col; /* SPA */ index[] and nzval[]. */ /* If I am the owner of the diagonal block, order it first in LUb_number. Necessary for SuperLU_DIST routines */ - kseen = EMPTY; + kseen = SLU_EMPTY; for (j = 0; j < nrbl; j++) { if (LUb_number[j] == jb) kseen = j; } - if (kseen != EMPTY && kseen != 0) { + if (kseen != SLU_EMPTY && kseen != 0) { LUb_number[kseen] = LUb_number[0]; LUb_number[0] = jb; } @@ -2234,7 +2234,7 @@ double *dense, *dense_col; /* SPA */ if (mycol == jbcol) { for (i = 0, j = ptrToRecv[p]; i < grid->npcol; i++, j++) ToSendR[ljb_j][i] = recvBuf[j]; - ToSendR[ljb_j][mycol] = EMPTY; + ToSendR[ljb_j][mycol] = SLU_EMPTY; } ptrToRecv[p] += grid->npcol; } @@ -2256,13 +2256,13 @@ double *dense, *dense_col; /* SPA */ if (myrow == jbrow ) { for (k = ljb_j * grid->nprow; k < (ljb_j+1) * grid->nprow; k++) { (*bsendx_plist)[k] = recvBuf[k]; - if ((*bsendx_plist)[k] != EMPTY) + if ((*bsendx_plist)[k] != SLU_EMPTY) nbsendx ++; } } else { for (k = ljb_j * grid->nprow; k < (ljb_j+1) * grid->nprow; k++) - (*bsendx_plist)[k] = EMPTY; + (*bsendx_plist)[k] = SLU_EMPTY; } } } /* end for jb ... */ @@ -2647,7 +2647,7 @@ double *dense, *dense_col; /* SPA */ if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -2972,7 +2972,7 @@ double *dense, *dense_col; /* SPA */ for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/pdutil.c b/SRC/pdutil.c index 71b7e730..46fa4c21 100755 --- a/SRC/pdutil.c +++ b/SRC/pdutil.c @@ -800,9 +800,9 @@ int dSolveInit(superlu_dist_options_t *options, SuperMatrix *A, itemp[procs] = n; for (p = 0; p < procs; ++p) { j = itemp[p]; - if ( j != EMPTY ) { + if ( j != SLU_EMPTY ) { k = itemp[p+1]; - if ( k == EMPTY ) k = n; + if ( k == SLU_EMPTY ) k = n; for (i = j ; i < k; ++i) row_to_proc[i] = p; } } diff --git a/SRC/psdistribute.c b/SRC/psdistribute.c index 681954ce..6b02f797 100644 --- a/SRC/psdistribute.c +++ b/SRC/psdistribute.c @@ -695,7 +695,7 @@ psdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, mem_use += (float) k*sizeof(int_t*) + (j + nsupers)*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; k = CEILING( nsupers, grid->nprow ); /* Number of local block rows */ @@ -924,14 +924,14 @@ psdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, len = k * grid->nprow; if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for fsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(k*sizeof(int*))) ) ABORT("Malloc fails for bsendx_plist[]."); if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for bsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; /* -------------------------------------------------------------- */ @@ -990,7 +990,7 @@ psdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, pr = PROW( gb, grid ); if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - bsendx_plist[ljb][pr] == EMPTY ) { + bsendx_plist[ljb][pr] == SLU_EMPTY ) { bsendx_plist[ljb][pr] = YES; ++nbsendx; } @@ -1056,7 +1056,7 @@ psdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, pr = PROW( gb, grid ); /* Process row owning this block */ if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - fsendx_plist[ljb][pr] == EMPTY /* first time */ ) { + fsendx_plist[ljb][pr] == SLU_EMPTY /* first time */ ) { fsendx_plist[ljb][pr] = YES; ++nfsendx; } @@ -1630,7 +1630,7 @@ psdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -1974,7 +1974,7 @@ if ( !iam) printf(".. Construct Reduce tree for L: %.2f\t\n", t); for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/psgsmv.c b/SRC/psgsmv.c index 5b4c2f96..65537ae6 100644 --- a/SRC/psgsmv.c +++ b/SRC/psgsmv.c @@ -127,11 +127,11 @@ void psgsmv_init } /* Build SPA to aid global to local translation. */ - for (i = 0; i < n; ++i) spa[i] = EMPTY; + for (i = 0; i < n; ++i) spa[i] = SLU_EMPTY; for (i = 0; i < m_loc; ++i) { /* Loop through each row of A */ for (j = rowptr[i]; j < rowptr[i+1]; ++j) { jcol = colind[j]; - if ( spa[jcol] == EMPTY ) { /* First time see this index */ + if ( spa[jcol] == SLU_EMPTY ) { /* First time see this index */ p = row_to_proc[jcol]; if ( p == iam ) { /* Local */ /*assert(jcol>=fst_row);*/ @@ -371,19 +371,13 @@ psgsmv void psgsmv_finalize(psgsmv_comm_t *gsmv_comm) { int_t *it; - //float *dt; // Sherry: this can be precision-independent + float *dt; SUPERLU_FREE(gsmv_comm->extern_start); - if ( (it = gsmv_comm->ind_tosend) ) SUPERLU_FREE(it); if ( (it = gsmv_comm->ind_torecv) ) SUPERLU_FREE(it); SUPERLU_FREE(gsmv_comm->ptr_ind_tosend); SUPERLU_FREE(gsmv_comm->SendCounts); -#if 0 if ( (dt = gsmv_comm->val_tosend) ) SUPERLU_FREE(dt); if ( (dt = gsmv_comm->val_torecv) ) SUPERLU_FREE(dt); -#else - if ( gsmv_comm->val_tosend != NULL ) SUPERLU_FREE(gsmv_comm->val_tosend); - if ( gsmv_comm->val_torecv != NULL ) SUPERLU_FREE(gsmv_comm->val_torecv); -#endif } diff --git a/SRC/psgsmv_d2.c b/SRC/psgsmv_d2.c index 5dde6444..074c6c07 100644 --- a/SRC/psgsmv_d2.c +++ b/SRC/psgsmv_d2.c @@ -129,11 +129,11 @@ void psgsmv_init_fp64 // X values are DOUBLE } /* Build SPA to aid global to local translation. */ - for (i = 0; i < n; ++i) spa[i] = EMPTY; + for (i = 0; i < n; ++i) spa[i] = SLU_EMPTY; for (i = 0; i < m_loc; ++i) { /* Loop through each row of A */ for (j = rowptr[i]; j < rowptr[i+1]; ++j) { jcol = colind[j]; - if ( spa[jcol] == EMPTY ) { /* First time see this index */ + if ( spa[jcol] == SLU_EMPTY ) { /* First time see this index */ p = row_to_proc[jcol]; if ( p == iam ) { /* Local */ /*assert(jcol>=fst_row);*/ diff --git a/SRC/psgstrf.c b/SRC/psgstrf.c index a023a8ef..aece99ce 100644 --- a/SRC/psgstrf.c +++ b/SRC/psgstrf.c @@ -1030,7 +1030,7 @@ psgstrf(superlu_dist_options_t * options, int m, int n, float anorm, } for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif @@ -1155,7 +1155,7 @@ psgstrf(superlu_dist_options_t * options, int m, int n, float anorm, } scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { lusup1 = Lnzval_bc_ptr[lk]; #if ( PROFlevel>=1 ) TIC (t1); @@ -1377,7 +1377,7 @@ psgstrf(superlu_dist_options_t * options, int m, int n, float anorm, #endif for (pj = 0; pj < Pc; ++pj) { /* Wait for Isend to complete before using lsub/lusup buffer. */ - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { MPI_Wait (&send_req[pj], &status); MPI_Wait (&send_req[pj + Pc], &status); } @@ -1704,7 +1704,7 @@ psgstrf(superlu_dist_options_t * options, int m, int n, float anorm, scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif diff --git a/SRC/psgstrs1.c b/SRC/psgstrs1.c index abbdd435..07320d4e 100644 --- a/SRC/psgstrs1.c +++ b/SRC/psgstrs1.c @@ -338,7 +338,7 @@ void psgstrs1(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -454,7 +454,7 @@ void psgstrs1(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -764,7 +764,7 @@ void psgstrs1(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -855,7 +855,7 @@ void psgstrs1(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, diff --git a/SRC/psgstrs_Bglobal.c b/SRC/psgstrs_Bglobal.c index fdc38a0d..770592f3 100644 --- a/SRC/psgstrs_Bglobal.c +++ b/SRC/psgstrs_Bglobal.c @@ -362,7 +362,7 @@ psgstrs_Bglobal(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -487,7 +487,7 @@ psgstrs_Bglobal(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -798,7 +798,7 @@ psgstrs_Bglobal(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) { - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -895,7 +895,7 @@ psgstrs_Bglobal(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) { - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, diff --git a/SRC/psgstrs_lsum.c b/SRC/psgstrs_lsum.c index 137274e3..df4abbf8 100644 --- a/SRC/psgstrs_lsum.c +++ b/SRC/psgstrs_lsum.c @@ -200,7 +200,7 @@ void slsum_fmod * Send Xk to process column Pc[k]. */ for (p = 0; p < grid->nprow; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, ikcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], iknsupc * nrhs + XK_H, @@ -364,7 +364,7 @@ void slsum_bmod * Send Xk to process column Pc[k]. */ for (p = 0; p < grid->nprow; ++p) { - if ( bsendx_plist[lk1][p] != EMPTY ) { + if ( bsendx_plist[lk1][p] != SLU_EMPTY ) { pi = PNUM( p, gikcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], iknsupc * nrhs + XK_H, diff --git a/SRC/pssymbfact_distdata.c b/SRC/pssymbfact_distdata.c index c3379e1f..d569c2bf 100644 --- a/SRC/pssymbfact_distdata.c +++ b/SRC/pssymbfact_distdata.c @@ -275,7 +275,7 @@ dist_symbLU (superlu_dist_options_t *options, int_t n, THEN ALLOCATE SPACE. THIS ACCOUNTS FOR THE FIRST PASS OF L and U. ------------------------------------------------------------*/ - gb = EMPTY; + gb = SLU_EMPTY; for (i = 0; i < n; i++) { if (gb != supno_n[i]) { /* a new supernode starts */ @@ -1467,7 +1467,7 @@ float *dense, *dense_col; /* SPA */ } memNLU += j*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; /* Auxiliary arrays used to set up L and U block data structures. @@ -1661,7 +1661,7 @@ float *dense, *dense_col; /* SPA */ fprintf(stderr, "Malloc fails for fsendx_plist[0]"); return (memDist + memNLU + memTRS); } - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < nsupers_j; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(nsupers_j*sizeof(int*))) ) { @@ -1672,7 +1672,7 @@ float *dense, *dense_col; /* SPA */ fprintf(stderr, "Malloc fails for bsendx_plist[0]"); return (memDist + memNLU + memTRS); } - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < nsupers_j; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; /* -------------------------------------------------------------- */ @@ -1918,7 +1918,7 @@ float *dense, *dense_col; /* SPA */ irow = lsub[i]; gb = BlockNum( irow ); /* Global block number */ pr = PROW( gb, grid ); /* Process row owning this block */ - if ( pr != jbrow && fsendx_plist[ljb_j][pr] == EMPTY && + if ( pr != jbrow && fsendx_plist[ljb_j][pr] == SLU_EMPTY && myrow == jbrow) { fsendx_plist[ljb_j][pr] = YES; ++nfsendx; @@ -1949,12 +1949,12 @@ float *dense, *dense_col; /* SPA */ index[] and nzval[]. */ /* If I am the owner of the diagonal block, order it first in LUb_number. Necessary for SuperLU_DIST routines */ - kseen = EMPTY; + kseen = SLU_EMPTY; for (j = 0; j < nrbl; j++) { if (LUb_number[j] == jb) kseen = j; } - if (kseen != EMPTY && kseen != 0) { + if (kseen != SLU_EMPTY && kseen != 0) { LUb_number[kseen] = LUb_number[0]; LUb_number[0] = jb; } @@ -2234,7 +2234,7 @@ float *dense, *dense_col; /* SPA */ if (mycol == jbcol) { for (i = 0, j = ptrToRecv[p]; i < grid->npcol; i++, j++) ToSendR[ljb_j][i] = recvBuf[j]; - ToSendR[ljb_j][mycol] = EMPTY; + ToSendR[ljb_j][mycol] = SLU_EMPTY; } ptrToRecv[p] += grid->npcol; } @@ -2256,13 +2256,13 @@ float *dense, *dense_col; /* SPA */ if (myrow == jbrow ) { for (k = ljb_j * grid->nprow; k < (ljb_j+1) * grid->nprow; k++) { (*bsendx_plist)[k] = recvBuf[k]; - if ((*bsendx_plist)[k] != EMPTY) + if ((*bsendx_plist)[k] != SLU_EMPTY) nbsendx ++; } } else { for (k = ljb_j * grid->nprow; k < (ljb_j+1) * grid->nprow; k++) - (*bsendx_plist)[k] = EMPTY; + (*bsendx_plist)[k] = SLU_EMPTY; } } } /* end for jb ... */ @@ -2647,7 +2647,7 @@ float *dense, *dense_col; /* SPA */ if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -2972,7 +2972,7 @@ float *dense, *dense_col; /* SPA */ for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/psutil.c b/SRC/psutil.c index 1f3606aa..f6d7337c 100755 --- a/SRC/psutil.c +++ b/SRC/psutil.c @@ -800,9 +800,9 @@ int sSolveInit(superlu_dist_options_t *options, SuperMatrix *A, itemp[procs] = n; for (p = 0; p < procs; ++p) { j = itemp[p]; - if ( j != EMPTY ) { + if ( j != SLU_EMPTY ) { k = itemp[p+1]; - if ( k == EMPTY ) k = n; + if ( k == SLU_EMPTY ) k = n; for (i = j ; i < k; ++i) row_to_proc[i] = p; } } diff --git a/SRC/psymbfact.c b/SRC/psymbfact.c index 9ea385a0..2e74ec3f 100644 --- a/SRC/psymbfact.c +++ b/SRC/psymbfact.c @@ -324,7 +324,7 @@ float symbfact_dist VInfo.maxSzBlk = sp_ienv_dist(3, options); maxSzBlk = VInfo.maxSzBlk; - mark = EMPTY; + mark = SLU_EMPTY; nsuper_loc = 0; nextl = 0; nextu = 0; neltsZr = 0; neltsTotal = 0; @@ -409,9 +409,9 @@ float symbfact_dist #endif } - /* set to EMPTY marker[] array */ + /* set to SLU_EMPTY marker[] array */ for (i = 0; i < n; i++) - tempArray[i] = EMPTY; + tempArray[i] = SLU_EMPTY; szSep = nprocs_symb; iSep = 0; @@ -1086,7 +1086,7 @@ symbfact_mapVtcs globToLoc[n] = n; for (p = 0; p < nprocs_symb; p++) { vtcs_pe[p] = 0; - avail_pes[p] = EMPTY; + avail_pes[p] = SLU_EMPTY; } nvtcs_loc = 0; nblks_loc = 0; @@ -1130,9 +1130,9 @@ symbfact_mapVtcs /* first allocate processors from previous levels */ for (ind_ap_s = (jSep-iSep) * npNode; ind_ap_s < (jSep-iSep+1) * npNode; ind_ap_s ++) { p = avail_pes[ind_ap_s]; - if (p != EMPTY && k < lstVtx) { + if (p != SLU_EMPTY && k < lstVtx) { /* for each column in the separator */ - avail_pes[ind_ap_s] = EMPTY; + avail_pes[ind_ap_s] = SLU_EMPTY; kk = 0; while (kk < noVtcsProc && k < lstVtx) { globToLoc[k] = p; @@ -1147,8 +1147,8 @@ symbfact_mapVtcs } } else { - if (p != EMPTY && k == lstVtx) { - avail_pes[ind_ap_s] = EMPTY; + if (p != SLU_EMPTY && k == lstVtx) { + avail_pes[ind_ap_s] = SLU_EMPTY; avail_pes[ind_ap_d] = p; ind_ap_d ++; } } @@ -1429,13 +1429,13 @@ symbfact_distributeMatrix for (i = 0, j = 0, p = 0; p < nprocs_num; p++) { if ( p != iam ) { if (nnzToSend[p] != 0) { - snd_aind[i + nnzAinf_toSnd[p]] = EMPTY; + snd_aind[i + nnzAinf_toSnd[p]] = SLU_EMPTY; ptr_toSnd[p] = i + nnzAinf_toSnd[p] + 1; } } else { if (nnzToRecv[p] != 0) { - rcv_aind[j + nnzAinf_toSnd[p]] = EMPTY; + rcv_aind[j + nnzAinf_toSnd[p]] = SLU_EMPTY; ptr_toSnd[p] = j + nnzAinf_toSnd[p] + 1; } } @@ -1578,7 +1578,7 @@ symbfact_distributeMatrix k = 0; while (k < nnzToRecv[p]) { j = rcv_aind[i + k]; - if (j == EMPTY) { + if (j == SLU_EMPTY) { ainf_data = FALSE; k ++; } @@ -1625,7 +1625,7 @@ symbfact_distributeMatrix k = 0; while (k < nnzToRecv[p]) { j = rcv_aind[i + k]; - if (ainf_data && j == EMPTY) { + if (ainf_data && j == SLU_EMPTY) { ainf_data = FALSE; k ++; } @@ -1985,14 +1985,14 @@ int symbfact_alloc CS->snd_buf = NULL; for (p = 0; p < nprocs; p++) { - CS->rcv_interLvl[p] = EMPTY; - CS->snd_interLvl[p] = EMPTY; - CS->rcv_intraLvl[p] = EMPTY; - CS->snd_intraLvl[p] = EMPTY; + CS->rcv_interLvl[p] = SLU_EMPTY; + CS->snd_interLvl[p] = SLU_EMPTY; + CS->rcv_intraLvl[p] = SLU_EMPTY; + CS->snd_intraLvl[p] = SLU_EMPTY; } for (p = 0; p <= nlvls; p++) { - CS->snd_vtxinter[p] = EMPTY; + CS->snd_vtxinter[p] = SLU_EMPTY; CS->snd_interSz[p] = 0; CS->snd_LinterSz[p] = 0; } @@ -2079,9 +2079,9 @@ symbfact_vtx x_aind_end = xsub[vtx_lid + 1]; xsub[vtx_lid] = next; k = x_aind_beg; - /* while (sub[k] != EMPTY && k < x_aind_end) { */ + /* while (sub[k] != SLU_EMPTY && k < x_aind_end) { */ while (k < x_aind_end) { - if (sub[k] == EMPTY) + if (sub[k] == SLU_EMPTY) k = x_aind_end; else { vtx_elt = sub[k]; @@ -2124,7 +2124,7 @@ symbfact_vtx if (vtx_bel_othSn == vtx) upd_lstSn = TRUE; - while (ind != EMPTY || upd_lstSn) { + while (ind != SLU_EMPTY || upd_lstSn) { if (upd_lstSn ) { upd_lstSn = FALSE; pr_lid = snrep_lid; @@ -2162,7 +2162,7 @@ symbfact_vtx Pslu_freeable, Llu_symbfact, VInfo, PS)) ) return (mem_error); } else if ( (mem_error = - psymbfact_LUXpand (iam, n, EMPTY, vtx, &next, 0, + psymbfact_LUXpand (iam, n, SLU_EMPTY, vtx, &next, 0, computeL, LL_SYMB, 1, Pslu_freeable, Llu_symbfact, VInfo, PS)) ) return (mem_error); @@ -2292,13 +2292,13 @@ updateRcvd_prGraph xsub_rcvd[i] = 0; i = 0; - fstVtx_srcUpd = EMPTY; + fstVtx_srcUpd = SLU_EMPTY; while (i < sub_rcvd_sz) { vtx = sub_rcvd[i + DIAG_IND]; nelts = sub_rcvd[i + NELTS_IND]; i += RCVD_IND; prVal = sub_rcvd[i]; - if (fstVtx_srcUpd == EMPTY) fstVtx_srcUpd = vtx; + if (fstVtx_srcUpd == SLU_EMPTY) fstVtx_srcUpd = vtx; xsub_rcvd[vtx - fstVtx_srcUpd] = i - RCVD_IND; xsub_rcvd[vtx-fstVtx_srcUpd+1] = i + nelts; for (k = i; k < i + nelts; k++) { @@ -2365,7 +2365,7 @@ updateRcvd_prGraph if (marker[vtx_elt_lid] != xsubPr[vtx_lid_p] - 1) subPr[marker[vtx_elt_lid] - 2] = marker[vtx_elt_lid] + 1; subPr[marker[vtx_elt_lid] + 1] = vtx - fstVtx_srcUpd + VInfo->nvtcs_loc; - subPr[marker[vtx_elt_lid]] = EMPTY; + subPr[marker[vtx_elt_lid]] = SLU_EMPTY; marker[vtx_elt_lid] += 2; } } @@ -2425,7 +2425,7 @@ update_prGraph if (prval_cursn != n) maxElt = prval_cursn; else - maxElt = EMPTY; + maxElt = SLU_EMPTY; while (kmin <= kmax) { if (prval_cursn == n) { /* compute maximum element of L(:, vtx) */ @@ -2565,16 +2565,16 @@ blk_symbfact szsn = 1; nvtcs = lstVtx_blk - fstVtx_blk; prval_cursn = n; - vtx_bel_snL = EMPTY; vtx_bel_snU = EMPTY; + vtx_bel_snL = SLU_EMPTY; vtx_bel_snU = SLU_EMPTY; - /* set up to EMPTY xlsubPr[], xusubPr[] */ + /* set up to SLU_EMPTY xlsubPr[], xusubPr[] */ if (PS->maxSzLPr < Llu_symbfact->indLsubPr) PS->maxSzLPr = Llu_symbfact->indLsubPr; if (PS->maxSzUPr < Llu_symbfact->indUsubPr) PS->maxSzUPr = Llu_symbfact->indUsubPr; for (i = 0; i < nvtcs; i++) { - xlsubPr[i] = EMPTY; - xusubPr[i] = EMPTY; + xlsubPr[i] = SLU_EMPTY; + xusubPr[i] = SLU_EMPTY; } Llu_symbfact->indLsubPr = 0; Llu_symbfact->indUsubPr = 0; @@ -2602,10 +2602,10 @@ blk_symbfact for (vtx = fstVtx_blk; vtx < lstVtx_blk; vtx++, vtx_lid ++, vtx_prid ++) { vtxp1 = vtx + 1; if (marku2_vtx +4 >= n) { - /* reset to EMPTY marker array */ + /* reset to SLU_EMPTY marker array */ for (i = 0; i < n; i++) - marker[i] = EMPTY; - marku2_vtx = EMPTY; + marker[i] = SLU_EMPTY; + marku2_vtx = SLU_EMPTY; } markl1_vtx = marku2_vtx + 1; markl2_vtx = markl1_vtx + 1; marku1_vtx = markl2_vtx + 1; marku2_vtx = marku1_vtx + 1; @@ -2851,7 +2851,7 @@ blk_symbfact lstVtx_tmp = fstVtxSep[jj] + sizes[jj]; CS->snd_interSz[lvl_tmp] += neltSn_L + neltSn_U + 4; CS->snd_LinterSz[lvl_tmp] += neltSn_L + 2; - if (CS->snd_vtxinter[lvl_tmp] == EMPTY) + if (CS->snd_vtxinter[lvl_tmp] == SLU_EMPTY) CS->snd_vtxinter[lvl_tmp] = snrep; } } @@ -2870,7 +2870,7 @@ blk_symbfact if (marker[vtxp1] == marku1_vtx) vtx_bel_snU = vtxp1; else - vtx_bel_snU = EMPTY; + vtx_bel_snU = SLU_EMPTY; } } if (vtx == lstVtx_blk - 1) @@ -2932,8 +2932,8 @@ domain_symbfact /* call blk_symbfact */ blk_symbfact (A, iam, lvl, szSep, ind_sizes1, ind_sizes2, sizes, fstVtxSep, - EMPTY, fstVtx, lstVtx, - NULL, EMPTY, NULL, EMPTY, + SLU_EMPTY, fstVtx, lstVtx, + NULL, SLU_EMPTY, NULL, SLU_EMPTY, Pslu_freeable, Llu_symbfact, VInfo, CS, PS, marker, p_mark, p_nextl, p_nextu, p_neltsZr, p_neltsTotal, @@ -3123,7 +3123,7 @@ initLvl_symbfact nelts ++; } if (nelts < cntelt_vtx_l) - lsub[nextl] = EMPTY; + lsub[nextl] = SLU_EMPTY; nextl += cntelt_vtx_l - nelts; x_aind_end = xusub[vtx_lid + 1]; xusub[vtx_lid] = nextu; @@ -3133,7 +3133,7 @@ initLvl_symbfact nelts ++; } if (nelts < cntelt_vtx_u) - usub[nextu] = EMPTY; + usub[nextu] = SLU_EMPTY; nextu += cntelt_vtx_u - nelts; } } @@ -3225,8 +3225,8 @@ expand_RL vtxXp_lid = LOCAL_IND( globToLoc[vtxXp] ); nextl = xlsub[vtxXp_lid+1]; - lvtx_lid = EMPTY; - if (lstVtx_srcUpd != EMPTY) + lvtx_lid = SLU_EMPTY; + if (lstVtx_srcUpd != SLU_EMPTY) lvtx_lid = LOCAL_IND( globToLoc[lstVtx_srcUpd - 1] ); /* count the number of new elements, and update Llu_symbfact->cntelt_vtcs */ @@ -3240,7 +3240,7 @@ expand_RL vtx = usubPr[j]; /* setup marker structure for already existing elements */ ii = xlsub[vtx_lid]; - while (lsub[ii] != EMPTY && ii < xlsub[vtx_lid + 1]) { + while (lsub[ii] != SLU_EMPTY && ii < xlsub[vtx_lid + 1]) { marker[lsub[ii]] = markl; ii ++; } @@ -3289,7 +3289,7 @@ expand_RL if (markl == n) { /* reset marker array */ for (j = fstVtx_toUpd; j < n; j++) - marker[j] = EMPTY; + marker[j] = SLU_EMPTY; markl = 0; } } @@ -3360,8 +3360,8 @@ rl_update maxNvtcsPProc = Pslu_freeable->maxNvtcsPProc; globToLoc = Pslu_freeable->globToLoc; - fstVtx_upd = EMPTY; - lstVtx_upd = EMPTY; + fstVtx_upd = SLU_EMPTY; + lstVtx_upd = SLU_EMPTY; xusubPr = Llu_symbfact->xlsubPr; usubPr = Llu_symbfact->lsubPr; if (computeL) { xlsub = Llu_symbfact->xlsub; lsub = Llu_symbfact->lsub; @@ -3380,12 +3380,12 @@ rl_update marker[i] = 0; i = 0; - if (fstVtx_srcUpd != EMPTY) { + if (fstVtx_srcUpd != SLU_EMPTY) { fstVtx_srcUpd_lid = LOCAL_IND( globToLoc[fstVtx_srcUpd] ); vtx_lid = fstVtx_srcUpd_lid; } - lvtx_lid = EMPTY; - if (lstVtx_srcUpd != EMPTY) + lvtx_lid = SLU_EMPTY; + if (lstVtx_srcUpd != SLU_EMPTY) lvtx_lid = LOCAL_IND( globToLoc[lstVtx_srcUpd - 1] ); while (i < usub_rcvd_sz) { @@ -3423,7 +3423,7 @@ rl_update for (i = 0; i < nvtcs_toUpd; i++) { if (marker[i] != 0) { marker[i] ++; - if (fstVtx_upd == EMPTY) + if (fstVtx_upd == SLU_EMPTY) fstVtx_upd = i; lstVtx_upd = i; } @@ -3447,7 +3447,7 @@ rl_update } i = 0; - if (fstVtx_srcUpd != EMPTY) { + if (fstVtx_srcUpd != SLU_EMPTY) { vtx_loc = fstVtx_srcUpd; vtx_lid = LOCAL_IND( globToLoc[vtx_loc] ); ind_blk = indBlk_srcUpd; @@ -3466,7 +3466,7 @@ rl_update nelts = xusub[vtx_lid + 1] - xusub[vtx_lid]; vtx_lid ++; vtx_loc ++; - if (ind_blk != EMPTY) + if (ind_blk != SLU_EMPTY) if (vtx_loc == VInfo->begEndBlks_loc[ind_blk+1]) { ind_blk += 2; vtx_loc = VInfo->begEndBlks_loc[ind_blk]; @@ -3497,8 +3497,8 @@ rl_update } /* reset marker array */ for (i = 0; i < nvtcs_toUpd; i++) - marker[i] = EMPTY; - if (fstVtx_srcUpd != EMPTY) { + marker[i] = SLU_EMPTY; + if (fstVtx_srcUpd != SLU_EMPTY) { vtx_loc = fstVtx_srcUpd; vtx_lid = LOCAL_IND( globToLoc[vtx_loc] ); ind_blk = indBlk_srcUpd; @@ -3520,7 +3520,7 @@ rl_update vtx_lid ++; marker[vtx] = i; vtx_loc ++; - if (ind_blk != EMPTY) + if (ind_blk != SLU_EMPTY) if (vtx_loc == VInfo->begEndBlks_loc[ind_blk+1]) { ind_blk += 2; vtx_loc = VInfo->begEndBlks_loc[ind_blk]; @@ -3538,7 +3538,7 @@ rl_update vtx = usubPr[j]; /* setup marker structure for already existing elements */ ii = xlsub[vtx_lid]; - while (lsub[ii] != EMPTY && ii < xlsub[vtx_lid + 1]) { + while (lsub[ii] != SLU_EMPTY && ii < xlsub[vtx_lid + 1]) { marker[lsub[ii]] = markl; ii ++; } @@ -3598,12 +3598,12 @@ rl_update } } if (nextl < xlsub[vtx_lid+1]) - lsub[nextl] = EMPTY; + lsub[nextl] = SLU_EMPTY; markl ++; if (markl == n) { /* reset marker array */ for (j = fstVtx_toUpd; j < n; j++) - marker[j] = EMPTY; + marker[j] = SLU_EMPTY; markl = 0; } } @@ -3653,7 +3653,7 @@ dnsUpSeps_symbfact VInfo->nnz_ainf_loc = 0; VInfo->nnz_asup_loc = 0; - if (fstVtx_dns == EMPTY) + if (fstVtx_dns == SLU_EMPTY) fstVtx_blk = VInfo->begEndBlks_loc[curblk_loc]; else fstVtx_blk = fstVtx_dns; @@ -3800,7 +3800,7 @@ dnsCurSep_symbfact VInfo->curblk_loc += 2; computeL = TRUE; computeU = TRUE; - lstVtx_dns_lid = EMPTY; + lstVtx_dns_lid = SLU_EMPTY; globToLoc = Pslu_freeable->globToLoc; maxNvtcsPProc = Pslu_freeable->maxNvtcsPProc; fstVtx = fstVtxSep[ind_sizes2]; @@ -3849,7 +3849,7 @@ dnsCurSep_symbfact nvtcs_upd += lstVtx_blk - fstVtx_blk; for (vtx = fstVtx_blk; vtx < lstVtx_blk; vtx++, vtx_lid++) { j = xsub[vtx_lid]; - while (j < xsub[vtx_lid+1] && sub[j] != EMPTY) { + while (j < xsub[vtx_lid+1] && sub[j] != SLU_EMPTY) { PS->nops ++; vtx_elt = sub[j] - fstVtx_dns; if (minElt_vtx[vtx_elt] == n) { @@ -3953,7 +3953,7 @@ dnsCurSep_symbfact } for (i = fstVtx_dns; i < n; i++) - marker[i] = EMPTY; + marker[i] = SLU_EMPTY; mark = 0; /* update vertices */ @@ -3976,9 +3976,9 @@ dnsCurSep_symbfact snlid = vtx_lid; snrep = vtx; if (mark + 2 > n) { - /* reset to EMPTY marker array */ + /* reset to SLU_EMPTY marker array */ for (i = 0; i < n; i++) - marker[i] = EMPTY; + marker[i] = SLU_EMPTY; mark = 0; } @@ -4090,7 +4090,7 @@ dnsCurSep_symbfact } } else { - maxElt = EMPTY; + maxElt = SLU_EMPTY; while (kmin <= kmax) { /* compute maximum element of L(:, vtx) */ if (sub[kmin] > maxElt) { @@ -4117,7 +4117,7 @@ dnsCurSep_symbfact lstVtx = fstVtxSep[ind_sizes2] + sizes[ind_sizes2]; CS->snd_interSz[lvl] += i + j + 4; CS->snd_LinterSz[lvl] += i + 2; - if (CS->snd_vtxinter[lvl] == EMPTY) + if (CS->snd_vtxinter[lvl] == SLU_EMPTY) CS->snd_vtxinter[lvl] = snrep; } } @@ -4125,7 +4125,7 @@ dnsCurSep_symbfact } /* restore value in cntelt_vtcs */ - if (lstVtx_dns_lid != EMPTY) + if (lstVtx_dns_lid != SLU_EMPTY) Llu_symbfact->cntelt_vtcs[lstVtx_dns_lid] = save_cnt; *p_mark = mark; if (minElt_vtx != CS->rcv_buf) @@ -4250,7 +4250,7 @@ denseSep_symbfact else if (rcvd_dnsSep) if ( (mem_error = dnsUpSeps_symbfact (n, iam, szSep, ind_sizes1, ind_sizes2, - sizes, fstVtxSep, EMPTY, + sizes, fstVtxSep, SLU_EMPTY, Llu_symbfact, Pslu_freeable, VInfo, CS, PS, p_nextl, p_nextu, p_nsuper_loc)) ) return (mem_error); @@ -4367,7 +4367,7 @@ interLvl_symbfact if ( (mem_error = dnsUpSeps_symbfact (n, iam, szSep, ind_sizes1, ind_sizes2, sizes, fstVtxSep, - EMPTY, Llu_symbfact, Pslu_freeable, VInfo, CS, PS, + SLU_EMPTY, Llu_symbfact, Pslu_freeable, VInfo, CS, PS, p_nextl, p_nextu, p_nsuper_loc)) ) return (mem_error); } @@ -4395,7 +4395,7 @@ interLvl_symbfact * information setup during the copy of data to be send in the buffer * rcv_interLvl : from which processors iam receives update data */ for (p = 2*fstP; p < 2*lstP; p++) - snd_interLvl[p] = EMPTY; + snd_interLvl[p] = SLU_EMPTY; if (snd_interLvlSz == 0 && nvtcsLvl_loc == 0) { code_err = MPI_Alltoall (&(snd_interLvl[2*fstP]), 2, mpi_int_t, @@ -4495,12 +4495,12 @@ interLvl_symbfact if (nextl == 0 || nextu - snd_LinterLvlSz == 0) { for (p = 2*fstP; p < 2*lstP; p++) - snd_interLvl[p] = EMPTY; + snd_interLvl[p] = SLU_EMPTY; } nprocsToSnd = 0; for (p = 2*fstP; p < 2*lstP; p +=2) { - if (snd_interLvl[p] != EMPTY || snd_interLvl[p+1] != EMPTY) { + if (snd_interLvl[p] != SLU_EMPTY || snd_interLvl[p+1] != SLU_EMPTY) { snd_interLvl[p] = nextl; snd_interLvl[p+1] = nextu - snd_LinterLvlSz; nprocsToSnd ++; @@ -4520,12 +4520,12 @@ interLvl_symbfact nprocsToRcv = 0; for (p = 2*fstP; p < 2*lstP; p +=2) { CS->ptr_rcvBuf[p] = max_rcvSz; - if (rcv_interLvl[p] != EMPTY) + if (rcv_interLvl[p] != SLU_EMPTY) max_rcvSz += rcv_interLvl[p]; CS->ptr_rcvBuf[p+1] = max_rcvSz; - if (rcv_interLvl[p+1] != EMPTY) + if (rcv_interLvl[p+1] != SLU_EMPTY) max_rcvSz += rcv_interLvl[p+1]; - if (rcv_interLvl[p] != EMPTY || rcv_interLvl[p+1] != EMPTY) + if (rcv_interLvl[p] != SLU_EMPTY || rcv_interLvl[p+1] != SLU_EMPTY) nprocsToRcv ++; } @@ -4557,7 +4557,7 @@ interLvl_symbfact /* determine if we have to send data */ i = 0; for (toSend = fstP, p = 2*fstP; p < 2*lstP; toSend++, p+=2) - if (snd_interLvl[p] != EMPTY && toSend != iam) { + if (snd_interLvl[p] != SLU_EMPTY && toSend != iam) { MPI_Isend (CS->snd_buf, nextl, mpi_int_t, toSend, tag_interLvl_LData, (*symb_comm), &(request_snd[2*i])); MPI_Isend (&(CS->snd_buf[snd_LinterLvlSz]), @@ -4583,7 +4583,7 @@ interLvl_symbfact mem_error = rl_update (0, n, iam, lsub_rcvd, lsub_rcvd_sz, - usub_rcvd, usub_rcvd_sz, snd_vtxLvl, EMPTY, snd_indBlk, + usub_rcvd, usub_rcvd_sz, snd_vtxLvl, SLU_EMPTY, snd_indBlk, fstVtxLvl_loc, lstVtx, nvtcsLvl_loc, 1, &mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); @@ -4594,7 +4594,7 @@ interLvl_symbfact lsub = Llu_symbfact->lsub; usub = Llu_symbfact->usub; mem_error = rl_update (0, n, iam, usub_rcvd, usub_rcvd_sz, - lsub_rcvd, lsub_rcvd_sz, snd_vtxLvl, EMPTY, snd_indBlk, + lsub_rcvd, lsub_rcvd_sz, snd_vtxLvl, SLU_EMPTY, snd_indBlk, fstVtxLvl_loc, lstVtx, nvtcsLvl_loc, 0, &mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); lsub = Llu_symbfact->lsub; usub = Llu_symbfact->usub; @@ -4603,7 +4603,7 @@ interLvl_symbfact /* post non-blocking receives for all the incoming messages */ i = 0; for (rcvdP = fstP, p = 2*fstP; p < 2*lstP; rcvdP++, p += 2) - if (rcv_interLvl[p] != EMPTY) { + if (rcv_interLvl[p] != SLU_EMPTY) { lsub_rcvd = &(CS->rcv_buf[CS->ptr_rcvBuf[p]]); MPI_Irecv (lsub_rcvd, rcv_interLvl[p], mpi_int_t, rcvdP, tag_interLvl_LData, (*symb_comm), &(request_rcv[i])); @@ -4626,7 +4626,7 @@ interLvl_symbfact MPI_Waitany (2*nprocsToRcv, request_rcv, &ind1, status); ij = 0; for (p = fstP; p < lstP; p++) - if (rcv_interLvl[2*p] != EMPTY) { + if (rcv_interLvl[2*p] != SLU_EMPTY) { if (ij <= ind1 && ind1 < ij+2) { rcvdP = p; p = lstP; if (ind1 == ij) ind2 = ij+1; @@ -4651,13 +4651,13 @@ interLvl_symbfact /* use received data to update symbolic factorization information */ mem_error = rl_update (1, n, iam, lsub_rcvd, lsub_rcvd_sz, - usub_rcvd, usub_rcvd_sz, EMPTY, EMPTY, EMPTY, + usub_rcvd, usub_rcvd_sz, SLU_EMPTY, SLU_EMPTY, SLU_EMPTY, fstVtxLvl_loc, lstVtx, nvtcsLvl_loc, 1, &mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); lsub = Llu_symbfact->lsub; mem_error = rl_update (1, n, iam, usub_rcvd, usub_rcvd_sz, - lsub_rcvd, lsub_rcvd_sz, EMPTY, EMPTY, EMPTY, + lsub_rcvd, lsub_rcvd_sz, SLU_EMPTY, SLU_EMPTY, SLU_EMPTY, fstVtxLvl_loc, lstVtx, nvtcsLvl_loc, 0, &mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); usub = Llu_symbfact->usub; @@ -4876,7 +4876,7 @@ intraLvl_symbfact nmsgsTRcv = n; VInfo->maxNeltsVtx -= fstVtx_blk - prv_fstVtx_blk; - index_req[0] = EMPTY; + index_req[0] = SLU_EMPTY; for (r = 0; r < 3; r++) request[r] = MPI_REQUEST_NULL; if (fstVtx_blk != fstVtx) { @@ -4964,14 +4964,14 @@ intraLvl_symbfact if (!lstBlkRcvd) { mem_error = rl_update (1, n, iam, lsub_rcvd, lsub_rcvd_sz, - usub_rcvd, usub_rcvd_sz, EMPTY, EMPTY, EMPTY, + usub_rcvd, usub_rcvd_sz, SLU_EMPTY, SLU_EMPTY, SLU_EMPTY, fstVtx_blk, lstVtx, nvtcs_blk + nvtcs_toUpd, 1, p_mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); lsub = Llu_symbfact->lsub; mem_error = rl_update (1, n, iam, usub_rcvd, usub_rcvd_sz, - lsub_rcvd, lsub_rcvd_sz, EMPTY, EMPTY, EMPTY, + lsub_rcvd, lsub_rcvd_sz, SLU_EMPTY, SLU_EMPTY, SLU_EMPTY, fstVtx_blk, lstVtx, nvtcs_blk + nvtcs_toUpd, 0, p_mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); @@ -5032,14 +5032,14 @@ intraLvl_symbfact if (lstBlkRcvd) { mem_error = rl_update (1, n, iam, lsub_rcvd, lsub_rcvd_sz, - usub_rcvd, usub_rcvd_sz, EMPTY, EMPTY, EMPTY, + usub_rcvd, usub_rcvd_sz, SLU_EMPTY, SLU_EMPTY, SLU_EMPTY, fstVtx_toUpd, lstVtx, nvtcs_toUpd, 1, p_mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); lsub = Llu_symbfact->lsub; mem_error = rl_update (1, n, iam, usub_rcvd, usub_rcvd_sz, - lsub_rcvd, lsub_rcvd_sz, EMPTY, EMPTY, EMPTY, + lsub_rcvd, lsub_rcvd_sz, SLU_EMPTY, SLU_EMPTY, SLU_EMPTY, fstVtx_toUpd, lstVtx, nvtcs_toUpd, 0, p_mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); @@ -5194,7 +5194,7 @@ intraLvl_symbfact mem_error = rl_update (0, n, iam, lsub_rcvd, lsub_rcvd_sz, usub_rcvd, usub_rcvd_sz, fstVtx_blk, lstVtx_blk, - EMPTY, + SLU_EMPTY, fstVtx_toUpd, lstVtx, nvtcs_toUpd, 1, p_mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); @@ -5203,7 +5203,7 @@ intraLvl_symbfact mem_error = rl_update (0, n, iam, usub_rcvd, usub_rcvd_sz, lsub_rcvd, lsub_rcvd_sz, fstVtx_blk, lstVtx_blk, - EMPTY, + SLU_EMPTY, fstVtx_toUpd, lstVtx, nvtcs_toUpd, 0, p_mark, marker, Pslu_freeable, Llu_symbfact, VInfo, PS); diff --git a/SRC/psymbfact_util.c b/SRC/psymbfact_util.c index 19afa2b4..26b3a3f3 100644 --- a/SRC/psymbfact_util.c +++ b/SRC/psymbfact_util.c @@ -328,12 +328,12 @@ int_t psymbfact_LUXpand for (; vtx_lid > vtxXp_lid; vtx_lid --) { j = xsub[vtx_lid]; nel = 0; - while (j < xsub[vtx_lid+1] && prev_mem[j] != EMPTY) { + while (j < xsub[vtx_lid+1] && prev_mem[j] != SLU_EMPTY) { nel ++; j ++; } j = xsub[vtx_lid] + nel - 1; k = i - (xsub[vtx_lid+1] - xsub[vtx_lid]) + nel - 1; - if (k+1 < i) new_mem[k+1] = EMPTY; + if (k+1 < i) new_mem[k+1] = SLU_EMPTY; while (j >= xsub[vtx_lid]) { new_mem[k] = prev_mem[j]; k--; j--; } @@ -344,7 +344,7 @@ int_t psymbfact_LUXpand xsub[vtx_lid+1] = i; k = *p_next; if (k < xsub[vtx_lid+1]) - new_mem[k] = EMPTY; + new_mem[k] = SLU_EMPTY; } if (rout_type == RL_SYMB) { @@ -358,12 +358,12 @@ int_t psymbfact_LUXpand nelts = Llu_symbfact->cntelt_vtcs[vtx_lid]; j = xsub[vtx_lid]; nel = 0; - while (j < xsub[vtx_lid+1] && prev_mem[j] != EMPTY) { + while (j < xsub[vtx_lid+1] && prev_mem[j] != SLU_EMPTY) { nel ++; j ++; } j = xsub[vtx_lid] + nel - 1; k = i - nelts + nel - 1; - if (k+1 < i) new_mem[k+1] = EMPTY; + if (k+1 < i) new_mem[k+1] = SLU_EMPTY; while (j >= xsub[vtx_lid]) { new_mem[k] = prev_mem[j]; k--; j--; } @@ -475,13 +475,13 @@ int_t psymbfact_LUXpand_RL for (; vtx_lid > vtxXp_lid; vtx_lid --) { j = xsub[vtx_lid]; nel = 0; - while (j < xsub[vtx_lid+1] && prev_mem[j] != EMPTY) { + while (j < xsub[vtx_lid+1] && prev_mem[j] != SLU_EMPTY) { nel ++; j++; } j = xsub[vtx_lid] + nel - 1; k = i - Llu_symbfact->cntelt_vtcs[vtx_lid] + nel - 1; if (k+1 < i) - new_mem[k+1] = EMPTY; + new_mem[k+1] = SLU_EMPTY; while (j >= xsub[vtx_lid]) { new_mem[k] = prev_mem[j]; k--; j--; @@ -493,7 +493,7 @@ int_t psymbfact_LUXpand_RL xsub[vtx_lid+1] = i; k = next; if (k < xsub[vtx_lid+1]) - new_mem[k] = EMPTY; + new_mem[k] = SLU_EMPTY; if (new_mem != prev_mem) SUPERLU_FREE (prev_mem); diff --git a/SRC/pzdistribute.c b/SRC/pzdistribute.c index b2f63086..08c5b4c3 100644 --- a/SRC/pzdistribute.c +++ b/SRC/pzdistribute.c @@ -694,7 +694,7 @@ pzdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, mem_use += (float) k*sizeof(int_t*) + (j + nsupers)*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; k = CEILING( nsupers, grid->nprow ); /* Number of local block rows */ @@ -923,14 +923,14 @@ pzdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, len = k * grid->nprow; if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for fsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(k*sizeof(int*))) ) ABORT("Malloc fails for bsendx_plist[]."); if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for bsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; /* -------------------------------------------------------------- */ @@ -989,7 +989,7 @@ pzdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, pr = PROW( gb, grid ); if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - bsendx_plist[ljb][pr] == EMPTY ) { + bsendx_plist[ljb][pr] == SLU_EMPTY ) { bsendx_plist[ljb][pr] = YES; ++nbsendx; } @@ -1055,7 +1055,7 @@ pzdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, pr = PROW( gb, grid ); /* Process row owning this block */ if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - fsendx_plist[ljb][pr] == EMPTY /* first time */ ) { + fsendx_plist[ljb][pr] == SLU_EMPTY /* first time */ ) { fsendx_plist[ljb][pr] = YES; ++nfsendx; } @@ -1629,7 +1629,7 @@ pzdistribute(superlu_dist_options_t *options, int_t n, SuperMatrix *A, if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -1973,7 +1973,7 @@ if ( !iam) printf(".. Construct Reduce tree for L: %.2f\t\n", t); for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/pzgsmv.c b/SRC/pzgsmv.c index f76c3293..4a53fec5 100644 --- a/SRC/pzgsmv.c +++ b/SRC/pzgsmv.c @@ -126,11 +126,11 @@ void pzgsmv_init } /* Build SPA to aid global to local translation. */ - for (i = 0; i < n; ++i) spa[i] = EMPTY; + for (i = 0; i < n; ++i) spa[i] = SLU_EMPTY; for (i = 0; i < m_loc; ++i) { /* Loop through each row of A */ for (j = rowptr[i]; j < rowptr[i+1]; ++j) { jcol = colind[j]; - if ( spa[jcol] == EMPTY ) { /* First time see this index */ + if ( spa[jcol] == SLU_EMPTY ) { /* First time see this index */ p = row_to_proc[jcol]; if ( p == iam ) { /* Local */ /*assert(jcol>=fst_row);*/ diff --git a/SRC/pzgstrf.c b/SRC/pzgstrf.c index ca0c625b..860f926d 100644 --- a/SRC/pzgstrf.c +++ b/SRC/pzgstrf.c @@ -1030,7 +1030,7 @@ pzgstrf(superlu_dist_options_t * options, int m, int n, double anorm, } for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif @@ -1155,7 +1155,7 @@ pzgstrf(superlu_dist_options_t * options, int m, int n, double anorm, } scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { lusup1 = Lnzval_bc_ptr[lk]; #if ( PROFlevel>=1 ) TIC (t1); @@ -1377,7 +1377,7 @@ pzgstrf(superlu_dist_options_t * options, int m, int n, double anorm, #endif for (pj = 0; pj < Pc; ++pj) { /* Wait for Isend to complete before using lsub/lusup buffer. */ - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { MPI_Wait (&send_req[pj], &status); MPI_Wait (&send_req[pj + Pc], &status); } @@ -1704,7 +1704,7 @@ pzgstrf(superlu_dist_options_t * options, int m, int n, double anorm, scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif diff --git a/SRC/pzgstrs1.c b/SRC/pzgstrs1.c index c016c2d3..8b5f13e6 100644 --- a/SRC/pzgstrs1.c +++ b/SRC/pzgstrs1.c @@ -339,7 +339,7 @@ void pzgstrs1(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -456,7 +456,7 @@ void pzgstrs1(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -766,7 +766,7 @@ void pzgstrs1(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -858,7 +858,7 @@ void pzgstrs1(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, diff --git a/SRC/pzgstrs_Bglobal.c b/SRC/pzgstrs_Bglobal.c index 53d61b93..1e9d3d07 100644 --- a/SRC/pzgstrs_Bglobal.c +++ b/SRC/pzgstrs_Bglobal.c @@ -365,7 +365,7 @@ pzgstrs_Bglobal(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -493,7 +493,7 @@ pzgstrs_Bglobal(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -805,7 +805,7 @@ pzgstrs_Bglobal(superlu_dist_options_t *options, int_t n, * Send Xk to process column Pc[k]. */ for (p = 0; p < Pr; ++p) { - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, @@ -905,7 +905,7 @@ pzgstrs_Bglobal(superlu_dist_options_t *options, int_t n, */ kcol = PCOL( k, grid ); for (p = 0; p < Pr; ++p) { - if ( bsendx_plist[lk][p] != EMPTY ) { + if ( bsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, kcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], knsupc * nrhs + XK_H, diff --git a/SRC/pzgstrs_lsum.c b/SRC/pzgstrs_lsum.c index bda1ce55..2e61ec34 100644 --- a/SRC/pzgstrs_lsum.c +++ b/SRC/pzgstrs_lsum.c @@ -204,7 +204,7 @@ void zlsum_fmod * Send Xk to process column Pc[k]. */ for (p = 0; p < grid->nprow; ++p) { - if ( fsendx_plist[lk][p] != EMPTY ) { + if ( fsendx_plist[lk][p] != SLU_EMPTY ) { pi = PNUM( p, ikcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], iknsupc * nrhs + XK_H, @@ -375,7 +375,7 @@ void zlsum_bmod * Send Xk to process column Pc[k]. */ for (p = 0; p < grid->nprow; ++p) { - if ( bsendx_plist[lk1][p] != EMPTY ) { + if ( bsendx_plist[lk1][p] != SLU_EMPTY ) { pi = PNUM( p, gikcol, grid ); #ifdef ISEND_IRECV MPI_Isend( &x[ii - XK_H], iknsupc * nrhs + XK_H, diff --git a/SRC/pzsymbfact_distdata.c b/SRC/pzsymbfact_distdata.c index 926cde83..b8a677c4 100644 --- a/SRC/pzsymbfact_distdata.c +++ b/SRC/pzsymbfact_distdata.c @@ -274,7 +274,7 @@ dist_symbLU (superlu_dist_options_t *options, int_t n, THEN ALLOCATE SPACE. THIS ACCOUNTS FOR THE FIRST PASS OF L and U. ------------------------------------------------------------*/ - gb = EMPTY; + gb = SLU_EMPTY; for (i = 0; i < n; i++) { if (gb != supno_n[i]) { /* a new supernode starts */ @@ -1466,7 +1466,7 @@ doublecomplex *dense, *dense_col; /* SPA */ } memNLU += j*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; /* Auxiliary arrays used to set up L and U block data structures. @@ -1660,7 +1660,7 @@ doublecomplex *dense, *dense_col; /* SPA */ fprintf(stderr, "Malloc fails for fsendx_plist[0]"); return (memDist + memNLU + memTRS); } - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < nsupers_j; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(nsupers_j*sizeof(int*))) ) { @@ -1671,7 +1671,7 @@ doublecomplex *dense, *dense_col; /* SPA */ fprintf(stderr, "Malloc fails for bsendx_plist[0]"); return (memDist + memNLU + memTRS); } - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < nsupers_j; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; /* -------------------------------------------------------------- */ @@ -1917,7 +1917,7 @@ doublecomplex *dense, *dense_col; /* SPA */ irow = lsub[i]; gb = BlockNum( irow ); /* Global block number */ pr = PROW( gb, grid ); /* Process row owning this block */ - if ( pr != jbrow && fsendx_plist[ljb_j][pr] == EMPTY && + if ( pr != jbrow && fsendx_plist[ljb_j][pr] == SLU_EMPTY && myrow == jbrow) { fsendx_plist[ljb_j][pr] = YES; ++nfsendx; @@ -1948,12 +1948,12 @@ doublecomplex *dense, *dense_col; /* SPA */ index[] and nzval[]. */ /* If I am the owner of the diagonal block, order it first in LUb_number. Necessary for SuperLU_DIST routines */ - kseen = EMPTY; + kseen = SLU_EMPTY; for (j = 0; j < nrbl; j++) { if (LUb_number[j] == jb) kseen = j; } - if (kseen != EMPTY && kseen != 0) { + if (kseen != SLU_EMPTY && kseen != 0) { LUb_number[kseen] = LUb_number[0]; LUb_number[0] = jb; } @@ -2233,7 +2233,7 @@ doublecomplex *dense, *dense_col; /* SPA */ if (mycol == jbcol) { for (i = 0, j = ptrToRecv[p]; i < grid->npcol; i++, j++) ToSendR[ljb_j][i] = recvBuf[j]; - ToSendR[ljb_j][mycol] = EMPTY; + ToSendR[ljb_j][mycol] = SLU_EMPTY; } ptrToRecv[p] += grid->npcol; } @@ -2255,13 +2255,13 @@ doublecomplex *dense, *dense_col; /* SPA */ if (myrow == jbrow ) { for (k = ljb_j * grid->nprow; k < (ljb_j+1) * grid->nprow; k++) { (*bsendx_plist)[k] = recvBuf[k]; - if ((*bsendx_plist)[k] != EMPTY) + if ((*bsendx_plist)[k] != SLU_EMPTY) nbsendx ++; } } else { for (k = ljb_j * grid->nprow; k < (ljb_j+1) * grid->nprow; k++) - (*bsendx_plist)[k] = EMPTY; + (*bsendx_plist)[k] = SLU_EMPTY; } } } /* end for jb ... */ @@ -2646,7 +2646,7 @@ doublecomplex *dense, *dense_col; /* SPA */ if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -2971,7 +2971,7 @@ doublecomplex *dense, *dense_col; /* SPA */ for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/pzutil.c b/SRC/pzutil.c index 18446005..935989e5 100755 --- a/SRC/pzutil.c +++ b/SRC/pzutil.c @@ -799,9 +799,9 @@ int zSolveInit(superlu_dist_options_t *options, SuperMatrix *A, itemp[procs] = n; for (p = 0; p < procs; ++p) { j = itemp[p]; - if ( j != EMPTY ) { + if ( j != SLU_EMPTY ) { k = itemp[p+1]; - if ( k == EMPTY ) k = n; + if ( k == SLU_EMPTY ) k = n; for (i = j ; i < k; ++i) row_to_proc[i] = p; } } diff --git a/SRC/scommunication_aux.c b/SRC/scommunication_aux.c index 55e83851..5ecd52cd 100644 --- a/SRC/scommunication_aux.c +++ b/SRC/scommunication_aux.c @@ -48,7 +48,7 @@ int_t sIBcast_LPanel for (int_t pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) + if (ToSendR[lk][pj] != SLU_EMPTY) { @@ -90,7 +90,7 @@ int_t sBcast_LPanel for (int_t pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) + if (ToSendR[lk][pj] != SLU_EMPTY) { diff --git a/SRC/sdistribute.c b/SRC/sdistribute.c index 63488284..e551b680 100644 --- a/SRC/sdistribute.c +++ b/SRC/sdistribute.c @@ -384,7 +384,7 @@ sdistribute(superlu_dist_options_t *options, mem_use += (float) k*sizeof(int_t*) + (j + nsupers)*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; k = CEILING( nsupers, grid->nprow ); /* Number of local block rows */ @@ -610,14 +610,14 @@ sdistribute(superlu_dist_options_t *options, len = k * grid->nprow; if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for fsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(k*sizeof(int*))) ) ABORT("Malloc fails for bsendx_plist[]."); if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for bsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; @@ -675,7 +675,7 @@ sdistribute(superlu_dist_options_t *options, pr = PROW( gb, grid ); if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - bsendx_plist[ljb][pr] == EMPTY ) { + bsendx_plist[ljb][pr] == SLU_EMPTY ) { bsendx_plist[ljb][pr] = YES; ++nbsendx; } @@ -742,7 +742,7 @@ sdistribute(superlu_dist_options_t *options, pr = PROW( gb, grid ); /* Process row owning this block */ if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - fsendx_plist[ljb][pr] == EMPTY /* first time */ ) { + fsendx_plist[ljb][pr] == SLU_EMPTY /* first time */ ) { fsendx_plist[ljb][pr] = YES; ++nfsendx; } @@ -1313,7 +1313,7 @@ sdistribute(superlu_dist_options_t *options, if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -1651,7 +1651,7 @@ if ( !iam) printf(".. Construct Reduce tree for L: %.2f\t\n", t); for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/slook_ahead_update.c b/SRC/slook_ahead_update.c index 5a6999cd..04e06804 100644 --- a/SRC/slook_ahead_update.c +++ b/SRC/slook_ahead_update.c @@ -250,7 +250,7 @@ while (j < nub && perm_u[2 * j] <= k0 + num_look_aheads) scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif @@ -271,7 +271,7 @@ while (j < nub && perm_u[2 * j] <= k0 + num_look_aheads) iam, kk, msgcnt[0], msgcnt[1], pj, SLU_MPI_TAG(0,kk0), SLU_MPI_TAG(1,kk0)); #endif - } /* end if ( ToSendR[lk][pj] != EMPTY ) */ + } /* end if ( ToSendR[lk][pj] != SLU_EMPTY ) */ } /* end for pj ... */ } /* end if( look_ahead[kk] == k0 && kcol == mycol ) */ } /* end while j < nub and perm_u[j] num_procs_to_send = EMPTY; // No X(2d) -> X(3d) comm. schedule yet + A3d->num_procs_to_send = SLU_EMPTY; // No X(2d) -> X(3d) comm. schedule yet A2d = SUPERLU_MALLOC(sizeof(NRformat_loc)); // find number of nnzs @@ -364,11 +364,11 @@ int sScatter_B3d(NRformat_loc3d *A3d, // modified In the most general case, block rows of B are not of even size, then the Layer 0 partition may overlap with 3D partition in an arbitrary manner. For example: - P0 P1 P2 P3 + P0 P1 P2 P3 X on grid-0: |___________|__________|_________|________| X on 3D: |___|____|_____|____|__|______|_____|_____| - P0 P1 P2 P3 P4 P5 P6 P7 + P0 P1 P2 P3 P4 P5 P6 P7 */ MPI_Status recv_status; int pxy = grid2d->nprow * grid2d->npcol; @@ -412,8 +412,8 @@ int sScatter_B3d(NRformat_loc3d *A3d, // modified for (p = 0; p < nprocs; ++p) { x_send_counts[p] = 0; x_recv_counts[p] = 0; - procs_to_send_list[p] = EMPTY; // (-1) - procs_recv_from_list[p] = EMPTY; + procs_to_send_list[p] = SLU_EMPTY; // (-1) + procs_recv_from_list[p] = SLU_EMPTY; } /* All procs participate */ diff --git a/SRC/symbfact.c b/SRC/symbfact.c index ac3553d8..1fb9f85e 100644 --- a/SRC/symbfact.c +++ b/SRC/symbfact.c @@ -124,9 +124,9 @@ int_t symbfact xprune = xplore + m; relax_end = xprune + n; relax = sp_ienv_dist(2, options); - ifill_dist(perm_r, m, EMPTY); - ifill_dist(repfnz, m, EMPTY); - ifill_dist(marker, m, EMPTY); + ifill_dist(perm_r, m, SLU_EMPTY); + ifill_dist(repfnz, m, SLU_EMPTY); + ifill_dist(marker, m, SLU_EMPTY); Glu_persist->supno[0] = -1; Glu_persist->xsup[0] = 0; Glu_freeable->xlsub[0] = 0; @@ -141,7 +141,7 @@ int_t symbfact SUPERLU_FREE(desc); for (j = 0; j < min_mn; ) { - if ( relax_end[j] != EMPTY ) { /* beginning of a relaxed snode */ + if ( relax_end[j] != SLU_EMPTY ) { /* beginning of a relaxed snode */ k = relax_end[j]; /* end of the relaxed snode */ /* Determine union of the row structure of supernode (j:k). */ @@ -175,7 +175,7 @@ int_t symbfact /* Reset repfnz[*] to prepare for the next column. */ for (i = 0; i < nseg; i++) { irep = segrep[i]; - repfnz[irep] = EMPTY; + repfnz[irep] = SLU_EMPTY; } ++j; @@ -240,7 +240,7 @@ static void relax_snode register int_t j, parent, nsuper; register int_t fsupc; /* beginning of a snode */ - ifill_dist(relax_end, n, EMPTY); + ifill_dist(relax_end, n, SLU_EMPTY); ifill_dist(desc, n+1, 0); nsuper = 0; @@ -526,7 +526,7 @@ static int_t column_dfs marker[krow] = jcol; /* mark as "visited" */ kperm = perm_r[krow]; - if ( kperm == EMPTY ) { + if ( kperm == SLU_EMPTY ) { /* --------------- * krow is in L * --------------- @@ -539,7 +539,7 @@ static int_t column_dfs return (mem_error); lsub = Glu_freeable->lsub; } - if ( kmark != jcolm1 ) jsuper = EMPTY; /* Row index subset test */ + if ( kmark != jcolm1 ) jsuper = SLU_EMPTY; /* Row index subset test */ } else { /* --------------- * krow is in U @@ -549,12 +549,12 @@ static int_t column_dfs krep = xsup[supno[kperm]+1] - 1; myfnz = repfnz[krep]; - if ( myfnz != EMPTY ) { /* krep was visited before */ + if ( myfnz != SLU_EMPTY ) { /* krep was visited before */ if ( kperm < myfnz ) repfnz[krep] = kperm; /* continue; */ } else { /* Otherwise perform DFS, starting at krep */ - oldrep = EMPTY; + oldrep = SLU_EMPTY; parent[krep] = oldrep; repfnz[krep] = kperm; xdfs = xlsub[krep]; @@ -573,7 +573,7 @@ static int_t column_dfs chperm = perm_r[kchild]; /* Case kchild is in L: place it in L[*,k] */ - if ( chperm == EMPTY ) { + if ( chperm == SLU_EMPTY ) { lsub[nextl++] = kchild; if ( nextl >= nzlmax ) { if ( (mem_error = @@ -583,7 +583,7 @@ static int_t column_dfs return (mem_error); lsub = Glu_freeable->lsub; } - if ( chmark != jcolm1 ) jsuper = EMPTY; + if ( chmark != jcolm1 ) jsuper = SLU_EMPTY; } else { /* Case kchild is in U: * chrep = its supernode-rep. If its rep @@ -591,7 +591,7 @@ static int_t column_dfs */ chrep = xsup[supno[chperm]+1] - 1; myfnz = repfnz[chrep]; - if ( myfnz != EMPTY ) {/* Visited before */ + if ( myfnz != SLU_EMPTY ) {/* Visited before */ if (chperm < myfnz) repfnz[chrep] = chperm; } else { /* Continue DFS at sup-rep of kchild */ @@ -615,11 +615,11 @@ static int_t column_dfs segrep[*nseg] = krep; ++(*nseg); kpar = parent[krep]; /* Pop from stack; recurse */ - if ( kpar == EMPTY ) break; /* DFS done */ + if ( kpar == SLU_EMPTY ) break; /* DFS done */ krep = kpar; xdfs = xplore[krep]; maxdfs = xprune[krep]; - } while ( kpar != EMPTY ); /* Until empty stack */ + } while ( kpar != SLU_EMPTY ); /* Until empty stack */ } /* else */ } /* else: krow is in U */ } /* for each nonzero in A[*, jcol] */ @@ -633,18 +633,18 @@ static int_t column_dfs jm1ptr = xlsub[jcolm1]; #ifdef T2_SUPER - if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = EMPTY; + if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = SLU_EMPTY; #endif /* Make sure the number of columns in a supernode doesn't exceed threshold. */ - if ( jcol - fsupc >= maxsuper ) jsuper = EMPTY; + if ( jcol - fsupc >= maxsuper ) jsuper = SLU_EMPTY; /* If jcol starts a new supernode, reclaim storage space in * lsub[*] from the previous supernode. Note we only store * the subscript set of the first and last columns of * a supernode. (first for G(L'), last for pruned graph) */ - if ( jsuper ==EMPTY ) { /* Starts a new supernode */ + if ( jsuper == SLU_EMPTY ) { /* Starts a new supernode */ if ( (fsupc < jcolm1-1) ) { /* >= 3 columns in nsuper */ #ifdef CHK_COMPRESS printf(" Compress lsub[] at super %d-%d\n",fsupc,jcolm1); @@ -715,7 +715,7 @@ static int_t pivotL /* Search for diagonal element. */ /* diagind = iperm_c[jcol];*/ diagind = jcol; - diag = EMPTY; + diag = SLU_EMPTY; for (isub = nsupc; isub < nsupr; ++isub) if ( lsub_ptr[isub] == diagind ) { diag = isub; @@ -723,7 +723,7 @@ static int_t pivotL } /* Diagonal pivot exists? */ - if ( diag == EMPTY ) { + if ( diag == SLU_EMPTY ) { printf("At column " IFMT ", ", jcol); ABORT("pivotL() encounters zero diagonal"); } @@ -806,7 +806,7 @@ static int_t set_usub if ( ksupno != jsupno ) { /* Should go into usub[*] */ kfnz = repfnz[krep]; - if ( kfnz != EMPTY ) { /* Nonzero U-segment */ + if ( kfnz != SLU_EMPTY ) { /* Nonzero U-segment */ usub[nextu++] = kfnz; /* fsupc = xsup[ksupno]; @@ -863,7 +863,7 @@ static void pruneL irep1 = irep + 1; /* Do not prune with a zero U-segment */ - if ( repfnz[irep] == EMPTY ) continue; + if ( repfnz[irep] == SLU_EMPTY ) continue; /* * If irep has not been pruned & it has a nonzero in row L[pivrow,i] @@ -883,9 +883,9 @@ static void pruneL if ( do_prune ) { /* Do a quicksort-type partition. */ while ( kmin <= kmax ) { - if ( perm_r[lsub[kmax]] == EMPTY ) + if ( perm_r[lsub[kmax]] == SLU_EMPTY ) kmax--; - else if ( perm_r[lsub[kmin]] != EMPTY ) + else if ( perm_r[lsub[kmin]] != SLU_EMPTY ) kmin++; else { /* kmin below pivrow, and kmax above pivrow: * interchange the two subscripts diff --git a/SRC/treeFactorization.c b/SRC/treeFactorization.c index 69d140fe..1fd608bf 100755 --- a/SRC/treeFactorization.c +++ b/SRC/treeFactorization.c @@ -78,7 +78,7 @@ int_t initFactStat(int_t nsupers, factStat_t* factStat) factStat->factored_D = intMalloc_dist( nsupers); //INT_T_ALLOC( nsupers); factStat->factored_L = intMalloc_dist( nsupers); //INT_T_ALLOC( nsupers); factStat->factored_U = intMalloc_dist( nsupers); //INT_T_ALLOC( nsupers); - factStat->factored = intMalloc_dist( nsupers); //INT_T_ALLOC( nsupers); + factStat->factored = int32Malloc_dist( nsupers); //INT_T_ALLOC( nsupers); factStat->IbcastPanel_L = intMalloc_dist(nsupers); //INT_T_ALLOC(nsupers); factStat->IbcastPanel_U = intMalloc_dist(nsupers); //INT_T_ALLOC(nsupers); factStat->gpuLUreduced = intMalloc_dist(nsupers); //INT_T_ALLOC(nsupers); diff --git a/SRC/util.c b/SRC/util.c index 45df8b71..05dd17e1 100755 --- a/SRC/util.c +++ b/SRC/util.c @@ -609,7 +609,7 @@ void super_stats_dist(int_t nsuper, int_t *xsup) } } -/*! \brief Check whether repfnz[] == EMPTY after reset. +/*! \brief Check whether repfnz[] == SLU_EMPTY after reset. */ void check_repfnz_dist(int_t n, int_t w, int_t jcol, int_t *repfnz) { @@ -617,7 +617,7 @@ void check_repfnz_dist(int_t n, int_t w, int_t jcol, int_t *repfnz) for (jj = jcol; jj < jcol + w; jj++) for (k = 0; k < n; k++) - if (repfnz[(jj - jcol) * n + k] != EMPTY) + if (repfnz[(jj - jcol) * n + k] != SLU_EMPTY) { fprintf(stderr, "col %d, repfnz_col[%d] = %d\n", jj, k, (int)repfnz[(jj - jcol) * n + k]); diff --git a/SRC/util_dist.h b/SRC/util_dist.h index ec334418..b05bc5c2 100644 --- a/SRC/util_dist.h +++ b/SRC/util_dist.h @@ -71,7 +71,7 @@ at the top-level directory. /* * Constants */ -#define EMPTY (-1) +#define SLU_EMPTY (-1) #ifndef FALSE #define FALSE (0) #endif diff --git a/SRC/zcommunication_aux.c b/SRC/zcommunication_aux.c index 55f9c435..e6122be3 100644 --- a/SRC/zcommunication_aux.c +++ b/SRC/zcommunication_aux.c @@ -46,7 +46,7 @@ int_t zIBcast_LPanel for (int_t pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) + if (ToSendR[lk][pj] != SLU_EMPTY) { @@ -88,7 +88,7 @@ int_t zBcast_LPanel for (int_t pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) + if (ToSendR[lk][pj] != SLU_EMPTY) { diff --git a/SRC/zdistribute.c b/SRC/zdistribute.c index 18b75bc6..5bb7ff30 100644 --- a/SRC/zdistribute.c +++ b/SRC/zdistribute.c @@ -383,7 +383,7 @@ zdistribute(superlu_dist_options_t *options, mem_use += (float) k*sizeof(int_t*) + (j + nsupers)*iword; - for (i = 0; i < j; ++i) index1[i] = EMPTY; + for (i = 0; i < j; ++i) index1[i] = SLU_EMPTY; for (i = 0,j = 0; i < k; ++i, j += grid->npcol) ToSendR[i] = &index1[j]; k = CEILING( nsupers, grid->nprow ); /* Number of local block rows */ @@ -609,14 +609,14 @@ zdistribute(superlu_dist_options_t *options, len = k * grid->nprow; if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for fsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) fsendx_plist[i] = &index1[j]; if ( !(bsendx_plist = (int **) SUPERLU_MALLOC(k*sizeof(int*))) ) ABORT("Malloc fails for bsendx_plist[]."); if ( !(index1 = int32Malloc_dist(len)) ) ABORT("Malloc fails for bsendx_plist[0]"); - for (i = 0; i < len; ++i) index1[i] = EMPTY; + for (i = 0; i < len; ++i) index1[i] = SLU_EMPTY; for (i = 0, j = 0; i < k; ++i, j += grid->nprow) bsendx_plist[i] = &index1[j]; @@ -674,7 +674,7 @@ zdistribute(superlu_dist_options_t *options, pr = PROW( gb, grid ); if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - bsendx_plist[ljb][pr] == EMPTY ) { + bsendx_plist[ljb][pr] == SLU_EMPTY ) { bsendx_plist[ljb][pr] = YES; ++nbsendx; } @@ -741,7 +741,7 @@ zdistribute(superlu_dist_options_t *options, pr = PROW( gb, grid ); /* Process row owning this block */ if ( pr != jbrow && myrow == jbrow && /* diag. proc. owning jb */ - fsendx_plist[ljb][pr] == EMPTY /* first time */ ) { + fsendx_plist[ljb][pr] == SLU_EMPTY /* first time */ ) { fsendx_plist[ljb][pr] = YES; ++nfsendx; } @@ -1312,7 +1312,7 @@ zdistribute(superlu_dist_options_t *options, if(Root==myrow){ rank_cnt_ref=1; for (j = 0; j < grid->nprow; ++j) { - if ( fsendx_plist[ljb][j] != EMPTY ) { + if ( fsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } @@ -1650,7 +1650,7 @@ if ( !iam) printf(".. Construct Reduce tree for L: %.2f\t\n", t); for (j = 0; j < grid->nprow; ++j) { // printf("ljb %5d j %5d nprow %5d\n",ljb,j,grid->nprow); // fflush(stdout); - if ( bsendx_plist[ljb][j] != EMPTY ) { + if ( bsendx_plist[ljb][j] != SLU_EMPTY ) { ++rank_cnt_ref; } } diff --git a/SRC/zlook_ahead_update.c b/SRC/zlook_ahead_update.c index 2737e9fb..bf1d2ad2 100644 --- a/SRC/zlook_ahead_update.c +++ b/SRC/zlook_ahead_update.c @@ -249,7 +249,7 @@ while (j < nub && perm_u[2 * j] <= k0 + num_look_aheads) scp = &grid->rscp; /* The scope of process row. */ for (pj = 0; pj < Pc; ++pj) { - if (ToSendR[lk][pj] != EMPTY) { + if (ToSendR[lk][pj] != SLU_EMPTY) { #if ( PROFlevel>=1 ) TIC (t1); #endif @@ -270,7 +270,7 @@ while (j < nub && perm_u[2 * j] <= k0 + num_look_aheads) iam, kk, msgcnt[0], msgcnt[1], pj, SLU_MPI_TAG(0,kk0), SLU_MPI_TAG(1,kk0)); #endif - } /* end if ( ToSendR[lk][pj] != EMPTY ) */ + } /* end if ( ToSendR[lk][pj] != SLU_EMPTY ) */ } /* end for pj ... */ } /* end if( look_ahead[kk] == k0 && kcol == mycol ) */ } /* end while j < nub and perm_u[j] num_procs_to_send = EMPTY; // No X(2d) -> X(3d) comm. schedule yet + A3d->num_procs_to_send = SLU_EMPTY; // No X(2d) -> X(3d) comm. schedule yet A2d = SUPERLU_MALLOC(sizeof(NRformat_loc)); // find number of nnzs @@ -363,11 +363,11 @@ int zScatter_B3d(NRformat_loc3d *A3d, // modified In the most general case, block rows of B are not of even size, then the Layer 0 partition may overlap with 3D partition in an arbitrary manner. For example: - P0 P1 P2 P3 + P0 P1 P2 P3 X on grid-0: |___________|__________|_________|________| X on 3D: |___|____|_____|____|__|______|_____|_____| - P0 P1 P2 P3 P4 P5 P6 P7 + P0 P1 P2 P3 P4 P5 P6 P7 */ MPI_Status recv_status; int pxy = grid2d->nprow * grid2d->npcol; @@ -411,8 +411,8 @@ int zScatter_B3d(NRformat_loc3d *A3d, // modified for (p = 0; p < nprocs; ++p) { x_send_counts[p] = 0; x_recv_counts[p] = 0; - procs_to_send_list[p] = EMPTY; // (-1) - procs_recv_from_list[p] = EMPTY; + procs_to_send_list[p] = SLU_EMPTY; // (-1) + procs_recv_from_list[p] = SLU_EMPTY; } /* All procs participate */