Use this file to discover all available pages before exploring further.
METIS ships three utility programs alongside its main partitioning tools. m2gmetis converts a mesh file into a METIS graph file without partitioning it; graphchk validates that a graph file conforms to the METIS format; and cmpfillin computes the fill-in statistics for an externally-supplied vertex ordering. All three are built and installed alongside gpmetis, ndmetis, and mpmetis.
m2gmetis converts a finite element mesh file into a METIS-format graph file. It uses the same dual and nodal graph construction logic as mpmetis, but writes the resulting graph to disk instead of partitioning it. This is useful when you want to inspect the graph, use it with gpmetis, or supply it to a custom partitioner.
The output is a standard METIS graph file (the same format accepted by gpmetis and ndmetis). The first line contains the number of vertices and edges; subsequent lines list each vertex’s adjacency.
For a dual graph (-gtype=dual): each vertex represents one mesh element.
For a nodal graph (-gtype=nodal): each vertex represents one mesh node.
graphchk reads a METIS graph file and checks whether it conforms to the required format. It is the recommended first step when debugging unexpected behavior in gpmetis or ndmetis, since malformed graph files cause silent errors or incorrect results.
**********************************************************************METIS 5.2.1 Copyright 1998-13, Regents of the University of MinnesotaGraph Information --------------------------------------------------- Name: graphs/4elt.graph, #Vertices: 15606, #Edges: 45878Checking Graph... --------------------------------------------------- The format of the graph is correct!**********************************************************************
If the graph is invalid, the message reads The format of the graph is incorrect!. When a FixedGraphFile path is supplied, METIS attempts to repair the file by removing duplicate edges, adding missing reverse edges, and dropping self-loops, then writes the corrected graph to the specified path.
The auto-fix feature repairs structural issues but cannot recover semantically incorrect edge weights. Always review the fixed graph before using it for partitioning.
cmpfillin evaluates the fill-in introduced by a vertex ordering, given an externally produced permutation file. It reads a graph and a permutation, then computes the number of nonzeros in the factor and the operation count for the corresponding sparse factorization. This is useful for comparing orderings produced by different tools against METIS orderings.
Path to the graph file (interpreted as the sparsity pattern of a symmetric matrix).
PermFile
Path to the permutation file. Contains the inverse permutation (iperm): one integer per line where line i gives the new position of old vertex i.
The permutation file format matches the .iperm file written by ndmetis. You can directly feed ndmetis output into cmpfillin to verify fill-in estimates.
**********************************************************************METIS 5.2.1 Copyright 1998-13, Regents of the University of MinnesotaGraph Information --------------------------------------------------- Name: graphs/4elt.graph, #Vertices: 15606, #Edges: 45878Fillin... ----------------------------------------------------------- Nonzeros: 3.867e+05 Operation Count: 9.544e+06**********************************************************************
Field
Meaning
Nonzeros
Number of nonzeros in the lower Cholesky factor L (excluding the diagonal). This measures fill-in: lower is better.
Operation Count
Number of floating-point multiply-add operations needed to compute the Cholesky factorization. Lower is better.
Run cmpfillin with several different orderings (e.g., AMD, RCM, METIS) on the same graph to select the ordering that minimizes fill-in for your specific matrix structure.