- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code compiles but crashes with a stack overflow on entry in the parallel region when compiled with OpenMP. I played with stack settings, but to no avail. Removing the block construct leads to expected results, as do other trivial changes to the program.
module compute implicit none integer :: nth, ny integer, parameter :: nsim=20 real, allocatable :: Ys(:,:) contains subroutine prep integer :: l real :: Y(ny),th(nth) !$omp parallel do private(Y) do l=1,nsim y=0 enddo print *,"done" block do l=1,10 Y=5 th=0 enddo end block end subroutine end module program mfort use compute implicit none nth=5; ny=8; allocate(Ys(ny,nsim)) print *,"hello" call prep end program
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code builds and runs OK with 17.0.4 compiler.
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