Isorropia is primarily an interface to the Zoltan toolkit, which is now required. Zoltan became a Trilinos package in 9.0 and is automatically enabled by Isorropia. To enable Isorropia in your Trilinos build, provide the argument '--enable-isorropia' to configure. If you wish to use third-party libraries (such as ParMetis or PT-Scotch) with Isorropia via Zoltan, see the configure options for Zoltan.
Isorropia contains separate classes to solve each of these problems, all of which derive from Isorropia::Operator and Isorropia::EpetraOperator. Note that an operator in Isorropia is different from an operator in Epetra!
The Isorropia::create_balanced_copy functions are free-standing functions (not class members) which simply take an input object (Epetra_CrsGraph, Epetra_CrsMatrix, etc.) and return a copy which is balanced across processes (parts). The reference-counter pointer class Teuchos::RCP is used.
In many use cases, such as performing one partitioning and then using it to redistribute multiple objects, it is more efficient to use the Isorropia::Partitioner and Isorropia::Redistributor classes. The general usage model is to:
Isorropia was designed such that these steps can usually be done in three lines of code. For example, the Partitioner will by default compute the partitioning at construction time.
Isorropia currently supports partitioning/redistributing of several Epetra objects, including Epetra_CrsGraph, Epetra_RowMatrix (which includes Epetra_CrsMatrix and Epetra_VbrMatrix) and Epetra_MultiVector.
Several Isorropia classes and methods accept Teuchos::ParameterList objects, allowing the user to control certain behavior. Isorropia parameters can be either lower or upper case.
Teuchos::ParameterList params;
params.set("PARTITIONING_METHOD", "SIMPLE_LINEAR");
Teuchos::ParameterList params;
Teuchos::ParameterList& sublist = params.sublist("Zoltan");
sublist.set("LB_METHOD", "GRAPH"); // Only works for symmetric matrices!
Refer to the Zoltan User's guide (available at the Zoltan web site) for available Zoltan parameters. In many cases, no parameters are necessary. Note that Isorropia will override a few default Zoltan settings: The default method (LB_METHOD) is HYPERGRAPH. The default approach (LB_APPROACH) is PARTITION. Isorropia will balance the number of nonzeros in a matrix, not the rows.
matrix_1.cpp demonstrates creating a balanced copy of Epetra_CrsGraph and Epetra_CrsMatrix objects using Isorropia::Epetra::create_balanced_copy functions.
part_redist.cpp demonstrates repartitioning and redistributing the contents of an Epetra_LinearProblem object, using the Isorropia::Partitioner and Isorropia::Redistributor classes. This program does not use user-specified weights/costs.
Other programs in the example subdirectory demonstrate the use of weights/costs data to influence the partitioner. See vert_weights.cpp, graphedge_weights.cpp and hgedge_weights.cpp.