I run the following code
program readit implicit none INTEGER :: S_time,E_time real :: rate=1000000.000 call system_clock(s_time) call equiv() call system_clock(e_time) print*,"total time",(e_time-s_time)/rate end program Subroutine equiv() INTEGER(2),dimension(6,1024,1024,2):: traject INTEGER(2),dimension(6*1024*1024,2):: trajectt equivalence (traject,trajectt) trajectt=1 print*,traject(1,1,1,1) end subroutine equiv
When I compile with openmp on like so:
pgf90 -Mchkstk -mp=bind readit.f90
I blow the stack even though there are no openmp calls in my program.
But if I take out the openmp flag the program runs as expected or if i leave the openmp flag on and take out equivalence the program also runs as expected. The equivalence arrays should be referencing the same memory so I am perplexed by this behavior.