Initial commit
This commit is contained in:
commit
66a6860316
407 changed files with 1254365 additions and 0 deletions
27
models/dist_statesaving/timer.py
Normal file
27
models/dist_statesaving/timer.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/env python
|
||||
import sys
|
||||
sys.path.append("../../src/")
|
||||
|
||||
import time
|
||||
|
||||
sys.setrecursionlimit(10000)
|
||||
|
||||
iters = int(sys.argv[1])
|
||||
nrmodels = range(10, 150, 10)
|
||||
|
||||
nodes = 100
|
||||
import subprocess
|
||||
|
||||
output = open('/tmp/output', 'w')
|
||||
for statesaving in ["custom", "deepcopy", "pickleH"]:
|
||||
f = open("dist_statesaving/result_" + str(statesaving), 'w')
|
||||
for models in nrmodels:
|
||||
total = 0.0
|
||||
for _ in range(iters):
|
||||
command = "mpirun -np 3 python dist_statesaving/experiment.py %i %s" % (models, statesaving)
|
||||
start = time.time()
|
||||
subprocess.check_output(command, shell=True, stderr=output)
|
||||
total += (time.time() - start)
|
||||
f.write("%i %s\n" % (models, total/iters))
|
||||
print("%i %s" % (models, total/iters))
|
||||
f.close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue