[Summary] a Fortran question

From: Oyanarte Portilho <portilho_at_fis.unb.br>
Date: Mon, 25 May 1998 10:55:05 -0300

Hi Gurus,

I have posted:

>> I have been using DEC Fortran for a long time, performing very
>> long calculations whose partial results are stored periodically
>> on disk so that if there is a power failure the work can be resumed
>> without much loss. Immediately after the partial result is available
>> the command WRITE can perform this with no problem.
>>
>> On the other hand I am using also IBM XLFortran and this compiler
>> does not write on disk so promply - it accumulates the partial results
>> in a kind of buffer and only after there is a certain amount of data
>> in that buffer it actually flushes to disk. This is not working to
>> me since I am loosing much computational effort with frequent
>> machine uptime interruptions. Does anybody know how to solve this
>> difficulty? I have tried to open and close the file everytime I
>> have to write on it, but with no success.

and got replies from:

Stan Horwitz <stan_at_thunder.ocis.temple.edu>
Barry Treahy <treahy_at_allianceelec.com>
Valentin Nakov <vnakov_at_gepard.my.domain>
K.McManus_at_greenwich.ac.uk

Precise directions came from:

Roberto Alves Nogueira <bob_at_dedalus.lcc.ufmg.br> (from the AIX-L list)
Jim Belonis <belonis_at_dirac.phys.washington.edu>

Thanks to all of them. The solution is to use after the WRITE command
the routine flush_

      call flush_(#)

where # is the logical unit number defined in the OPEN statement. This
enforces disk flushing after each WRITE.

Cheers,


        Oyanarte Portilho
        Institute of Physics
        University of Brasilia, Brazil
Received on Mon May 25 1998 - 15:55:57 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT