1#include "../CombBLAS.h"
31template <
typename PARMAT>
119 cout <<
"ncol nrows nedges deg \n";
141 cout <<
"\n-------------- usage --------------\n";
142 cout <<
"Usage (random matrix): ./maximal <er|g500|ssca> <Scale> <EDGEFACTOR> <algo><rand><moreSplit>\n";
143 cout <<
"Usage (input matrix): ./maximal <input> <matrix> <algo><rand><moreSplit>\n\n";
145 cout <<
" \n-------------- meaning of arguments ----------\n";
146 cout <<
"** er: Erdos-Renyi, g500: Graph500 benchmark, ssca: SSCA benchmark\n";
147 cout <<
"** scale: matrix dimention is 2^scale\n";
148 cout <<
"** edgefactor: average degree of vertices\n";
149 cout <<
"** algo : maximal matching algorithm used to initialize\n ";
150 cout <<
" greedy: greedy init , ks: Karp-Sipser, dmd: dynamic mindegree\n";
151 cout <<
" default: dynamic mindegree\n";
152 cout <<
"** (optional) rand: random parent selection in greedy/Karp-Sipser\n" ;
153 cout <<
"** (optional) moreSplit: more splitting of Matrix.\n" ;
154 cout <<
"(order of optional arguments does not matter)\n";
156 cout <<
" \n-------------- examples ----------\n";
157 cout <<
"Example: mpirun -np 4 ./maximal g500 18 16 ks rand" <<
endl;
158 cout <<
"Example: mpirun -np 4 ./maximal input cage12.mtx dmd\n" <<
endl;
165 for(
int i=0; i<
argc; i++)
170 if(
allArg.find(
"moreSplit")!=string::npos)
172 if(
allArg.find(
"randMaximal")!=string::npos)
174 if(
allArg.find(
"greedy")!=string::npos)
176 else if(
allArg.find(
"ks")!=string::npos)
178 else if(
allArg.find(
"dmd")!=string::npos)
189 tinfo <<
"\n---------------------------------\n";
190 tinfo <<
" Maximal matching algorithm options: ";
194 if(
randMaximal)
tinfo <<
" random parent selection in greedy/Karp-Sipser, ";
196 tinfo <<
"\n---------------------------------\n\n";
257 printf(
"ERROR: The MPI library does not have MPI_THREAD_SERIALIZED support\n");
280 if(
string(
argv[1]) ==
string(
"input"))
333 printf(
"The input type - %s - is not recognized.\n",
argv[2]);
int main(int argc, char *argv[])
SpParMat< int64_t, bool, SpDCCols< int64_t, bool > > PSpMat_Bool
void GetOptions(char *argv[], int argc)
void experiment(PSpMat_Bool &A, PSpMat_Bool &AT, FullyDistVec< int64_t, int64_t > degCol)
void removeIsolated(PSpMat_Bool &A)
void GenGraph500Data(double initiator[4], int log_numverts, int edgefactor, bool scramble=false, bool packed=false)
static void Print(const std::string &s)
void Symmetricize(PARMAT &A)
void MaximalMatching(Par_DCSC_Bool &A, Par_DCSC_Bool &AT, FullyDistVec< IT, IT > &mateRow2Col, FullyDistVec< IT, IT > &mateCol2Row, FullyDistVec< IT, IT > °ColRecv, int type, bool rand=true)
friend bool operator<(const VertexType &vtx1, const VertexType &vtx2)
friend bool operator==(const VertexType &vtx1, const VertexType &vtx2)
VertexType(int64_t p=-1, int64_t r=-1, int16_t pr=0)
friend ostream & operator<<(ostream &os, const VertexType &vertex)