PRs 44698/50016: Slow Fortran I/O on Windows and flushing/_commit [was: Re: GCC 4.7.0 Status Report (2011-10-11)]

Tobias Burnus burnus@net-b.de
Fri Oct 14 14:49:00 GMT 2011


* Kai, NightStrike et al: How does the patch look from the 
MinGW/MinGW-w64 point of view? Can you test-compile the patch?
* Janne, Jerry: What do you think?

Dear all,

attached is a draft implementation for the scheme proposed before (cf. 
below). What do you think? Is this a viable way? Do you have better ideas?

The patch was bootstrapped on x86-64-linux, but there it should be a no op.

For tests, have a look at both PRs: 44698 and 50016.

Tobias


On 10/14/2011 12:15 PM, Tobias Burnus wrote:
> How about the following:
>
> By default, e.g. for raw_flush and friends, do not call Windows' 
> _commit. That's equivalent to the current Linux/Unix behaviour and 
> undoes the patch for PR 44698.
>
> If the user calls INQUIRE on an open file or calls the FLUSH() 
> statement or the FLUSH() subroutine, an explicit _commit is done on 
> Windows. That way, the system buffer is flushed and an access with a 
> different file descriptor to the same file sees the current version. 
> That's the same as one already has on Unix/Linux/Darwin, except that 
> there it happens automatically and that FLUSH does not cause data 
> written to the filesystem (only fsync() does), but that's OK.
>
> I think that should solve the problem of PR 44698 and PR 50016 and 
> give a consistent view of the file system without imposing too much 
> performance problems.
>
> Janne, what do you think? What do others think?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io-windows-flush.diff
Type: text/x-patch
Size: 3674 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111014/92bff617/attachment.bin>


More information about the Fortran mailing list