devito
devito copied to clipboard
AttributeError: damp object has no attribute '_data_buffer'
I was trying to run the tutorial 1 about modeling, and got errors at:
model = Model(vp=v, origin=origin, shape=shape, spacing=spacing, space_order=2, nbl=10)
Could anyone help take a look? Thanks!
/content/devito/examples/seismic/model.py in __init__(self, origin, spacing, shape, space_order, vp, nbl, dtype, epsilon, delta, theta, phi, subdomains, **kwargs)
201 subdomains=(), **kwargs):
202 super(Model, self).__init__(origin, spacing, shape, space_order, nbl, dtype,
--> 203 subdomains)
204
205 # Create square slowness of the wave as symbol `m`
/content/devito/examples/seismic/model.py in __init__(self, origin, spacing, shape, space_order, nbl, dtype, subdomains, damp_mask)
87 # Create dampening field as symbol `damp`
88 self.damp = Function(name="damp", grid=self.grid)
---> 89 initialize_damp(self.damp, self.nbl, self.spacing, mask=damp_mask)
90 self._physical_parameters = ['damp']
91 else:
/content/devito/examples/seismic/model.py in initialize_damp(damp, nbl, spacing, mask)
48
49 # TODO: Figure out why yask doesn't like it with dse/dle
---> 50 Operator(eqs, name='initdamp', dse='noop', dle='noop')()
51
52
/content/devito/devito/operator/operator.py in __call__(self, **kwargs)
495
496 def __call__(self, **kwargs):
--> 497 self.apply(**kwargs)
498
499 def apply(self, **kwargs):
/content/devito/devito/operator/operator.py in apply(self, **kwargs)
561 # Build the arguments list to invoke the kernel function
562 with self._profiler.timer_on('arguments'):
--> 563 args = self.arguments(**kwargs)
564
565 # Invoke kernel function with args
/content/devito/devito/operator/operator.py in arguments(self, **kwargs)
443 def arguments(self, **kwargs):
444 """Arguments to run the Operator."""
--> 445 args = self._prepare_arguments(**kwargs)
446 # Check all arguments are present
447 for p in self.parameters:
/content/devito/devito/operator/operator.py in _prepare_arguments(self, **kwargs)
353 # E.g., SubFunctions
354 continue
--> 355 for k, v in p._arg_values(**kwargs).items():
356 if k in args and args[k] != v:
357 raise ValueError("Default `%s` is incompatible with other args as "
/content/devito/devito/types/dense.py in _arg_values(self, **kwargs)
782 values.update(self.grid._arg_defaults())
783 else:
--> 784 values = self._arg_defaults(alias=self).reduce_all()
785
786 return values
/content/devito/devito/types/dense.py in _arg_defaults(self, alias)
742 """
743 key = alias or self
--> 744 args = ReducerMap({key.name: self._data_buffer})
745
746 # Collect default dimension arguments from all indices
/content/devito/devito/finite_differences/differentiable.py in __getattr__(self, name)
128 if name in self._fd:
129 return self._fd[name][0](self)
--> 130 raise AttributeError("%r object has no attribute %r" % (self.__class__, name))
131
132 # Override SymPy arithmetic operators
AttributeError: damp object has no attribute '_data_buffer'
can you edit the original message and put the stack trace within a code block:
code ...
otherwise formatting and layout are messed up
now a question: what did you change to get this error? did it work the first time you run it?
Sure, I will edit the original message.
I am running the tutorial 1 on google colab notebooks. I followed the quickstart steps (conda virtual env and pip install) and created the environment. Nothing else is added. Then it failed with the error of attribute '_data_buffer'.
[image: image.png]
Thanks, Zhenzhen
On Thu, Jan 9, 2020 at 3:10 AM Fabio Luporini [email protected] wrote:
can you edit the original message and put the stack trace within a code block:
code ...
otherwise formatting and layout are messed up
now a question: what did you change to get this error? did it work the first time you run it?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devitocodes/devito/issues/1047?email_source=notifications&email_token=AFUEET2B7KXN6QDQWP4CVJ3Q43SY7A5CNFSM4KERT2J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIPRVWQ#issuecomment-572463834, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFUEETZZ44IYBZQW332CVJ3Q43SY7ANCNFSM4KERT2JQ .
That's really odd. Will look into this.
Which cell is failing exactly?
Are there any further updates on this?
I have seen this error myself, recently. Forgot how I resolved it.
What python version are/were you using @jazzskier ?