Re: Read/write binary files in Linux and Windows




"Luis Samaniego" <luis.samaniego@xxxxxx> wrote in message
news:5o8bubFll15fU1@xxxxxxxxxxxxxxxx
Dear Fortran experts,

I am using the following code to read and write binary files in both a
Linux cluster and in Windows PC.

OS/COMPILERS
In Windows: CVF 6.6 (little Endian)
In Linux: PGI (Portland Group) and Sun compilers (little Endian)

<snip>

open (unit=1, &
file='out.r4', &
form='unformatted', &
access='direct', &


recl=m*n*4)

I would guess that is your problem right there.
On the Linux compiler recl is measured in "bytes", on Windows it is in
"Words" (4 bytes)

Les


.



Relevant Pages

  • Read/write binary files in Linux and Windows
    ... I am using the following code to read and write binary files in both a Linux cluster and in Windows PC. ... PGI and Sun compilers (little Endian) ... My intention is to use the same binary files in both systems since I know that both systems are little Endian. ...
    (comp.lang.fortran)
  • Re: Ive had it with Windows--Im switching to Linux
    ... endian to think about too, quite many architectures uses big endian, but I ... guess you only mean Linux x86 and with Mac only "Mactels". ... my primary targets are Linux and Windows. ...
    (alt.os.linux)
  • Re: Future of IT in Lebanon
    ... working knowledge of Indian programmers DNA, nor of their intuitive Java ... > So Longhorn is not an experiment and Linux is an experiment? ... another chapter in the Windows story, and the Microsoft marketing machine is ... > application opens, Check the about, it says Microsoft Visual Basic 6.3. ...
    (soc.culture.lebanon)
  • FTP DOWNLOAD! More than 6500 CRACKED SOFTWARE(CAD,CAE,CAM,ED
    ... Autodesk Architectural Desktop 2005 ... DASSAULT SYSTEMES CAA ENOVIA LCA V5R13 ... ALTAIR.OPTISTRUCT V5.1 for LINUX ... ANSYS V8.0 FOR WINDOWS ...
    (microsoft.public.dotnet.framework.adonet)
  • Linux for Senior Citizens
    ... Linux for Senior Citizens ... For such people, I believe, Windows really is a better option: ... The kernel manages all the hardware and also looks after all running ...
    (uk.people.silversurfers)