- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try compiling with: -assume byterecl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks; that's what I was looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page