Re: Need help with large file reading and writing.
- From: "news.gatech.edu" <liscon@xxxxxxxxx>
- Date: Fri, 14 Jul 2006 10:22:19 -0400
Thanks very much!
To clarify the problem:
Memory leak: I did use some allocatable matrice and forget to deallocate them, but I deallocate them or just declare them as static after you mentioned. The same problem happned. so maybe memory leak is not possible. The only parameters used often in the code are 7 integer variables.
Compilers: I use Intel Compiler(version 8.1) on Linux.
Also the code runs smoothly for 64 files when the files' size are small, say 100M each one. And when I increase the file size to about 400M each, it stops at the point of 32 files. Moreover, when the file size increases to about 1G, it just handles the first 10 files.
It always stops about 800 sec.
And the error output are:
Exited with exit code 1.
Resource usage summary:
CPU time : 832.00 sec.
Max Memory : 2 MB
Max Swap : 19 MB
Max Processes : 1
Max Threads : 1
The output (if any) follows:
Timeout alarm signaled
TID HOST_NAME COMMAND_LINE STATUS TERMINATION_TIME
==== ========== ================ ======================= ===================
0001 compute-6- mpirun_ssh -np 1 Killed by PAM (SIGTERM) 07/13/2006 23:08:10
About the Formatted and Unformatted I/O, I don't know much about the efficiency. Thanks very much, I will try it right now.
Liscon
Richard E Maine wrote:
news.gatech.edu <liscon@xxxxxxxxx> wrote:
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.
[sample code elided. I don't think it is telling me much about the
problem. I saw some "issues" in the sample code, but I'd guess they were
all artifacts of the attempt at simplification and have nothing to do
with the question. For example, the file names were... well, not what
one might think they were intended to be.]
Not a lot of data to go on, but I doubt it has anthing to do with
"buffer memory." Compilers don't need to buffer the whole file or
anything like that. Large records might cause buffer size "issues", but
I don't see any suggetsion that your record sizes are particularly
large.
My first guess would be that the compiler and/or operating system (you
didn't say what operating system that I noticed; the Intel compiler runs
on several) don't support files as large as you are trying to write.
My second guess would be a memory leak somewhere. If so, simplified
illustrative code would not be enough to find it. The old MS
Powerstation 4 compiler used to have memory leaks in formatted I/O. I
wouldn't expect that out of Intel, but I can't rule it out.
P.S. You mention files of gigabyte size, and your example shows
formatted I/O. I assume you know that formatted I/O is *VERY*
inefficient, both in terms of file size and time. Maybe you have good
reason to use formatted I/O anyway; maybe you don't even have a choice.
And maybe performance is not an issue. But I thought I'd mention it just
in case.
.
- References:
- Need help with large file reading and writing.
- From: news.gatech.edu
- Re: Need help with large file reading and writing.
- From: Richard E Maine
- Need help with large file reading and writing.
- Prev by Date: Re: Need help with large file reading and writing.
- Next by Date: Re: Need help with large file reading and writing.
- Previous by thread: Re: Need help with large file reading and writing.
- Next by thread: Re: Need help with large file reading and writing.
- Index(es):
Relevant Pages
|