force write in Gfortran

Janne Blomqvist jblomqvi@cc.hut.fi
Fri Mar 24 15:15:00 GMT 2006


On Fri, Mar 24, 2006 at 11:44:45AM -0300, Paulo Ziemer wrote:
> Hi,
> 
> Is there any way to force Gfortran not buffer and write immediately  to 
> a file?  I have tried to use the environment GFORTRAN_UNBUFFRED_ALL but 
> it didn't work. 
> 
> Using ifort compiler the results are written much more faster than using 
> Gfortran. Anyone knows a good strategy to debug the file acess / write 
> process?  Sometime files are not created or only the first write command 
> is correctly written (in the case we have several write commands in 
> sequence).

You can try the FLUSH statement, which flushes the io buffers for the
unit in question (or all open units, if a unit number is not
specified IIRC).

If you want more specific help, I suggest you post a code snippet that
demonstrates your problem, along with the output of 'gfortran -v'.

-- 
Janne Blomqvist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060324/75ce87e4/attachment.sig>


More information about the Fortran mailing list