diff --git a/beopest_launcher.py b/beopest_launcher.py index b8c303b..0c6c18e 100644 --- a/beopest_launcher.py +++ b/beopest_launcher.py @@ -2,7 +2,8 @@ # after estimation has already commenced. # For initial start (including master), set "workerstartN" to zero. # For starting additional slaves after this launcher has already run once, -# set "workerstartN" equal to the first available "worker#" that is available. +# set "workerstartN" equal to the first available "worker#" that is available, set +# KILLOLD to False, and STARTMASTER to False. import os import shutil @@ -32,9 +33,9 @@ def tf2flag(intxt): bp = inpardat.findall('.//bp')[0].text casefile = inpardat.findall('.//casefile')[0].text mod_dirs = [] -tmp = inpardat.findall('.//mod_dir') -for el in tmp: - mod_dirs.append(el.text) +tmp = inpardat.findall('.//mod_dir')[0].text +for el in tmp.split(','): + mod_dirs.append(el.strip()) stdir = inpardat.findall('.//stdir')[0].text mflags = inpardat.findall('.//mflags')[0].text masterip = inpardat.findall('.//masterip')[0].text @@ -65,7 +66,7 @@ def tf2flag(intxt): os.mkdir('worker%s' %(i)) for cfold in mod_dirs: print ' copying %s' %(cfold) - shutil.copytree(cfold,os.path.join(currdir,'worker%s' %(i),cfold)) + shutil.copytree(cfold,os.path.join(currdir,'worker%s' %(i),os.path.basename(cfold))) # launch the master if STARTMASTER: @@ -74,8 +75,8 @@ def tf2flag(intxt): os.chdir(currdir) if STARTWORKERS: - print 'pausing 10 seconds to let the master get rolling' - for csec in range(10): # wait 10 seconds to be sure the master started up correctly + print 'pausing 2 seconds to let the master get rolling' + for csec in range(2): # wait a few seconds to be sure the master started up correctly print '. '*(csec+1) time.sleep(1) for i in range(numworkers):