Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes default preconditioner threshold to zero #1344

Merged
merged 1 commit into from
Jul 30, 2022

Conversation

kyleniemeyer
Copy link
Member

Changes proposed in this pull request

This pull request makes one small, simple change: the default threshold for using the adaptive preconditioner is now 0.0, rather than the (arbitrary) 1e-8.

@anthony-walker's study showed that using no threshold often leads to as good—and sometimes better—performance than an arbitrary threshold value, and setting a non-zero value should only be done intentionally by someone trying to tune for optimal performance.

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be good to put the rationale for the change in the commit message so what's written in the PR is preserved.

@anthony-walker's study showed that using no threshold often leads to
as good—and sometimes better—performance than an arbitrary threshold
value, and setting a non-zero value should only be done intentionally by
someone trying to tune for optimal performance.
@kyleniemeyer
Copy link
Member Author

@ischoegl good suggestion, done!

Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @kyleniemeyer! LGTM.

@codecov
Copy link

codecov bot commented Jul 30, 2022

Codecov Report

Merging #1344 (163d469) into main (b86674c) will increase coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1344      +/-   ##
==========================================
+ Coverage   68.03%   68.15%   +0.11%     
==========================================
  Files         327      327              
  Lines       42652    42658       +6     
  Branches    17180    17180              
==========================================
+ Hits        29020    29074      +54     
+ Misses      11345    11291      -54     
- Partials     2287     2293       +6     
Impacted Files Coverage Δ
include/cantera/numerics/AdaptivePreconditioner.h 100.00% <ø> (ø)
src/oneD/Sim1D.cpp 74.01% <0.00%> (-0.27%) ⬇️
include/cantera/thermo/ThermoPhase.h 44.58% <0.00%> (+3.18%) ⬆️
include/cantera/cython/kinetics_utils.h 91.42% <0.00%> (+8.57%) ⬆️
src/kinetics/Kinetics.cpp 79.11% <0.00%> (+9.78%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@ischoegl ischoegl merged commit 12ea53d into Cantera:main Jul 30, 2022
@kyleniemeyer kyleniemeyer deleted the change-default-threshold branch July 30, 2022 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants