Skip to content

Commit 7f9984e

Browse files
committed
Improve memory footprint error message. [ci skip]
1 parent e5a3f00 commit 7f9984e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/somd2/runner/_repex.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,13 @@ def _create_dynamics(
378378

379379
# If this exceeds the total memory, raise an error.
380380
if est_total > total_mem:
381+
baseline = info["before"]
382+
replica_cost = first_cost + marginal_cost * (num_contexts - 1)
381383
msg = (
382384
f"Not enough memory on device {device} for all assigned replicas. "
383-
f"Estimated memory usage: {est_total / (1024**3):.2f} GB, "
385+
f"Baseline usage before simulation: {baseline / (1024**3):.2f} GB "
386+
f"Estimated replica memory: {replica_cost / (1024**3):.2f} GB, "
387+
f"Total estimated: {est_total / (1024**3):.2f} GB, "
384388
f"Available memory: {total_mem / (1024**3):.2f} GB."
385389
)
386390
_logger.error(msg)

0 commit comments

Comments
 (0)