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

Do not recreate parser_name input port to change default #54

Merged
merged 3 commits into from
Mar 16, 2023

Conversation

sphuber
Copy link
Member

@sphuber sphuber commented Mar 16, 2023

A number of fixes to the various CalcJob plugins.

@sphuber sphuber requested review from JPchico and chrisjsewell and removed request for JPchico March 16, 2023 10:23
@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Merging #54 (6debf5b) into develop (165f349) will increase coverage by 1.30%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop      #54      +/-   ##
===========================================
+ Coverage    88.93%   90.24%   +1.30%     
===========================================
  Files           32       32              
  Lines         2449     2408      -41     
===========================================
- Hits          2178     2173       -5     
+ Misses         271      235      -36     
Flag Coverage Δ
pytests 90.24% <100.00%> (+1.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiida_lammps/calculations/lammps/__init__.py 94.11% <ø> (+26.91%) ⬆️
aiida_lammps/calculations/lammps/base.py 96.34% <100.00%> (-0.05%) ⬇️
aiida_lammps/calculations/lammps/force.py 98.18% <100.00%> (ø)
aiida_lammps/calculations/lammps/md.py 96.90% <100.00%> (ø)
aiida_lammps/calculations/lammps/md_multi.py 86.77% <100.00%> (ø)
aiida_lammps/calculations/lammps/optimize.py 95.06% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sphuber sphuber force-pushed the fix/spec-parser-default branch from 90c7ee3 to aeadadd Compare March 16, 2023 10:40
Copy link
Collaborator

@JPchico JPchico left a comment

Choose a reason for hiding this comment

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

Hi @sphuber the tests seem to be failing for python 3.10 could you check why that is?
It seems that it is failing when trying to get the lammps version number.

@sphuber
Copy link
Member Author

sphuber commented Mar 16, 2023

I am seeing these errors in the logs:

/usr/share/miniconda/envs/__setup_conda/bin/lmp_serial: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory

Maybe it is not the Python version but the LAMMPS version. The Python 3.10 run is using lammps==2021.09.29. I think the conda build may be missing a dependency. Since this is not related to this PR, I will open a separate one to fix it.

Sebastiaan Huber added 3 commits March 16, 2023 18:08
The `CalcJob` plugins were setting the default value for the
`parser_name` metadata option by redefining the port. This is not
desirable since this loses the `help` attribute. Instead, we simply
change the default through the attribute on the existing port.
The plugin was setting `CodeInfo.withmpi` based on the inputs from
`metadata.options.withmpi`. This is not necessary as the metadata option
is already handled by the `CalcJob` base class. The plugin implementation
should only set `CodeInfo.withmpi` if it wants to _force_ the code to be
run with MPI enabled or disabled.

The `CalcJob` base implementation used to not distinguish between the
two, but in aiidateam/aiida-core#5922 the
handling of MPI was improved. A `Code` can now define whether it
should be run with MPI or not and so the `CalcJob` class now has to
raise if the MPI setting of the code and the plugin clash. The `withmpi`
option, if explicitly set by the user, is also checked.

Since the plugin doesn't intend to enforce MPI or not, the setting on
the `CodeInfo` is removed.
This code is not used and seems to have no relation with the
`BaseLammpsCalculation`.
@sphuber sphuber force-pushed the fix/spec-parser-default branch from aeadadd to 6debf5b Compare March 16, 2023 17:08
Copy link
Collaborator

@JPchico JPchico left a comment

Choose a reason for hiding this comment

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

It looks good!

@JPchico JPchico merged commit d679df5 into aiidaplugins:develop Mar 16, 2023
@sphuber sphuber deleted the fix/spec-parser-default branch March 16, 2023 17:20
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