home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / fortran / 4303 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.6 KB

  1. Path: sparky!uunet!portal!lll-winken!dublin.llnl.gov!sterne
  2. From: sterne@dublin.llnl.gov (Philip Sterne)
  3. Newsgroups: comp.lang.fortran
  4. Subject: flushing output in f77
  5. Keywords: flush,i/o
  6. Message-ID: <141324@lll-winken.LLNL.GOV>
  7. Date: 12 Nov 92 22:10:39 GMT
  8. Sender: usenet@lll-winken.LLNL.GOV
  9. Reply-To: sterne@dublin.llnl.gov (Philip Sterne)
  10. Organization: Lawrence Livermore National Laboratory
  11. Lines: 32
  12. Nntp-Posting-Host: dublin.llnl.gov
  13.  
  14. Is there a clean standard-conforming way of emptying the write
  15. buffer for a unit in f77?  
  16.  
  17. Problem:  Iterative procedure acting on a large vector.  Time
  18.       per iteration can be as long as a day or so.  
  19.       Currently only write the converged vector at the
  20.       end of the job.
  21.  
  22. Need:      Transportable way of writing the vector to disk at
  23.       intermediate steps so I can restart the calculation
  24.       and not lose completed iterations.  Ideally write
  25.       out the vector to disk, rewind, overwrite with 
  26.       the next vector on completion of the next iteration, 
  27.       and so on.  I need some way of flushing the write 
  28.       buffer so the file contains the entire vector.
  29.  
  30. I could use flush, but that appears to be architecture dependent.
  31.  
  32. At the moment, the best (portable) plan I can come up is to open, 
  33. write and close some file for each iteration.  
  34.  
  35. Is there a better way?  For example, does a REWIND force a flush?
  36. Or is this vendor dependent?  The standard doesn't seem to address 
  37. this question.  
  38.  
  39. Thanking you in anticipation,
  40.                 Phil
  41.  
  42. --
  43. Philip Sterne                 |    sterne@dublin.llnl.gov
  44. Lawrence Livermore National Laboratory    |    Phone   (510) 422-2510
  45. Livermore,  CA 94550            |    Fax     (510) 422-7300
  46.