Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* unformatted file conversion
@ 1996-04-02  5:00 Doug Sondak 
  1996-04-04  5:00 ` Steve Lionel
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Sondak	 @ 1996-04-02  5:00 UTC (permalink / raw)


Although I am using an IBM workstation, I work closely with a
colleague who has a cluster of DEC Alpha workstations.  We
generate unformatted files in our fortran code, but we can't
share these files due to the different binary formats on the
machines.  (I routinely transfer files between IBM and SGI
workstations, but I assume that the DEC words have the bits
swapped compared to these machines.)

Does anyone have a utility to convert these files between the
two formats?  I checked the DEC FAQ and the DEC web page, but
I didn't come up with anything.  Thanks for any help you can
offer.

Doug Sondak
United Technologies Research Center
sondakdl@utrc.utc.com
(860) 727-2139




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

* Re: unformatted file conversion
  1996-04-02  5:00 unformatted file conversion Doug Sondak 
@ 1996-04-04  5:00 ` Steve Lionel
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Lionel @ 1996-04-04  5:00 UTC (permalink / raw)



In article <1996Apr2.151749.4173@cronkite.res.utc.com>, 
sondak@galileo.res.utc.com (Doug Sondak	) writes:
|>Although I am using an IBM workstation, I work closely with a
|>colleague who has a cluster of DEC Alpha workstations.  We
|>generate unformatted files in our fortran code, but we can't
|>share these files due to the different binary formats on the
|>machines.  (I routinely transfer files between IBM and SGI
|>workstations, but I assume that the DEC words have the bits
|>swapped compared to these machines.)

I think I responded to Doug's question in another forum/newsgroup - in
brief, the solution is to use -convert big_endian on the Alpha side when
compiling the Fortran code. This will make unformatted files automatically
convert to the IBM-style big-endian byte order.  There are "smaller hammers"
available to specify this for individual units - see the DEC Fortran
User Manual for details.
-- 

Steve Lionel                      mailto:lionel@quark.zko.dec.com
Fortran Development               http://www.digital.com/info/slionel.html
Digital Equipment Corporation     http://ourworld.compuserve.com/homepages/
110 Spit Brook Road, ZKO2-3/N30    Steve_Lionel/
Nashua, NH 03062-2698             "Free advice is worth every cent"

For information on Digital Fortran 90, see http://www.digital.com/info/hpc/f90/



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

* Re: unformatted file conversion
@ 1996-04-05  5:00 Jeffrey S. Pidel
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey S. Pidel @ 1996-04-05  5:00 UTC (permalink / raw)


sondak@galileo.res.utc.com (Doug Sondak	) wrote:

DEC Fortran 77 has an option on the OPEN statement called 
"CONVERT" that allows you to change the input/output of data files
that you work with. This are options  little-endiad, big-endiad,
vax-d, vax-g, etc. The Fortran run time will convert them on the fly.
If you standardize on big-endiad (RS6000 format ?)  for your
unformatted data files you should be OK. You could not easily write a
program to convert the files  to RS6000 format unless you knew every
variable type that was being written out and its offset in the file.

>Although I am using an IBM workstation, I work closely with a
>colleague who has a cluster of DEC Alpha workstations.  We
>generate unformatted files in our fortran code, but we can't
>share these files due to the different binary formats on the
>machines.  (I routinely transfer files between IBM and SGI
>workstations, but I assume that the DEC words have the bits
>swapped compared to these machines.)

>Does anyone have a utility to convert these files between the
>two formats?  I checked the DEC FAQ and the DEC web page, but
>I didn't come up with anything.  Thanks for any help you can
>offer.

>Doug Sondak
>United Technologies Research Center
>sondakdl@utrc.utc.com
>(860) 727-2139








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

end of thread, other threads:[~1996-04-05  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-04-02  5:00 unformatted file conversion Doug Sondak 
1996-04-04  5:00 ` Steve Lionel
  -- strict thread matches above, loose matches on Subject: below --
1996-04-05  5:00 Jeffrey S. Pidel

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