Cancel that... the problem doesn't seem to be the compiler... I do get
a similar error woth the PGI compiler... the PGI compiler works fine
on a similar x86-64 machine, so I've got some more detective work to do.


Jeff Haferman wrote:
> 
> Hi -
> I've got the following compile line using the Portland Group (PGI) f77
> compiler
> pgf77 -byteswapio -r8 -c write_state.f
> 
> I'm trying to figure out a corresponding line for the Sun Studio
> compiler...I thought the following would work
> sunf95 -xfilebyteorder=big16:%all -r8const
> 
> The code compiles but chokes when trying to read an existing binary file
> that contains 64-bit binary numbers (I'm working with the MITgcm code if
> that makes a difference - I don't know how the binary file was created, but
> it is read just fine when I compile with the PGI compiler).
> 
>>From the pgf77 manual:
> -byteswapio: Swap bytes from big-endian to little-endian or vice versa on
> input/output of unformatted Fortran data. Use of this option enables
>                      reading/writing of Fortran unformatted data files
> compatible with those produced on Sun or SGI systems.
> -r8: Interpret REAL variables as DOUBLE PRECISION.
> 
> I'm working on a Linux x86-64 system... when I compile the code with the PGI
> compiler, all is well.  When I use the Sun Studio compiler, the code chokes
> when trying to read the binary file.
> 


Reply via email to