Intel Fortran Compiler - FTELL problem with buffered I/O


ref_number : dpd200049885

version : Intel Fortran Compiler  versions 9.1, 10.1 and 11.0

os : all

problem description : If a Fortran I/O unit is opened for buffered I/O, either with the parameter BUFFERED='yes' or with the command line switch /assume:buffered_io (Windows*) or -assume buffered_io (Linux* or Mac OS* X), the FTELL and FTELLI8 functions from the Fortran runtime library may not operate correctly if the preceding write operation was too small to cause the I/O buffer to be flushed, and may return a value that is too small.
        The recommended workaround is to insert a FLUSH statement immediately preceding any call to FTELL or FTELLI8, for example:

open(iunit, buffered='yes')

write(iunit) A



resolution status : This issue has been resolved in version 11.1 and later of the Intel Fortran Compiler.

[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]

For more complete information about compiler optimizations, see our Optimization Notice.