- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hello,
I am using very large arrays, but also have a lot of memory, so theoretically that should not be a problem. But I am getting this error at the build stage:
"fatal error LNK1248: image size (93B5D000) exceeds maximum allowable size (80000000)"
Could you please help to sort out with this? How to tell the compiler to use more memory (IVF 2011, Windows 7).
Thank you in advance!
I am using very large arrays, but also have a lot of memory, so theoretically that should not be a problem. But I am getting this error at the build stage:
"fatal error LNK1248: image size (93B5D000) exceeds maximum allowable size (80000000)"
Could you please help to sort out with this? How to tell the compiler to use more memory (IVF 2011, Windows 7).
Thank you in advance!
- Marcas:
- Intel® Fortran Compiler
Link copiado
14 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
It is a problem. Windows limits static code and data to 2GB, and you have exceeded this. Even on 64-bit Windows, no matter how much memory you have, the 2GB limit for static (non-allocatable) data remains.
The solution is to change the arrays from being declared with fixed bounds to being allocatable, and then using ALLOCATE to make them the desired size. If you are on a 64-bit system, this will allow you to have larger arrays. But if you are on a 32-bit system, you cannot go larger than 2GB.
The solution is to change the arrays from being declared with fixed bounds to being allocatable, and then using ALLOCATE to make them the desired size. If you are on a 64-bit system, this will allow you to have larger arrays. But if you are on a 32-bit system, you cannot go larger than 2GB.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thank you Steve,
I am on a 64 bit system.
I tried using allocatable arrays, but then I got an error when trying to pass this array from the main program to the subroutine. Do you know what is the limit for allocatable arrays?
I am on a 64 bit system.
I tried using allocatable arrays, but then I got an error when trying to pass this array from the main program to the subroutine. Do you know what is the limit for allocatable arrays?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
There is no particular limit for allocatable arrays. Be sure that you are building an "x64" configuration and not "Win32". What error did you see?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Did you also change the declaration of the dummy argument to an automatic shape, i.e. real(8) array(:)
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
You don't need to do that if you are passing the whole array or a contiguous slice. And if you did make that change, you would also have to make an explicit interface visible to the caller.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I have made the following declaration:
double precision, allocatable :: Array (:,:)
Then I use it in the following way in the body of the program:
...
allocate (Array(X,Y))
call MySubroutine(Array)
...
Then I get the following error:
Microsoft Visual C++ Debug Library:
Program...
File: f:\dd\vctools\crt_bld\self_64_amd64\crt\src\wincig.c
Line: 417
Expression: ("invalid signal or error, 0")
Just to clarify, I do not have any C++ code, only Fortran code in my project. Do not know why is this "wincig.c" here.
double precision, allocatable :: Array (:,:)
Then I use it in the following way in the body of the program:
...
allocate (Array(X,Y))
call MySubroutine(Array)
...
Then I get the following error:
Microsoft Visual C++ Debug Library:
Program...
File: f:\dd\vctools\crt_bld\self_64_amd64\crt\src\wincig.c
Line: 417
Expression: ("invalid signal or error, 0")
Just to clarify, I do not have any C++ code, only Fortran code in my project. Do not know why is this "wincig.c" here.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
That message is coming from down inside the run-time library. There is probably another message in your console window. What does the declaration of MySubroutine look like? (Names and declarations of arguments.) What you have written is ok as far as it goes, but there's not enough infomation to know exactly what is wrong.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Inside mySubroutine, I declare Array as follows:
double precision, dimension (X, Y) :: Array
The values X and Y are made available to all subroutines through the use of the Module that is used by all subroutines.
The error in the console is as follows:
forrtl: severe (170): Stack overflow
my_main_program_name.f90 .....
kernel32.dl ....
ntdll.dll ...
double precision, dimension (X, Y) :: Array
The values X and Y are made available to all subroutines through the use of the Module that is used by all subroutines.
The error in the console is as follows:
forrtl: severe (170): Stack overflow
my_main_program_name.f90 .....
kernel32.dl ....
ntdll.dll ...
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Ok. This error means that the compiler was asked to create a large temporary array as a result of an array expression. It can also happen if you declare an "automatic array", a local array whose dimensions depend on other variables. Is this error happening as soon as the program enters the subroutine or is it within the executable lines of the subroutine.
If you are using Visual Studio, try setting the property Optimization > Heap Arrays to 0. From the command line use /heap-arrays . For more information, see Doctor Fortran in "Don't Blow Your Stack!"
If you are using Visual Studio, try setting the property Optimization > Heap Arrays to 0. From the command line use /heap-arrays . For more information, see Doctor Fortran in "Don't Blow Your Stack!"
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Quoting Steve Lionel (Intel)
If you are using Visual Studio, try setting the property Optimization > Heap Arrays to 0.
Thank you very much, this worked!
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Steve,
This Windows limitation of 2GB is related to the size of each block (COMMON) or to the size of the program as a whole?
In other words, if I have a large common block, would it make any difference if I split the common in smaller sized commons?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
It is the total size of all statically allocated code and data in a given image section. Splitting the COMMONs into smaller ones won't help. I suggest using ALLOCATABLE arrays instead.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks for your prompt help Steve.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Quoting emailergrand
..."fatal error LNK1248: image size (93B5D000) exceeds maximum allowable size (80000000)"...
I had a similar error with a 32-bit compiler when I tried to declare a 16,384x16,384matrix. It looks like
you tried to declare a largermatrix:
0x93B5D000 = 2,478,166,016 bytes and this isa ~24,890x24890single-precisionmatrix.

Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora