Need help with large file reading and writing.
- From: "news.gatech.edu" <liscon@xxxxxxxxx>
- Date: Thu, 13 Jul 2006 17:20:20 -0400
Hello Pals:
When I use fortran 90 code to read larger files,about 1G each, and write the data to other opened files with 32-bit Intel-compiler. Each time, I just opened 3 files simultaneously and closed unused ones. The code always stops at the point of 10 files reading. I am not sure it is the compiler problem about the limitation of buffer memory.
Thanks very much
Liscon
Simple code:
open(unit=18,file="aux.out")
do i=1,10
open(unit=101+i,file="fort.1+i") !old file; unit and file name just for simplicity
open(unit=1001+i,file="fort.101+i") !New file
do j=1,EN ! number of lines wrote to the new file
read(101+i,format)n1,n2,n3,n4,n5,n6,n7
write(1001+i,format)n1,n2,n3,n4,n5,n6,n7
end o
do j=EN+1,N ! number of lines left,N=total lines of old file
read(101+i,format)n1,n2,n3,n4,n5,n6,n7
write(1001+i,format)n1,n2,n3,n4,n5,n6,n7
end do
close(101+i)
close(1001+i)
end do
.
- Follow-Ups:
- Re: Need help with large file reading and writing.
- From: Terry
- Re: Need help with large file reading and writing.
- From: Herman D . Knoble
- Re: Need help with large file reading and writing.
- From: Richard E Maine
- Re: Need help with large file reading and writing.
- Prev by Date: Re: Initialisation of multidimensional array
- Next by Date: Re: Need help with large file reading and writing.
- Previous by thread: optional arguments in subroutine or using generic procedure
- Next by thread: Re: Need help with large file reading and writing.
- Index(es):