1 #define DETERMINISTIC 1
5 #define _OPENMP // should be defined before any COMBBLAS header is included
10 #include "CombBLAS/CombBLAS.h"
35 int main(
int argc,
char* argv[])
38 MPI_Init_thread(&argc, &argv, MPI_THREAD_SERIALIZED, &provided);
39 if (provided < MPI_THREAD_SERIALIZED)
41 printf(
"ERROR: The MPI library does not have MPI_THREAD_SERIALIZED support\n");
42 MPI_Abort(MPI_COMM_WORLD, 1);
46 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
47 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
52 cout <<
"Usage: ./rcm <filename>" << endl;
63 string filename(argv[1]);
65 tinfo <<
"**** Reading input matrix: " << filename <<
" ******* " << endl;
66 SpParHelper::Print(tinfo.str());
67 double t01 = MPI_Wtime();
69 double t02 = MPI_Wtime();
71 tinfo <<
"Reader took " << t02-t01 <<
" seconds" << endl;
72 SpParHelper::Print(tinfo.str());
81 SpParHelper::Print(
"Applied symmetric permutation.\n");
85 SpParHelper::Print(
"Rectangular matrix: Can not apply symmetric permutation.\n");
88 filename +=
"_permuted";
91 tinfo <<
"**** Saved to output matrix: " << filename <<
" ******* " << endl;
92 SpParHelper::Print(tinfo.str());