This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fortran support for files greater than 2GB on Linux PC



Dear g77 developers,

the recently developed  support for files >2GB on Linux machines
has motivated me to update the libI77 part of the g77 runtime library
to use the open64 etc. calls to support large file I/O in Forrtan, too.
I assume that there might be broader interest in such an extension, 
especially
in the natural science community, where Fortran is (unfortunatelly) still
the leading language.

Therefore I send as an attachment modified version of the lib2c/libI77 
library (for 2.95.2 version of gcc). I have tested it on Linux 2.3.99-pre9,
running a pretty large quantum chemical program with large files 
successfully.

If there is an interest from your side, I can provide also patch format 
of the changes,
check #ifdefs to be portable for all architectures etc.

Sincerely yours,

Jiri Pittner

library replacement

      program Big
      parameter(irecl=1024*1024,recn=10)
      real*8 p
      integer i
 
      open(unit=99,status='UNKNOWN',form='UNFORMATTED',
     _   access='DIRECT',RECL=irecl,file="/scratch/jiri/large")

      do i=1,recn
          p=10.*(i-1)
          write(99,rec=i*1024) p
      enddo
      close(99)
      open(unit=99,status='OLD',form='UNFORMATTED',
     _   access='DIRECT',RECL=irecl,file="/scratch/jiri/large")
      do i=1,recn
          p= -1.
          read(99,rec=i*1024) p
          write(6,*)p
      enddo
       close(99)
      END

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]