[ltp] help --size of my program too large

Tod Harter linux-thinkpad@linux-thinkpad.org
Tue, 1 Jul 2003 18:24:21 -0400


Ouch!

I'd have to go back and stare at my x86 assembler manuals and whatnot for a 
while to be sure, but I believe you are simply running into a fundamental 
limitation of memory mapping here. That is to say that x86 simply cannot map 
a single segment that is larger than 1G... At least not the way Linux's 
memory management is designed. Maybe there are compiler options that let 
Linux load a larger than 1gig ELF into a code segment, but just as a guess, 
probably not...

In my wildest dreams I have never heard of a 1 GIG executeable before! How 
could you have such a huge text segment? I can only suggest a redesign of the 
program so it loads WHATEVER is in that memory AFTER it begins to run, in 
which case it will be in a different segment. Even then I'm highly skeptical 
that Linux on x86 can deal with a single process requiring in excess of a gig 
of address space to be mapped, period.

There are also a host of other potential pitfalls, like I/O to addresses over 
1 gig requires special workarounds, and it may be that the kernel simply 
can't load across to the 1 gig physical memory barrier. 

Even assuming you CAN find the reason for this, I suspect it will be no end of 
problems. I think you will just have to segment up the problem into smaller 
chunks and process it in stages.

On Tuesday 01 July 2003 02:56 pm, George Jiang wrote:
> Hi ,  sorry to put this message here. But I know there are a lot of experts
> on Linux here, and I don't know other pertinent linux newsletters. Thanks.
>
> --- Steps ---
> During my research I have to use a Fortran program for scientific
> computation.
> It deals with a large model.
> first, I use "f77 aa.f -o aa.exe" to compile it;
> second, I use "size aa.exe" to view the size of the exe file;
> third, I use "./aa.exe" to run the program.
>
> --- Problem ---
> When the size is larger than 1.0 G, I got the message "Segmentation fault
> (cor
> e dumped)"  when I run "./aa.exe";
> Then I adjusted the model size, and redo step1,2,3. This time the program
> runs
> well.
>
> --- Question ---
> My computer has 1.5G memory; does anyone know how to fix this problem so
> that I can run the program with a larger model (my research requires me to
> run a large model)?  such a
> s modify the configuration or settings of the Linux system... ( red hat
> linux 8.0
> )?
> ( I've thought about MPI; But it's not easy to modify the program for
> parralel
> computing, so I want to find another solution)
>
> Thanks a lot!!
>    George Jiang
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail

-- 
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com