Skip to content

Commit 15bf108

Browse files
Merge pull request #2784 from pybamm-team/issue-2783-benchmarks
fix benchmarks
2 parents 31ec93c + 317c0a3 commit 15bf108

File tree

7 files changed

+24
-7
lines changed

7 files changed

+24
-7
lines changed

.github/workflows/benchmark_on_push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
HEAD_COMMIT=$(git rev-parse HEAD)
3939
echo $BASE_COMMIT | tee commits_to_compare.txt
4040
echo $HEAD_COMMIT | tee -a commits_to_compare.txt
41-
asv run HASHFILE:commits_to_compare.txt --m "GitHubRunner" --show-stderr -v
41+
asv run HASHFILE:commits_to_compare.txt --m "GitHubRunner" --show-stderr --strict -v
4242
- name: Compare commits' benchmark results
4343
run: |
4444
BASE_COMMIT=$(head -1 commits_to_compare.txt)

asv.conf.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// "install_command": ["in-dir={env_dir} python -mpip install {wheel_file}"],
2525
// "uninstall_command": ["return-code=any python -mpip uninstall -y {project}"],
2626
"build_command": [
27+
"/bin/rm -rf pybind11",
2728
"/usr/bin/git clone --depth 1 --branch v2.6.2 https://github.com/pybind/pybind11.git",
2829
"python setup.py build",
2930
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"

benchmarks/different_model_options.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class TimeSolveLithiumPlating:
124124

125125
def setup(self, model, params, solver_class):
126126
SolveModel.solve_setup(
127-
self, "OKane2020", model, "lithium plating", params, solver_class
127+
self, "OKane2022", model, "lithium plating", params, solver_class
128128
)
129129

130130
def time_solve_model(self, model, params, solver_class):
@@ -139,12 +139,10 @@ class TimeBuildModelSEI:
139139
"none",
140140
"constant",
141141
"reaction limited",
142-
"reaction limited (asymmetric)",
143142
"solvent-diffusion limited",
144143
"electron-migration limited",
145144
"interstitial-diffusion limited",
146145
"ec reaction limited",
147-
"ec reaction limited (asymmetric)",
148146
],
149147
)
150148

@@ -160,12 +158,10 @@ class TimeSolveSEI:
160158
"none",
161159
"constant",
162160
"reaction limited",
163-
"reaction limited (asymmetric)",
164161
"solvent-diffusion limited",
165162
"electron-migration limited",
166163
"interstitial-diffusion limited",
167164
"ec reaction limited",
168-
"ec reaction limited (asymmetric)",
169165
],
170166
[pybamm.CasadiSolver, pybamm.IDAKLUSolver],
171167
)
@@ -263,6 +259,12 @@ class TimeSolveSurfaceForm:
263259
)
264260

265261
def setup(self, model, params, solver_class):
262+
if (model, params, solver_class) == (
263+
pybamm.lithium_ion.SPM,
264+
"differential",
265+
pybamm.IDAKLUSolver,
266+
):
267+
raise NotImplementedError
266268
SolveModel.solve_setup(
267269
self, "Marquis2019", model, "surface form", params, solver_class
268270
)

benchmarks/time_setup_models_and_sims.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Ramadass2004",
1010
"Mohtat2020",
1111
"Chen2020",
12-
"Chen2020_plating",
12+
"OKane2022",
1313
"Ecker2015",
1414
]
1515

benchmarks/time_sims_experiments.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ class TimeSimulation:
2121
}
2222

2323
def setup(self, experiment, parameters, model_class, solver_class):
24+
if (experiment, parameters, model_class, solver_class) == (
25+
"GITT",
26+
"Marquis2019",
27+
pybamm.lithium_ion.DFN,
28+
pybamm.CasadiSolver,
29+
):
30+
raise NotImplementedError
2431
self.param = pybamm.ParameterValues(parameters)
2532
self.model = model_class()
2633
self.solver = solver_class()

benchmarks/time_solve_models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ class TimeSolveDFN:
145145
)
146146

147147
def setup(self, solve_first, parameters, solver_class):
148+
if (solve_first, parameters, solver_class) == (
149+
True,
150+
"ORegan2022",
151+
pybamm.CasadiSolver,
152+
):
153+
raise NotImplementedError
148154
self.solver = solver_class()
149155
self.model = pybamm.lithium_ion.DFN()
150156
c_rate = 1

pybamm/input/parameters/lithium_ion/Marquis2019.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ def get_parameter_values():
380380
"Inner SEI reaction proportion": 0.5,
381381
"Inner SEI partial molar volume [m3.mol-1]": 9.585e-05,
382382
"Outer SEI partial molar volume [m3.mol-1]": 9.585e-05,
383+
"SEI growth transfer coefficient": 0.5,
383384
"SEI reaction exchange current density [A.m-2]": 1.5e-07,
384385
"SEI resistivity [Ohm.m]": 200000.0,
385386
"Outer SEI solvent diffusivity [m2.s-1]": 2.5000000000000002e-22,

0 commit comments

Comments
 (0)