35#include "CombBLAS/CombBLAS.h"
40int main(
int argc,
char* argv[])
43 MPI_Init(&argc, &argv);
44 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
45 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
51 cout <<
"Usage: ./IteratorTest <BASEADDRESS> <Matrix>" << endl;
52 cout <<
"Input file <Matrix> should be under <BASEADDRESS> in triples format" << endl;
58 string directory(argv[1]);
60 name = directory+
"/"+name;
62 typedef SpParMat <int, double, SpDCCols<int,double> > PARMAT;
63 shared_ptr<CommGrid> fullWorld;
64 fullWorld.reset(
new CommGrid(MPI_COMM_WORLD, 0, 0) );
67 A.ReadDistribute(name, 0);
80 MPI_Allreduce( &count, &total, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
82 if(total ==
A.getnnz())
int main(int argc, char *argv[])
Iterate over the nonzeros of the sparse column.
Iterate over (sparse) columns of the sparse matrix.
static void Print(const std::string &s)