black without mortimer

This commit is contained in:
Noe Brucy
2022-11-28 18:01:18 +01:00
parent 7548ef7e0a
commit fa396178c6
14 changed files with 371 additions and 304 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ from utils.mypool import MyPool
try:
from mpi4py.futures import MPIPoolExecutor
mpi_loaded = True
except ModuleNotFoundError:
mpi_loaded = False
@@ -27,6 +28,7 @@ def _map_aux(fun, path, path_out, params, run_num, **kwargs):
def _map_rule(snap, rule, **kwargs):
return snap.process(rule, **kwargs)
class Aggregator:
def get_snap_list(self, select=None):
@@ -43,7 +45,7 @@ class Aggregator:
return self.map(_map_rule, select, num_process, rule=func, **kwargs)
snaps = self.get_snap_list(select)
if num_process is None:
num_process = self.params.process.num_process