This is the mail archive of the
mailing list for the GCC project.
Re: fortran binary reads
- To: <dietrich at nmia dot com>, <gcc at gcc dot gnu dot org>
- Subject: Re: fortran binary reads
- From: "Tim Prince" <tprince at computer dot org>
- Date: Mon, 1 Oct 2001 07:18:06 -0700
- Cc: "David E. Dietrich" <dietrich at plato dot nmia dot com>
- References: <m15o146-0011gLC@plato.nmia.com>
----- Original Message -----
From: "David E. Dietrich" <firstname.lastname@example.org>; "David E.
Cc: "David E. Dietrich" <email@example.com>
Sent: Monday, October 01, 2001 4:16 AM
Subject: fortran binary reads
> Dear GNU Support:
> I have a Fortran applications problem that may have an easy
> The fortran compiler that came with my Suse Linux applications
> GNU Fortran 0.5.25 20010315 (release)
> has problems reading standard binary data files. These files
> standard single precision --- 8 byte word length ---
> data sets used by atmospheric and ocean scientists.
> I think the problem may be related to the fortran compiler
> are "c" language binary files, which I am told are different
> fortran counterparts.
> Please advise if you know of a solution. Thank you very much
> kind consideration,
> Sincerely, David E. Dietrich
If you are using sequential binary files (Fortran unformatted),
your difficulty is likely to be with byte order. AFAIK, linux
tradition avoids attempts to solve this portability problem in
the language run-time libraries, as is done in several Unix
implementations. Please read the information on this subject
under 'info g77'. While it would appear desirable for Fortran
compilers to support opening files with big-endian byte order, to
implement such an extension is not trivial; thus the availability
of open source packages to deal with this problem.
gcc avoids as much as possible dealing with run-time support
libraries; if you prefer to use a linux-vendor-specific version
of gcc/g77, you might ask your vendor whether they have an
interest in dealing with the problem.
This mail-list may not be as effective a forum for your question
as one of the general Fortran-oriented lists.