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
377 stars 273 forks source link

ClassicalDamage demo not working out-of-the-box #8907

Closed alejocaldeGEM closed 1 year ago

alejocaldeGEM commented 1 year ago

Trying to run job_hazard.ini found in oq-engine\demos\risk\ClassicalDamage folder, the calculation fails in the lasts steps (datastore.py), preventing the user to run the demo end-to-end and review the standard outputs of a classical damage calculation. See the full traceback here:

[2023-07-14 11:06:15 #26 INFO] classical 100% [25 submitted, 0 queued] [2023-07-14 11:06:15 #26 INFO] Mean time per core=6s, std=1.3s, min=4s, max=9s [2023-07-14 11:06:15 #26 INFO] Received {'pnemap': '20.16 MB', 'source_data': '52.26 KB', 'cfactor': '3.66 KB', 'grp_id': '125 B', 'task_no': '125 B', 'rup_data': '125 B'} in 10 seconds from classical [2023-07-14 11:06:16 #26 CRITICAL] Traceback (most recent call last): File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commonlib\datastore.py", line 487, in getitem val = self.hdf5[key] File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\baselib\hdf5.py", line 492, in getitem h5obj = super().getitem(path) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "C:\Users\acalderon\openquake\lib\site-packages\h5py_hl\group.py", line 328, in getitem oid = h5o.open(self.id, self._e(name), lapl=self._lapl) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5o.pyx", line 190, in h5py.h5o.open KeyError: "Unable to open object (object 'disagg_by_src' doesn't exist)"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\base.py", line 241, in run self.result = self.execute() File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 592, in execute self.execute_par(maxw) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 611, in execute_par self.haz.store_disagg(acc) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 401, in store_disagg disagg_by_src = self.datastore['disagg_by_src'][()] File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commonlib\datastore.py", line 497, in getitem raise KeyError('No %r found in %s' % (key, self)) KeyError: "No 'disagg_by_src' found in <DataStore C:\Users\acalderon\oqdata/calc_26.hdf5 open>" [2023-07-14 11:06:16 #26 CRITICAL] Traceback (most recent call last): File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commonlib\datastore.py", line 487, in getitem val = self.hdf5[key] File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\baselib\hdf5.py", line 492, in getitem h5obj = super().getitem(path) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "C:\Users\acalderon\openquake\lib\site-packages\h5py_hl\group.py", line 328, in getitem oid = h5o.open(self.id, self._e(name), lapl=self._lapl) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5o.pyx", line 190, in h5py.h5o.open KeyError: "Unable to open object (object 'disagg_by_src' doesn't exist)"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\engine\engine.py", line 279, in run_calc calc.run(shutdown=True) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\base.py", line 241, in run self.result = self.execute() File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 592, in execute self.execute_par(maxw) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 611, in execute_par self.haz.store_disagg(acc) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 401, in store_disagg disagg_by_src = self.datastore['disagg_by_src'][()] File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commonlib\datastore.py", line 497, in getitem raise KeyError('No %r found in %s' % (key, self)) KeyError: "No 'disagg_by_src' found in <DataStore C:\Users\acalderon\oqdata/calc_26.hdf5 open>"

Traceback (most recent call last): File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commonlib\datastore.py", line 487, in getitem val = self.hdf5[key] File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\baselib\hdf5.py", line 492, in getitem h5obj = super().getitem(path) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "C:\Users\acalderon\openquake\lib\site-packages\h5py_hl\group.py", line 328, in getitem oid = h5o.open(self.id, self._e(name), lapl=self._lapl) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5o.pyx", line 190, in h5py.h5o.open KeyError: "Unable to open object (object 'disagg_by_src' doesn't exist)"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\acalderon\openquake\Scripts\oq-script.py", line 33, in sys.exit(load_entry_point('openquake.engine', 'console_scripts', 'oq')()) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commands__main.py", line 53, in oq sap.run(commands, prog='oq') File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\baselib\sap.py", line 212, in run return _run(parser(funcdict, parserkw), argv) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\baselib\sap.py", line 203, in _run return func(dic) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commands\engine.py", line 175, in main run_jobs(jobs) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\engine\engine.py", line 404, in run_jobs run_calc(jobctx) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\engine\engine.py", line 279, in run_calc calc.run(shutdown=True) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\base.py", line 241, in run self.result = self.execute() File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 592, in execute self.execute_par(maxw) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 611, in execute_par self.haz.store_disagg(acc) File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\calculators\classical.py", line 401, in store_disagg disagg_by_src = self.datastore['disagg_by_src'][()] File "C:\Users\acalderon\Documents\Git\oq-engine\openquake\commonlib\datastore.py", line 497, in getitem__ raise KeyError('No %r found in %s' % (key, self)) KeyError: "No 'disagg_by_src' found in <DataStore C:\Users\acalderon\oqdata/calc_26.hdf5 open>"

Replicated in OQ v3.16.4 and OQv3.16.5 Windows OS OQ Engine 3.16.5

micheles commented 1 year ago

This looks like a Windows-only error. I thought the Windows action was running all demos, @vot4anto should check.

vot4anto commented 1 year ago

@micheles on Windows action we run only the tests on what we agreed on to use to test the installation after the latest change to adopt Fiona:

pytest -vsx --color=yes D:\a\oq-engine\oq-engine\openquake\sep
#
pytest -vsx --color=yes D:\a\oq-engine\oq-engine\openquake\openquake\hazardlib\tests\gsim\kotha_2020_test.py
#
pytest -vsx --color=yes D:\a\oq-engine\oq-engine\openquake\calculators

I change the action to test this case and this error is only on LTS releases: https://github.com/gem/oq-engine/actions/runs/5573960598