Skip to content

Commit

Permalink
Moved the reportwriter into calculators
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Aug 23, 2016
1 parent c83a72d commit bf730cb
Show file tree
Hide file tree
Showing 28 changed files with 420 additions and 420 deletions.
4 changes: 2 additions & 2 deletions doc/sphinx/openquake.commonlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ openquake.commonlib.readinput module
:undoc-members:
:show-inheritance:

openquake.commonlib.reportwriter module
openquake.calculators.reportwriter module
---------------------------------------

.. automodule:: openquake.commonlib.reportwriter
.. automodule:: openquake.calculators.reportwriter
:members:
:undoc-members:
:show-inheritance:
Expand Down
2 changes: 1 addition & 1 deletion openquake/calculators/classical.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def execute(self):
"""
Builds a dictionary pmap_by_grp_gsim from the stored PoEs
"""
if 'poes' not in self.datastore:
if 'poes' not in self.datastore: # when building the short report
return

pmap_by_grp_gsim = {}
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions openquake/commands/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
from openquake.baselib.general import groupby
from openquake.baselib.performance import Monitor
from openquake.commonlib import (
sap, nrml, readinput, reportwriter, datastore, views)
sap, nrml, readinput, datastore, views)
from openquake.commonlib.parallel import get_pickled_sizes
from openquake.commonlib.export import export
from openquake.calculators import base
from openquake.calculators import base, reportwriter
from openquake.hazardlib import gsim


Expand Down
2 changes: 1 addition & 1 deletion openquake/commonlib/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def view_fullreport(token, dstore):
Display an .rst report about the computation
"""
# avoid circular imports
from openquake.commonlib.reportwriter import ReportWriter
from openquake.calculators.reportwriter import ReportWriter
return ReportWriter(dstore).make_report()


Expand Down
18 changes: 9 additions & 9 deletions openquake/qa_tests_data/classical/case_1/report.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Classical Hazard QA Test, Case 1
================================

gem-tstation:/home/michele/ssd/calc_41619.hdf5 updated Tue Aug 23 17:47:46 2016
gem-tstation:/home/michele/ssd/calc_41668.hdf5 updated Tue Aug 23 18:24:20 2016

num_sites = 1, sitecol = 739 B

Expand All @@ -21,7 +21,7 @@ area_source_discretization None
random_seed 1066
master_seed 0
sites_per_tile 10000
engine_version '2.1.0-git5b04a6e'
engine_version '2.1.0-gitc83a72d'
============================ ================================

Input files
Expand Down Expand Up @@ -70,13 +70,13 @@ source_model.xml 0 Active Shallow Crust 1 1 0.025
Informational data
------------------
======================================== ============
count_eff_ruptures_max_received_per_task 1,283
count_eff_ruptures_max_received_per_task 1,224
count_eff_ruptures_num_tasks 1
count_eff_ruptures_sent.monitor 954
count_eff_ruptures_sent.monitor 903
count_eff_ruptures_sent.rlzs_by_gsim 516
count_eff_ruptures_sent.sitecol 433
count_eff_ruptures_sent.sources 1,188
count_eff_ruptures_tot_received 1,283
count_eff_ruptures_tot_received 1,224
hazard.input_weight 0.025
hazard.n_imts 2
hazard.n_levels 3.000
Expand Down Expand Up @@ -115,9 +115,9 @@ operation time_sec memory_mb counts
reading composite source model 0.004 0.0 1
store source_info 0.004 0.0 1
managing sources 0.003 0.0 1
total count_eff_ruptures 3.369E-04 0.0 1
reading site collection 3.910E-05 0.0 1
total count_eff_ruptures 3.440E-04 0.0 1
reading site collection 2.909E-05 0.0 1
filtering sources 2.098E-05 0.0 1
saving probability maps 2.003E-05 0.0 1
aggregate curves 1.407E-05 0.0 1
saving probability maps 1.812E-05 0.0 1
aggregate curves 1.383E-05 0.0 1
============================== ========= ========= ======
28 changes: 14 additions & 14 deletions openquake/qa_tests_data/classical/case_10/report.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Classical Hazard QA Test, Case 10
=================================

gem-tstation:/home/michele/ssd/calc_41600.hdf5 updated Tue Aug 23 17:46:47 2016
gem-tstation:/home/michele/ssd/calc_41672.hdf5 updated Tue Aug 23 19:27:25 2016

num_sites = 1, sitecol = 739 B

Expand All @@ -21,7 +21,7 @@ area_source_discretization 10.0
random_seed 1066
master_seed 0
sites_per_tile 10000
engine_version '2.1.0-git5b04a6e'
engine_version '2.1.0-gitc83a72d'
============================ ================================

Input files
Expand Down Expand Up @@ -83,13 +83,13 @@ filtered_weight 150
Informational data
------------------
======================================== ============
count_eff_ruptures_max_received_per_task 1,198
count_eff_ruptures_max_received_per_task 1,139
count_eff_ruptures_num_tasks 2
count_eff_ruptures_sent.monitor 1,736
count_eff_ruptures_sent.monitor 1,634
count_eff_ruptures_sent.rlzs_by_gsim 1,050
count_eff_ruptures_sent.sitecol 866
count_eff_ruptures_sent.sources 2,404
count_eff_ruptures_tot_received 2,396
count_eff_ruptures_tot_received 2,278
hazard.input_weight 150
hazard.n_imts 1
hazard.n_levels 4.000
Expand All @@ -106,15 +106,15 @@ Slowest sources
src_group_id source_id source_class weight split_num filter_time split_time cum_calc_time max_calc_time num_tasks
============ ========= ============ ====== ========= =========== ========== ============= ============= =========
0 1 PointSource 75 1 0.004 1.884E-05 0.0 0.0 0
1 1 PointSource 75 1 0.004 1.502E-05 0.0 0.0 0
1 1 PointSource 75 1 0.004 1.407E-05 0.0 0.0 0
============ ========= ============ ====== ========= =========== ========== ============= ============= =========

Computation times by source typology
------------------------------------
============ =========== ========== ============= ============= ========= ======
source_class filter_time split_time cum_calc_time max_calc_time num_tasks counts
============ =========== ========== ============= ============= ========= ======
PointSource 0.009 3.386E-05 0.0 0.0 0 2
PointSource 0.008 3.290E-05 0.0 0.0 0 2
============ =========== ========== ============= ============= ========= ======

Information about the tasks
Expand All @@ -126,13 +126,13 @@ Slowest operations
============================== ========= ========= ======
operation time_sec memory_mb counts
============================== ========= ========= ======
reading composite source model 0.015 0.0 1
reading composite source model 0.014 0.0 1
managing sources 0.013 0.0 1
filtering sources 0.009 0.0 2
filtering sources 0.008 0.0 2
store source_info 0.005 0.0 1
total count_eff_ruptures 5.920E-04 0.0 2
aggregate curves 4.005E-05 0.0 2
reading site collection 3.386E-05 0.0 1
splitting sources 3.386E-05 0.0 2
saving probability maps 2.408E-05 0.0 1
total count_eff_ruptures 7.122E-04 0.0 2
reading site collection 3.910E-05 0.0 1
aggregate curves 3.433E-05 0.0 2
splitting sources 3.290E-05 0.0 2
saving probability maps 2.384E-05 0.0 1
============================== ========= ========= ======
36 changes: 18 additions & 18 deletions openquake/qa_tests_data/classical/case_11/report.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Classical Hazard QA Test, Case 11
=================================

gem-tstation:/home/michele/ssd/calc_41611.hdf5 updated Tue Aug 23 17:47:15 2016
gem-tstation:/home/michele/ssd/calc_41683.hdf5 updated Tue Aug 23 19:27:51 2016

num_sites = 1, sitecol = 739 B

Expand All @@ -21,7 +21,7 @@ area_source_discretization 10.0
random_seed 1066
master_seed 0
sites_per_tile 10000
engine_version '2.1.0-git5b04a6e'
engine_version '2.1.0-gitc83a72d'
============================ ================================

Input files
Expand Down Expand Up @@ -88,13 +88,13 @@ filtered_weight 225
Informational data
------------------
======================================== ============
count_eff_ruptures_max_received_per_task 1,198
count_eff_ruptures_max_received_per_task 1,139
count_eff_ruptures_num_tasks 3
count_eff_ruptures_sent.monitor 2,604
count_eff_ruptures_sent.monitor 2,451
count_eff_ruptures_sent.rlzs_by_gsim 1,575
count_eff_ruptures_sent.sitecol 1,299
count_eff_ruptures_sent.sources 3,606
count_eff_ruptures_tot_received 3,594
count_eff_ruptures_tot_received 3,417
hazard.input_weight 225
hazard.n_imts 1
hazard.n_levels 4.000
Expand All @@ -110,17 +110,17 @@ Slowest sources
============ ========= ============ ====== ========= =========== ========== ============= ============= =========
src_group_id source_id source_class weight split_num filter_time split_time cum_calc_time max_calc_time num_tasks
============ ========= ============ ====== ========= =========== ========== ============= ============= =========
0 1 PointSource 87 1 0.005 2.098E-05 0.0 0.0 0
1 1 PointSource 75 1 0.004 1.502E-05 0.0 0.0 0
2 1 PointSource 62 1 0.004 1.478E-05 0.0 0.0 0
0 1 PointSource 87 1 0.004 1.478E-05 0.0 0.0 0
1 1 PointSource 75 1 0.003 1.097E-05 0.0 0.0 0
2 1 PointSource 62 1 0.003 1.001E-05 0.0 0.0 0
============ ========= ============ ====== ========= =========== ========== ============= ============= =========

Computation times by source typology
------------------------------------
============ =========== ========== ============= ============= ========= ======
source_class filter_time split_time cum_calc_time max_calc_time num_tasks counts
============ =========== ========== ============= ============= ========= ======
PointSource 0.013 5.078E-05 0.0 0.0 0 3
PointSource 0.010 3.576E-05 0.0 0.0 0 3
============ =========== ========== ============= ============= ========= ======

Information about the tasks
Expand All @@ -132,13 +132,13 @@ Slowest operations
============================== ========= ========= ======
operation time_sec memory_mb counts
============================== ========= ========= ======
reading composite source model 0.019 0.0 1
managing sources 0.019 0.0 1
filtering sources 0.013 0.0 3
store source_info 0.005 0.0 1
total count_eff_ruptures 8.192E-04 0.0 3
aggregate curves 5.078E-05 0.0 3
splitting sources 5.078E-05 0.0 3
reading site collection 3.695E-05 0.0 1
saving probability maps 2.599E-05 0.0 1
managing sources 0.016 0.0 1
reading composite source model 0.015 0.0 1
filtering sources 0.010 0.0 3
store source_info 0.008 0.0 1
total count_eff_ruptures 7.520E-04 0.0 3
aggregate curves 9.418E-05 0.0 3
saving probability maps 3.791E-05 0.0 1
splitting sources 3.576E-05 0.0 3
reading site collection 2.480E-05 0.0 1
============================== ========= ========= ======
26 changes: 13 additions & 13 deletions openquake/qa_tests_data/classical/case_12/report.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Classical Hazard QA Test, Case 12
=================================

gem-tstation:/home/michele/ssd/calc_41616.hdf5 updated Tue Aug 23 17:47:40 2016
gem-tstation:/home/michele/ssd/calc_41665.hdf5 updated Tue Aug 23 18:24:14 2016

num_sites = 1, sitecol = 739 B

Expand All @@ -21,7 +21,7 @@ area_source_discretization 10.0
random_seed 1066
master_seed 0
sites_per_tile 10000
engine_version '2.1.0-git5b04a6e'
engine_version '2.1.0-gitc83a72d'
============================ ==============================================================

Input files
Expand Down Expand Up @@ -80,13 +80,13 @@ filtered_weight 0.050
Informational data
------------------
======================================== ============
count_eff_ruptures_max_received_per_task 1,219
count_eff_ruptures_max_received_per_task 1,160
count_eff_ruptures_num_tasks 2
count_eff_ruptures_sent.monitor 1,784
count_eff_ruptures_sent.monitor 1,682
count_eff_ruptures_sent.rlzs_by_gsim 1,206
count_eff_ruptures_sent.sitecol 866
count_eff_ruptures_sent.sources 2,376
count_eff_ruptures_tot_received 2,438
count_eff_ruptures_tot_received 2,320
hazard.input_weight 0.050
hazard.n_imts 1
hazard.n_levels 3.000
Expand All @@ -102,16 +102,16 @@ Slowest sources
============ ========= ============ ====== ========= =========== ========== ============= ============= =========
src_group_id source_id source_class weight split_num filter_time split_time cum_calc_time max_calc_time num_tasks
============ ========= ============ ====== ========= =========== ========== ============= ============= =========
0 1 PointSource 0.025 1 2.789E-05 0.0 0.0 0.0 0
1 2 PointSource 0.025 1 1.287E-05 0.0 0.0 0.0 0
0 1 PointSource 0.025 1 2.885E-05 0.0 0.0 0.0 0
1 2 PointSource 0.025 1 1.407E-05 0.0 0.0 0.0 0
============ ========= ============ ====== ========= =========== ========== ============= ============= =========

Computation times by source typology
------------------------------------
============ =========== ========== ============= ============= ========= ======
source_class filter_time split_time cum_calc_time max_calc_time num_tasks counts
============ =========== ========== ============= ============= ========= ======
PointSource 4.077E-05 0.0 0.0 0.0 0 2
PointSource 4.292E-05 0.0 0.0 0.0 0 2
============ =========== ========== ============= ============= ========= ======

Information about the tasks
Expand All @@ -126,9 +126,9 @@ operation time_sec memory_mb counts
reading composite source model 0.006 0.0 1
store source_info 0.005 0.0 1
managing sources 0.004 0.0 1
total count_eff_ruptures 4.978E-04 0.0 2
filtering sources 4.077E-05 0.0 2
aggregate curves 3.386E-05 0.0 2
reading site collection 3.386E-05 0.0 1
saving probability maps 2.480E-05 0.0 1
total count_eff_ruptures 5.891E-04 0.0 2
filtering sources 4.292E-05 0.0 2
reading site collection 3.695E-05 0.0 1
aggregate curves 3.290E-05 0.0 2
saving probability maps 2.408E-05 0.0 1
============================== ========= ========= ======
Loading

0 comments on commit bf730cb

Please sign in to comment.