diff --git a/devito/operator/operator.py b/devito/operator/operator.py index ce07ebb368..bacba1f872 100644 --- a/devito/operator/operator.py +++ b/devito/operator/operator.py @@ -1364,8 +1364,10 @@ def _get_nbytes(self, i): try: # Non-regular AbstractFunction (compressed, etc) nbytes = obj.nbytes_max - except AttributeError: - # Garden-variety AbstractFunction + except (AttributeError, ValueError): + # Either garden-variety AbstractFunction, or uninitialised + # function used in estimate. In the latter case, fall back + # to nbytes, as it is typically zero nbytes = obj.nbytes # Could nominally have symbolic nbytes at this point @@ -1461,7 +1463,8 @@ def nbytes_consumed_arrays(self): # Temporaries such as Arrays are allocated and deallocated on-the-fly # while in C land, so they need to be accounted for as well for i in self._op_symbols: - if not i.is_Array or not i._mem_heap or i.alias: + if not i.is_Array or not i._mem_heap or i.alias \ + or not i.is_regular: continue if i.is_regular: