Merge branch 'master' of ssh://github.com/tqchen/rabit
This commit is contained in:
commit
58f80c5675
@ -24,13 +24,13 @@ def mpi_submit(nslave, args):
|
|||||||
args arguments to launch each job
|
args arguments to launch each job
|
||||||
this usually includes the parameters of master_uri and parameters passed into submit
|
this usually includes the parameters of master_uri and parameters passed into submit
|
||||||
"""
|
"""
|
||||||
cmd = ' '.join(['mpirun -n %d' % nslave] + args)
|
cmd = ' '.join(['mpirun -n %d -machinefile %s' % (nslave, args[0])] + args[1:])
|
||||||
print cmd
|
print cmd
|
||||||
subprocess.check_call(cmd, shell = True)
|
subprocess.check_call(cmd, shell = True)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
print 'Usage: <nslave> <cmd>'
|
print 'Usage: <nslave> <machine_file> <cmd>'
|
||||||
exit(0)
|
exit(0)
|
||||||
# call submit, with nslave, the commands to run each job and submit function
|
# call submit, with nslave, the commands to run each job and submit function
|
||||||
tracker.submit(int(sys.argv[1]), sys.argv[2:], fun_submit= mpi_submit)
|
tracker.submit(int(sys.argv[1]), sys.argv[2:], fun_submit= mpi_submit)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user