Skip to content

Commit

Permalink
moved --olC back to --oln - that was even more stupi - a typically fr…
Browse files Browse the repository at this point in the history
…iday afternoon fix :(
  • Loading branch information
Mark Fiers committed Nov 12, 2012
1 parent d1c719e commit ef7329c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions moa/plugin/job/openLavaActor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def hook_defineCommandOptions(job, parser):
parser.add_argument('--olx', default='', dest='openlavaExtra',
help='Extra arguments for bsub')

parser.add_argument('--olC', default=1, type=int, dest='openlavaCores',
help='The number of cores the jobs requires')
parser.add_argument('--oln', default=1, type=int, dest='openlavaProcs',
help='The number of processors the jobs requires')

parser.add_argument('--oldummy', default=False, dest='openlavaDummy',
action='store_true',
Expand Down Expand Up @@ -119,12 +119,12 @@ def s(*cl):
s("#BSUB -e %s" % errfile)
s("#BSUB -q %s" % sysConf.args.openlavaQueue)

if '--olC' in sys.argv:
cores = sysConf.args.openlavaCores
if '--oln' in sys.argv:
procs = sysConf.args.openlavaProcs
else:
cores = sysConf.job.conf.get('threads', sysConf.args.openlavaCores)
procs = sysConf.job.conf.get('threads', sysConf.args.openlavaProcs)

s("#BSUB -C %d" % cores)
s("#BSUB -C %d" % procs)

if sysConf.args.openlavaExtra.strip():
s("#BSUB %s" % sysConf.args.openlavaExtra)
Expand Down Expand Up @@ -209,7 +209,7 @@ def s(*cl):
return 0

tmpfile = _writeOlTmpFile(wd, sc)

moa.ui.message("Running %s:" % " ".join(map(str, bsub_cl)))
moa.ui.message("(copy of) the bsub script: %s" % tmpfile)
p = sp.Popen(map(str, bsub_cl), cwd=wd, stdout=sp.PIPE, stdin=sp.PIPE)
Expand Down Expand Up @@ -250,7 +250,7 @@ def s(*cl):
cd {{ job.wd }}
echo "Openlava OnSuccess Start"
echo "Killing the OnError job"
bkill -J "{{ job.data.openlava.uid }}_Err"
bkill -J "{{ job.data.openlava.uid }}_Err"
moasetstatus success
"""

Expand All @@ -267,7 +267,7 @@ def s(*cl):
{%- endif %}
#BSUB -w '({%- for j in job.data.openlava.alljids -%}
{%- if loop.index0 > 0 %}||{% endif -%}
exit({{j}},!=0)
exit({{j}},!=0)
{%- endfor -%}
)'
Expand All @@ -279,7 +279,7 @@ def s(*cl):
bkill -s 9 {{ j }}
{% endfor %}
bkill -J "{{ job.data.openlava.uid }}_Ok"
bkill -J "{{ job.data.openlava.uid }}_Ok"
moasetstatus error
"""

Expand Down Expand Up @@ -311,9 +311,9 @@ def hook_async_exit(job):
P.communicate(onsuccess)
P = sp.Popen('bsub', stdin=sp.PIPE)
P.communicate(onerror)




#register this actor globally
sysConf.actor.actors['openlava'] = openlavaRunner
Expand Down

0 comments on commit ef7329c

Please sign in to comment.