-
Notifications
You must be signed in to change notification settings - Fork 82
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
New error handling for SCF convergence edge cases #695
New error handling for SCF convergence edge cases #695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zooks97 . Couple of minor changes and then we would need a test. All the infrastructure to write one is already in place. Just have a look in tests/workflows/pw/test_base.py
. You can see examples there: essentially you create a workchain instance with specific inputs, call a few outline steps to initialize the state and then you call the new handler, checking afterwards that the report and context are correctly changed.
I've attempted to write a simple test for the new exit code, but I'm getting a bunch of md5 mismatch errors when running pytest (maybe my setup is bad?). Would like to have feedback on if the test is reasonable (maybe should test all combinations of the two pw inputs). Edit: looks like the test is failing on CI. I need to get my DE setup right so that I can fix it, do you know why I'm getting only md5 check failures? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zooks97 . Test looks fine in principle there is just a mistake which causes it to fail. That isn't anything to do with md5s though, but I reckon that is something you have locally. Most likely this is due to the SSSP pseudos. Are you running against a clean test profile? Can you post the exact error and stack trace?
Thanks @zooks97 but you and |
541c381
to
2cb8730
Compare
In certain cases, a user will set inputs such that the SCF will not converge, for example, by setting `scf_must_converge` to false, or by setting `electron_maxstep` to zero. This can be useful to initialize a charge density of a system and the workchain should not restart or fail in this case. The `PwParser` now returns `WARNING_ELECTRONIC_CONVERGENCE_NOT_REACHED` instead of `ERROR_ELECTRONIC_CONVERGENCE_NOT_REACHED` if any of these parameters are set as described. The `PwBaseWorkChain` has a new handler for this new exit code to consider the calculation as successful and finish the workchain. Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
2cb8730
to
94b4db0
Compare
Fixed the branch and also added a test for the |
Thanks! |
Fixes #694