Skip to content

Commit

Permalink
Update bytes conversion to 1e9 for GB
Browse files Browse the repository at this point in the history
Just noticed on a 40GB job the returned bytes was 40,000,000, I think this is the correct conversion unless I have made an oversight.
  • Loading branch information
JoeZiminski authored Dec 15, 2023
1 parent f6562d6 commit 55069f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slurmio/slurmio.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,6 @@ def _trackable_resources(self) -> dict:

def convert_mem_to_bytes(s):
if s.endswith("G"):
return int(s[:-1]) * 10**6
return int(s[:-1]) * 10**9
else:
return int(s)

0 comments on commit 55069f6

Please sign in to comment.