70 #ifdef HAVE_ZOLTAN2_INST_FLOAT_INT_LONG 75 #ifdef HAVE_ZOLTAN2_INST_DOUBLE_INT_LONG 80 #ifdef HAVE_ZOLTAN2_INST_FLOAT_INT_INT 85 #ifdef HAVE_ZOLTAN2_INST_DOUBLE_INT_INT 98 int main(
int argc,
char *argv[])
100 #ifdef HAVE_ZOLTAN2_MPI 101 MPI_Init(&argc, &argv);
103 MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
104 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
106 int rank=0, nprocs=1;
112 size_t localCount = 40*(rank+1);
116 for (
int i=0, num=40; i <= nprocs ; i++, num+=40)
117 cout <<
"Rank " << i <<
" has " << num <<
" ids." << endl;
120 for (
int i=1; i <= rank; i++)
123 for (
size_t i=0; i < localCount; i++)
124 globalIds[i] = offset++;
135 std::vector<const scalar_t *> noWeights;
136 std::vector<int> noStrides;
138 inputAdapter_t ia(localCount, globalIds, noWeights, noStrides);
143 Teuchos::ParameterList params(
"test params");
144 params.set(
"debug_level",
"basic_status");
145 params.set(
"debug_procs",
"0");
146 params.set(
"error_check_level",
"debug_mode_assertions");
148 params.set(
"algorithm",
"block");
149 params.set(
"imbalance_tolerance", 1.1);
150 params.set(
"num_global_parts", nprocs);
155 #ifdef HAVE_ZOLTAN2_MPI 176 cout <<
"PASS" << endl;
180 #ifdef HAVE_ZOLTAN2_MPI
A simple class that can be the User template argument for an InputAdapter.
Defines the PartitioningSolution class.
void printMetrics(ostream &os) const
Print the array of metrics.
PartitioningProblem sets up partitioning problems for the user.
Defines the PartitioningProblem class.
void solve(bool updateInputData=true)
Direct the problem to create a solution.
Zoltan2::BasicIdentifierInput< myTypes_t > inputAdapter_t
int main(int argc, char *argv[])