aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
52 stars 77 forks source link

`PwParser`: Missing `CELL_PARAMETERS` causes parsing to except #728

Open mbercx opened 2 years ago

mbercx commented 2 years ago

During one of my PwCalculation runs, the following output is printed at the first ionic iteration:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine bfgs (1):
     dE0s is positive which should never happen
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

     stopping ...
00   0.000000000   8.465436411

ATOMIC_POSITIONS (angstrom)
Nb            1.8368309585        0.0000000000        1.8536657717
Nb            0.0000000000        1.8368309585        6.6117706388
Si            0.0000000000        0.0000000000        0.0000000000
Si            1.8368309585        1.8368309585        0.0000000000
Sb            1.8368309585        0.0000000000        5.4797314139
Sb            0.0000000000        1.8368309585        2.9857049967

It seems that the printing of this error message messes up the output of the CELL_PARAMETERS, which means that these are missing for the first step. This results in the following report for the Excepted calculation job:

+-> REPORT at 2021-09-10 18:40:06.375625+00:00
 | [88175|PwCalculation|on_except]: Traceback (most recent call last):
 |   File "/home/aiida/.virtualenvs/aiida-lumi/lib/python3.8/site-packages/plumpy/process_states.py", line 230, in execute
 |     result = self.run_fn(*self.args, **self.kwargs)
 |   File "/home/aiida/.virtualenvs/aiida-lumi/lib/python3.8/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 388, in parse
 |     exit_code_retrieved = self.parse_retrieved_output(retrieved_temporary_folder)
 |   File "/home/aiida/.virtualenvs/aiida-lumi/lib/python3.8/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 468, in parse_retrieved_output
 |     exit_code = parser.parse(**parse_kwargs)
 |   File "/home/aiida/envs/aiida-lumi/code/aiida-quantumespresso/aiida_quantumespresso/parsers/pw.py", line 65, in parse
 |     trajectory = self.build_output_trajectory(parsed_trajectory, structure)
 |   File "/home/aiida/envs/aiida-lumi/code/aiida-quantumespresso/aiida_quantumespresso/parsers/pw.py", line 425, in build_output_trajectory
 |     trajectory.set_trajectory(
 |   File "/home/aiida/.virtualenvs/aiida-lumi/lib/python3.8/site-packages/aiida/orm/nodes/data/array/trajectory.py", line 137, in set_trajectory
 |     self._internal_validate(stepids, cells, symbols, positions, times, velocities)
 |   File "/home/aiida/.virtualenvs/aiida-lumi/lib/python3.8/site-packages/aiida/orm/nodes/data/array/trajectory.py", line 64, in _internal_validate
 |     raise ValueError('TrajectoryData.cells must have shape (s,3,3), with s=number of steps')
 | ValueError: TrajectoryData.cells must have shape (s,3,3), with s=number of steps

aiida-quantumespresso version: develop branch QE version: v6.8

mbercx commented 2 years ago

@pietrodelugas could you explain what this error means exactly? Since "it should never happen", should we return an exit code that indicates the calculation failed here?