5 #define _OPENMP // should be defined before any COMBBLAS header is included 22 #define RAND_PERMUTE 1 43 template <
typename PARMAT>
65 int main(
int argc,
char* argv[])
68 MPI_Init(&argc, &argv);
69 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
70 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
75 cout <<
"Usage: ./rcm <rmat|er|input> <scale|filename> <splitPerThread>" << endl;
76 cout <<
"Example: mpirun -np 4 ./rcm rmat 20" << endl;
77 cout <<
"Example: mpirun -np 4 ./rcm er 20" << endl;
78 cout <<
"Example: mpirun -np 4 ./rcm input a.mtx" << endl;
90 if(
string(argv[1]) ==
string(
"input"))
93 string filename(argv[2]);
95 tinfo <<
"**** Reading input matrix: " << filename <<
" ******* " << endl;
98 SpParHelper::Print(tinfo.str());
99 double t01 = MPI_Wtime();
101 double t02 = MPI_Wtime();
105 tinfo <<
"Reader took " << t02-t01 <<
" seconds" << endl;
106 tinfo <<
"Bandwidth before random permutation " << bw << endl;
107 tinfo <<
"Profile before random permutation " << pf << endl;
108 SpParHelper::Print(tinfo.str());
114 else if(
string(argv[1]) == string(
"rmat"))
117 scale =
static_cast<unsigned>(atoi(argv[2]));
118 double initiator[4] = {.57, .19, .19, .05};
121 MPI_Barrier(MPI_COMM_WORLD);
127 else if(
string(argv[1]) ==
string(
"er"))
130 scale =
static_cast<unsigned>(atoi(argv[2]));
131 double initiator[4] = {.25, .25, .25, .25};
134 MPI_Barrier(MPI_COMM_WORLD);
142 SpParHelper::Print(
"Unknown input option\n");
151 double gtime = MPI_Wtime();
152 SpParHelper::GatherMatrix(com, ABool->
seq(), (int)0);
155 cout <<
"gathertime " << MPI_Wtime() - gtime << endl;
std::shared_ptr< CommGrid > getcommgrid() const
Compute the maximum of two values.
void GenGraph500Data(double initiator[4], int log_numverts, int edgefactor, bool scramble=false, bool packed=false)
SpParMat< int64_t, double, SpDCCols< int64_t, double > > Par_DCSC_Double
double cblas_transvectime
double cblas_alltoalltime
double cblas_allgathertime
SpParMat< int64_t, int64_t, SpDCCols< int64_t, int64_t > > Par_DCSC_int64_t
double cblas_mergeconttime
int main(int argc, char *argv[])
double cblas_localspmvtime
SpParMat< int64_t, bool, SpDCCols< int64_t, bool > > Par_DCSC_Bool
SpParMat< int64_t, bool, SpCCols< int64_t, bool > > Par_CSC_Bool
void ParallelReadMM(const std::string &filename, bool onebased, _BinaryOperation BinOp)
void Symmetricize(PARMAT &A)