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

Record size with direct file I/O

talewiston
Beginner
664 Views

We found an apparent compiler bugthat causes anI/O addressing error with direct-accessmulti-record files.

We define array sizes in bytes and use the "-assume byterecl" option when compiling. This works fine if a file contains only one record, but for files with more than one record, the "REC=" statement in the READ command appears to be calculating record length in words, not bytes. We have a file that contains one record per month. If we specify REC=1, it reads January's data. For REC=2, it reads May. For REC=3, it reads September. Anything higher than 3 aborts trying to read past the end-of-file.

We've run this same code for yearsusing other FORTRAN compilers with no problem.

Here's the compiler version information:

Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100203 Package ID: l_cprof_p_11.1.069

0 Kudos
2 Replies
Steven_L_Intel1
Employee
664 Views
I'd think we'd have seen this a long time ago if it were a compiler bug, but anything is possible. Can you reproduce this with the 12.1 compiler and libraries? If so, please attach a short (if possible) example that demonstrates the problem.
0 Kudos
talewiston
Beginner
664 Views
I'll see if the 12.1 compiler is available on our servers. We just moved from IBM to Linux a few weeks ago, and everyone (especially sysadmin) is still busy putting out fires. Thanks.

Ted
0 Kudos
Reply