forked from lanl/MATAR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimetest.py
64 lines (38 loc) · 1.99 KB
/
timetest.py
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
import subprocess, os
def runParN():
subprocess.call('rm ../results/results_par.csv', shell=True)
Ns = [500,1000, 2000, 4000, 6000, 8000, 10000]
Ns = [str(n) for n in Ns]
subprocess.call('echo N, Prob, K, t1, t2, t3, total_time, distance >> ../results/results_par.csv', shell=True)
for n in Ns:
for i in range(3):
print("n:", n , "loop:", i, " of 3")
subprocess.call('./test/watt-graph/test_kokkos_floyd ' + n + ' 0 6 >> ../results/results_par.csv', shell=True)
def runDiffP():
subprocess.call('rm ../results/results_dif_p.csv', shell=True)
Ps = [0.0001, 0.005, 0.01, 0.02, 0.05, 0.1]
Ps = [str(p) for p in Ps]
subprocess.call('echo N, Prob, K, t1, t2, t3, total_time, distance >> ../results/results_dif_p.csv', shell=True)
for p in Ps:
for i in range(3):
print("p:", p , "loop:", i, " of 3")
subprocess.call('./test/watt-graph/test_kokkos_floyd 5000 ' + p + ' 6 >> ../results/results_dif_p.csv', shell=True)
def runSerN():
subprocess.call('rm ../results/results_ser.csv', shell=True)
Ns = [500,1000, 2000, 2500, 3000, 3500, 4000]
Ns = [str(n) for n in Ns]
subprocess.call('echo N, Prob, K, t1, t2, t3, total_time, distance >> ../results/results_ser.csv', shell=True)
for n in Ns:
for i in range(3):
print("n:", n , "loop:", i, " of 3")
subprocess.call('./test/watt-graph/test_floyd ' + n + ' 0 6 >> ../results/results_ser.csv', shell=True)
def runCpuN():
subprocess.call('rm ../results/results_cpu.csv', shell=True)
Ns = [500,1000, 2000, 2500, 3000, 3500, 4000, 6000]
Ns = [str(n) for n in Ns]
subprocess.call('echo N, Prob, K, t1, t2, t3, total_time, distance >> ../results/results_cpu.csv', shell=True)
for n in Ns:
for i in range(3):
print("n:", n , "loop:", i, " of 3")
subprocess.call('./test/watt-graph/test_kokkos_floyd ' + n + ' 0 6 >> ../results/results_cpu.csv', shell=True)
runCpuN()