Dan : Do your tests need new dll with latest fix of 4GB issue?
ans: The test I am doing is using version 8.91.1. This version has a fix for integer*8 address. I have not yet tested 4gb+ files.
The main purpose of my tests are to confirm that READ ( ..., pos=address,...) and WRITE ( ..., pos=address,...) are working for stream I/O.
What I am finding is 'WRITE ( lu, pos=address, ...) IO_list', appears to fail on rewriting to the file. I have found that 'READ ( lu, pos=address, ...) IO_list' appears to work in the test program I attached. This test also uses integer8, so FTN95 Ver 8.91.1 does address integer8 problems, but fails on re-writing data to the file. The 'pos=address' capability, provides for an addressible file data structure
Dan : And what are speeds of READ / WRITE ( pos=address ) in comparison with Method2 above ? I suspect it might not be worth to use it anymore
Ans : The Stream read/write ( pos=address ) should be supported by Windows buffered I/O, similar to Fortran unformatted, fixed length record performance. It should be a good solution. The stream I/O could be a much better solution than 'Method 2' which appears to be Fortran unformatted sequential I/O for records larger than 2gbytes. I still have not seen the header/footer syntax for this FTN95 solution, but I suspect it is not compatible with ifort/gfortran. I have read that ifort and gfortran are compatible for Fortran unformatted sequential I/O, including records larger than 2gbytes, althlough the header/footer syntax is a bit of a mess, using 2gbyte sub-records.
I would expect that stream I/O is a better solution, although it is probably safer to partition the data into records smaller than 2gbytes.
It is probably better to have a file dump something like:
write(11) nB,size(Arr4(:,1))
do i=1,nB
write(11) i,Arr4(:,i)
enddo
write (11) -1