Skip to content

Commit

Permalink
NUMBA_OPT=0 fails CI; removing debug leftovers; add max(1, time)
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo committed Jan 4, 2024
1 parent 891bebb commit 57e7f4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
run: echo NUMBA_THREADING_LAYER=omp >> $GITHUB_ENV

- env:
NUMBA_OPT: 0
NUMBA_OPT: 1
run: |
pytest --durations=10 -p no:unraisableexception -We tests/unit_tests
pytest --durations=10 -p no:unraisableexception -We -k "not test_timing_3d" tests/smoke_tests
Expand Down
5 changes: 2 additions & 3 deletions examples/PyMPDATA_examples/Olesik_et_al_2022/wall_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ def test_wall_time(n_runs=3, mrats=(20,), generate=False, print_tab=True, rtol=R
minimum_values = []
while i < n_runs:
result = make_data(settings, grid, opts)
print("\t", i, opts, result["wall_time"])
wall_times = result["wall_time"]
minimal = np.nanmin(wall_times)
minimum_values.append(minimal)
i += 1
selected_value = np.min(minimum_values)
if opts == {"n_iters": 1}:
norm = selected_value
print(norm)
at_least_one_to_avoid_nans = 1
norm = max(at_least_one_to_avoid_nans, selected_value)
table_data["opts"].append(str(opts) + "(" + grid.__class__.__name__ + ")")
table_data["values"].append(
np.nan if norm == 0 else round(selected_value / norm, 1)
Expand Down

0 comments on commit 57e7f4a

Please sign in to comment.