Skip to content

Commit

Permalink
minor fixes on data db
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Mar 29, 2022
1 parent 5986134 commit d5f8bba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
11 changes: 3 additions & 8 deletions src/eko/evolution_operator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,12 @@ def integrate(

# run integration in parallel for each grid point
# or avoid opening a single pool
args = (self.run_op_integration, enumerate(np.log(self.int_disp.xgrid_raw)))
if self.n_pools == 1:
res = map(
self.run_op_integration,
enumerate(np.log(self.int_disp.xgrid_raw)),
)
res = map(*args)
else:
with Pool(self.n_pools) as pool:
res = pool.map(
self.run_op_integration,
enumerate(np.log(self.int_disp.xgrid_raw)),
)
res = pool.map(*args)

# collect results
for k, row in enumerate(res):
Expand Down
2 changes: 1 addition & 1 deletion src/ekomark/data/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ class Operator(Base): # pylint: disable=too-few-public-methods
ev_op_max_order = Column(Integer)
ev_op_iterations = Column(Integer)
Q2grid = Column(Text)
n_integration_cores = Column(Integer)
backward_inversion = Column(Text)
4 changes: 1 addition & 3 deletions src/ekomark/data/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"""
Operator card configurations.
"""
import os

from banana.data import cartesian_product, sql

from eko import interpolation
Expand All @@ -19,7 +17,7 @@
ev_op_max_order=10,
ev_op_iterations=10,
backward_inversion="expanded",
n_integration_cores=os.cpu_count(),
n_integration_cores=0,
Q2grid=[100],
)

Expand Down

0 comments on commit d5f8bba

Please sign in to comment.