Aleksandar Donev wrote:
> James Giles wrote:
>> I think FLUSH should be in an annex instead of the body of the
>> standard. Something like: "If your system requires it, it should
>> look like so." It should never be necessary (or even meaningful)
>> to explicitly flush system buffers on a modern, well designed
>> system.
> I disagree---there are many cases where flushing is necessary in my
> experience. The point is that every compiler must compile codes with FLUSH,
> so that people do not have trouble porting things. It can be empty and do
> nothing, but it may also save you in cases like working on a cluster with
> MPICH...
Yes, there are many cases where flushing is necessary on old or
poorly designed systems. But, requiring application programmers
to know when and where those cases are is the crux of the problem.
The system can *always* discover such things. Few systems even
provide a way for applications to find out whether it needs to
flush or not. As a result, you must flush at any point where it
simply *might* be necessary. Why have buffers in the system at
all?
--
J. Giles
|