Skip to content

Commit 735da03

Browse files
authored
Merge branch 'devitocodes:main' into master
2 parents 9d389da + 34cdc53 commit 735da03

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

devito/ir/support/properties.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,22 @@ def inbound(self, dims):
296296
return self.add(dims, INBOUND)
297297

298298
def init_core_shm(self, dims):
299-
return self.add(dims, INIT_CORE_SHM)
299+
properties = self.add(dims, INIT_CORE_SHM)
300+
properties = properties.drop(properties={INIT_HALO_LEFT_SHM,
301+
INIT_HALO_RIGHT_SHM})
302+
return properties
300303

301304
def init_halo_left_shm(self, dims):
302-
return self.add(dims, INIT_HALO_LEFT_SHM)
305+
properties = self.add(dims, INIT_HALO_LEFT_SHM)
306+
properties = properties.drop(properties={INIT_CORE_SHM,
307+
INIT_HALO_RIGHT_SHM})
308+
return properties
303309

304310
def init_halo_right_shm(self, dims):
305-
return self.add(dims, INIT_HALO_RIGHT_SHM)
311+
properties = self.add(dims, INIT_HALO_RIGHT_SHM)
312+
properties = properties.drop(properties={INIT_CORE_SHM,
313+
INIT_HALO_LEFT_SHM})
314+
return properties
306315

307316
def is_parallel(self, dims):
308317
return any(len(self[d] & {PARALLEL, PARALLEL_INDEP}) > 0

devito/symbolics/extended_dtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
limits_mapper = {
1414
np.int32: Bunch(min=ValueLimit('INT_MIN'), max=ValueLimit('INT_MAX')),
1515
np.int64: Bunch(min=ValueLimit('LONG_MIN'), max=ValueLimit('LONG_MAX')),
16-
np.float32: Bunch(min=-ValueLimit('FLT_MIN'), max=ValueLimit('FLT_MAX')),
17-
np.float64: Bunch(min=-ValueLimit('DBL_MIN'), max=ValueLimit('DBL_MAX')),
16+
np.float32: Bunch(min=-ValueLimit('FLT_MAX'), max=ValueLimit('FLT_MAX')),
17+
np.float64: Bunch(min=-ValueLimit('DBL_MAX'), max=ValueLimit('DBL_MAX')),
1818
}
1919

2020

devito/types/dense.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import numpy as np
77
import sympy
8-
from psutil import virtual_memory
98
from functools import cached_property
109

1110
from devito.builtins import assign
@@ -1380,14 +1379,6 @@ def __init_finalize__(self, *args, **kwargs):
13801379
self._time_order = kwargs.get('time_order', 1)
13811380
super().__init_finalize__(*args, **kwargs)
13821381

1383-
# Check we won't allocate too much memory for the system
1384-
available_mem = virtual_memory().available
1385-
required_mem = np.dtype(self.dtype).itemsize * self.size
1386-
if required_mem > available_mem:
1387-
raise MemoryError(
1388-
f"Trying to allocate more memory ({humanbytes(required_mem)}) "
1389-
f"for `{self.name}` than available ({humanbytes(available_mem)})"
1390-
)
13911382
if not isinstance(self.time_order, int):
13921383
raise TypeError("`time_order` must be int")
13931384

0 commit comments

Comments
 (0)