16 int 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;
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;
41 SpParHelper::Print(outs.str());
43 SpParHelper::Print(
"Generated renamed edge lists\n");
46 A =
new PARDBMAT(*DEL,
false);
48 SpParHelper::Print(
"Created double Sparse Matrix\n");
50 float balance = A->LoadImbalance();
51 outs2 <<
"Load balance: " << balance << endl;
52 SpParHelper::Print(outs2.str());
55 for(
unsigned i=1; i<4; i++)
59 B =
new PARDBMAT(*DEL,
false);
61 SpParHelper::Print(
"Created RHS Matrix\n");
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 iota(IT globalsize, NT first)
void PrintInfo(std::string vectorname) const