COMBINATORIAL_BLAS 1.6
 
Loading...
Searching...
No Matches
HashSpGEMMTest.cpp
Go to the documentation of this file.
1#include <mpi.h>
2#include <sys/time.h>
3#include <iostream>
4#include <functional>
5#include <algorithm>
6#include <vector>
7#include <sstream>
8#include "CombBLAS/CombBLAS.h"
9#include "CombBLAS/CommGrid3D.h"
10#include "CombBLAS/SpParMat3D.h"
11#include "CombBLAS/ParFriends.h"
12
13using namespace std;
14using namespace combblas;
15
16#define EPS 0.0001
17
18#ifdef _OPENMP
20#else
22#endif
23
24
25// Simple helper class for declarations: Just the numerical type is templated
26// The index type and the sequential matrix type stays the same for the whole code
27// In this case, they are "int" and "SpDCCols"
28template <class NT>
29class PSpMat
30{
31public:
34};
35
36int main(int argc, char* argv[])
37{
38 int nprocs, myrank;
39 MPI_Init(&argc, &argv);
42
43 if(argc < 4){
44 if(myrank == 0)
45 {
46 cout << "Usage: ./<Binary> <MatrixA> <MatrixB> <MatrixCC>" << endl;
47 }
49 return -1;
50 }
51 else {
52 string Aname(argv[1]);
53 string Bname(argv[2]);
54 string CCname(argv[3]);
56 fullWorld.reset( new CommGrid(MPI_COMM_WORLD, 0, 0) );
57
58 double t0, t1;
59
61
65
66 A2D.ParallelReadMM(Aname, true, maximum<double>());
67 B2D.ParallelReadMM(Bname, true, maximum<double>());
68 CC2D.ParallelReadMM(CCname, true, maximum<double>());
69
73
74 //Clocal = LocalSpGEMMHash<PTFF, double>(*Alocal, *Blocal, false, false, true);
77
78 if(*Clocal == *CClocal){
79 if(myrank == 0) fprintf(stderr, "Correct\n");
80 }
81 else{
82 if(myrank == 0) fprintf(stderr, "Not correct\n");
83 }
84
85 }
87 return 0;
88}
int main()
Definition Driver.cpp:12
int cblas_splits
SpParMat< int64_t, NT, DCCols > MPI_DCCols
SpDCCols< int64_t, NT > DCCols
int nprocs
Definition comms.cpp:55