- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to build my fortran code. However, I got "fatal error LNK1248: image size (1011A05A0) exceeds maximum allowable size (80000000)". What does this mean? and What should I do to run my fortran code?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It means that the total size of code and static data in your application exceeds 2GB and won't run. Even on 64-bit Windows, there is a 2GB limit for static code and data.
You probably have very large arrays declared, perhaps in COMMON. If you need more than 2GB of data, you will need to use 64-bit Windows and ALLOCATABLE arrays, allocating them to the desired size in your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm getting this same error and have used previous forum discussions to try and solve the problem to limited effect. My application was compiling fine until I added two additional variables, when I started getting the error. I read previous discussions and changed the new variables to allocatable arrays, but this made no difference. I removed them again and still got the same error. I cleaned my solution and still got the same error. I am able to compile a release version in either Win32 or x64, but not a debug version. As I am still developing the code I really need a debug version. I have spoken to experienced fortran programmers and they are as confused as I am....any ideas?
Thanks
Anthony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm getting this same error and have used previous forum discussions to try and solve the problem to limited effect.
References/links, please?
My application was compiling fine until I added two additional variables
I'd have to see at least the declarations of the additional variables and, preferably, full code that demonstrates the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read https://software.intel.com/en-us/articles/memory-limits-applications-windows - this will explain the problem. You probably still have some very large static arrays.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We recently had this and it was caused by having common blocks that were too big (and were only ever going to get bigger). We had parameters defining the maximum model size and we couldn't keep increasing them. Our solution was to remove all such arrays from common and make them dynamically allocated. It wasn't a quick job but it is now mostly comlete. Examples of the sort of work involved for us:
- create modules to replace the common arrays as appropriate
- remove all "include 'x.cmn' " in the module and replace all "include 'x.cmn' " lines with 'use' everywhere else
- make as much of the module data as you can either private or public,protected
- fix all ensuing problems caused by the interfaces automatically generated by the new modules
- replace all the uses of the common blocks in c++ code with function calls
- handle the fact that real/integer equivalences between arrays in common are no longer valid
- test, test and test again
Hope that helps.

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