33#ifndef __STDC_CONSTANT_MACROS
34#define __STDC_CONSTANT_MACROS
36#ifndef __STDC_LIMIT_MACROS
37#define __STDC_LIMIT_MACROS
48#include "CombBLAS/CombBLAS.h"
74 printf(
"ERROR: The MPI library does not have MPI_THREAD_SERIALIZED support\n");
98 cout <<
"Usage: ./cc -I <mm|triples> -M <FILENAME_MATRIX_MARKET> (required)\n";
99 cout <<
"-I <INPUT FILE TYPE> (mm: matrix market, triples: (vtx1, vtx2, edge_weight) triples. default:mm)\n";
100 cout <<
"-base <BASE OF MATRIX MARKET> (default:1)\n";
101 cout <<
"-rand <RANDOMLY PERMUTE VERTICES> (default:0)\n";
102 cout <<
"Example (0-indexed mtx with random permutation): ./cc -M input.mtx -base 0 -rand 1" <<
endl;
103 cout <<
"Example (triples format): ./cc -I triples -M input.txt" <<
endl;
109 string ifilename =
"";
114 for (
int i = 1; i <
argc; i++)
124 if(myrank == 0)
printf(
"filename: %s\n",ifilename.c_str());
129 if(myrank == 0)
printf(
"\nBase of MM (1 or 0):%d",base);
134 if(myrank == 0)
printf(
"\nRandomly permute the matrix? (1 or 0):%d",randpermute);
164 if(
A.getnrow() ==
A.getncol())
167 p.iota(
A.getnrow(), 0);
192 outs <<
"Nonzeros: " << nnz <<
endl;
199 string outname = ifilename +
".components";
214 s2 <<
"=================================================\n" <<
endl ;
SpDCCols< int64_t, double > DCCols
SpParMat< int64_t, double, DCCols > MPI_DCCols
static void Print(const std::string &s)
FullyDistVec< IT, IT > CC(SpParMat< IT, NT, DER > &A, IT &nCC)