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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/tools-compilers/attachments/20090722/9443c02e/attachment.html>