/* * Print the blocks in the factored matrix L. */ void zPrintLblocks(int_t iam, int_t nsupers, gridinfo_t *grid, Glu_persist_t *Glu_persist, LocalLU_t *Llu) { register int_t c, extra, gb, j, lb, nsupc, nsupr, len, nb, ncb; register int_t k, mycol, r; int_t *xsup = Glu_persist->xsup; int_t *index; doublecomplex *nzval; printf("\n(%d) L BLOCKS IN COLUMN-MAJOR ORDER -->\n", iam); ncb = nsupers / grid->npcol; extra = nsupers % grid->npcol; mycol = MYCOL( iam, grid ); if ( mycol < extra ) ++ncb; for (lb = 0; lb < ncb; ++lb) { index = Llu->Lrowind_bc_ptr[lb]; if ( index ) { /* Not an empty column */ nzval = Llu->Lnzval_bc_ptr[lb]; nb = index[0]; nsupr = index[1]; gb = lb * grid->npcol + mycol; nsupc = SuperSize( gb ); printf("(%d) block column %d (local), # row blocks %d\n", iam, lb, nb); for (c = 0, k = BC_HEADER, r = 0; c < nb; ++c) { len = index[k+1]; printf("(%d) row-block %d: block # %d\tlength %d\n", iam, c, index[k], len); PrintInt10("lsub", len, &index[k+LB_DESCRIPTOR]); for (j = 0; j < nsupc; ++j) { PrintDoublecomplex("nzval", len, &nzval[r + j*nsupr]); } k += LB_DESCRIPTOR + len; r += len; } } printf("(%d)", iam); PrintInt10("ToSendR[]", grid->npcol, Llu->ToSendR[lb]); PrintInt10("fsendx_plist[]", grid->nprow, Llu->fsendx_plist[lb]); } printf("nfrecvx %4d\n", Llu->nfrecvx); k = CEILING( nsupers, grid->nprow ); PrintInt10("fmod", k, Llu->fmod); } /* ZPRINTLBLOCKS */
/* * Print the local MSR matrix */ static void zPrintMSRmatrix ( int m, /* Number of rows of the submatrix. */ doublecomplex val[], int_t bindx[], gridinfo_t *grid ) { int iam, nnzp1; if ( !m ) return; iam = grid->iam; nnzp1 = bindx[m]; printf("(%2d) MSR submatrix has %d rows -->\n", iam, m); PrintDoublecomplex("val", nnzp1, val); PrintInt10("bindx", nnzp1, bindx); }
int zPrint_CompRowLoc_Matrix_dist(SuperMatrix *A) { NRformat_loc *Astore; int_t i, nnz_loc, m_loc; doublecomplex *dp; printf("\n==== CompRowLoc matrix: "); printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->Mtype); Astore = (NRformat_loc *) A->Store; printf("nrow %d, ncol %d\n", A->nrow,A->ncol); nnz_loc = Astore->nnz_loc; m_loc = Astore->m_loc; printf("nnz_loc %d, m_loc %d, fst_row %d\n", nnz_loc, m_loc, Astore->fst_row); PrintInt10("rowptr", m_loc+1, Astore->rowptr); PrintInt10("colind", nnz_loc, Astore->colind); if ( (dp = (doublecomplex *) Astore->nzval) != NULL ) PrintDoublecomplex("nzval", nnz_loc, dp); printf("==== end CompRowLoc matrix\n"); }
/* * Print the blocks in the factored matrix U. */ void zPrintUblocks(int_t iam, int_t nsupers, gridinfo_t *grid, Glu_persist_t *Glu_persist, LocalLU_t *Llu) { register int_t c, extra, jb, k, lb, len, nb, nrb, nsupc; register int_t myrow, r; int_t *xsup = Glu_persist->xsup; int_t *index; doublecomplex *nzval; printf("\n(%d) U BLOCKS IN ROW-MAJOR ORDER -->\n", iam); nrb = nsupers / grid->nprow; extra = nsupers % grid->nprow; myrow = MYROW( iam, grid ); if ( myrow < extra ) ++nrb; for (lb = 0; lb < nrb; ++lb) { index = Llu->Ufstnz_br_ptr[lb]; if ( index ) { /* Not an empty row */ nzval = Llu->Unzval_br_ptr[lb]; nb = index[0]; printf("(%d) block row %d (local), # column blocks %d\n", iam, lb, nb); r = 0; for (c = 0, k = BR_HEADER; c < nb; ++c) { jb = index[k]; len = index[k+1]; printf("(%d) col-block %d: block # %d\tlength %d\n", iam, c, jb, index[k+1]); nsupc = SuperSize( jb ); PrintInt10("fstnz", nsupc, &index[k+UB_DESCRIPTOR]); PrintDoublecomplex("nzval", len, &nzval[r]); k += UB_DESCRIPTOR + nsupc; r += len; } printf("(%d) ToSendD[] %d\n", iam, Llu->ToSendD[lb]); } } } /* ZPRINTUBLOCKS */