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_AdaptiveRepart repartitions a distributed graph whose load has changed since the last partition — for example, after mesh refinement or when computational work per vertex varies over time. Rather than optimizing edge cut alone, it balances a combined objective that accounts for both inter-process communication and the cost of moving vertices to new partitions. The ipc2redist parameter controls this tradeoff: lower values prioritize minimizing vertex movement, while higher values prioritize minimizing the edge cut of the new partition.
Parameters
Distribution of vertices across processes.
vtxdist[i] is the global index of the first vertex on process i. Size npes + 1; must be identical on all processes.Local adjacency row pointers in CSR format. Size
local_nvtxs + 1.Local adjacency column indices in CSR format. Size
xadj[local_nvtxs].Vertex weights.
ncon values per vertex in interleaved order. May be NULL when bit 1 of wgtflag is 0.Per-vertex communication size used to estimate redistribution cost. When a vertex moves to a new partition, its
vsize contributes to the redistribution penalty in the objective function. May be NULL, in which case unit sizes are assumed.Edge weights, one value per entry in
adjncy. May be NULL when bit 0 of wgtflag is 0.Bitmask controlling which weights are used.
0 = no weights, 1 = edge weights only, 2 = vertex weights only, 3 = both.Indexing convention.
0 for C-style 0-based indexing; 1 for Fortran-style 1-based indexing.Number of balancing constraints per vertex.
Desired number of partitions after repartitioning.
Target partition weights. Array of
nparts * ncon values. Values for each constraint must sum to 1.0. Pass NULL for equal-weight partitions.Per-constraint imbalance tolerance. Array of
ncon values greater than 1.0.Tradeoff parameter between inter-process communication cost and redistribution cost. Lower values (e.g.,
0.001) minimize vertex movement; higher values (e.g., 1000.0) optimize partition quality as if starting from scratch. Typical values range from 1.0 to 1000.0.Algorithm options. If
options[0] = 0, all defaults are used. If options[0] = 1, options[PMV3_OPTION_DBGLVL] (index 1) sets the debug level and options[PMV3_OPTION_SEED] (index 2) sets the random seed.Output. Total weight of edges crossing partition boundaries after repartitioning.
Input and output. On entry, contains the current partition assignment for each local vertex. On return, contains the new partition assignment. Caller must allocate at least
local_nvtxs elements.Pointer to the MPI communicator covering all participating processes.
Return value
ReturnsMETIS_OK (1) on success. Any other value indicates an error.