Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion moa/data/etc/config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins:
system:
moaGit:
module: moa.plugin.system.moaGit
enabled: false
enabled: true
enforce: false
commit:
- '.moa/template'
Expand Down
31 changes: 19 additions & 12 deletions moa/plugin/job/openLavaActor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ def hook_defineCommandOptions(job, parser):
parser.add_argument('--olx', default='', dest='openlavaExtra',
help='Extra arguments for bsub')

parser.add_argument('--oln', default=1, type=int, dest='openlavaProcs',
help='The number of processors the jobs requires')
parser.add_argument('--olmin', type=int, dest='openlavaProcsMin',
help='The minimum number of processors the job requires')

parser.add_argument('--olmax', type=int, dest='openlavaProcsMax',
help='The maximum number of processors the job allows')

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

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

s("#BSUB -C %d" % procs)
# Only specify '-n' if required
if '--olmin' in sys.argv:
minProcs = sysConf.args.openlavaProcsMin
# Max also set?
if '--olmax' in sys.argv:
maxProcs = sysConf.args.openlavaProcsMax
minMaxProcs = "%d,%d" % (minProcs, maxProcs)
else:
minMaxProcs = "%d" % minProcs
s("#BSUB -n %s" % minMaxProcs)

if sysConf.args.openlavaExtra.strip():
s("#BSUB %s" % sysConf.args.openlavaExtra)
Expand Down Expand Up @@ -243,10 +250,10 @@ def s(*cl):
#BSUB -m {{ args.openlavaHost }}
{%- endif %}

#BSUB -w '({%- for j in job.data.openlava.alljids -%}
#BSUB -w '{%- for j in job.data.openlava.alljids -%}
{%- if loop.index0 > 0 %}&&{% endif -%}
done({{j}})
{%- endfor -%})'
{%- endfor -%}'
cd {{ job.wd }}
echo "Openlava OnSuccess Start"
echo "Killing the OnError job"
Expand All @@ -265,11 +272,11 @@ def s(*cl):
{% if args.openlavaHost -%}
#BSUB -m {{ args.openlavaHost }}
{%- endif %}
#BSUB -w '({%- for j in job.data.openlava.alljids -%}
#BSUB -w '{%- for j in job.data.openlava.alljids -%}
{%- if loop.index0 > 0 %}||{% endif -%}
exit({{j}},!=0)
{%- endfor -%}
)'
'

cd {{ job.wd }}
echo "Openlava OnError Start"
Expand Down