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

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

luang-prabang
Beginner
441 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
441 Views
Try compiling with: -assume byterecl
0 Kudos
luang-prabang
Beginner
441 Views
Thanks; that's what I was looking for.
0 Kudos
joseph-krahn
New Contributor I
441 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.
0 Kudos
Reply