A hypergraph consists of vertices and hyperedges. A hyperedge connects one or more vertices. A graph is a special case of a hypergraph where each edge has size two (two vertices). The hypergraph model is well suited to parallel computing, where vertices correspond to data objects and hyperedges represent the communication requirements. The basic partitioning problem is to partition the vertices into k approximately equal sets such that the number of cut hyperedges is minimized. Most partitioners (including Zoltan-PHG) allows a more general model where both vertices and hyperedges can be assigned weights. It has been shown that the hypergraph model gives a more accurate representation of communication cost (volume) than the graph model. In particular, for sparse matrix-vector multiplication, the hypergraph model exactly represents communication volume. Sparse matrices can be partitioned either along rows or columns; in the row-net model the columns are vertices and each row corresponds to an hyperedge, while in the column-net model the roles of vertices and hyperedges are reversed.
Zoltan contains a native parallel hypergraph partitioner, called PHG
(Parallel HyperGraph partitioner). In addition, Zoltan provides
access to PaToH,
a serial hypergraph partitioner.
Note that PaToH is not part of Zoltan and should be obtained
separately from the
PaToH web site.
Zoltan-PHG is a fully parallel multilevel hypergraph partitioner. For
further technical description, see [Devine et al, 2006].
Planned future features (currently not supported):
For applications that already use Zoltan to do graph partitioning, it is fairly easy to upgrade to hypergraph partitioning. See the section graph vs. hypergraph partitioning.
Method String: | HYPERGRAPH |
Parameters: | |
HYPERGRAPH_PACKAGE |
PHG (parallel) or PaToH (serial) |
PHG_OUTPUT_LEVEL |
Level of verbosity; 0 is silent. |
CHECK_HYPERGRAPH |
Check that the query functions
return valid input data; 0 or 1. (This slows performance; intended for |
(CHECK_GRAPH) |
debugging.) |
PHG_COARSENING_METHOD | The method to use in the matching/coarsening phase: ipm - inner product matching (a.k.a. heavy connectivity matching); gives best quality. l-ipm - local ipm on each processor. Faster but usually gives poorer quality. a-ipm - alternate between ipm and l-ipm. (A compromise between speed and quality.) none - no coarsening |
PHG_COARSEPARTITION_METHOD | Method to partition the coarsest (smallest) hypergraph;
typically done in serial: random - random linear - linear assignment of the vertices (ordered by the user query function) greedy - greedy method based on minimizing cuts auto - automatically select from the above methods (in parallel, the processes will do different methods) |
PHG_REFINEMENT_METHOD |
Refinement algorithm: fm - approximate Fiduccia-Mattheyses (FM) no - no refinement |
PHG_REFINEMENT_QUALITY | Knob to control the trade-off between run time and quality. 1
is the recommended (default) setting, >1 gives more refinement
(higher quality partitions but longer run time), while <1 gives less
refinement (and
poorer quality). |
PHG_RANDOMIZE_INPUT |
Randomize layout of vertices and
hyperedges in internal parallel 2D layout? Setting this parameter to 1 often reduces Zoltan-PHG execution time. |
PHG_EDGE_WEIGHT_OPERATION | Operation to be applied to edge
weights supplied by different processes for the same hyperedge: add - the hyperedge weight will be the sum of the supplied weights max - the hyperedge weight will be the maximum of the supplied weights error - if the hyperedge weights are not equal, Zoltan will flag an error, otherwise the hyperedge weight will be the value returned by the processes |
PHG_EDGE_SIZE_THRESHOLD |
Ignore hyperedges greater than this fraction times
number of vertices. |
ADD_OBJ_WEIGHT |
Add implicit vertex (object)
weight. This will be in addition to the user-defined weights. (Note:
Multi-weight partitioning is not yet supported, so currently only use
this option with
obj_weight_dim=0.)
Valid values: "none" "unit" or "vertices" "pins" or "nonzeros" or "vertex degree" |
Default values: | |
HYPERGRAPH_PACKAGE = PHG |
|
CHECK_HYPERGRAPH=0 |
|
PHG_OUTPUT_LEVEL=0 | |
PHG_COARSENING_METHOD=ipm | |
PHG_COARSEPARTITION_METHOD=auto | |
PHG_REFINEMENT_METHOD=fm | |
PHG_REFINEMENT_QUALITY=1 | |
PHG_RANDOMIZE_INPUT=0 | |
PHG_EDGE_WEIGHT_OPERATION=max | |
PHG_EDGE_SIZE_THRESHOLD=0.25 | |
ADD_OBJ_WEIGHT=none | |
Required Query Functions: | |
ZOLTAN_NUM_OBJ_FN | |
ZOLTAN_OBJ_LIST_FN or ZOLTAN_FIRST_OBJ_FN/ZOLTAN_NEXT_OBJ_FN pair | |
ZOLTAN_HG_SIZE_CS_FN
ZOLTAN_HG_CS_FN |
|
Optional Query Functions: | |
ZOLTAN_HG_SIZE_EDGE_WTS_FN | |
ZOLTAN_HG_EDGE_WTS_FN |
It is possible to provide the graph query functions instead of the hypergraph queries, though this is not recommended. If only graph query functions are registered, Zoltan will automatically create a hypergraph from the graph, but this is not equivalent to graph partitioning. In particular, the edge weights will not be accurate.