8#include "CombBLAS/CombBLAS.h"
16int main(
int argc,
char* argv[])
19 MPI_Init(&argc, &argv);
20 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
21 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
27 cout <<
"Usage: ./IndexingTiming <Scale>" << endl;
33 typedef SpParMat <int, double, SpDCCols<int,double> > PARDBMAT;
35 double initiator[4] = {.6, .4/3, .4/3, .4/3};
38 int scale =
static_cast<unsigned>(atoi(argv[1]));
39 ostringstream outs, outs2, outs3;
40 outs <<
"Forcing scale to : " << scale << endl;
46 A =
new PARDBMAT(*DEL,
false);
50 float balance =
A->LoadImbalance();
51 outs2 <<
"Load balance: " << balance << endl;
55 for(
unsigned i=1; i<4; i++)
59 B =
new PARDBMAT(*DEL,
false);
64 perm.
iota(
A->getnrow(), 0);
69 sel.
iota(
B->getnrow(), 0);
73 A->SpAsgn(perm,perm,*
B);
76 double t1 = MPI_Wtime();
79 A->SpAsgn(perm,perm,*
B);
81 double t2 = MPI_Wtime();
85 cout<<
"Scale " << scale-i <<
" assignment iterations finished"<<endl;
86 printf(
"%.6lf seconds elapsed per iteration\n", (t2-t1)/(
double)
ITERATIONS);
int main(int argc, char *argv[])
void GenGraph500Data(double initiator[4], int log_numverts, int edgefactor, bool scramble=false, bool packed=false)
void PrintInfo(std::string vectorname) const
void iota(IT globalsize, NT first)
static void Print(const std::string &s)