Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran 77 - Program immediately crashes for arrays over vertain size

Status
Not open for further replies.

Llan

Programmer
Dec 12, 2008
2
DE
I am trying to compile a numerical simulation software that is still in F77. It uses maximum array sizes, e.g. for the number of elements in the finite difference scheme. If I push the maximum array size over a certain threshold, e.g. 300000, so not that big a number compared to today's memory size, the program crashes on startup.
I tried compiling it with debug options and ran it in gdb, but it crashes faster than gdb can catch, it only gives a SIGKILL message.
I normally don't get an error message, only once I saw this message

Inconsistency detected by ld.so: rtld.c: 1075: dl_main: Assertion
`_rtld_local._dl_rtld_map.l_libname' failed!

so it's some kind of memory problem.

The developers say that they can run the program for 1 million elements and more.
I have tried different compilers (pgf90, gfortran, g77) and two different Linux systems (Ubuntu) with 2GB and 3GB RAM. I have tried to find compiler options, but I couldn't find one relating to this problems, and honestly I wouldn't really know what to look for.

Do you have any idea how to find out what this problem could be?
 
You don't say what type of variable this is. If it is a double, then 300000 entries = 2400000 bytes i.e. 2.4Mb. This isn't big but how many of these arrays do you have?

Note that apart from memory, the program has to load as well. You need the space for the program + space for the data + space for the OS and everything else it uses. With no programs running, check how much space the OS is using.

Also check how much swap space you have. You may need to increase it.
 
Thanks for your answer,

it's just INTEGER arrays, and i'd say maybe 500000 integers total, so that should not be too much. I tested on a system with 2 GB and one with 3GB RAM, and the number I was able to get didn't change considerably.

I will try and check the swap space, maybe that's the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top