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

Bug fix: Improve cracking integration tests and examples on M-series hardware #3372

Merged
merged 5 commits into from
Oct 5, 2023

Conversation

kratman
Copy link
Contributor

@kratman kratman commented Sep 27, 2023

Description

On apple m-series hardware, the cracking simulations fail in the examples and integration tests. The error message suggested adjusting dt_max, but I did not get that working. What worked instead was adjusting the size of the mesh used in the simulation. This change does not address the root cause of the issue, but can make the tests run. Having failing tests makes it difficult to see if new changes are causing issues.

Original:

var_pts = {
    "x_n": 20,  # negative electrode
    "x_s": 20,  # separator 
    "x_p": 20,  # positive electrode
    "r_n": 30,  # negative particle
    "r_p": 30,  # positive particle
}

New:

var_pts = {
    "x_n": 20,  # negative electrode
    "x_s": 20,  # separator 
    "x_p": 20,  # positive electrode
    "r_n": 26,  # negative particle
    "r_p": 26,  # positive particle
}

Related #3140

Type of change

Minor adjustment to the integration tests and examples to improve compatibility for Mac.

  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (d67b009) 99.58% compared to head (66742b2) 99.58%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3372   +/-   ##
========================================
  Coverage    99.58%   99.58%           
========================================
  Files          256      256           
  Lines        19998    19998           
========================================
  Hits         19915    19915           
  Misses          83       83           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kratman
Copy link
Contributor Author

kratman commented Sep 27, 2023

Lychee error is corrected in #3373

@BradyPlanden BradyPlanden self-requested a review October 4, 2023 17:56
Copy link
Member

@BradyPlanden BradyPlanden left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! It seems that the Lychee workflow is still causing problems, but that doesn't appear to be caused by the changes in this pull. It looks like there is a conflict to resolve, but as discussed in the dev meeting let's merge this fix and keep #3140 open.

@kratman
Copy link
Contributor Author

kratman commented Oct 4, 2023

Looks great, thanks! It seems that the Lychee workflow is still causing problems, but that doesn't appear to be caused by the changes in this pull. It looks like there is a conflict to resolve, but as discussed in the dev meeting let's merge this fix and keep #3140 open.

Yeah lychee was unrelated to this change. I will fix the conflict so it can be merged.

@kratman
Copy link
Contributor Author

kratman commented Oct 4, 2023

@BradyPlanden Should be good to go after the tests pass. It all worked locally after the merge

@BradyPlanden BradyPlanden merged commit 550c457 into pybamm-team:develop Oct 5, 2023
32 of 33 checks passed
@kratman kratman deleted the feat/appleSolver branch October 6, 2023 22:59
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