9int main(
int argc,
char *argv[])
12 MPI_Init(&argc, &argv);
13 MPI_Comm_size(MPI_COMM_WORLD, &
nprocs);
14 MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
18 std::cerr <<
"Usage: ./Subgraphs2ProcsTest <MatrixA> <VectorAssignments>" << std::endl;
23 if (!myrank) std::cerr <<
"processor grid: (" << std::sqrt(
nprocs) <<
" x " << std::sqrt(
nprocs) <<
")" << std::endl;
25 std::shared_ptr<combblas::CommGrid> fullWorld;
34 std::vector<int> local_idx_map;
38 for (
auto colit = locmat.begcol(); colit != locmat.endcol(); ++colit) {
39 for (
auto nzit = locmat.begnz(colit); nzit != locmat.endnz(colit); ++nzit) {
40 std::cout << myrank <<
": " << local_idx_map[nzit.rowid()]+1 <<
"\t" << local_idx_map[colit.colid()]+1 <<
"\t" << nzit.value() << std::endl;
43 std::cout << std::endl;