Skip to content

Commit

Permalink
add printing nonzeros in A and fill ratio.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyeli committed Nov 10, 2024
1 parent e3c902f commit 53f941e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions SRC/prec-independent/symbfact.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int_t symbfact
)
{

int_t m, n, min_mn, j, i, k, irep, nseg, pivrow, info;
int_t m, n, min_mn, nnz, j, i, k, irep, nseg, pivrow, info;
int_t *iwork, *perm_r, *segrep, *repfnz;
int_t *xprune, *marker, *parent, *xplore;
int_t relax, *desc, *relax_end;
Expand All @@ -104,11 +104,11 @@ int_t symbfact

m = A->nrow;
n = A->ncol;
nnz = ((NCPformat*)A->Store)->nnz;
min_mn = SUPERLU_MIN(m, n);

/* Allocate storage common to the symbolic factor routines */
info = symbfact_SubInit(options, DOFACT, NULL, 0, m, n,
((NCPformat*)A->Store)->nnz,
info = symbfact_SubInit(options, DOFACT, NULL, 0, m, n, nnz,
Glu_persist, Glu_freeable);
if ( info != 0 )
return info;
Expand Down Expand Up @@ -188,11 +188,13 @@ int_t symbfact

if ( !pnum && (options->PrintStat == YES)) {
nnzLU = nnzL + nnzU - min_mn;
printf("\tMatrix size min_mn " IFMT "\n", min_mn);
printf("\tNonzeros in L " IFMT "\n", nnzL);
printf("\tNonzeros in U " IFMT "\n", nnzU);
printf("\tnonzeros in L+U " IFMT "\n", nnzLU);
printf("\tnonzeros in LSUB " IFMT "\n", nnzLSUB);
printf("\tmatrix dimension " IFMT "\n", min_mn);
printf("\tnonzeros in A " IFMT "\n", nnz);
printf("\tnonzeros in L " IFMT "\n", nnzL);
printf("\tnonzeros in U " IFMT "\n", nnzU);
printf("\tnonzeros in L+U " IFMT "\n", nnzLU);
printf("\tfill ratio " "%8.1f" "\n", (float)nnzLU/nnz);
printf("\tnonzeros in LSUB " IFMT "\n", nnzLSUB);
}
SUPERLU_FREE(iwork);

Expand Down
2 changes: 1 addition & 1 deletion SRC/prec-independent/trfAux.c
Original file line number Diff line number Diff line change
Expand Up @@ -2593,7 +2593,7 @@ void permCol_SymbolicFact3d(superlu_dist_options_t *options, int n, SuperMatrix
#if (PRNTlevel >= 1)
if (!iam)
{
printf("\tNo of supers %ld\n", (long)Glu_persist->supno[n - 1] + 1);
printf("\tNumber of supers %ld\n", (long)Glu_persist->supno[n - 1] + 1);
printf("\tSize of G(L) %ld\n", (long)Glu_freeable->xlsub[n]);
printf("\tSize of G(U) %ld\n", (long)Glu_freeable->xusub[n]);
printf("\tint %lu, short %lu, float %lu, double %lu\n",
Expand Down

0 comments on commit 53f941e

Please sign in to comment.