Initial commit
This commit is contained in:
commit
66a6860316
407 changed files with 1254365 additions and 0 deletions
28
models/dist_activity_citylayout/timer.py
Normal file
28
models/dist_activity_citylayout/timer.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/env python
|
||||
import sys
|
||||
sys.path.append("../../src/")
|
||||
|
||||
import time
|
||||
|
||||
sys.setrecursionlimit(10000)
|
||||
|
||||
tests = ["AT", "CACR", "NO", "CA"]
|
||||
loads = range(5000, 45000, 5000)
|
||||
|
||||
iters = int(sys.argv[1])
|
||||
|
||||
for relocator in tests:
|
||||
f = open("dist_activity_citylayout/results_%s" % relocator, 'w')
|
||||
for load in loads:
|
||||
total = 0.0
|
||||
for _ in range(iters):
|
||||
command = "mpirun -np 3 python dist_activity_citylayout/test_city_%s.py %s" % (relocator, load)
|
||||
output = open("/tmp/output", 'w')
|
||||
import subprocess
|
||||
start = time.time()
|
||||
subprocess.call(command, shell=True, stdout=output)
|
||||
output.close()
|
||||
total += (time.time() - start)
|
||||
f.write("%s %s\n" % (load, total/iters))
|
||||
print("%s %s" % (load, total/iters))
|
||||
f.close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue