UHS calculator class

Bug #888171 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
Medium
Lars Butler

Bug Description

[et=24h] # 3 days
[at=11h]

--Calculation Workflow--

for rlz in realizations:
  sample_source_model()
  sample_gmpe_model()
  for site in sites:
    compute_uhs(s, site, poes)

utils.tasks.distribute() should be used to create a task for each site. Thus, the code will look something more like this:

for rlz in realizations:
  sample_source_model()
  sample_gmpe_model()
  distribute(compute_uhs_task, ("site", sites), tf_args=..., ath=..., ath_args=...)

An async task handler will need to be defined to tally the results as they are computed (so we know when the calculation is complete).

Details

compute_uhs:
  - This is executed by a celery worker (as an async task). Results should be saved directly the to the database.
  - given a single site, compute uhs results for a realization (sample)
  - calls the java UHSCalculator to perform the bulk of the computation
  - results are saved directly to the database (write_uhs_results; see bug # 925425)
  - the implementation of this functionality is in the scope of bug # 888172

--Stats and Progress Indication--

Async task handler (mentioned above):
- create and maintain a 'total' ('t') counter for the total number of tasks.
- keep track of the task counter (in Redis) for the compute_uhs_task @task and compare the completed # to the 't' counter to determine when the calculation is complete

--@preload--

The functionality in openquake.calculators.hazard.general.preload should be implemented in the pre_execute() method (see the abstract Calculator class)

description: updated
description: updated
description: updated
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :

Since this bug was originally specified, mixins have been removed and many improvements have been made in result serialization and stats code. The design for this bug should be updated accordingly (to use the components that are now available).

summary: - UHS mixin class
+ UHS calculator class
John Tarter (toh2)
Changed in openquake:
milestone: none → 0.6.0
importance: Undecided → Medium
Revision history for this message
Lars Butler (lars-butler) wrote :

Based on the new design (saving directly to the database, export HDF5/NRML after calculation, etc.), the spec for this bug needs to be heavily revised.

Changed in openquake:
status: New → Incomplete
assignee: nobody → Lars Butler (lars-butler)
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
Changed in openquake:
status: Incomplete → In Progress
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :
Revision history for this message
Lars Butler (lars-butler) wrote :
description: updated
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
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.