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

PwParser: Refactor to primarily parse from XML and only parse from stdout what is necessary #940

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Apr 18, 2023

  1. Tests: Update PwParser fixtures to QE 6.6 XML output

    The earliest versions of the `PwParser` exclusively parsed from the
    stdout because that was all tha `pw.x` produced. At some point, it
    started also writing output in an XML file, however, this format was
    deprecated as of QE v6.2 and replaced by an XML with a different schema.
    The advantage of the latter is that it comes with an XSD file which can
    be used to validate and parse XML output files.
    
    For backwards compatibility reasons, the `PwParser` has never fully
    transitioned to parsing exclusively from the XML. This is also because
    the XML does not provide all data that was currently parsed from the
    stdout.
    
    The time has come to start getting rid of the stdout parsing as it is
    intrinsically fragile. The current version of `aiida-quantumespresso`
    anyway only supports QE v6.6 and up, all of which have full support for
    the schema based XML output. The idea is to migrate the `PwParser` to
    parse almost exclusively from the XML file and only fetch that from the
    stdout which the XML does not provide.
    
    To prepare this move, the test fixtures, which often contain reference
    files generated by old QE versions with the old deprecated XML format,
    need to be updated to provide reference output with modern QE versions.
    Here we replace the output files with output generated by QE pw.x v6.6.
    
    For the "success" calculations, a new calculation was run and the output
    files were used. The same technique was applied for certain "failed"
    cases wherever that was possible by setting a specific input. For
    example, the out-of-walltime error could easily be simulated by setting
    the `max_seconds` input to 1 second, guaranteeing the error to be hit.
    There are however a number of errors that are very specific and
    difficult to reproduce, notably the BFGS errors for the vc-relax tests.
    For these, the XML has been replaced with outputs of a similar
    calculation that actually succeeded. These files are then naturally not
    commensurate with the stdout file, but this is not important since they
    are testing the parsing of the error, which is only done from the
    stdout anyway.
    
    Following are notes related to changes for specific tests cases:
    
    * `vcrelax_success_rVV10`: Has been renamed to `scf_success_rVV10`. The
    reason being that the calculation had to be reperformed and a `vc-relax`
    kept failing with a `ERROR_IONIC_CONVERGENCE_REACHED_FINAL_SCF_FAILED`
    Since the relaxation is not the point of the test, an `scf` calculation
    was done instead.
    sphuber committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    29c4cb2 View commit details
    Browse the repository at this point in the history
  2. WIP

    sphuber committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    a531dd5 View commit details
    Browse the repository at this point in the history