Skip to content

Commit 24a5130

Browse files
committed
Fix memory check
1 parent fdcb4e9 commit 24a5130

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fidimag/common/cuboid_mesh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
2828
"""
2929
from __future__ import print_function
30-
from psutil import virtual_memory
30+
from psutil import virtual_memory
3131
import numpy as np
3232
from textwrap import dedent
3333
from six.moves import range
@@ -273,7 +273,7 @@ def check_size(self, system_memory_fake_for_testing=None):
273273
size_coordinates_GiB = size_coordinates_bytes / (1024. ** 3)
274274

275275
if system_memory_fake_for_testing is None:
276-
mem = virtual_memory() / (1024.0 ** 3)
276+
mem = virtual_memory().total / (1024.0 ** 3)
277277
else:
278278
mem_GiB = system_memory_fake_for_testing
279279

0 commit comments

Comments
 (0)