Hi,
I am trying to modify loop in a program using Openmp syntax. The problem I am facing is using Openmp syntax gives core dump and the print statement are not consistent in run. Sometimes the loop doesn’t start at all.
I am also setting “ulimit -s unlimited” as suggested in some searches. This program is a modified version of open source program, just trying to make it more advance.
Also, if some one can point out private and shared variables I have used are correct or not.
Thanks
Apurva
Following is the loop
!$OMP PARALLEL DO shared(r,ro,vx,vr,rovt,vt,rovx,rovr,rorvt) private(i,j,k,rrnow,recip) collapse(3) num_threads(4) schedule(static)
DO k=1,km
print *,“k”,k
DO j=2,jm
print *,“j”,j
rrnow = 1/r(j,k)
DO i=1,im
print \*,“i”,i
!$OMP CRITICAL
recip = 1.0/ro(i,j,k)
vx(i,j,k) = rovx(i,j,k)\*recip
vr(i,j,k) = rovr(i,j,k)\*recip
rovt(i,j,k) = rorvt(i,j,k)\*rrnow
vt(i,j,k) = rovt(i,j,k)\*recip
!$OMP END CRITICAL
END DO
END DO
END DO
!$OMP END PARALLEL DO