home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!portal!lll-winken!dublin.llnl.gov!sterne
- From: sterne@dublin.llnl.gov (Philip Sterne)
- Newsgroups: comp.lang.fortran
- Subject: flushing output in f77
- Keywords: flush,i/o
- Message-ID: <141324@lll-winken.LLNL.GOV>
- Date: 12 Nov 92 22:10:39 GMT
- Sender: usenet@lll-winken.LLNL.GOV
- Reply-To: sterne@dublin.llnl.gov (Philip Sterne)
- Organization: Lawrence Livermore National Laboratory
- Lines: 32
- Nntp-Posting-Host: dublin.llnl.gov
-
- Is there a clean standard-conforming way of emptying the write
- buffer for a unit in f77?
-
- Problem: Iterative procedure acting on a large vector. Time
- per iteration can be as long as a day or so.
- Currently only write the converged vector at the
- end of the job.
-
- Need: Transportable way of writing the vector to disk at
- intermediate steps so I can restart the calculation
- and not lose completed iterations. Ideally write
- out the vector to disk, rewind, overwrite with
- the next vector on completion of the next iteration,
- and so on. I need some way of flushing the write
- buffer so the file contains the entire vector.
-
- I could use flush, but that appears to be architecture dependent.
-
- At the moment, the best (portable) plan I can come up is to open,
- write and close some file for each iteration.
-
- Is there a better way? For example, does a REWIND force a flush?
- Or is this vendor dependent? The standard doesn't seem to address
- this question.
-
- Thanking you in anticipation,
- Phil
-
- --
- Philip Sterne | sterne@dublin.llnl.gov
- Lawrence Livermore National Laboratory | Phone (510) 422-2510
- Livermore, CA 94550 | Fax (510) 422-7300
-