Results 1 to 3 of 3
The problem is that whenever we try to declare an array of over 1GB of memory the program will crash. The program will compile fine in f95 but when it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-11-2003 #1Just Joined!
- Join Date
- Mar 2003
- Posts
- 2
Memory Allocation issue
The problem is that whenever we try to declare an array of over 1GB of memory the program will crash. The program will compile fine in f95 but when it runs it will crash during the memory allocation give the error "segmentation fault... memory dumped". This problem will not even compile in f77. We have 2GB of system memory in the machine and over 2gigs of swap space. We think this may be a memory limitation of the kernel but I have no idea of how to fix the problem.
- 03-11-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
f95 and f77? Are you guys serious about programming in FORTRAN?!
Anyway, the default kernels are compiled only for machines with under 1 GB of RAM. I don't know if that is what causes your problems, but you might want to try reconfiguring it. In the kernel configuration, under Processor type and features, there is the option for High Memory Support. Choose 4 GB there and recompile. Then try your program on that kernel.
If that doesn't solve the problem, the cause is apparently in your own program. Note that you should still run a kernel with high memory support, since it will be better optimized for your hardware. Anyway, if it turns out that the kernel wasn't the cause of the problem, try compiling a C program that manipulates more then 1 GB and see if there is a problem in the FORTRAN compiler or libraries. I admit it doesn't sound likely, but it's worth a try.
If that doesn't turn out to be the problem either, just resolve to gdb. I must admit that it isn't a good sign that the program won't compile in f77, but maybe you're just using some language functionality that wasn't present back then?
By the way, is this the GCC FORTRAN compiler? If not, try that, too.
- 03-15-2003 #3Just Joined!
- Join Date
- Mar 2003
- Posts
- 2
We seemed to have fixed the problem by allocating the memory with C and using function calls to Fortran for the rest. I'm still not sure why there is a limitation on the Fortran compilers though. There must be some way to tweak the compiler to use the full resources of the machine.


Reply With Quote
