byterecl for PGI?

A colleague of mine is trying to run some code that is usually compiled with ifort and “-assume byterecl”. A quick perusal of the manpage for pgfortran shows no obvious twin for PGI, but is there one?

Or will he, if he wants to build with PGI, need to rework the code to use ACCESS=‘STREAM’ (which might work if one assumes that the value of file_storage_size will be 1 byte)? Some other method (environment variable?)?

Hi Matt,

Byte RECL values is our default, so no flag or code modifications should be needed.

From the PGI Fortran Guide:

The units depend on the value of the FORTRANOPT environment variable. If the value is vaxio, then the record length is in units of 32-bit words. If FORTRANOPT is not defined, or its value is something other than vaxio, then the record length is always in units of bytes.

Hope this helps,


Yep. It turned out many of the issues were due to endianness issues and that PGI seems to need -Mbyteswapio in more compiles than Intel’s compilers require (kind of like how ifort is a bit looser when it comes to linking/includes).