Skip to content

Commit 65406c4

Browse files
committed
In the ILU setting, allow users to allocate and fill the supno/xsup arrays, defining the supernode parition.
1 parent abd7c4a commit 65406c4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

SRC/prec-independent/ilu_level_symbfact.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,16 @@ int_t ilu_level_symbfact
7676
int_t nnzL = 0, nnzU = 0;
7777

7878
/* Set up supernode partition */
79-
Glu_persist->supno = (int_t *) SUPERLU_MALLOC(n * sizeof(int_t));
80-
Glu_persist->xsup = (int_t *) SUPERLU_MALLOC((n+1) * sizeof(int_t));
8179
if ( options->UserDefineSupernode == NO ) {
80+
Glu_persist->supno = (int_t *) SUPERLU_MALLOC(n * sizeof(int_t));
81+
Glu_persist->xsup = (int_t *) SUPERLU_MALLOC((n+1) * sizeof(int_t));
8282
for (i = 0; i < n; i++) { /* set up trivial supernode for now. */
8383
Glu_persist->supno[i] = i;
8484
Glu_persist->xsup[i] = i;
8585
}
8686
Glu_persist->xsup[n] = n;
87+
} else {
88+
/* User alreay allocated and defined the above supernode partition */
8789
}
8890

8991
/* Count nonzeros per column for L & U */

SRC/prec-independent/trfAux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,9 +2579,9 @@ void permCol_SymbolicFact3d(superlu_dist_options_t *options, int n, SuperMatrix
25792579

25802580
t = SuperLU_timer_();
25812581

2582-
if ( options->ILU_level != SLU_EMPTY ) {
2582+
if ( options->ILU_level != SLU_EMPTY ) { /* for any level-based ILU */
25832583
iinfo = ilu_level_symbfact(options, &GAC, perm_c, etree, Glu_persist, Glu_freeable);
2584-
} else {
2584+
} else { /* for complete LU */
25852585
iinfo = symbfact(options, iam, &GAC, perm_c, etree, Glu_persist, Glu_freeable);
25862586
}
25872587

0 commit comments

Comments
 (0)