🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4490

Re: Help with UNIX f77 file buffer system

#4490
From: System Admin (Mike Peterson)
Date: Mon, 25 Jan 1993 16:17
24 lines
1938 bytes
In article <1993Jan25.091937.5738@doug.cae.wisc.edu> dafnioti@cae.wisc.edu (Petros Dafniotis) writes:
>Hello netters,
>
>  I know very little about UNIX (in fact I am using VMS for almost 9yrs now).
>A friend of mine had the following problem:
>"His program (all written in FORTRAN by 1-2 people years ago) takes quite
>some time to finish. He is writing info produced at
>run time to 2-3 output files. However, 90% of the runs are proved to be
>useless quite soon; so he uses CTRL-C to abort execution. But then he finds
>no info in the output files. I am guessing that the UNIX file buffer system
>still keeps these numbers in the buffer and what he needs is to flush the
>buffers after each single write. Could someone tell me how can this be
>accomplished in UNIX? (he is using HP-RISC and SUN SPARC-I workstations)."

Try the 'flush' routine from the BSD F77 library (it should be in HP-UX
9.0, but is not in HP-UX 8.07); Sun has had that library for ages.
If you are stuck at 8.07, write a C routine that calls fflush
after using FSTREAM (see p. 9-30 of the FORTRAN manual) to get the
C "FILE *" pointer. This approach will not work on stdin/stdout/stderr
at 8.07, but works fine on other unit numbers.
-- 
core error - bus dumped    -*-    Mike Peterson, SysAdmin, U/Toronto Chemistry
 *******   As usual, I speak only for me, myself and I; nobody else   *******
E-mail: system@alchemy.chem.utoronto.ca  Tel: (416)978-7094  Fax: (416)978-8775
Technical Details
Message-ID: <1993Jan25.161732.1640@alchemy.chem.utoronto.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!system
References: <1993Jan25.091937.5738@doug.cae.wisc.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.fortran
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!system
From: system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson))
Subject: Re: Help with UNIX f77 file buffer system
Message-ID: <1993Jan25.161732.1640@alchemy.chem.utoronto.ca>
Organization: University of Toronto Chemistry Department
References: <1993Jan25.091937.5738@doug.cae.wisc.edu>
Date: Mon, 25 Jan 1993 16:17:32 GMT
Lines: 24