Commit 9086ed21 authored by dw113919's avatar dw113919

Modified code to compile with nagfor.

This compiler is a bit picky about some fortran features. In particular it does not like
dummy arguments to be used as dimensions before they are declared...
parent 1d1aa7e7
......@@ -26,9 +26,9 @@ SUBROUTINE calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs
TYPE(t_eigVecCoeffs), INTENT(IN) :: eigVecCoeffs
TYPE(t_denCoeffs), INTENT(INOUT) :: denCoeffs
INTEGER, INTENT(IN) :: noccbd
REAL, INTENT(IN) :: we(noccbd)
INTEGER, INTENT(IN) :: noccbd
INTEGER, INTENT(IN) :: ispin
!---> set up coefficients for the spherical and
......
......@@ -611,7 +611,7 @@ MODULE m_corespec_eval
ila1la2 = cimu**(la1-la2)
if(abs(real(td(1))).gt.0.d0.or.abs(real(td(2))).gt.0.d0.or.abs(imag(td(2))).gt.0.d0) then
if(abs(real(td(1))).gt.0.d0.or.abs(real(td(2))).gt.0.d0.or.abs(aimag(td(2))).gt.0.d0) then
write(39,'(2f4.0,i2,6i4,a,6i4,a,6f7.3,a,4f10.6)') ila1la2,la1-la2,l1,-m1,la1,mu1,li,mi,' ',l2,-m2,la2,mu2,li,mi,' ',ga(0,1),ga(0,2),ga(1,1),ga(1,2),ga(2,1),ga(2,2),' ',1000000*td
endif
......
......@@ -11,7 +11,7 @@ CONTAINS
USE m_types
COMPLEX,INTENT(in) :: chi(2,2)
TYPE(t_mat),INTENT(IN) :: mat_tmp
CLASS(t_mat),INTENT(INOUT):: mat(2,2)
CLASS(t_mat),INTENT(INOUT):: mat(:,:)
INTEGER:: iintsp,jintsp
......
......@@ -19,7 +19,7 @@ CONTAINS
TYPE(t_lapw),INTENT(IN) :: lapw
TYPE(t_usdus),INTENT(IN) :: usdus
TYPE(t_tlmplm),INTENT(IN) :: td
CLASS(t_mat),INTENT(INOUT) :: hmat(2,2)
CLASS(t_mat),INTENT(INOUT) :: hmat(:,:)!(2,2)
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: n,isp
......
......@@ -19,7 +19,7 @@ CONTAINS
TYPE(t_lapw),INTENT(IN) :: lapw
TYPE(t_usdus),INTENT(IN) :: usdus
TYPE(t_tlmplm),INTENT(IN) :: td
CLASS(t_mat),INTENT(INOUT) :: hmat(2,2)
CLASS(t_mat),INTENT(INOUT) :: hmat(:,:)!(2,2)
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: n
......
......@@ -119,7 +119,7 @@ c
we(index(idim)) = ff(idim)
END DO
8000 FORMAT (15x,'ef_newton failed after :',i3,'iterations.',/,
8000 FORMAT (15x,'ef_newton failed after :',i3,'iterations.',/,
+ 15x,'The error in the weight is : ',e12.5,/,
+ 15x,'The error in ef is : ',e12.5,' htr',/)
8010 FORMAT (15x,'Number of iterations needed : ',i3,/,
......
......@@ -613,7 +613,7 @@ CONTAINS
IF(l.EQ.0) THEN
IF(igpt.NE.1) THEN
csum = csum - cexp * ( sphbesmoment(0,itype1,iqnrm)*atoms%rmt(itype1)**2 -&
sphbesmoment(2,itype1,iqnrm)*2d0/3 ) / 10
sphbesmoment(2,itype1,iqnrm)*2.0/3 ) / 10
ELSE
csum = csum - cexp * atoms%rmt(itype1)**5/30
END IF
......
......@@ -135,7 +135,7 @@ SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension
INTEGER :: kcorner(3,8) = reshape((/ 0,0,0, 1,0,0, 0,1,0, 0,0,1, 1,1,0, 1,0,1, 0,1,1, 1,1,1 /), (/3,8/) )
COMPLEX :: exchcorrect(kpts%nkptf)
COMPLEX :: dcprod(hybrid%nbands(nk),hybrid%nbands(nk),3)
COMPLEX(8) :: exch_vv(hybrid%nbands(nk),hybrid%nbands(nk))
COMPLEX :: exch_vv(hybrid%nbands(nk),hybrid%nbands(nk))
COMPLEX :: hessian(3,3)
COMPLEX :: proj_ibsc(3,mnobd,hybrid%nbands(nk))
COMPLEX :: olap_ibsc(3,3,mnobd,mnobd)
......@@ -147,7 +147,7 @@ SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension
#if defined(CPP_MPI)&&defined(CPP_NEVER)
COMPLEX(8) :: buf_vv(hybrid%nbands(nk),nbands(nk))
COMPLEX :: buf_vv(hybrid%nbands(nk),nbands(nk))
#endif
#if ( !defined CPP_NOSPMVEC && !defined CPP_IRAPPROX )
......
......@@ -89,9 +89,9 @@
WRITE(6,*)
WRITE(6,*) 'DBG: symor,zorth,oldfleur :', symor,zorth,oldfleur
WRITE(6,'(x,a13,48i5)') 'DBG: optype :', optype(1:nops)
WRITE(6,'(1x,a13,48i5)') 'DBG: optype :', optype(1:nops)
WRITE(6,*) 'DBG: invsym,invs,zrfs,invs2 :', invsym,invs,zrfs,invs2
WRITE(6,'(x,a45,3i5)')
WRITE(6,'(1x,a45,3i5)')
& 'DBG: (before reorder) invsop,zrfsop,invs2op :',
& invsop,zrfsop,invs2op
......
......@@ -62,9 +62,9 @@ CONTAINS
!#ifdef CPP_ALLOW_USAGE_DATA
CALL DATE_AND_TIME(values = dt)
r = (dt(1) - 1970) * 365_8 * 24 * 60 * 60 * 1000 + &
dt(2) * 31_8 * 24 * 60 * 60 * 1000 + &
dt(3) * 24_8 * 60 * 60 * 1000 + dt(5) * 60 * 60 * 1000 + &
r = (dt(1) - 1970) * 365 * 24 * 60 * 60 * 1000 + &
dt(2) * 31 * 24 * 60 * 60 * 1000 + &
dt(3) * 24 * 60 * 60 * 1000 + dt(5) * 60 * 60 * 1000 + &
dt(6) * 60 * 1000 + dt(7) * 1000 + dt(8)
!pid = GETPID()
!r=r*1000+pid
......
......@@ -6,7 +6,7 @@ implicit none
contains
real(kind=8) function DoubleFactorial( n_upper, n_lower )
real function DoubleFactorial( n_upper, n_lower )
! calculates ( 2 * n_upper + 1 ) !! / ( 2 * n_lower + 1 ) !! or just ( 2 * n_upper + 1 ) !!, if n_lower is not present
integer :: n_upper
......
......@@ -208,8 +208,8 @@ SUBROUTINE calcCoefficients(thisDenCoeffsOffdiag,atoms,sphhar,sym,eigVecCoeffs,w
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_eigVecCoeffs), INTENT(IN) :: eigVecCoeffs
REAL, INTENT(IN) :: we(noccbd)
INTEGER, INTENT(IN) :: noccbd
REAL, INTENT(IN) :: we(noccbd)
CALL rhomt21(atoms,we,noccbd,eigVecCoeffs,thisDenCoeffsOffdiag%uu21,thisDenCoeffsOffdiag%ud21,&
thisDenCoeffsOffdiag%du21,thisDenCoeffsOffdiag%dd21,thisDenCoeffsOffdiag%uulo21,&
......
......@@ -7,6 +7,7 @@
IMPLICIT NONE
INTEGER, INTENT(IN) :: jmtd
REAL, INTENT(INOUT) :: d2f(jmtd)
REAL, INTENT(IN) :: fac(jmtd)
REAL, INTENT(IN) :: f(jmtd)
......@@ -14,7 +15,6 @@
REAL, INTENT(IN) :: dx
INTEGER, INTENT(IN) :: jri
INTEGER, INTENT(IN) :: jmtd
REAL, ALLOCATABLE :: fr(:),dfr(:)
INTEGER :: i
......
......@@ -7,6 +7,7 @@
IMPLICIT NONE
INTEGER, INTENT(IN) :: jmtd
COMPLEX, INTENT(INOUT) :: d2f(jmtd)
COMPLEX, INTENT(IN) :: fac(jmtd)
......@@ -15,7 +16,6 @@
REAL, INTENT(IN) :: dx
INTEGER, INTENT(IN) :: jri
INTEGER, INTENT(IN) :: jmtd
REAL, ALLOCATABLE :: fr(:),fi(:),dfr(:),dfi(:)
INTEGER :: i
......
......@@ -8,11 +8,11 @@
IMPLICIT NONE
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd
REAL, INTENT(IN) :: rmsh(jmtd),dx
REAL, INTENT(IN) :: ub(jmtd,2) ! u(b2)
REAL, INTENT(IN) :: j2(0:lmaxd,jmtd) ! j_l(b2*r)
REAL, INTENT(IN) :: b ! b2
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd
INTEGER, INTENT(IN) :: l ! l of sph. Bessel j2
REAL, INTENT(OUT) :: dub(jmtd,2)
......
......@@ -9,6 +9,7 @@
IMPLICIT NONE
INTEGER, INTENT(IN) :: jmtd
REAL, INTENT(IN) :: f(jmtd,2),g(jmtd,2)
REAL, INTENT(IN) :: vr(jmtd)
REAL, INTENT(IN) :: epar
......@@ -16,7 +17,6 @@
REAL, INTENT(IN) :: dx
REAL, INTENT(IN) :: expect
INTEGER, INTENT(IN) :: jri
INTEGER, INTENT(IN) :: jmtd
INTEGER, INTENT(IN) :: l
REAL, ALLOCATABLE :: x(:),dg(:,:),t(:,:),vv(:)
......
......@@ -13,6 +13,7 @@
IMPLICIT NONE
INTEGER, INTENT(IN) :: jmtd
REAL, INTENT(IN) :: p(jmtd,2)
REAL, INTENT(IN) :: q(jmtd,2)
REAL, INTENT(IN) :: vr(jmtd)
......@@ -20,7 +21,6 @@
REAL, INTENT(IN) :: rmsh(jmtd)
REAL, INTENT(IN) :: dx
INTEGER, INTENT(IN) :: jri
INTEGER, INTENT(IN) :: jmtd
INTEGER, INTENT(IN) :: l
REAL, INTENT(OUT) :: integral
......
......@@ -22,12 +22,12 @@ c*************************************************c
REAL difcub
EXTERNAL difcub
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd
REAL, INTENT(OUT) :: integral
REAL, INTENT(IN) :: vr(jmtd),rmsh(jmtd),dx,e
REAL, INTENT(IN) :: uj1(jmtd,2) ! u(b1)*j
REAL, INTENT(IN) :: uj2(jmtd,2) ! u(b2)*j
REAL, INTENT(IN) :: duj2(jmtd,2) ! d/dr (u(b2)j)
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd
INTEGER, INTENT(IN) :: lzb ! l of zentrifugal barrier
REAL, ALLOCATABLE :: x(:)
......
......@@ -22,12 +22,12 @@ c*************************************************c
REAL difcub
EXTERNAL difcub
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd
REAL, INTENT(OUT) :: integral
REAL, INTENT(IN) :: vr(jmtd),vm(jmtd),rmsh(jmtd),dx,e
REAL, INTENT(IN) :: uj1(jmtd,2) ! u(b1)*j
REAL, INTENT(IN) :: uj2(jmtd,2) ! u(b2)*j
REAL, INTENT(IN) :: duj2(jmtd,2) ! d/dr (u(b2)j)
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd
INTEGER, INTENT(IN) :: lzb ! l of zentrifugal barrier
REAL, ALLOCATABLE :: x(:)
......
......@@ -22,13 +22,13 @@ c*************************************************c
REAL difcub
EXTERNAL difcub
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd,irank
REAL, INTENT(OUT) :: integral
REAL, INTENT(IN) :: vr(jmtd),rmsh(jmtd),dx,e
REAL, INTENT(IN) :: uj1(jmtd,2) ! u(b1)*j
REAL, INTENT(IN) :: uj2(jmtd,2) ! u(b2)*j
REAL, INTENT(IN) :: duj1(jmtd,2) ! d/dr (u(b1)j)
REAL, INTENT(IN) :: duj2(jmtd,2) ! d/dr (u(b2)j)
INTEGER, INTENT(IN) :: jri,jmtd,lmaxd,irank
INTEGER, INTENT(IN) :: lzb ! l of zentrifugal barrier
REAL, ALLOCATABLE :: x(:)
......
......@@ -482,7 +482,7 @@ c close(321)
do i=1,num_wann2
do kk=1,3
write(321,*) r1,r2,r3,i,j,kk,real(hreal(kk,i,j,rvecind)),
& imag(hreal(kk,i,j,rvecind))
& aimag(hreal(kk,i,j,rvecind))
enddo !kk
enddo !i
enddo !j
......
......@@ -76,8 +76,8 @@ c****************************************************************
real tmp_zatom(1:ntype),tmp_dx(1:ntype),tmp_rmt(1:ntype)
integer tmp_jri(1:ntype),tmp_neq(1:ntype),tmp_rmsh(jmtd,ntype)
complex,allocatable::wannint(:,:,:,:)
real(4) delta1,delta2,plot_time_int,plot_read_data_time
real(4) plot_time_sph,time_sqrt
real delta1,delta2,plot_time_int,plot_read_data_time
real plot_time_sph,time_sqrt
plot_time_sph=0.0
plot_time_int=0.0
plot_read_data_time=0.0
......
......@@ -138,7 +138,7 @@ c real,intent(inout) :: fermi_weights(:,:,:) !(neigd,nkptd,jspd)
character(len=12) :: fending
integer :: i,nkpts,ikpt,nkqpts,iqpt
real(4) :: delta3,time_lapw_expand,delta2,time_lapw_plot
real :: delta3,time_lapw_expand,delta2,time_lapw_plot
logical :: l_need_fft,l_file
integer :: hopmin_z,hopmax_z
integer :: hopmin_y,hopmax_y
......
......@@ -221,10 +221,10 @@ c..wf-hamiltonian in real space (hopping in the same unit cell)
complex,allocatable::ulojug(:,:,:,:)
complex,allocatable::ulojdg(:,:,:,:)
complex,allocatable::ulojulog(:,:,:,:)
real(4) delta,delta1,time_interstitial,time_mmn
real(4) time_total,delta2,delta3
real(4) time_lapw_expand,time_rw,time_symm,time_film
real(4) time_lapw_plot,time_ujugaunt,time_abcof
real delta,delta1,time_interstitial,time_mmn
real time_total,delta2,delta3
real time_lapw_expand,time_rw,time_symm,time_film
real time_lapw_plot,time_ujugaunt,time_abcof
integer :: n_start,n_end,mlotot,mlolotot,err
integer :: mlot_d,mlolot_d,ilo,dir,l1,l2,ii,jj
character(len=2) :: spin012(0:2)
......
......@@ -223,10 +223,10 @@ c real, allocatable :: ei(:)
complex,allocatable::ulojug(:,:,:,:,:)
complex,allocatable::ulojdg(:,:,:,:,:)
complex,allocatable::ulojulog(:,:,:,:,:,:)
real(4) delta,delta1,time_interstitial,time_mmn
real(4) time_total,delta2,delta3
real(4) time_lapw_expand,time_rw,time_symm,time_film
real(4) time_lapw_plot,time_ujugaunt,time_abcof
real delta,delta1,time_interstitial,time_mmn
real time_total,delta2,delta3
real time_lapw_expand,time_rw,time_symm,time_film
real time_lapw_plot,time_ujugaunt,time_abcof
integer :: n_start,n_end,mlotot,mlolotot,err
integer :: mlot_d,mlolot_d,ilo,dir,length
character(len=2) :: spin012(0:2)
......
......@@ -372,6 +372,7 @@ cccccccccccc read in the eigenvalues and vectors cccccc
l_p0 = .false.
if (irank.eq.0) l_p0 = .true.
allocate ( flo(ntypd,jmtd,2,nlod) )
#ifdef CPP_NEVER
call cdn_read0(
> lmaxd,ntypd,nlod,neigd,wannierspin,
......@@ -379,7 +380,6 @@ cccccccccccc read in the eigenvalues and vectors cccccc
> l_noco,nrec,66,
< ello,evac,epar,bkpt,wk,n_bands,nrec1,n_size)
allocate ( flo(ntypd,jmtd,2,nlod) )
na = 1
do 40 n = 1,ntype
......
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