Skip to content

Commit

Permalink
🐛 actually fix encapsulated jobs (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
mflevine authored Mar 5, 2019
1 parent 7bb2008 commit 940d63a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion toil_container/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.4
1.1.5
6 changes: 4 additions & 2 deletions toil_container/lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,11 @@ def build_bsub_line(cpu, mem, runtime, jobname):
"'{}'".format(jobname),
]

cpu = int(cpu) or 1

if mem:
if os.getenv(_PER_SLOT_LSF_CONFIG) == "Y" or per_core_reservation():
mem = float(mem) / 1024 ** 3 / int(cpu or 1)
mem = float(mem) / 1024 ** 3 / cpu
else:
mem = old_div(float(mem), 1024 ** 3)

Expand All @@ -281,7 +283,7 @@ def build_bsub_line(cpu, mem, runtime, jobname):
bsubline += ["-M", str(mem_limit)]

if cpu:
bsubline += ["-n", str(int(cpu))]
bsubline += ["-n", str(cpu)]

if runtime:
bsubline += [os.getenv("TOIL_CONTAINER_RUNTIME_FLAG", "-W"), str(int(runtime))]
Expand Down

0 comments on commit 940d63a

Please sign in to comment.