Skip to content

Commit

Permalink
Merge pull request #151 from NNPDF/use-eko-managed-solve
Browse files Browse the repository at this point in the history
Use `eko.runner.managed.solve`
  • Loading branch information
felixhekhorn authored Feb 7, 2024
2 parents 907b782 + 916bf03 commit 210da28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pineko/theory.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import pineappl
import rich
import yaml
from eko.runner.managed import solve

from . import check, configs, evolve, parser, scale_variations, theory_card

Expand Down Expand Up @@ -331,7 +332,7 @@ def eko(self, name, _grid, tcard):
logger.info("Start computation of %s", name)
start_time = time.perf_counter()
# Actual computation of the EKO
eko.runner.solve(new_theory, new_op, eko_filename)
solve(new_theory, new_op, eko_filename)
logger.info(
"Finished computation of %s - took %f s",
name,
Expand Down Expand Up @@ -408,7 +409,7 @@ def fk(self, name, grid_path, tcard, pdf):
).size
== 0
):
rich.print(f"[green] Skipping empty grid.")
rich.print("[green] Skipping empty grid.")
return

# check for sv
Expand All @@ -421,7 +422,7 @@ def fk(self, name, grid_path, tcard, pdf):
with eko.EKO.read(eko_filename) as operators:
# Skip the computation of the fktable if the eko is empty
if len(operators.mu2grid) == 0 and check.is_num_fonll(tcard["FNS"]):
rich.print(f"[green] Skipping empty eko for nFONLL.")
rich.print("[green] Skipping empty eko for nFONLL.")
return
eko_tmp_path = (
operators.paths.root.parent / f"eko-tmp-{name}-{np.random.rand()}.tar"
Expand Down

0 comments on commit 210da28

Please sign in to comment.