home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2865 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.4 KB  |  54 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!engage.pko.dec.com!e2big.mko.dec.com!impec.zko.dec.com!cowan
  3. From: cowan@impec.zko.dec.com (Ken Cowan)
  4. Subject: Re: Portability of DIRECT UNFORMATTED data files?
  5. Message-ID: <1992Jul29.143659.29110@e2big.mko.dec.com>
  6. Sender: usenet@e2big.mko.dec.com (Mr. USENET)
  7. Reply-To: cowan@impec.zko.dec.com (Ken Cowan)
  8. Organization: Digital Equipment Corporation
  9. References: <1992Jul29.111524.1@lure.latrobe.edu.au> <Bs5F3H.AB0@news.udel.edu>
  10. Date: Wed, 29 Jul 92 14:36:59 GMT
  11. Lines: 41
  12.  
  13. In article <Bs5F3H.AB0@news.udel.edu>, mccalpin@perelandra.cms.udel.edu (John D. McCalpin) writes:
  14. |>
  15. |>In article <1992Jul29.111524.1@lure.latrobe.edu.au> matap@lure.latrobe.edu.au (Andrej Panjkov, La Trobe Maths) writes:
  16. |>>What does the standard say about the internal format of DIRECT UNFORMATTED
  17. |>>data files? 
  18. |>
  19. |>I have not looked, but I suspect that the standard says nothing useful
  20. |>for portability here.
  21. |>
  22. |>>Will these be portable between systems?  (ie is a D/U file written by
  23. |>>a Fortran program on one system readable by a Fortran program on another?)
  24. |>
  25. |>There is a growing range of machines for which Fortran direct access files
  26. |>use the same internal format.  Right now I share Fortran DA files between
  27. |>Sun, Silicon Graphics, and IBM RS/6000 machines completely transparently.
  28. |>
  29. |>(Note: the OPEN statement on the SGI may differ, since the RECL= parameter
  30. |>is in 32-bit words, while Sun & IBM use a RECL of bytes.)
  31. |>
  32. |>These machines also use identical formats for Fortran sequential unformatted
  33. |>files.
  34. |>
  35. |>Many other machines are definitely *not* the same format, such as the
  36. |>DECstations, which have their bytes swapped.  I think that Stardent
  37. |>does some funny swapping as well - perhaps on half-words?
  38. |>
  39. |>I am told that there exist options in Cray Fortran to output IEEE binary
  40. |>files.  I do not know if they implement exact compatibility with the 
  41. |>Sun/SGI/IBM machines for DA files or for sequential unformatted files.
  42. |>-- 
  43. |>--
  44. |>John D. McCalpin                        mccalpin@perelandra.cms.udel.edu
  45. |>Assistant Professor                     mccalpin@brahms.udel.edu
  46. |>College of Marine Studies, U. Del.      John.McCalpin@mvs.udel.edu
  47. |>
  48.  
  49.    DEC Fortran V3 on the DECstation has an option that lets you read RS/6000
  50. direct access unformatted files.  Try "CONVERT=BIG_ENDIAN" as an open statement
  51. option.  This is documented in the release notes for V3.1.
  52.  
  53.    KC
  54.