public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* fortran binary reads
@ 2001-10-01  4:17 David E. Dietrich
  2001-10-01  7:30 ` Tim Prince
  0 siblings, 1 reply; 2+ messages in thread
From: David E. Dietrich @ 2001-10-01  4:17 UTC (permalink / raw)
  To: gcc; +Cc: David E. Dietrich

Dear GNU Support:
I have a Fortran applications problem that may have an easy solution.
The fortran compiler that came with my Suse Linux applications software

GNU Fortran 0.5.25 20010315 (release)

has problems reading standard binary data files.  These files are the
standard single precision --- 8 byte word length --- climatological
data sets used by atmospheric and ocean scientists.

I think the problem may be related to the fortran compiler assuming they
are "c" language binary files, which I am told are different from their
fortran counterparts.

Please advise if you know of a solution.  Thank you very much for your
kind consideration,

Sincerely, David E. Dietrich
dietrich@nmia.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: fortran binary reads
  2001-10-01  4:17 fortran binary reads David E. Dietrich
@ 2001-10-01  7:30 ` Tim Prince
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Prince @ 2001-10-01  7:30 UTC (permalink / raw)
  To: dietrich, gcc; +Cc: David E. Dietrich

----- Original Message -----
From: "David E. Dietrich" <dietrich@plato.nmia.com>; "David E.
Dietrich" <dietrich@nmia.com>
To: <gcc@gcc.gnu.org>
Cc: "David E. Dietrich" <dietrich@plato.nmia.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
solution.
> The fortran compiler that came with my Suse Linux applications
software
>
> GNU Fortran 0.5.25 20010315 (release)
>
> has problems reading standard binary data files.  These files
are the
> standard single precision --- 8 byte word length ---
climatological
> data sets used by atmospheric and ocean scientists.
>
> I think the problem may be related to the fortran compiler
assuming they
> are "c" language binary files, which I am told are different
from their
> fortran counterparts.
>
> Please advise if you know of a solution.  Thank you very much
for your
> kind consideration,
>
> Sincerely, David E. Dietrich
> dietrich@nmia.com
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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-01  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-01  4:17 fortran binary reads David E. Dietrich
2001-10-01  7:30 ` Tim Prince

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).