gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
378 stars 273 forks source link

error in RuptureContext for some sources with parameter 'occurrence_rate' #7675

Closed kejohnso closed 2 years ago

kejohnso commented 2 years ago

The following error is given by a model using one sites.csv, but runs correctly for a different sites.csv. I will share the job files privately.

AttributeError: 
  File "/opt/src/oq-engine/openquake/baselib/parallel.py", line 427, in new
    val = func(*args)
  File "/opt/src/oq-engine/openquake/baselib/parallel.py", line 975, in split_task
    res = func(elems, *args, monitor=monitor)
  File "/opt/src/oq-engine/openquake/calculators/classical.py", line 92, in classical
    result = hazclassical(srcs, sitecol, cmaker)
  File "/opt/src/oq-engine/openquake/hazardlib/calc/hazard_curve.py", line 112, in classical
    dic = PmapMaker(cmaker, src_filter, group).make()
  File "/opt/src/oq-engine/openquake/hazardlib/contexts.py", line 1117, in make
    'rup_data': self.dictarray(self.rupdata),
  File "/opt/src/oq-engine/openquake/hazardlib/contexts.py", line 1104, in dictarray
    dic[par] = numpy.array([getattr(ctx, par) for ctx in ctxs])
  File "/opt/src/oq-engine/openquake/hazardlib/contexts.py", line 1104, in <listcomp>
    dic[par] = numpy.array([getattr(ctx, par) for ctx in ctxs])
AttributeError: 'RuptureContext' object has no attribute 'occurrence_rate'
micheles commented 2 years ago

On which machine does this happen? It could be an outdated cluster.

kejohnso commented 2 years ago

On which machine does this happen? It could be an outdated cluster.

It happened on Hendrix as well as my own computer