From de79584ddbebc7e13296a6750ef4eb5e921c6f22 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Mon, 21 Aug 2023 08:04:46 +0200 Subject: [PATCH] Fixed log message about the size of the produced GMFs --- openquake/calculators/event_based_risk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openquake/calculators/event_based_risk.py b/openquake/calculators/event_based_risk.py index 5c8bc77e4c98..9468501df84f 100644 --- a/openquake/calculators/event_based_risk.py +++ b/openquake/calculators/event_based_risk.py @@ -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): @@ -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')