- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am converting a 10 year old Scientific Simulation Fortran Program that was developed most recently on MS PowerStation Fortran. It declares a number of large static arrays of real and complex numbers in the main program totaling to approximately 3GB. The program ran fine on all versions of windows and some flavors of UNIX (not sure of the compiler for UNIX). In all runs of the program, the static arrays were only partially used. The number of elements depended on input parameters for surface dimensions and such.
When I compile it with CVF v6.5, it compiles and links just fine (barring the linker exception for too large a program, which MS PSF gave as well). But, when I run it, the O/S complains that it doesn't have enough virtual memory to execute the program.
This behavior implies that the MS Powerstation did not allocate the full static array at the outset of the program. Rather, it must have allocated the memory based on access to the array. Pretty neat trick, if that is what it is doing.
Has anyone come across this behavior before? Do you have any recommendations or workarounds. The obvious modification is to convert the arrays to dynamically allocated to sizes based on the program input parameters. Any others?
Thanks,
Bob
When I compile it with CVF v6.5, it compiles and links just fine (barring the linker exception for too large a program, which MS PSF gave as well). But, when I run it, the O/S complains that it doesn't have enough virtual memory to execute the program.
This behavior implies that the MS Powerstation did not allocate the full static array at the outset of the program. Rather, it must have allocated the memory based on access to the array. Pretty neat trick, if that is what it is doing.
Has anyone come across this behavior before? Do you have any recommendations or workarounds. The obvious modification is to convert the arrays to dynamically allocated to sizes based on the program input parameters. Any others?
Thanks,
Bob
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
None other :-). PSF's ability to create a runnable program looks odd to me -- I wouldn't expect it to work. Namely, 32-bit OS is theoretically able to work with 2GB of memory; real limit is somewhat lower. But, ALLOCATABLE arrays are a definite recommendation for such kind of problem.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page