Skip to content

Commit

Permalink
Only count output file usage when using the file store (#4692)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnovak authored Nov 21, 2023
1 parent 836944f commit 341ff1f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/toil/cwl/cwltoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2265,13 +2265,20 @@ def __init__(
)
preemptible = parsed_value

# We always need space for the temporary files for the job
total_disk = cast(int, req["tmpdirSize"]) * (2**20)
if not getattr(runtime_context, "bypass_file_store", False):
# If using the Toil file store, we also need space for the output
# files, which may need to be stored locally and copied off the
# node.
total_disk += cast(int, req["outdirSize"]) * (2**20)
# If not using the Toil file store, output files just go directly to
# their final homes their space doesn't need to be accounted per-job.

super().__init__(
cores=req["cores"],
memory=int(req["ram"] * (2**20)),
disk=int(
(cast(int, req["tmpdirSize"]) * (2**20))
+ (cast(int, req["outdirSize"]) * (2**20))
),
disk=int(total_disk),
accelerators=accelerators,
preemptible=preemptible,
tool_id=self.cwltool.tool["id"],
Expand Down

0 comments on commit 341ff1f

Please sign in to comment.