-
Notifications
You must be signed in to change notification settings - Fork 1
/
bench_file.cpp
104 lines (91 loc) · 2.18 KB
/
bench_file.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include "benchmark_dist.hpp"
#include <string>
using namespace std;
/*
* The main file is currently set up to benchmark the
* algorithms on Erdos-Reyi random matrices. The parameters
* are, in order,
*
* logM
* edgeFactor
* algorithm name
* R-value
* replication factor
* fused?
*/
int main(int argc, char** argv) {
MPI_Init(&argc, &argv);
initialize_mpi_datatypes();
string fname(argv[1]);
string algorithm_name(argv[2]);
int R = atoi(argv[3]);
int c = atoi(argv[4]);
string output_file(argv[5]);
string app(argv[6]);
SpmatLocal S;
S.loadTuples(true, -1, -1, fname);
if(algorithm_name == "15d") {
/*benchmark_algorithm(&S,
"15d_sparse",
output_file,
true,
R,
c,
app);*/
benchmark_algorithm(&S,
"15d_sparse",
output_file,
false,
R,
c,
app);
/*benchmark_algorithm(&S,
"15d_fusion2",
output_file,
true,
R,
c,
app);*/
/*benchmark_algorithm(&S,
"15d_fusion1",
output_file,
true,
R,
c,
app);*/
/*benchmark_algorithm(&S,
"15d_fusion1",
output_file,
false,
R,
c,
app);*/
}
else if(algorithm_name == "25d") {
/*benchmark_algorithm(&S,
"25d_sparse_replicate",
output_file,
false,
R,
c,
app);*/
/*benchmark_algorithm(&S,
"25d_dense_replicate",
output_file,
true,
R,
c,
app);*/
benchmark_algorithm(&S,
"25d_dense_replicate",
output_file,
false,
R,
c,
app);
}
else {
assert(false);
}
MPI_Finalize();
}