Initial commit
This commit is contained in:
commit
66a6860316
407 changed files with 1254365 additions and 0 deletions
27
models/dist_memo/timer.py
Normal file
27
models/dist_memo/timer.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/env python
|
||||
import sys
|
||||
sys.path.append("../../src/")
|
||||
|
||||
import time
|
||||
|
||||
sys.setrecursionlimit(10000)
|
||||
|
||||
loads = range(10000, 100000, 5000)
|
||||
iters = int(sys.argv[1])
|
||||
|
||||
import subprocess
|
||||
output = open('/tmp/output', 'w')
|
||||
|
||||
for memo in [True, False]:
|
||||
f = open("dist_memo/result_%s" % (memo), 'w')
|
||||
for load in loads:
|
||||
val = str(load)
|
||||
for _ in range(iters):
|
||||
command = "mpirun -np 2 python dist_memo/model.py %i %s"
|
||||
command = (command % (load, memo))
|
||||
start = time.time()
|
||||
subprocess.check_output(command, shell=True, stderr=output)
|
||||
val += " %s" % (round(time.time() - start, 2))
|
||||
f.write("%s\n" % (val))
|
||||
print(val)
|
||||
f.close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue