- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I run a code to solve the heat equation by OPEN MP got the following error msg.
forrtl: severe (170): Program Exception - stack overflow
Image PC Routine Line Source
console2.exe 005174E5 Unknown Unknown Unknown
console2.exe 0045BC32 Unknown Unknown Unknown
console2.exe 00530145 Unknown Unknown Unknown
kernel32.dll 005179B0 Unknown Unknown Unknown
ntdll.dll.dll 77CBE489 Unknown Unknown Unknown
When I did some search, it seemed like I had to increase the stach size. So I did it call KMP_SET_STACKSIZE_S (8000000).
and it still gives the same error msg.
I have Intel Fortran 7.1 and am running it on Visual Studio .net. on Windows xp.
My system is core 2Duo with 4G RAM.
Some parts of my code is as follow:
!-----------------------------------------------------
integer imax, kmax, itmax
parameter (imax=401, kmax=401)
parameter (itmax=1000)
! iteration
do it=1,itmax
!$OMP PARALLEL PRIVATE(i,k,dphi), SHARED(phi, phin, dx2i, dy2i, dt, dphimax)
!$OMP DO
do k=1,kmax-1
do i=1,imax-1
dphi =(phi(i+1,k)+phi(i-1,k)-2.0*phi(i,k))*dy2i+(phi(i,k+1)+phi(i,k-1)-2.0*phi (i,k))*dx2i
phin(i,k)=phi(i,k)+dphi
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL
!-----------------------------------------------------
It works safely for (imax=301, kmax=301), but for (imax=401 , kmax=401) and more i got the stack overflow error.
i searched around this problem but nothing could helped me with this
May any one please tell me what to do.
My email: ymahmoudi@yahoo.com
Regards, Mahmoudi
forrtl: severe (170): Program Exception - stack overflow
Image PC Routine Line Source
console2.exe 005174E5 Unknown Unknown Unknown
console2.exe 0045BC32 Unknown Unknown Unknown
console2.exe 00530145 Unknown Unknown Unknown
kernel32.dll 005179B0 Unknown Unknown Unknown
ntdll.dll.dll 77CBE489 Unknown Unknown Unknown
When I did some search, it seemed like I had to increase the stach size. So I did it call KMP_SET_STACKSIZE_S (8000000).
and it still gives the same error msg.
I have Intel Fortran 7.1 and am running it on Visual Studio .net. on Windows xp.
My system is core 2Duo with 4G RAM.
Some parts of my code is as follow:
!-----------------------------------------------------
integer imax, kmax, itmax
parameter (imax=401, kmax=401)
parameter (itmax=1000)
! iteration
do it=1,itmax
!$OMP PARALLEL PRIVATE(i,k,dphi), SHARED(phi, phin, dx2i, dy2i, dt, dphimax)
!$OMP DO
do k=1,kmax-1
do i=1,imax-1
dphi =(phi(i+1,k)+phi(i-1,k)-2.0*phi(i,k))*dy2i+(phi(i,k+1)+phi(i,k-1)-2.0*phi (i,k))*dx2i
phin(i,k)=phi(i,k)+dphi
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL
!-----------------------------------------------------
It works safely for (imax=301, kmax=301), but for (imax=401 , kmax=401) and more i got the stack overflow error.
i searched around this problem but nothing could helped me with this
May any one please tell me what to do.
My email: ymahmoudi@yahoo.com
Regards, Mahmoudi
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - ymahmoudi
I run a code to solve the heat equation by OPEN MP got the following error msg.
forrtl: severe (170): Program Exception - stack overflow
Image PC Routine Line Source
console2.exe 005174E5 Unknown Unknown Unknown
console2.exe 0045BC32 Unknown Unknown Unknown
console2.exe 00530145 Unknown Unknown Unknown
kernel32.dll 005179B0 Unknown Unknown Unknown
ntdll.dll.dll 77CBE489 Unknown Unknown Unknown
When I did some search, it seemed like I had to increase the stach size. So I did it call KMP_SET_STACKSIZE_S (8000000).
and it still gives the same error msg.
I have Intel Fortran 7.1 and am running it on Visual Studio .net. on Windows xp.
My system is core 2Duo with 4G RAM.
Some parts of my code is as follow:
!-----------------------------------------------------
integer imax, kmax, itmax
parameter (imax=401, kmax=401)
parameter (itmax=1000)
! iteration
do it=1,itmax
!$OMP PARALLEL PRIVATE(i,k,dphi), SHARED(phi, phin, dx2i, dy2i, dt, dphimax)
!$OMP DO
do k=1,kmax-1
do i=1,imax-1
dphi =(phi(i+1,k)+phi(i-1,k)-2.0*phi(i,k))*dy2i+(phi(i,k+1)+phi(i,k-1)-2.0*phi (i,k))*dx2i
phin(i,k)=phi(i,k)+dphi
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL
!-----------------------------------------------------
It works safely for (imax=301, kmax=301), but for (imax=401 , kmax=401) and more i got the stack overflow error.
i searched around this problem but nothing could helped me with this
May any one please tell me what to do.
My email: ymahmoudi@yahoo.com
Regards, Mahmoudi
forrtl: severe (170): Program Exception - stack overflow
Image PC Routine Line Source
console2.exe 005174E5 Unknown Unknown Unknown
console2.exe 0045BC32 Unknown Unknown Unknown
console2.exe 00530145 Unknown Unknown Unknown
kernel32.dll 005179B0 Unknown Unknown Unknown
ntdll.dll.dll 77CBE489 Unknown Unknown Unknown
When I did some search, it seemed like I had to increase the stach size. So I did it call KMP_SET_STACKSIZE_S (8000000).
and it still gives the same error msg.
I have Intel Fortran 7.1 and am running it on Visual Studio .net. on Windows xp.
My system is core 2Duo with 4G RAM.
Some parts of my code is as follow:
!-----------------------------------------------------
integer imax, kmax, itmax
parameter (imax=401, kmax=401)
parameter (itmax=1000)
! iteration
do it=1,itmax
!$OMP PARALLEL PRIVATE(i,k,dphi), SHARED(phi, phin, dx2i, dy2i, dt, dphimax)
!$OMP DO
do k=1,kmax-1
do i=1,imax-1
dphi =(phi(i+1,k)+phi(i-1,k)-2.0*phi(i,k))*dy2i+(phi(i,k+1)+phi(i,k-1)-2.0*phi (i,k))*dx2i
phin(i,k)=phi(i,k)+dphi
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL
!-----------------------------------------------------
It works safely for (imax=301, kmax=301), but for (imax=401 , kmax=401) and more i got the stack overflow error.
i searched around this problem but nothing could helped me with this
May any one please tell me what to do.
My email: ymahmoudi@yahoo.com
Regards, Mahmoudi
You can link with this switch
/stack:8000000
Michel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Michel
You can link with this switch
/stack:8000000
Michel.
Dear Michel
Would you explain more about this issue?
how can i link to the switch whichyou mentioned?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's entirely possible you may require both increased thread stack size (KMP_STACKSIZE for ifort OpenMP) and overall stack size (microsoft link option /link /stack:xxxxxxxx, or adjustment by editbin). You should find both of these described in the ifort help file.
Particularly on 32-bit Windows, you wouldn't want to request increases far beyond what is needed.
Particularly on 32-bit Windows, you wouldn't want to request increases far beyond what is needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am also having a program exception problem with my OpenMP parallelized code. The serial code is working properly.
I have tried many of the suggestions I found in this forum and elsewhere, but I am still not able to solve the issue.
I set the heap arrays option to a very high value, as well as the Stack reserve. I also set KMP_STACKSIZE to a high value.
I have tried many of the suggestions I found in this forum and elsewhere, but I am still not able to solve the issue.
I set the heap arrays option to a very high value, as well as the Stack reserve. I also set KMP_STACKSIZE to a high value.
In my code I have the following lines for the parallelization:
Call KMP_SET_STACKSIZE_S(2000000000)
Call omp_set_num_threads(2)
!$omp parallel do
do s = 0, NSECTORS
Call EmpCoef(ChoiceInput,ExperInput,CohortWgt,s,gammaSim(s,:))
end do
!$omp end parallel do
The function EmpCoef locally creates two other dynamic arrays. One of the arrays cannot be created. When the code executes the line:
allocate(XEmp(1:SizeEmp,1:(15+2*NSECTORS)),STAT=status)
I get status = 41, which means I was not able to allocate XEmp.
Curious thing is that the Xemp dimension is not that big: it's (500000, 20)
Many thanks,
Rafael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - rafadix08
I set the heap arrays option to a very high value, as well as the Stack reserve. I also set KMP_STACKSIZE to a high value.
No, set your heap_arrays option to a small number, or don't use any number at all. The number indicates that you want arrays bigger than "N" to be put on the heap.
- Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Lorri Menard (Intel)
No, set your heap_arrays option to a small number, or don't use any number at all. The number indicates that you want arrays bigger than "N" to be put on the heap.
- Lorri
Thanks Lorri, but with no number at all it doesn't work either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - ymahmoudi
I run a code to solve the heat equation by OPEN MP got the following error msg.
forrtl: severe (170): Program Exception - stack overflow
Image PC Routine Line Source
console2.exe 005174E5 Unknown Unknown Unknown
console2.exe 0045BC32 Unknown Unknown Unknown
console2.exe 00530145 Unknown Unknown Unknown
kernel32.dll 005179B0 Unknown Unknown Unknown
ntdll.dll.dll 77CBE489 Unknown Unknown Unknown
When I did some search, it seemed like I had to increase the stach size. So I did it call KMP_SET_STACKSIZE_S (8000000).
and it still gives the same error msg.
I have Intel Fortran 7.1 and am running it on Visual Studio .net. on Windows xp.
My system is core 2Duo with 4G RAM.
Some parts of my code is as follow:
!-----------------------------------------------------
integer imax, kmax, itmax
parameter (imax=401, kmax=401)
parameter (itmax=1000)
! iteration
do it=1,itmax
!$OMP PARALLEL PRIVATE(i,k,dphi), SHARED(phi, phin, dx2i, dy2i, dt, dphimax)
!$OMP DO
do k=1,kmax-1
do i=1,imax-1
dphi =(phi(i+1,k)+phi(i-1,k)-2.0*phi(i,k))*dy2i+(phi(i,k+1)+phi(i,k-1)-2.0*phi (i,k))*dx2i
phin(i,k)=phi(i,k)+dphi
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL
!-----------------------------------------------------
It works safely for (imax=301, kmax=301), but for (imax=401 , kmax=401) and more i got the stack overflow error.
i searched around this problem but nothing could helped me with this
May any one please tell me what to do.
My email: ymahmoudi@yahoo.com
Regards, Mahmoudi
forrtl: severe (170): Program Exception - stack overflow
Image PC Routine Line Source
console2.exe 005174E5 Unknown Unknown Unknown
console2.exe 0045BC32 Unknown Unknown Unknown
console2.exe 00530145 Unknown Unknown Unknown
kernel32.dll 005179B0 Unknown Unknown Unknown
ntdll.dll.dll 77CBE489 Unknown Unknown Unknown
When I did some search, it seemed like I had to increase the stach size. So I did it call KMP_SET_STACKSIZE_S (8000000).
and it still gives the same error msg.
I have Intel Fortran 7.1 and am running it on Visual Studio .net. on Windows xp.
My system is core 2Duo with 4G RAM.
Some parts of my code is as follow:
!-----------------------------------------------------
integer imax, kmax, itmax
parameter (imax=401, kmax=401)
parameter (itmax=1000)
! iteration
do it=1,itmax
!$OMP PARALLEL PRIVATE(i,k,dphi), SHARED(phi, phin, dx2i, dy2i, dt, dphimax)
!$OMP DO
do k=1,kmax-1
do i=1,imax-1
dphi =(phi(i+1,k)+phi(i-1,k)-2.0*phi(i,k))*dy2i+(phi(i,k+1)+phi(i,k-1)-2.0*phi (i,k))*dx2i
phin(i,k)=phi(i,k)+dphi
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL
!-----------------------------------------------------
It works safely for (imax=301, kmax=301), but for (imax=401 , kmax=401) and more i got the stack overflow error.
i searched around this problem but nothing could helped me with this
May any one please tell me what to do.
My email: ymahmoudi@yahoo.com
Regards, Mahmoudi
Try this way: On your workplace select Project->settings->Link->Category->Output->Stack allocations->Reserve->8000000, you'll see the Project Options: /stack:0x7a1200. Click OK button return to your workplace and then rebuild your project. This worked for me and I hope it works for you, too.

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