to run all executables
This commit is contained in:
parent
fcf2f0a03d
commit
20b03e781c
@ -6,7 +6,8 @@ def main():
|
|||||||
parser = argparse.ArgumentParser(description='TODO')
|
parser = argparse.ArgumentParser(description='TODO')
|
||||||
parser.add_argument('-ho', '--host_dir', required=True)
|
parser.add_argument('-ho', '--host_dir', required=True)
|
||||||
parser.add_argument('-s', '--submit_script', required=True)
|
parser.add_argument('-s', '--submit_script', required=True)
|
||||||
parser.add_argument('-ex', '--executable', required=True)
|
parser.add_argument('-rex', '--rabit_exec', required=True)
|
||||||
|
parser.add_argument('-mpi', '--mpi_exec', required=True)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
ndata = [10**4, 10**5, 10**6, 10**7]
|
ndata = [10**4, 10**5, 10**6, 10**7]
|
||||||
@ -14,13 +15,20 @@ def main():
|
|||||||
|
|
||||||
machines = [2,4,8,16,31]
|
machines = [2,4,8,16,31]
|
||||||
|
|
||||||
for i, data in enumerate(ndata):
|
executables = [args.rabit_exec, args.mpi_exec]
|
||||||
for machine in machines:
|
|
||||||
host_file = os.path.join(args.host_dir, 'hosts%d' % machine)
|
for executable in executables:
|
||||||
cmd = 'python %s %d %s %s %d %d' % (args.submit_script, machine, host_file, args.executable, data, nrepeat[i])
|
sys.stderr.write('Executable %s' % executable)
|
||||||
sys.stderr.write('data=%d, repeat=%d, machine=%d\n' % (data, nrepeat[i], machine))
|
sys.stderr.flush()
|
||||||
sys.stderr.flush()
|
for i, data in enumerate(ndata):
|
||||||
os.system(cmd)
|
for machine in machines:
|
||||||
|
host_file = os.path.join(args.host_dir, 'hosts%d' % machine)
|
||||||
|
cmd = 'python %s %d %s %s %d %d' % (args.submit_script, machine, host_file, executable, data, nrepeat[i])
|
||||||
|
sys.stderr.write('data=%d, repeat=%d, machine=%d\n' % (data, nrepeat[i], machine))
|
||||||
|
sys.stderr.flush()
|
||||||
|
os.system(cmd)
|
||||||
|
sys.stderr.write('\n')
|
||||||
|
sys.stderr.flush()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
Loading…
x
Reference in New Issue
Block a user