15 #include <Teuchos_DefaultComm.hpp>
16 #include <Teuchos_ParameterList.hpp>
20 int main(
int narg,
char **arg)
22 Tpetra::ScopeGuard tscope(&narg, &arg);
23 Teuchos::RCP<const Teuchos::Comm<int> > comm = Tpetra::getDefaultComm();
27 int rank = comm->getRank();
29 zlno_t numMyIdentifiers = 0;
34 adapter_t *adapter =
new adapter_t(numMyIdentifiers, NULL);
36 Teuchos::ParameterList params(
"test parameters");
37 params.set(
"num_global_parts", 4);
38 params.set(
"algorithm",
"block");
39 params.set(
"partitioning_approach",
"partition");
54 std::cout <<
"FAIL GlobalNumberOfParts = "
60 std::cout <<
"PASS" << std:: endl;
int main(int narg, char **arg)
Defines the PartitioningSolution class.
common code used by tests
This class represents a collection of global Identifiers and their associated weights, if any.
A PartitioningSolution is a solution to a partitioning problem.
Tpetra::Map::local_ordinal_type zlno_t
static const std::string fail
Defines the BasicIdentifierAdapter class.
int globalFail(const Comm< int > &comm, int fail)
const PartitioningSolution< Adapter > & getSolution()
Get the solution to the problem.
PartitioningProblem sets up partitioning problems for the user.
Defines the PartitioningProblem class.
size_t getActualGlobalNumberOfParts() const
Returns the actual global number of parts provided in setParts().
void solve(bool updateInputData=true)
Direct the problem to create a solution.