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

Direct accessing binary files

wcandrews
Beginner
965 Views
In i/o to binary files, what is the maximum direct access value allowed by Intel fortran?
For example:
integer*1 ibyte
integer*8 i
open(1,input,access='direct',recl=1) ! 1 byte records
inquire(1,flen=length) ! length =length of file
read(1,rec=i) ibyte
Using Intel fortran, can rec, flen and length be set to integer*8 and get around the 2**31-1 limitations of my current Lahey compiler.
Wayne
0 Kudos
1 Reply
Steven_L_Intel1
Employee
965 Views
Intel Fortran does not support the non-standard FLEN keyword on INQUIRE. (There are other ways of getting the file size, however.) But it does support direct access files larger than 2GB. The individual records are limited to 2GB. Record numbers can be INTEGER*8 and exceed 2GB.
0 Kudos
Reply