Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

On Big Red and Quarry at IU, how do I read unformatted data written on another machine?

On Big Red at Indiana University, unformatted data files are read and written in "big endian" byte order. Many other machines, for example, IU's Quarry, read and write unformatted data files in "little endian" byte order. You can read unformatted data files on Big Red that were written on a little endian machine.

Use the environment variable XLFRTEOPTS to specify XL Fortran runtime option settings:

export XLFRTEOPTS=ufmt_littleendian=unit_number

The IBM compilers information center provides this detail on ufmt_littleendian:

"ufmt_littleendian={units_list}

Specifies unit numbers of unformatted data files on which little-endian I/O is to be performed. The little-endian format data in the specified unformatted files is converted, on-the-fly, during the I/O operation to and from the big-endian format used on machines where XL Fortran applications are running.

This runtime option does not work with internal files; internal files are always FORMATTED. Units specified must be connected by an explicit or implicit OPEN for the UNFORMATTED form of I/O.

The syntax for this option is as follows:

ufmt_littleendian=units_list

where:

units_list = units | units_list, units

units = unit | unit- | -unit | unit1-unit2

The unit number must be an integer, whose value is in the range 1 through 2 147 483 647."

On Quarry, you can use the convert switch with the ifort command to convert unformatted data:

ifort -convert keyword file1 [ file2 ]...

Replace keyword with one of the following:

big_endian cray fdx fgx ibm little_endian native vaxd vaxg

For further help reading unformatted data on Big Red or Quarry, email the IU High Performance Applications group.

This document was developed with support from the National Science Foundation (NSF) under Grant No. 0503697 to the University of Chicago and subcontracted to Indiana University. Additional support was provided by IU through its participation in the TeraGrid, which is supported by the NSF under Grants No. 0833618, SCI451237, SCI535258, and SCI504075. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.

This is document awhq in domain all.
Last modified on July 28, 2011.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.