*** empty log message ***

svn path=/trunk/boinc/; revision=3566
This commit is contained in:
Karl Chen 2004-06-14 11:19:07 +00:00
parent 1fb8c8a679
commit c7d62352ae
2 changed files with 17 additions and 7 deletions

View File

@ -13479,3 +13479,10 @@ Rom 13 June 2004
setup_project.py setup_project.py
sched/ sched/
start start
Karl 2004-06-14
- 'start': simplified remote fork/exec logic, and added option for
parallel/sequential delegation to remote hosts (default sequential)
sched/
start

View File

@ -88,6 +88,7 @@ ignore_timestamps = False
prune_run_state = True # prune_run_state = True #
is_main_host = False is_main_host = False
local_hostname = '' local_hostname = ''
delegate_other_hosts_in_parallel = False
def get_host_list(): def get_host_list():
''' '''
@ -696,18 +697,20 @@ apply(command)
run_state.write() run_state.write()
if is_main_host: if is_main_host:
if delegate_other_hosts_in_parallel:
wait_mode = os.P_NOWAIT
else:
wait_mode = os.P_WAIT
other_hosts = get_host_list() other_hosts = get_host_list()
for host in other_hosts: for host in other_hosts:
if host == local_hostname: if host == local_hostname:
continue continue
local_cmd = ' '.join(sys.argv) local_cmd = ' '.join(sys.argv)
remote_cmd = 'ssh '+host+' "cd '+cwd+';'+local_cmd remote_cmd = [ 'ssh', host, 'cd', cwd, ' && ' ] + sys.argv
if verbose: if verbose:
remote_cmd += " -v" remote_cmd += [ '-v' ]
remote_cmd += '"' print 'running ', ' '.join(remote_cmd)
print 'running ', remote_cmd os.spawnvp(wait_mode, remote_cmd[0], remote_cmd)
pid = os.fork()
if pid == 0:
os.execl('/bin/sh', 'sh', '-c', remote_cmd)
os.unlink(start_lockfile) os.unlink(start_lockfile)