Skip to content

Commit

Permalink
Modify openmp private clause
Browse files Browse the repository at this point in the history
  • Loading branch information
sdhzhs committed Dec 27, 2020
1 parent dd04710 commit 5f82032
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions lib/Condiff.f03
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Subroutine Condiff(scalar)
Ga=mu+mut/sigmatw
!$OMP END WORKSHARE
end if
!$OMP DO PRIVATE(Dnow,Dnoe,Dnos,Dnon,Faw,Fae,Fks,Fkn,Fwallw,Fwalle)
!$OMP DO PRIVATE(Dnow,Dnoe,Dnos,Dnon,Faw,Fae,Fks,Fkn,Fwallw,Fwalle,i)
DO j=1,Jc-1
DO i=2,Ic-1
Dw(i,j)=interpl(a1(i,j)*Ga(i,j),a1(i-1,j)*Ga(i-1,j),dk(i,j),dk(i-1,j))*dy/dx
Expand Down Expand Up @@ -119,7 +119,7 @@ Subroutine Condiff(scalar)
aM(4,:,:)=0
aM(5,:,:)=0
!$OMP END WORKSHARE
!$OMP DO PRIVATE(aP,aW,aE,aS,aN,DF)
!$OMP DO PRIVATE(aP,aW,aE,aS,aN,DF,i)
DO j=1,Jc-1
DO i=2,Ic-1
Fw(i,j)=dy*rhok(i,j)*Unk(i,j)
Expand Down Expand Up @@ -185,7 +185,7 @@ Subroutine Condiff(scalar)
!$OMP END WORKSHARE
end if
if(Turmod=='sst'.and.(scalar=='Tk'.or.scalar=='Tw')) then
!$OMP DO PRIVATE(Ret,Dwplus,phi1,F1,betaistar,Fmt,alphaf,betai)
!$OMP DO PRIVATE(Ret,Dwplus,phi1,F1,betaistar,Fmt,alphaf,betai,i)
DO j=1,Jc-1
DO i=2,Ic-1
Dwplus=max(2*rho(i,j)*(Tkx(i,j)*Twx(i,j)+Tky(i,j)*Twy(i,j))/(sigmaw2*Tw(i,j)),1e-10)
Expand All @@ -211,7 +211,7 @@ Subroutine Condiff(scalar)
end DO
!$OMP END DO
else if(scalar=='Tn') then
!$OMP DO PRIVATE(Xi,fnu1,fnu2,Sv,rm,gm)
!$OMP DO PRIVATE(Xi,fnu1,fnu2,Sv,rm,gm,i)
DO j=1,Jc-1
DO i=2,Ic-1
if(Walltreat=='lr') then
Expand All @@ -237,7 +237,7 @@ Subroutine Condiff(scalar)
!$OMP WORKSHARE
b=F
!$OMP END WORKSHARE
!$OMP DO
!$OMP DO PRIVATE(i)
DO j=1,Jc-1
DO i=2,Ic-1
if(scalar=='U') then
Expand Down
16 changes: 8 additions & 8 deletions lib/Linearsolver.f03
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subroutine sor(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
real(8) aM(5,Ic,Jc),b(Ic,Jc),F(Ic,Jc),F0(Ic,Jc)
real(8) Fo(Ic,Jc)
character(*) scalar
!$OMP PARALLEL
!$OMP PARALLEL PRIVATE(k)
!$OMP SINGLE
maxl=1000
if(scalar=='dP') then
Expand All @@ -20,7 +20,7 @@ Subroutine sor(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
!$OMP WORKSHARE
Fo=F
!$OMP END WORKSHARE
!$OMP DO
!$OMP DO PRIVATE(i)
DO j=1,Jc-1
DO i=2,Ic-1
if(j>1) then
Expand All @@ -43,7 +43,7 @@ Subroutine sor(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
!$OMP SINGLE
rms=0
!$OMP END SINGLE
!$OMP DO REDUCTION(+:rms)
!$OMP DO REDUCTION(+:rms) PRIVATE(i)
DO j=1,Jc
DO i=1,Ic
if(abs(Fo(i,j))>0) then
Expand All @@ -70,7 +70,7 @@ Subroutine CGSTAB(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
character(*) scalar
character(4) pretype

!$OMP PARALLEL PRIVATE(alpha,beta,rho,omiga,rho0)
!$OMP PARALLEL PRIVATE(alpha,beta,rho,omiga,rho0,k)
!$OMP SINGLE
maxl=1000
if(scalar=='dP') then
Expand All @@ -83,7 +83,7 @@ Subroutine CGSTAB(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
!$OMP WORKSHARE
rms=0
!$OMP END WORKSHARE
!$OMP DO
!$OMP DO PRIVATE(i)
DO j=1,Jc-1
DO i=2,Ic-1
if(j>1) then
Expand All @@ -106,7 +106,7 @@ Subroutine CGSTAB(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
aD=aM(1,:,:)
!$OMP END WORKSHARE
if(pretype=='ILU') then
!$OMP DO
!$OMP DO PRIVATE(i)
DO j=1,Jc-1
DO i=2,Ic-1
if(j==1) then
Expand Down Expand Up @@ -141,7 +141,7 @@ Subroutine CGSTAB(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
!$OMP WORKSHARE
v=y
!$OMP END WORKSHARE
!$OMP DO
!$OMP DO PRIVATE(i)
DO j=1,Jc-1
DO i=2,Ic-1
if(j>1) then
Expand Down Expand Up @@ -169,7 +169,7 @@ Subroutine CGSTAB(aM,b,F,F0,a,Ic,Jc,Ib1,Ib2,scalar)
!$OMP WORKSHARE
t=z
!$OMP END WORKSHARE
!$OMP DO
!$OMP DO PRIVATE(i)
DO j=1,Jc-1
DO i=2,Ic-1
if(j>1) then
Expand Down

0 comments on commit 5f82032

Please sign in to comment.