Engine tries to compute quantiles using only one realisation

Bug #1344045 reported by Daniele Viganò
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
High
Michele Simionato

Bug Description

Damiano replied to a user from INGV-PI about this error:

Traceback (most recent call last):
  File "/usr/bin/openquake", line 9, in <module>
    load_entry_point('openquake.engine==1.0.0', 'console_scripts', 'openquake')()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/bin/oqscript.py", line 455, in main
    log_file, args.exports)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 565, in run_job
    job, log_level, log_file, exports, 'hazard' if hazard else 'risk')
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 361, in run_calc
    _do_run_calc(calculator, exports, job_type)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 409, in _do_run_calc
    calc.post_process()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/calculators/hazard/classical/core.py", line 315, in post_process
    self.do_aggregate_post_proc()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/performance.py", line 48, in newmeth
    return method(self, *args)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/calculators/hazard/general.py", line 660, in do_aggregate_post_proc
    curves_poes, quantile
  File "/usr/lib/python2.7/dist-packages/openquake/engine/calculators/post_processing.py", line 140, in quantile_curve
    return (1.0 - gamma) * data[:, k - 1] + gamma * data[:, k]
IndexError: invalid index

He replied that it could be generated by the fact that the Engine tries to generate quantiles with only one realisation instead of at least 2.

He suggested to leave the 'quantile_hazard_curves' empty in the job.ini.

We should implement a check to avoid this and/or generate a better error.

description: updated
Revision history for this message
Michele Simionato (michele-simionato) wrote :
Changed in oq-engine:
status: New → Fix Committed
importance: Undecided → High
milestone: none → 1.0.1
Changed in oq-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.