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_numberThe
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:
Replace keyword with one of the following:
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.
Last modified on July 28, 2011.







