Skip to content

Commit

Permalink
Added docstring [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Sep 5, 2024
1 parent 208e0a0 commit d37afd8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openquake/calculators/classical.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ def store_ctxs(dstore, rupdata_list, grp_id):

# ########################### task functions ############################ #

def save_rmap(rates_g, g, N, num_chunks, mon):
def save_rates(rates_g, g, N, num_chunks, mon):
"""
Store the rates for the given g on a file scratch/calc_id/task_no.hdf5
"""
rates = from_rates_g(rates_g, g, numpy.arange(N))
_store(rates, num_chunks, None, mon)

Expand Down Expand Up @@ -562,7 +565,7 @@ def redweight(src):
allargs.append((rates_g, g, self.N, self.num_chunks, mon))
with self.monitor('storing rates', measuremem=True), \
mp.Pool(mcores) as pool:
pool.starmap(save_rmap, allargs)
pool.starmap(save_rates, allargs)
elif self.rmap.acc:
with self.monitor('storing rates', measuremem=True):
for g, rates_g in self.rmap.acc.items():
Expand Down

0 comments on commit d37afd8

Please sign in to comment.