Sparse direct solvers (LU, Cholesky, LDLT) factorize a matrix by eliminating variables one at a time. The order in which variables are eliminated determines how much fill — new nonzeros introduced during factorization — is created. A good fill-reducing ordering can reduce both memory usage and factorization time by orders of magnitude.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KarypisLab/ParMETIS/llms.txt
Use this file to discover all available pages before exploring further.
ParMETIS_V3_NodeND computes a parallel nested dissection ordering on a distributed graph, producing the permutation vector and separator tree sizes needed by downstream sparse solvers.
When to use ordering
ApplyNodeND before calling a sparse direct solver such as SuperLU, PARDISO, MUMPS, or PETSc’s direct solve. The typical workflow is:
- Assemble the sparse matrix and represent its sparsity pattern as a graph.
- Compute a fill-reducing ordering with
NodeND. - Pass the ordering to the solver’s symbolic factorization step.
- Factor and solve.
Output arrays
NodeND produces two output arrays:
| Array | Length | Meaning |
|---|---|---|
order | local_nvtxs | order[i] is the new (permuted) index of local vertex i. |
sizes | 2 * npes | Sizes of the separators in the nested dissection tree. Used by sparse solvers to set up the elimination tree. |
Step-by-step workflow
Build the distributed graph
Populate
vtxdist, xadj, and adjncy exactly as you would for PartKway. The graph should represent the sparsity pattern of the symmetric matrix: vertices are unknowns, edges are off-diagonal nonzeros.Set options
Set
options[0] = 0 to use defaults. Set options[0] = 1 to enable custom debug level and seed via options[PMV3_OPTION_DBGLVL] and options[PMV3_OPTION_SEED].Complete example
Extended control: ParMETIS_V32_NodeND
ParMETIS_V32_NodeND exposes additional parameters for fine-grained control of the ordering algorithm.
| Parameter | Type | Description |
|---|---|---|
vwgt | idx_t * | Vertex weights. Pass NULL for uniform weights. |
mtype | idx_t * | Matching type: PARMETIS_MTYPE_LOCAL (1) or PARMETIS_MTYPE_GLOBAL (2). |
rtype | idx_t * | Separator refinement type: PARMETIS_SRTYPE_GREEDY (1) or PARMETIS_SRTYPE_2PHASE (2). |
p_nseps | idx_t * | Number of separators to compute in parallel. |
s_nseps | idx_t * | Number of separators to compute in serial. |
ubfrac | real_t * | Imbalance tolerance for the nested dissection bisections (e.g. 1.05). |
seed | idx_t * | Random seed for reproducibility. |
dbglvl | idx_t * | Debug level (OR of PARMETIS_DBGLVL_* constants). |
Serial ordering: ParMETIS_SerialNodeND
ParMETIS_SerialNodeND gathers the full graph on a single process and runs the serial METIS nested dissection algorithm. Use it for small graphs or when you need the higher quality of the serial ordering algorithm.
ParMETIS_SerialNodeND replicates the entire graph on one process. For large graphs this can exhaust memory. Use ParMETIS_V3_NodeND for distributed-memory scalability.