aiida-quantumespresso icon indicating copy to clipboard operation
aiida-quantumespresso copied to clipboard

`parse_output_base`: Move detection of 'JOB DONE' to the end

Open qiaojunfeng opened this issue 4 years ago • 2 comments
trafficstars

Currently in parse_output_base(), the detection of JOB DONE string in QE stdout is at the beginning, https://github.com/aiidateam/aiida-quantumespresso/blob/27c93e5848829219eda7ab6ee5256bfbbd960f42/aiida_quantumespresso/parsers/parse_raw/base.py#L27-L31 This will hide the detection of any QE reported error e.g.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Error in routine set_para_diag (1):
    Too few bands for required ndiag
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

These kinds of errors are handled by the following lines at the end of parse_output_base() https://github.com/aiidateam/aiida-quantumespresso/blob/27c93e5848829219eda7ab6ee5256bfbbd960f42/aiida_quantumespresso/parsers/parse_raw/base.py#L55-L57

Can we move the JOB DONE lines to the end so the errors won't be hidden by the too generic ERROR_OUTPUT_STDOUT_INCOMPLETE?

qiaojunfeng avatar Oct 07 '21 09:10 qiaojunfeng

Thanks @qiaojunfeng! Maybe I'm misunderstanding, but doesn't parse_output_base simply append these errors to the logging container? In the end, the parser that calls this function can still decide which exit code to return, no?

mbercx avatar Oct 07 '21 10:10 mbercx

Thanks @mbercx , you are right, this is not the cause. Actually the logs.error is empty is caused by other bugs 😂, which I try to fix in #751

qiaojunfeng avatar Oct 07 '21 12:10 qiaojunfeng