Commit 6d265e45 authored by Daniel Wortmann's avatar Daniel Wortmann

Bugfixes to allow gfortran to work around problems with OpenMP and modern Fortran

parent 68306625
......@@ -92,9 +92,10 @@ CONTAINS
! ..
! .. Intrinsic Functions ..
INTRINSIC max,mod,min
LOGICAL l_gga
!ta+
!.....------------------------------------------------------------------
l_gga=xcpot%is_gga()
#ifdef CPP_MPI
CALL MPI_BCAST(obsolete%ndvgrd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
......@@ -170,7 +171,7 @@ CONTAINS
chlh(jr,lh,js) = rho(jr,lh,n,js)*rr2(jr)
ENDDO
IF (xcpot%is_gga()) THEN
IF (l_gga) THEN
CALL grdchlh(&
& ixpm,ist,atoms%jri(n),atoms%dx(n),atoms%rmsh(1,n),&
& chlh(1,lh,js),obsolete%ndvgrd,&
......@@ -187,7 +188,7 @@ CONTAINS
#ifdef CPP_MPI
!$OMP& SHARED(vr_local,vxr_local,excr_local,ichsmrg_local,rhmn_local) &
#endif
!$OMP& SHARED(vr,vxr,excr,rhmn,ichsmrg) &
!$OMP& SHARED(vr,vxr,excr,rhmn,ichsmrg,l_gga) &
!$OMP& SHARED(dimension,mpi,sphhar,atoms,rho,xcpot,input,sym,obsolete)&
!$OMP& SHARED(n,nd,ist,ixpm,nsp,nat,d_15,lwbc) &
!$OMP& SHARED(rx,wt,rr2,thet) &
......@@ -228,7 +229,7 @@ CONTAINS
ch(k,js) = ch(k,js) + ylh(k,lh,nd)*chlh(jr,lh,js)
ENDDO
IF (xcpot%is_gga()) THEN
IF (l_gga) THEN
!
DO k = 1,nsp
chdr(k,js) =chdr(k,js)+ ylh(k,lh,nd)*chlhdr(jr,lh,js)
......@@ -251,7 +252,7 @@ CONTAINS
ENDDO ! lh
ENDDO ! js
IF (xcpot%is_gga()) THEN
IF (l_gga) THEN
CALL mkgylm(&
& input%jspins,atoms%rmsh(jr,n),thet,nsp,dimension%nspd,dimension%jspd,ch,chdr,&
& chdt,chdf,chdrr,chdtt,chdff,chdtf,chdrt,chdrf,&
......
......@@ -36,9 +36,12 @@ c.....------------------------------------------------------------------
REAL, PARAMETER :: sml = 1.e-14
REAL, PARAMETER :: smlc = 2.01e-14
LOGICAL :: l_hse
l_hse=(xcpot%is_name("hse").or.xcpot%is_name("vhse").or.
+ xcpot%is_name("lhse"))
!$OMP PARALLEL DEFAULT(none)
!$OMP+ SHARED(irmx,rh,xcpot,jspins)
!$OMP+ SHARED(irmx,rh,xcpot,jspins,l_hse)
!$OMP+ SHARED(agr,agru,agrd,g2ru,g2rd,gggr,gggru,gggrd)
!$OMP+ SHARED(vx,vxc)
!$OMP+ PRIVATE(rou,rod,vxlu,vclu,vxld,vcld,vxgu,vcgu,vxgd,vcgd)
......@@ -119,8 +122,7 @@ c.....
xcptu = vxlu + vclu + vxgu + vcgu
xcptd = vxld + vcld + vxgd + vcgd
IF (xcpot%is_name("hse").or.xcpot%is_name("vhse").or.
+ xcpot%is_name("lhse"))then
IF (l_hse)then
vx(i,1) = vxupsr * 2
vx(i,jspins) = vxdnsr * 2
ELSE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment