Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26745 Discussions

Direct access record length: code uses bytes, compiler uses words

luang-prabang
Beginner
147 Views
I am building some old fortran code with ifort, and I have observed that the record length parameter (RECL=) in OPEN statements is interpreted as four byte words by ifort. The code was written with the assumption that RECL is in bytes. I would prefer not to change the code so that the same code base continues to work with other fortran compilers. Is there an ifort command line option that will give me the other behavior?
0 Kudos
3 Replies
Kevin_D_Intel
Employee
147 Views
Try compiling with: -assume byterecl
luang-prabang
Beginner
147 Views
Thanks; that's what I was looking for.
joseph-krahn
New Contributor I
147 Views
Ideally, newer code should use the FILE_STORAGE_SIZE variable in the ISO_FORTAN_ENV module. It defines the bit size used for file record lengths, so that compiler compatibility flags are not needed.
Reply