- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have a problem with Intel Fortran Compiler.
My program works well when I use little dimension for bidimensional logical array variables; when I increase dimension, it gives me this error" Program Exception - Stack Overflow " when I pass these variables to subroutines. I need to increase dimension of this variabiles for my research. What can I do? I'm using a Intel Fortran Compiler Integration for Microsoft Visual Studio .NET 2003, Version 8.1.2790.2003, Copyright (C) 2002-2004 Intel Corporation.
Please help me.
Thank you
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this article for more information on stack overflows and what to do about them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok,
I read the article but I can't deallocate variables becouse Ialways use them in my program . I'm using acompiler from 2004 becouse I'm working in a company. Can you help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Show us the call that is getting the error, the declarations of all variables used in the call and the header (subroutine/function and declaration of all arguments) of the routine being called.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK,
so in the main program Ideclare theselogical variables
logical
,allocatable :: popimping(:,:),popfilm(:,:),popimpingPC(:,:),popfilmPC(:,:), &popimpingPM(:,:),popfilmPM(:,:),popimpingMPOOL(:,:),popfilmMPOOL(:,:), &
popimping_1(:,:),popfilm_1(:,:),popimpingPC_1(:,:), popimpingPM_1(:,:),popfilmPM_1(:,:), &
popfilmPC_1(:,:),popimpingMPOOL_1(:,:),popfilmMPOOL_1(:,:)
And then I allocate them:
allocate
(popimping(numbitmaximp,popiniz),popfilm(numbitmaxfilm,popiniz),popimpingPC(numbitmaximp,popiniz), &popfilmPC(numbitmaxfilm,popiniz), &
popimpingPM(numbitmaximp,popiniz),popfilmPM(numbitmaxfilm,popiniz),popimpingMPOOL(numbitmaximp,popiniz),&
popfilmMPOOL(numbitmaxfilm,popiniz))
and
allocate
(popimping_1(numbitmaximp_1,popiniz),popfilm_1(numbitmaxfilm_1,popiniz),popimpingPC_1(numbitmaximp_1,popiniz), &popfilmPC_1(numbitmaxfilm_1,popiniz), &
popimpingPM_1(numbitmaximp_1,popiniz),popfilmPM_1(numbitmaxfilm_1,popiniz), &
popimpingMPOOL_1(numbitmaximp_1,popiniz),popfilmMPOOL_1(numbitmaxfilm_1,popiniz))
where numbitmaximp=1450, numbitmaxfilm=2300, numbitmaximp_1=1550,numbitmaxfilm_1=2450; popiniz is the dimension that I would change, if it is 20 my program works, if it is 30 it does't work. I'd like it was 200 or more.
Then I call some of these variabiles in this subroutine:call
crossover(0,nbit_imping,nbit_film,popiniz,pm,pc,nummax,numbitmaximp, &popimping,ndimimp,popfilm,numbitmaxfilm, &
ndimfil,ndimfilm,ndimimping,dimimpingPC,popimpingPC,dimfilmPC,popfilmPC)
and I declare them in this subroutine
logical
:: popimping(numbitmaximp,popiniz),helpimpin(numbitmaximp,popiniz), &popimpingPC(numbitmaximp,popiniz),helpfilm(numbitmaxfilm,popiniz), &
popfilmPC(numbitmaxfilm,popiniz),popfilm(numbitmaxfilm,popiniz)
This is the first subroutine that call these variabiles and then my program stops in this point when I pass variables.
What can I do?? Must I set something in visual studio to increase memory? Must I set something about logical variable?
thank you
popimpingPM(:,:),popfilmPM(:,:),popimpingMPOOL(:,:),popfilmMPOOL(:,:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The alternative is to change the stack size. Right click on the project, select Properties, Linker, System. Change "Stack Reserve Size" to a large value - start with 10000000 and see if that works. If not, double it. Repeat as needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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