# [petsc-users] RCM for ILU?

Qin Lu lu_qin_2000 at yahoo.com
Fri Feb 14 11:12:16 CST 2014

```Barry and Jed,

Nice to know that! Is there a corresponding function call to set RCM?

Thanks,
Qin

On Friday, February 14, 2014 10:20 AM, Jed Brown <jed at jedbrown.org> wrote:

Qin Lu <lu_qin_2000 at yahoo.com> writes:

> Hello,
>
> Is the RCM reordering available for ILU preconditioner in PETSc? The manual says RCM works with LU factorization, but it does not mention it for preconditioners.

It works for all factorization preconditioners (ILU, ICC, LU, Cholesky).

~/petsc/src/ksp/ksp/examples/tutorials\$ ./ex2 -m 100 -n 100 -ksp_view -pc_type ilu -pc_factor_mat_ordering_type rcm
KSP Object: 1 MPI processes
type: gmres
GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement
GMRES: happy breakdown tolerance 1e-30
maximum iterations=10000, initial guess is zero
tolerances:  relative=9.80296e-07, absolute=1e-50, divergence=10000
left preconditioning
using PRECONDITIONED norm type for convergence test
PC Object: 1 MPI processes
type: ilu
ILU: out-of-place factorization
0 levels of fill
tolerance for zero pivot 2.22045e-14
using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
matrix ordering: rcm
factor fill ratio given 1, needed 1
Factored matrix follows:
Mat Object:         1 MPI processes
type: seqaij
rows=10000, cols=10000
package used to perform factorization: petsc
total: nonzeros=49600, allocated nonzeros=49600
total number of mallocs used during MatSetValues calls =0
not using I-node routines
linear system matrix = precond matrix:
Mat Object:   1 MPI processes
type: seqaij
rows=10000, cols=10000
total: nonzeros=49600, allocated nonzeros=50000
total number of mallocs used during MatSetValues calls =0
not using I-node routines
Norm of error 0.00314611 iterations 84
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140214/b8375f2d/attachment-0001.html>
```