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

Increase robustness: version check, prevent precompilation with MPI, automatically precompile in the workchain #17

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Technici4n
Copy link
Collaborator

Depends on epfl-matmat/AiidaDFTK.jl#23.

Copy link
Collaborator

@mfherbst mfherbst left a comment

Choose a reason for hiding this comment

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

Puh some of this Aiida stuff is really quite ugly.

src/aiida_dftk/calculations.py Outdated Show resolved Hide resolved
src/aiida_dftk/calculations.py Outdated Show resolved Hide resolved
@@ -40,6 +40,17 @@ def parse(self, **kwargs):
else:
return self.exit_codes.ERROR_POSTSCF_OUT_OF_WALLTIME

# Check error file
try:
errors_log = self.retrieved.base.repository.get_object_content("errors.log")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer constants over hard-coding this.

src/aiida_dftk/workflows/base.py Show resolved Hide resolved
AiidaDFTK = "26386dbc-b74b-4d9a-b75a-41d28ada84fc"

[compat]
AiidaDFTK = "{aiida_dftk.calculations._AIIDA_DFTK_MIN_VERSION}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Another good point for changing how version bounds are implemented: here the mechanics is Pkg, thus different

@mfherbst
Copy link
Collaborator

Actually one question: What will happen if a user badly messed up their AiidaDFTK installation ? Will this also trigger a precompile ? Maybe even get caught in an infinite loop ?

@Technici4n
Copy link
Collaborator Author

Technici4n commented Dec 20, 2024

The expected behavior is that it will attempt a precompilation, the precompilation will fail, and the workchain will terminate. There should hopefully not be an infinite loop because:

  • The _attempted_precompilation_extra extra1 prevents multiple precompilations.
  • If the precompilation fails, the workchain is immediately terminated with ERROR_PRECOMPILATION_FAILURE.

Footnotes

  1. In AiiDA, an extra is a mutable node property.

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.

Precompilation and MPI don't play well together Version consistency check
2 participants