Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Re: "Unformated" data in g77 between Intel & ALpha
  1998-10-14  4:00 "Unformated" data in g77 between Intel & ALpha G. Hugh SONG
@ 1998-10-13  4:00 ` Greg Lindahl
  1998-10-14  4:00   ` G. Hugh SONG
  1998-10-15  4:00 ` Eric Frey
  1 sibling, 1 reply; 6+ messages in thread
From: Greg Lindahl @ 1998-10-13  4:00 UTC (permalink / raw)


"G. Hugh SONG" <ghsong@\"Spamspoiler\"kjist.ac.kr> writes:

> I heard that the default length of integer data type is different.
> Would that affect the compatibility of "UNFORMATED" data type?

It so happens that the f2c libraries use a 4-byte integer for a record
length for unformatted data on x86, and an 8-byte integer on an alpha.

You can write a program to convert from one to the other.

-- g




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

* "Unformated" data in g77 between Intel & ALpha
@ 1998-10-14  4:00 G. Hugh SONG
  1998-10-13  4:00 ` Greg Lindahl
  1998-10-15  4:00 ` Eric Frey
  0 siblings, 2 replies; 6+ messages in thread
From: G. Hugh SONG @ 1998-10-14  4:00 UTC (permalink / raw)


I know that Fortran "UNFORMATED" IO data types are different between Sun
Sparc and,
say, IBM 370 Fortran.

I have been using G77 on i386 Linux machines.   Now I started using
Alpha Linux.
I created bunch of unformatted output data files, just as I have been
doing on i386 Linux
machines.  Alas!  The graphics program called IDL (PV~Wave for that
matter) cannot
read the data file.

I heard that the default length of integer data type is different.
Would that affect the compatibility of "UNFORMATED" data type?
What about the normal double precision data type?  Since we have to
choose different sections inside D1MACH.F,  I guess the binary
representations of double precision float may be different between
Intel and ALpha.

However, what I heard is that the internal binary representation and the

external "UNFORMATED" are different again.

What is actually true?  Does anyone know about all of this?

Or did I simply make a mistake ?

Thanks a lot.
--
G. Hugh Song

PS: Please remove "Spamspoiler" when replying





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

* Re: "Unformated" data in g77 between Intel & ALpha
  1998-10-13  4:00 ` Greg Lindahl
@ 1998-10-14  4:00   ` G. Hugh SONG
  1998-10-14  4:00     ` Greg Lindahl
  0 siblings, 1 reply; 6+ messages in thread
From: G. Hugh SONG @ 1998-10-14  4:00 UTC (permalink / raw)


Greg Lindahl wrote:

> "G. Hugh SONG" <ghsong@\"Spamspoiler\"kjist.ac.kr> writes:
>
> > I heard that the default length of integer data type is different.
> > Would that affect the compatibility of "UNFORMATED" data type?
>
> It so happens that the f2c libraries use a 4-byte integer for a record
> length for unformatted data on x86, and an 8-byte integer on an alpha.
>
> You can write a program to convert from one to the other.
>
> -- g

Thank you for your kind answer, Mr. Lindahl.

Is integer the only data type which contributes the incompatibility
between g77's of Intel Linux and Alpha Linux?

If so, I can handle this.  If that is not the case, too much problem.
Then, I should use FORMATED IO only.  This way, I will  have a
major problem with the file size.

Thanks
--
G. Hugh Song

PS: Please remove "Spamspoiler" when replying





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

* Re: "Unformated" data in g77 between Intel & ALpha
  1998-10-14  4:00   ` G. Hugh SONG
@ 1998-10-14  4:00     ` Greg Lindahl
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Lindahl @ 1998-10-14  4:00 UTC (permalink / raw)


"G. Hugh SONG" <ghsong@\"Spamspoiler\"kjist.ac.kr> writes:

> Is integer the only data type which contributes the incompatibility
> between g77's of Intel Linux and Alpha Linux?

No, it is all data types -- the record size is the problem.

INTEGER is 4 bytes on both Intel and Alpha Linux.

> Then, I should use FORMATED IO only.  This way, I will  have a
> major problem with the file size.

This is the easiest solution.

-- g



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

* Re: "Unformated" data in g77 between Intel & ALpha
  1998-10-14  4:00 "Unformated" data in g77 between Intel & ALpha G. Hugh SONG
  1998-10-13  4:00 ` Greg Lindahl
@ 1998-10-15  4:00 ` Eric Frey
  1998-10-15  4:00   ` meek
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Frey @ 1998-10-15  4:00 UTC (permalink / raw)


One way to get I have used to get around the problem with insertion of
record markers is to use access='direct' and a suitable record length
(recl=nnn).  This results in files without any record markers. The
downsize is that you have to write your records in the appropriate size
chunks and keep track of which record you are on (and specify it
in the write statement using irec=nn). Another problem as
far as portability is that with some fortran compilers  you specifiy
the record length in bytes, on others it is in 4 byte words. I can't
remember which g77 does.




=======================================================================
Eric C. Frey    
Assistant Professor 	  
Department of Biomedical Engineering and Department of Radiology
The University of North Carolina



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

* RE: "Unformated" data in g77 between Intel & ALpha
  1998-10-15  4:00 ` Eric Frey
@ 1998-10-15  4:00   ` meek
  0 siblings, 0 replies; 6+ messages in thread
From: meek @ 1998-10-15  4:00 UTC (permalink / raw)




  Here is what I use to write "real" binary files in the DEC-ALPHA
 to be transferred by FTP binary mode to DOS.

        integer*1 block(8000)

          open(17,file=fname,form='unformatted',recl=2000,
     1  recordtype='fixed',access='sequential',status='new')

         Write(17)block

There are no extra "record mark" (or whatever) bytes in the o/p.


I haven't found any way to go from DOS to ALPHA other than
by FTPing from DOS to ALPHA in binary mode and reading
512 bytes at a time into a circular store while stripping off the
(pre-known) "real"  record lengths. What a pain ! but after you
have written the subroutine - just feed it the "real" record length
and it's easy.

chris



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

end of thread, other threads:[~1998-10-15  4:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-10-14  4:00 "Unformated" data in g77 between Intel & ALpha G. Hugh SONG
1998-10-13  4:00 ` Greg Lindahl
1998-10-14  4:00   ` G. Hugh SONG
1998-10-14  4:00     ` Greg Lindahl
1998-10-15  4:00 ` Eric Frey
1998-10-15  4:00   ` meek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox