Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29245 Discussions

fatal error LNK1248: image size (1011A05A0) exceeds maximum allowable size (80000000)

bhseok
Beginner
3,600 Views

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?

0 Kudos
5 Replies
Steven_L_Intel1
Employee
3,600 Views

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.

0 Kudos
Anthony_H_2
Beginner
3,600 Views

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

0 Kudos
mecej4
Honored Contributor III
3,600 Views

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.

0 Kudos
Steven_L_Intel1
Employee
3,600 Views

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.

0 Kudos
Simon_Geard
New Contributor I
3,600 Views

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.

0 Kudos
Reply