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

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!system
  3. From: system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson))
  4. Subject: Re: Help with UNIX f77 file buffer system
  5. Message-ID: <1993Jan25.161732.1640@alchemy.chem.utoronto.ca>
  6. Organization: University of Toronto Chemistry Department
  7. References: <1993Jan25.091937.5738@doug.cae.wisc.edu>
  8. Date: Mon, 25 Jan 1993 16:17:32 GMT
  9. Lines: 24
  10.  
  11. In article <1993Jan25.091937.5738@doug.cae.wisc.edu> dafnioti@cae.wisc.edu (Petros Dafniotis) writes:
  12. >Hello netters,
  13. >
  14. >  I know very little about UNIX (in fact I am using VMS for almost 9yrs now).
  15. >A friend of mine had the following problem:
  16. >"His program (all written in FORTRAN by 1-2 people years ago) takes quite
  17. >some time to finish. He is writing info produced at
  18. >run time to 2-3 output files. However, 90% of the runs are proved to be
  19. >useless quite soon; so he uses CTRL-C to abort execution. But then he finds
  20. >no info in the output files. I am guessing that the UNIX file buffer system
  21. >still keeps these numbers in the buffer and what he needs is to flush the
  22. >buffers after each single write. Could someone tell me how can this be
  23. >accomplished in UNIX? (he is using HP-RISC and SUN SPARC-I workstations)."
  24.  
  25. Try the 'flush' routine from the BSD F77 library (it should be in HP-UX
  26. 9.0, but is not in HP-UX 8.07); Sun has had that library for ages.
  27. If you are stuck at 8.07, write a C routine that calls fflush
  28. after using FSTREAM (see p. 9-30 of the FORTRAN manual) to get the
  29. C "FILE *" pointer. This approach will not work on stdin/stdout/stderr
  30. at 8.07, but works fine on other unit numbers.
  31. -- 
  32. core error - bus dumped    -*-    Mike Peterson, SysAdmin, U/Toronto Chemistry
  33.  *******   As usual, I speak only for me, myself and I; nobody else   *******
  34. E-mail: system@alchemy.chem.utoronto.ca  Tel: (416)978-7094  Fax: (416)978-8775
  35.