Commit df58eb05 authored by Gustav Bihlmayer's avatar Gustav Bihlmayer

Some modifications to make the code compile with intel.12 added;

specify -DCPP_OLDINTEL to deactivate parts of the code that did
not compile; mainly the order of USE statements was changed or
ONLY was added to avoid confusion of the compiler.
parent dde1385b
......@@ -9,7 +9,9 @@ CONTAINS
!***********************************************************************
!
SUBROUTINE q_mt_sl(jsp,atoms,nobd,ikpt,ne,skip_t,noccbd,eigVecCoeffs,usdus,slab)
USE m_types
USE m_types_setup
USE m_types_usdus
USE m_types_cdnval, ONLY: t_eigVecCoeffs, t_slab
IMPLICIT NONE
TYPE(t_usdus),INTENT(IN) :: usdus
TYPE(t_atoms),INTENT(IN) :: atoms
......
......@@ -7,8 +7,11 @@ MODULE m_qal21
CONTAINS
SUBROUTINE qal_21(dimension,atoms,input,noccbd,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
USE m_types_setup
USE m_types_dos
USE m_types_cdnval, ONLY: t_eigVecCoeffs
USE m_types_denCoeffsOffdiag
USE m_rotdenmat
USE m_types
IMPLICIT NONE
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_input), INTENT(IN) :: input
......
......@@ -11,7 +11,8 @@ CONTAINS
SUBROUTINE calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)
USE m_juDFT
USE m_types
USE m_types_setup
USE m_types_cdnval, ONLY: t_eigVecCoeffs,t_denCoeffs
USE m_rhomt
USE m_rhonmt
USE m_rhomtlo
......
......@@ -6,7 +6,7 @@
module m_corespec
USE m_types
USE m_types_setup, ONLY: t_coreSpecInput
implicit none
......
......@@ -6,9 +6,11 @@
MODULE m_corespec_eval
USE m_corespec
USE m_types
USE m_types_setup
USE m_types_usdus
USE m_types_cdnval, ONLY: t_eigVecCoeffs
USE m_constants
USE m_corespec
IMPLICIT NONE
......
......@@ -14,10 +14,12 @@ CONTAINS
!
!*********************************************************************
USE m_constants, ONLY : c_light
USE m_types_setup
USE m_types_mpi
USE m_types_enpara
USE m_xmlOutput
USE m_radsra
USE m_differ
USE m_types
USE m_xmlOutput
IMPLICIT NONE
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_enpara),INTENT(IN) :: enpara
......
......@@ -23,10 +23,10 @@ CONTAINS
SUBROUTINE eigenso(eig_id,mpi,DIMENSION,stars,vacuum,atoms,sphhar,&
obsolete,sym,cell,noco,input,kpts,oneD,vTot,enpara,results)
USE m_types
USE m_eig66_io, ONLY : read_eig,write_eig
USE m_spnorb
USE m_alineso
USE m_types
USE m_judft
#ifdef CPP_MPI
USE m_mpi_bc_pot
......
......@@ -5,9 +5,6 @@ CONTAINS
SUBROUTINE ssomat(seigvso,theta,phi,eig_id,DIMENSION,atoms,kpts,sym,&
cell,noco, input,mpi, oneD,enpara,v,results )
USE m_eig66_io
USE m_spnorb
USE m_abcof
USE m_types_mat
USE m_types_setup
USE m_types_mpi
......@@ -19,6 +16,9 @@ CONTAINS
USE m_types_usdus
USE m_types_lapw
USE m_constants
USE m_eig66_io
USE m_spnorb
USE m_abcof
IMPLICIT NONE
TYPE(t_mpi),INTENT(IN) :: mpi
......
......@@ -5,8 +5,10 @@
!--------------------------------------------------------------------------------
MODULE m_types_dmi
USE m_judft
USE m_types
USE m_types_forcetheo
USE m_judft
TYPE,EXTENDS(t_forcetheo) :: t_forcetheo_dmi
INTEGER :: q_done
REAL,ALLOCATABLE:: qvec(:,:)
......
......@@ -5,8 +5,10 @@
!--------------------------------------------------------------------------------
MODULE m_types_jij
USE m_judft
USE m_types
USE m_types_forcetheo
USE m_judft
TYPE,EXTENDS(t_forcetheo) :: t_forcetheo_jij
INTEGER :: loopindex,no_loops
INTEGER,ALLOCATABLE :: q_index(:),iatom(:),jatom(:)
......
......@@ -5,8 +5,9 @@
!--------------------------------------------------------------------------------
MODULE m_types_mae
USE m_judft
USE m_types
USE m_types_forcetheo
USE m_judft
TYPE,EXTENDS(t_forcetheo) :: t_forcetheo_mae
INTEGER :: directions_done
REAL,ALLOCATABLE:: theta(:)
......
......@@ -5,8 +5,10 @@
!--------------------------------------------------------------------------------
MODULE m_types_ssdisp
USE m_judft
USE m_types
USE m_types_forcetheo
USE m_judft
TYPE,EXTENDS(t_forcetheo) :: t_forcetheo_ssdisp
INTEGER :: q_done
REAL,ALLOCATABLE:: qvec(:,:)
......
......@@ -12,6 +12,8 @@ CONTAINS
cell,sphhar,stars,xcpot,mpi,oneD,hmat,vx)
USE m_types
USE m_judft
USE m_intgr, ONLY : intgr3
USE m_constants
USE m_gaunt, ONLY : gaunt1
......@@ -20,7 +22,6 @@ CONTAINS
USE m_radflo
USE m_radfun
USE m_abcof3
USE m_types
IMPLICIT NONE
......@@ -85,7 +86,9 @@ CONTAINS
COMPLEX :: carr(hybrid%maxlmindx,DIMENSION%nvd),carr1(DIMENSION%nvd,DIMENSION%nvd)
COMPLEX ,ALLOCATABLE :: ahlp(:,:,:),bhlp(:,:,:)
COMPLEX, ALLOCATABLE :: bascof(:,:,:)
#ifndef CPP_OLDINTEL
COMPLEX :: bascof_lo(3,-atoms%llod:atoms%llod,4*atoms%llod+2,atoms%nlod, atoms%nat)
#endif
CALL timestart("subvxc")
vxc=0
......@@ -132,9 +135,9 @@ CONTAINS
! Calculate bascof
ALLOCATE(ahlp(DIMENSION%nvd,0:DIMENSION%lmd,atoms%nat),bhlp(DIMENSION%nvd,0:DIMENSION%lmd,atoms%nat),stat=ok)
IF(ok.NE.0) STOP 'subvxc: error in allocation of ahlp/bhlp'
#ifndef CPP_OLDINTEL
CALL abcof3(input,atoms,sym,jsp,cell,bk,lapw,usdus,oneD,ahlp,bhlp,bascof_lo)
#endif
ALLOCATE(bascof(DIMENSION%nvd,2*(DIMENSION%lmd+1),atoms%nat), stat=ok)
IF(ok.NE.0) STOP 'subvxc: error in allocation of bascof'
......@@ -346,6 +349,9 @@ CONTAINS
IF(atoms%invsat(iatom).EQ.1) invsfct = 2
DO ilo = 1, atoms%nlo(itype)
#ifdef CPP_OLDINTEL
CALL judft_error ("no LOs & hybrid with old intel compiler!",calledby="subvxc.F90")
#else
l1 = atoms%llo(ilo,itype)
DO ikvec = 1, invsfct*(2*l1+1)
DO m1 = -l1, l1
......@@ -477,6 +483,7 @@ CONTAINS
icentry = ic
END DO !ikvec
ikvecat = ikvecat + invsfct*(2*l1+1)
#endif
END DO ! ilo
ikvecprevat = ikvecprevat + ikvecat
ikvecat = 0
......
......@@ -11,15 +11,17 @@ CONTAINS
input,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,forcetheo,&
sliceplot,banddos,obsolete,enpara,xcpot,kpts,hybrid,&
oneD,coreSpecInput,l_opti)
USE m_judft
USE m_types
USE m_judft
USE m_dimens
USE m_inped
USE m_setup
USE m_constants
USE m_winpXML
#ifdef CPP_MPI
#ifndef CPP_OLDINTEL
USE m_mpi_dist_forcetheorem
#endif
#endif
IMPLICIT NONE
......@@ -191,8 +193,9 @@ CONTAINS
CALL MPI_BCAST(namex,4,MPI_CHARACTER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(l_krla,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%ntype,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
#ifndef CPP_OLDINTEL
CALL mpi_dist_forcetheorem(mpi,forcetheo)
#endif
#endif
IF (mpi%irank.NE.0) THEN
CALL xcpot%init(namex,l_krla,atoms%ntype)
......
......@@ -19,8 +19,8 @@
& atomTypeSpecies,speciesRepAtomType,numSpecies,&
& a1,a2,a3)
USE iso_c_binding
USE m_types
USE iso_c_binding
USE m_chkmt
USE m_constants
USE m_atominput
......
......@@ -5,7 +5,6 @@
!--------------------------------------------------------------------------------
MODULE m_cdngen
USE m_juDFT
CONTAINS
......@@ -22,6 +21,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
USE m_types
USE m_constants
USE m_juDFT
USE m_prpqfftmap
USE m_cdnval
USE m_cdn_io
......
......@@ -10,9 +10,9 @@
input,field,DIMENSION,atoms,sphhar,cell,stars,sym,noco,vacuum,forcetheo,&
sliceplot,banddos,obsolete,enpara,xcpot,results,kpts,hybrid,&
oneD,coreSpecInput,wann,l_opti)
USE m_types
USE m_judft
USE m_juDFT_init
USE m_types
USE m_init_wannier_defaults
USE m_rinpXML
USE m_postprocessInput
......@@ -37,8 +37,10 @@
#ifdef CPP_MPI
USE m_mpi_bc_all, ONLY : mpi_bc_all
#ifndef CPP_OLDINTEL
USE m_mpi_dist_forcetheorem
#endif
#endif
#ifdef CPP_HDF
USE m_hdf_tools
#endif
......@@ -206,7 +208,9 @@
CALL initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
DIMENSION,cell,sym,xcpot,noco,oneD,hybrid,&
kpts,enpara,sphhar,mpi,obsolete)
#ifndef CPP_OLDINTEL
CALL mpi_dist_forcetheorem(mpi,forcetheo)
#endif
#endif
ELSE ! else branch of "IF (input%l_inpXML) THEN"
......
......@@ -22,12 +22,12 @@ CONTAINS
SUBROUTINE vgen(hybrid,field,input,xcpot,DIMENSION,atoms,sphhar,stars,vacuum,sym,&
obsolete,cell,oneD,sliceplot,mpi,results,noco,den,vTot,vx,vCoul)
USE m_types
USE m_rotate_int_den_to_local
USE m_bfield
USE m_vgen_coulomb
USE m_vgen_xcpot
USE m_vgen_finalize
USE m_types
#ifdef CPP_MPI
USE m_mpi_bc_potden
#endif
......@@ -64,7 +64,11 @@ CONTAINS
CALL vCoul%resetPotDen()
CALL vx%resetPotDen()
ALLOCATE(vx%pw_w,mold=vTot%pw)
#ifndef CPP_OLDINTEL
ALLOCATE(vTot%pw_w,mold=vTot%pw)
#else
ALLOCATE( vTot%pw_w(size(vTot%pw,1),size(vTot%pw,2)) )
#endif
ALLOCATE(vCoul%pw_w(SIZE(den%pw,1),1))
CALL workDen%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,0)
......
......@@ -6,8 +6,10 @@
MODULE m_mpi_dist_forcetheorem
CONTAINS
#ifndef CPP_OLDINTEL
SUBROUTINE mpi_dist_forcetheorem(mpi,forcetheo)
USE m_types
USE m_types_mpi
USE m_types_forcetheo, ONLY: t_forcetheo
USE m_types_forcetheo_extended
IMPLICIT NONE
TYPE(t_mpi),INTENT(in)::mpi
......@@ -43,4 +45,7 @@ CONTAINS
END SELECT
#endif
END SUBROUTINE mpi_dist_forcetheorem
#else
#endif
END MODULE m_mpi_dist_forcetheorem
......@@ -14,6 +14,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,cell,atoms,enpara,stars,vacuum,di
USE m_types
USE m_juDFT
USE m_constants
#ifndef CPP_OLDINTEL
USE m_cdnval
USE m_cdn_io
USE m_cdncore
......@@ -23,6 +24,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,cell,atoms,enpara,stars,vacuum,di
USE m_intnv
#ifdef CPP_MPI
USE m_mpi_bc_potden
#endif
#endif
IMPLICIT NONE
......@@ -47,6 +49,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,cell,atoms,enpara,stars,vacuum,di
INTEGER, INTENT(IN) :: eig_id
#ifndef CPP_OLDINTEL
TYPE(t_cdnvalJob) :: cdnvalJob
TYPE(t_potden) :: singleStateDen, overallDen, overallVCoul
TYPE(t_regionCharges) :: regCharges
......@@ -59,9 +62,11 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,cell,atoms,enpara,stars,vacuum,di
REAL, ALLOCATABLE :: overallVCoulSSDen(:,:,:)
REAL, ALLOCATABLE :: vTotSSDen(:,:,:)
#endif
CALL juDFT_error('rdmft not yet implemented!', calledby = 'rdmft')
#ifndef CPP_OLDINTEL
! General initializations
ALLOCATE(overallVCoulSSDen(MAXVAL(results%neig(1:kpts%nkpt,1:input%jspins)),kpts%nkpt,input%jspins))
ALLOCATE(vTotSSDen(MAXVAL(results%neig(1:kpts%nkpt,1:input%jspins)),kpts%nkpt,input%jspins))
......@@ -201,7 +206,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,cell,atoms,enpara,stars,vacuum,di
! Calculate final overall density
! Calculate total energy
#endif
END SUBROUTINE rdmft
END MODULE m_rdmft
......@@ -447,9 +447,9 @@ END SUBROUTINE orbcomp_init
SUBROUTINE cdnvalJob_init(thisCdnvalJob,mpi,input,kpts,noco,results,jspin,sliceplot,banddos)
USE m_types_mpi
USE m_types_setup
USE m_types_kpts
USE m_types_mpi
USE m_types_misc
IMPLICIT NONE
......
......@@ -197,7 +197,7 @@ END SUBROUTINE addRadFunScalarProducts
SUBROUTINE calcCoefficients(thisDenCoeffsOffdiag,atoms,sphhar,sym,eigVecCoeffs,we,noccbd)
USE m_types_setup
USE m_types_cdnval
USE m_types_cdnval, ONLY: t_eigVecCoeffs
USE m_rhomt21 ! calculate (spin) off-diagonal MT-density coeff's
USE m_rhonmt21 ! -"- non-MT-density coeff's
......
......@@ -117,7 +117,7 @@ SUBROUTINE addContribsA21A12(thisForce,input,atoms,dimension,sym,cell,oneD,enpar
USE m_types_setup
USE m_types_usdus
USE m_types_enpara
USE m_types_cdnval
USE m_types_cdnval, ONLY: t_eigVecCoeffs
USE m_types_misc
USE m_forcea12
USE m_forcea21
......
......@@ -82,6 +82,8 @@ CONTAINS
CLASS(t_xcpot_libxc),INTENT(IN):: xcpot
#ifdef CPP_LIBXC
xcpot_is_gga=ANY((/XC_FAMILY_GGA, XC_FAMILY_HYB_GGA/)==xc_f03_func_info_get_family(xcpot%xc_info_x))
#else
xcpot_is_gga=.false.
#endif
END FUNCTION xcpot_is_gga
......@@ -90,6 +92,8 @@ CONTAINS
CLASS(t_xcpot_libxc),INTENT(IN):: xcpot
#ifdef CPP_LIBXC
xcpot_is_MetaGGA=ANY((/XC_FAMILY_MGGA, XC_FAMILY_HYB_MGGA/)==xc_f03_func_info_get_family(xcpot%xc_info_x))
#else
xcpot_is_MetaGGA=.false.
#endif
END FUNCTION xcpot_is_MetaGGA
......@@ -98,6 +102,8 @@ CONTAINS
CLASS(t_xcpot_libxc),INTENT(IN):: xcpot
#ifdef CPP_LIBXC
xcpot_is_hybrid=ANY((/XC_FAMILY_HYB_MGGA, XC_FAMILY_HYB_GGA/)==xc_f03_func_info_get_family(xcpot%xc_info_x))
#else
xcpot_is_hybrid=.false.
#endif
END FUNCTION xcpot_is_hybrid
......@@ -193,7 +199,7 @@ CONTAINS
ALLOCATE(grad%sigma(MERGE(1,3,jspins==1),ngrid))
ALLOCATE(grad%gr(3,ngrid,jspins))
ALLOCATE(grad%laplace(ngrid,jspins))
ALLOCATE(grad%vsigma,mold=grad%sigma)
ALLOCATE(grad%vsigma(MERGE(1,3,jspins==1),ngrid))
END SUBROUTINE xcpot_alloc_gradients
......
......@@ -23,6 +23,7 @@ contains
!----------------------------------------------------------------------------
use m_constants
use m_types
use m_vmts
use m_intnv
use m_vvac
......@@ -30,7 +31,6 @@ contains
use m_vvacxy
use m_vintcz
use m_checkdopall
use m_types
use m_od_vvac
use m_od_vvacis
use m_convol
......
......@@ -69,7 +69,11 @@ CONTAINS
ALLOCATE(exc%pw_w(stars%ng3,1));exc%pw_w=0.0
IF (PRESENT(results)) THEN
CALL veff%init(stars,atoms,sphhar,vacuum,input%jspins,.FALSE.,1)
#ifndef CPP_OLDINTEL
ALLOCATE(veff%pw_w,mold=veff%pw)
#else
ALLOCATE( veff%pw_w(size(veff%pw,1),size(veff%pw,2)) )
#endif
ENDIF
! exchange correlation potential
......
......@@ -17,7 +17,7 @@ SUBROUTINE initWannierDefaults(wann)
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
USE m_types
USE m_types_setup
IMPLICIT NONE
......
......@@ -13,7 +13,7 @@ subroutine wann_read_inp(input,l_p0,wann)
! Frank Freimuth
!********************************************
use m_judft
use m_types
use m_types_setup
implicit none
......
......@@ -23,9 +23,9 @@ c in the basis set of Wannier functions may be constructed.
c
c Frank Freimuth
c***********************************************************************
USE m_types
USE m_spnorb
USE m_hsoham
USE m_types
implicit none
TYPE(t_mpi),INTENT(IN) :: mpi
......
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