Skip to content

Commit

Permalink
fix: binary mem (#2695)
Browse files Browse the repository at this point in the history
### Description

<!--Add a description of your PR here-->

### QC
<!-- Make sure that you can tick the boxes below. -->

* [ ] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [ ] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
  • Loading branch information
fgvieira committed Feb 15, 2024
1 parent 74db8e5 commit 18689b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snakemake/resources.py
Expand Up @@ -619,7 +619,7 @@ def infer_resources(name, value, resources: dict):
raise WorkflowError(
f"Cannot parse mem or disk value into size in MB for setting {inferred_name} resource: {value}"
)
resources[inferred_name] = max(int(round(in_bytes / 1000 / 1000)), 1)
resources[inferred_name] = max(int(round(in_bytes / 1024 / 1024)), 1)
elif name == "runtime" and isinstance(value, str):
try:
resources["runtime"] = max(int(round(parse_timespan(value) / 60)), 1)
Expand Down

0 comments on commit 18689b4

Please sign in to comment.