home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / fortran / 5163 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.5 KB  |  33 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!doug.cae.wisc.edu!dafnioti
  3. From: dafnioti@cae.wisc.edu (Petros Dafniotis)
  4. Subject: Help with UNIX f77 file buffer system
  5. Organization: U of Wisconsin-Madison College of Engineering
  6. Date: 25 Jan 93 09:19:37 CST
  7. Message-ID: <1993Jan25.091937.5738@doug.cae.wisc.edu>
  8. Summary: Need to flush buffer after each write statement 
  9. Lines: 22
  10.  
  11. Hello netters,
  12.  
  13.   I know very little about UNIX (in fact I am using VMS for almost 9yrs now).
  14. A friend of mine had the following problem:
  15. "His program (all written in FORTRAN by 1-2 people years ago) takes quite
  16. some time to finish. He is writing info produced at
  17. run time to 2-3 output files. However, 90% of the runs are proved to be
  18. useless quite soon; so he uses CTRL-C to abort execution. But then he finds
  19. no info in the output files. I am guessing that the UNIX file buffer system
  20. still keeps these numbers in the buffer and what he needs is to flush the
  21. buffers after each single write. Could someone tell me how can this be
  22. accomplished in UNIX? (he is using HP-RISC and SUN SPARC-I workstations)."
  23.  
  24.   I would appreciate any help/comments (replies either by e-mail or in the
  25. news are fine). Thank you,
  26.  
  27.                 Petros Dafniotis
  28.                 Chem Engr Dept, UW-Madison
  29.             e-mail: dafnioti@cae.wisc.edu
  30.  
  31. PS: I managed to do that by using really a C function to do all open/fprintf/
  32.     fflush/close commands. But I would prefer a FORTRAN way (if possible).
  33.