Help :Writing potable unformated files in fortran
From: Arindam Chakraborty (arimail77_at_yahoo.com)
Date: 07/23/04
- Next message: *** Hendrickson: "Re: allocate / deallocate question"
- Previous message: Les: "allocate / deallocate question"
- Next in thread: Richard Edgar: "Re: Help :Writing potable unformated files in fortran"
- Reply: Richard Edgar: "Re: Help :Writing potable unformated files in fortran"
- Reply: Paul Van Delst: "Re: Help :Writing potable unformated files in fortran"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Jul 2004 04:51:02 -0700
Background:
===========
I have a fortran 90 code that writes large amount of data (~3GB) in
unformatted files. When porting codes from BIG_ENDIAN machines to
LITTLE_ENDIAN ones, I have done the usual thing of compiling the code
with appropriate endian options. I wanted all the unformatted files to
be big_endian and
the code in little_endian machines were compiled with compiler flags
that enfores big_endian format.
Question:
=========
But now I am getting tired of jumping the big_endian-little_endian
hoops, and
I dont like the dependency of the source code on endian-ness.
I also found out that GNU Fortran compiler does not have any options
for doing endian conversions. Although I dont use GNU fortran, but I
will like to have my code potable.
[1] I was wondering if anyone can suggest me an ENDIAN-INDEPENDENT
method of
writing unformatted files in fortran.
[2] Are there any convensions or standards for writing unformatted
data?
I heard something about NCSA's HDF format. Any info/pointers on it
will
be very useful.
I have seen some posting in this group (comp.lang.fortran) where
someone discussed that 'unformatted' and 'binary' files two different
things. In that case I am open to suggestion for both 'unformatted'
and 'binary' files.
Misc Info:
==========
I have compiled the code on following machines:
IBM SP : xlf90
Altix : ifort -convert big_endian (Intel 8.0)
HP : ifort -convert big_endian (Intel 8.0)
IBM Netfinity : pgf90 -byteswapio
Thanks in advance,
--Ari
- Next message: *** Hendrickson: "Re: allocate / deallocate question"
- Previous message: Les: "allocate / deallocate question"
- Next in thread: Richard Edgar: "Re: Help :Writing potable unformated files in fortran"
- Reply: Richard Edgar: "Re: Help :Writing potable unformated files in fortran"
- Reply: Paul Van Delst: "Re: Help :Writing potable unformated files in fortran"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]