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

HpCalculation: exit code and handler for cholesky #38

Merged
merged 2 commits into from
May 30, 2023

Conversation

bastonero
Copy link
Collaborator

The infamous Cholesky factorization error is also
possible in hp.x. Here we add the exit code, the
parser and the handler for the HpBaseWorkChain.
A riorganization of the hp/parse_raw is made to
make it easier for the future implementating new
exit codes, on the same line of aiida-qe.

On the contrary of pw.x, other diagonalization
options are not available. As from experience,
this error can come in magnetic system due to
numerical noise on parallel diagonalization. As such,
the implemented handler will set the diagonalization
flag to do that in serial, in order to avoid such noise.
This approach worked in many cases in my personal
experience, and it's the best we have at the moment.

The infamous Cholesky factorization error is also
possible in `hp.x`. Here we add the exit code, the
parser and the handler for the `HpBaseWorkChain`.
A riorganization of the `hp/parse_raw` is made to
make it easier for the future implementating new
exit codes, on the same line of aiida-qe.

On the contrary of `pw.x`, other diagonalization
options are not available. As from experience,
this error can come in magnetic system due to
numerical noise on parallel diagonalization. As such,
the implemented handler will set the diagonalization
flag to do that in serial, in order to avoid such noise.
This approach worked in many cases in my personal
experience, and it's the best we have at the moment.
@bastonero bastonero requested review from sphuber and mbercx May 26, 2023 14:21
@bastonero
Copy link
Collaborator Author

Fixes #35

Copy link
Member

@mbercx mbercx left a comment

Choose a reason for hiding this comment

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

Thanks @bastonero! I've given the code a first pass and left some comments/questions. No need to add too much scope creep here though, let's focus on just adding the error handler for the infamous cholesky error and work on refactoring improvements later.

EDIT: As a side note, you seem to be doing some pretty hard-core line wrapping in your commit message. 😅 I think our default approach is to have:

  • 66 character maximum for the commit title, so it fits nicely on one line in the GitHub history
  • 80 character maximum for the commit message/body, so git log messages are easier to read.

src/aiida_quantumespresso_hp/calculations/hp.py Outdated Show resolved Hide resolved
src/aiida_quantumespresso_hp/parsers/hp.py Show resolved Hide resolved
src/aiida_quantumespresso_hp/parsers/hp.py Outdated Show resolved Hide resolved
src/aiida_quantumespresso_hp/parsers/parse_raw/hp.py Outdated Show resolved Hide resolved
src/aiida_quantumespresso_hp/parsers/parse_raw/hp.py Outdated Show resolved Hide resolved
tests/parsers/test_hp.py Show resolved Hide resolved
@bastonero bastonero requested a review from mbercx May 30, 2023 09:52
Copy link
Member

@mbercx mbercx left a comment

Choose a reason for hiding this comment

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

Great, thanks @bastonero. Good job blocking that scope creep 😉

image

@bastonero bastonero merged commit 2e76141 into master May 30, 2023
@bastonero bastonero deleted the handler/cholesky branch May 30, 2023 14:45
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