Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Records lost when writing files


I previously posted this to Intel Support with no concrete results, so I'm copying it to the community and would appreciate any feedback if you have seen something like this...

We have several Fortran processes which write out large sequential files. We occasionally see these output files with random records missing from the middle of the file, but otherwise well formed. We have had reports of this kind of thing for a while with 3 different Fortran applications.
Our outputs are mainly written to a network drive that is in a remote data centre. We don't know of any issues with non-Fortran applications writing to the same drive.  Generally the issue is easy to reproduce writing to the network drive but not reproducible writing to a local disk.

The applications are compiled on Windows in VS2017 with IFORT [IA-32]. We have also tried IFORT [IA-32] and IFORT 2021.7.0 with same results.
The Fortran option around I/O Buffering is OFF.  (Issue still occurs if it is ON).

We do not think it is a flaw in the program logic - we have extensively investigated this possibility. 
No error status code (iostat) or exception is returned to the program logic - we are testing for all eventualities.

A colleague offered the opinion that the IFORT I/O was not thread safe and he had found that in an OpenMP Fortran application, all I/O, even READs, had to be enclosed in critical sections to work reliably.  However, this would not appear to explain the issue in the current application which is not using OpenMP or threading.

I would appreciate your opinion on whether there is any known problem in IFORT applications, or reports from other customers. While we have not ruled out an issue with the connection to our data centre, evidence currently points to the Fortran applications with no known issues with other applications.

0 Kudos
0 Replies