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

crambin test fails on s390x #78

Closed
susilehtola opened this issue Jun 25, 2022 · 3 comments · Fixed by #79
Closed

crambin test fails on s390x #78

susilehtola opened this issue Jun 25, 2022 · 3 comments · Fixed by #79

Comments

@susilehtola
Copy link
Collaborator

https://kojipkgs.fedoraproject.org//work/tasks/7437/88727437/build.log

  1/114 Test   #2: crambin ..........................***Failed    0.59 sec
          Sat Jun 25 16:46:58 2022  Job: 'Crambin_1SCF' started successfully
          MOPAC Job: "Crambin_1SCF.mop" ended normally on Jun 25, 2022, at 16:46.
WARNING: output file size mismatch, 40403 vs. 15253
Traceback (most recent call last):
  File "/builddir/build/BUILD/mopac-22.0.3/tests/run_test.py", line 32, in <module>
    compare_mopac_out_file(out_line, out_list, ref_line, ref_list)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/mopac-22.0.3/tests/compare_output.py", line 225, in compare_mopac_out_file
    assert ref == out, f'ERROR: string mismatch between {ref} on reference line {ref_line0} and {out} on output line {out_line0}'
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: ERROR: string mismatch between PLS on reference line 1368 and OLDENS on output line 1368
@godotalgorithm
Copy link
Collaborator

I think I know what's wrong here: the s390x is a big-endian machine, whereas most modern processors (i.e. x86) are little-endian. This is example is reading a binary restart file, and it is presumably endian-dependent and failing to read the file correctly. "OLDENS" is part of the error message of detecting a "corrupt" restart file.

I can rewrite this restart feature to be endian-independent, but it won't be an immediate fix. Alternatively, I could try to use CMake's system for detecting endian-ness and only run this test on little-endian machines, or figure out how to convert the restart file and have a separate big-endian version of the test prepared.

Is there a system to suppress specific combinations of tests and systems in the Fedora test process?

@susilehtola
Copy link
Collaborator Author

Is there a system to suppress specific combinations of tests and systems in the Fedora test process?

Yes, I can apply a platform dependent patch that disables the tests on architectures it shouldn't be run on.

@godotalgorithm
Copy link
Collaborator

I have a simple solution: I will rewrite the test to generate the binary restart file before reading it instead of loading a pre-generated restart file. Therefore, it will be generated with the same endianness as is read. We don't actually need restart files to be portable between machines of different endianness. The only downside is that the test is slower, since it has to run a full SCF cycle on a large protein rather than starting from a nearly-converged density matrix.

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 a pull request may close this issue.

2 participants