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

IOError in MDAnalysis/coordinates/TRZ.py", line 242, in _read_trz_header on big-endian arches #1424

Closed
rathann opened this issue Jun 22, 2017 · 3 comments
Assignees
Milestone

Comments

@rathann
Copy link
Contributor

rathann commented Jun 22, 2017

Expected behaviour

Testsuite passes.

Actual behaviour

67 tests fail with:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "/usr/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
    return func()
  File "/builddir/build/BUILD/MDAnalysis-0.16.1/MDAnalysisTests-0.16.1/MDAnalysisTests/analysis/test_hydrogenbondautocorrel.py", line 37, in setUp
    u = self.u = mda.Universe(TRZ_psf, TRZ)
  File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/core/universe.py", line 278, in __init__
    self.load_new(coordinatefile, **kwargs)
  File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/core/universe.py", line 426, in load_new
    self.trajectory = reader(filename, **kwargs)
  File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/coordinates/TRZ.py", line 175, in __init__
    self._read_trz_header()
  File "/builddir/build/BUILDROOT/python-MDAnalysis-0.16.1-2.fc27.ppc64/usr/lib64/python2.7/site-packages/MDAnalysis/coordinates/TRZ.py", line 242, in _read_trz_header
    raise IOError
IOError: 

Code to reproduce the behaviour

Run the testsuite on a big-endian arch like ppc64 or s390x. Example failure on ppc64: https://koji.fedoraproject.org/koji/taskinfo?taskID=20061305 (see build.log).

Current version of MDAnalysis:

0.16.1

@rathann
Copy link
Contributor Author

rathann commented Jun 22, 2017

Apparently, the TRZ file format is little-endian. Patch incoming.

@kain88-de
Copy link
Member

you mean the files we have are all little-endian? Or did you find some actual reference or standard description of the format online?

@richardjgowers
Copy link
Member

the files don't exactly have a standard, they're just written by a Fortran write(*,*) , which iirc follows the endianness of whatever is writing it.

orbeckst pushed a commit that referenced this issue Jun 22, 2017
Numpy dtype int (iN) and float (fN) specifiers assume native-endian
by default, so force them to be little-endian.

Closes #1424.
@orbeckst orbeckst mentioned this issue Jun 22, 2017
4 tasks
orbeckst pushed a commit that referenced this issue Jun 22, 2017
- Numpy dtype int (iN) and float (fN) specifiers assume native-endian
  by default, so force them to be little-endian.
- Closes #1424.
- added CHANGELOG entry and docs
@orbeckst orbeckst modified the milestone: 0.17.0 Jun 22, 2017
kain88-de pushed a commit that referenced this issue Jun 24, 2017
- Numpy dtype int (iN) and float (fN) specifiers assume native-endian
  by default, so force them to be little-endian.
- Closes #1424.
- added CHANGELOG entry and docs
kain88-de pushed a commit that referenced this issue Jun 24, 2017
- Numpy dtype int (iN) and float (fN) specifiers assume native-endian
  by default, so force them to be little-endian.
- Closes #1424.
- added CHANGELOG entry and docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants