Skip to content

Commit

Permalink
Merge pull request #8943 from gem/gmf_bytes
Browse files Browse the repository at this point in the history
Fixed log message about the size of the produced GMFs
  • Loading branch information
micheles authored Aug 21, 2023
2 parents de17ee7 + de79584 commit bde9273
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openquake/calculators/event_based_risk.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def event_based_risk(df, oqparam, monitor):
outs = gen_outputs(df, crmodel, rng, monitor)
avg, alt = aggreg(outs, crmodel, ARK, aggids, rlz_id, ideduc.any(),
monitor)
return dict(avg=avg, alt=alt)
return dict(avg=avg, alt=alt, gmf_bytes=df.memory_usage().sum())


def gen_outputs(df, crmodel, rng, monitor):
Expand Down Expand Up @@ -442,7 +442,7 @@ def agg_dicts(self, dummy, dic):
"""
if not dic:
return
self.gmf_bytes += dic['alt'].memory_usage().sum()
self.gmf_bytes += dic.pop('gmf_bytes')
self.oqparam.ground_motion_fields = False # hack
with self.monitor('saving risk_by_event'):
alt = dic.pop('alt')
Expand Down

0 comments on commit bde9273

Please sign in to comment.