Commit 91967600 authored by Gregor Michalicek's avatar Gregor Michalicek

Remove irank2, isize2, comm from hybrid functionals code

These variables were needed for some MPI parallelization that
has already been removed. In the future it will be replaced by
a new parallelization scheme.
parent 088e558e
...@@ -4,7 +4,7 @@ MODULE m_hf_init ...@@ -4,7 +4,7 @@ MODULE m_hf_init
! preparations for HF and hybrid functional calculation ! preparations for HF and hybrid functional calculation
! !
CONTAINS CONTAINS
SUBROUTINE hf_init(hybrid,kpts,atoms,input,DIMENSION,hybdat,irank2,isize2,l_real) SUBROUTINE hf_init(hybrid,kpts,atoms,input,DIMENSION,hybdat,l_real)
USE m_types USE m_types
USE m_read_core USE m_read_core
USE m_util USE m_util
...@@ -15,7 +15,6 @@ CONTAINS ...@@ -15,7 +15,6 @@ CONTAINS
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_input),INTENT(IN) :: input TYPE(t_input),INTENT(IN) :: input
TYPE(t_dimension),INTENT(IN) :: DIMENSION TYPE(t_dimension),INTENT(IN) :: DIMENSION
INTEGER,INTENT(OUT) :: irank2(:),isize2(:)
TYPE(t_hybdat),INTENT(OUT) :: hybdat TYPE(t_hybdat),INTENT(OUT) :: hybdat
LOGICAL,INTENT(IN) :: l_real LOGICAL,INTENT(IN) :: l_real
...@@ -81,10 +80,6 @@ CONTAINS ...@@ -81,10 +80,6 @@ CONTAINS
END DO END DO
END DO END DO
irank2 = 0
isize2 = 1
!skip_kpt = .false. !skip_kpt = .false.
END SUBROUTINE hf_init END SUBROUTINE hf_init
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
SUBROUTINE checkolap(atoms,hybdat,& SUBROUTINE checkolap(atoms,hybdat,&
& hybrid,& & hybrid,&
& nkpti,kpts,& & nkpti,kpts,&
& dimension,mpi,irank2,skip_kpt,& & dimension,mpi,skip_kpt,&
& input,sym,noco,& & input,sym,noco,&
& cell,lapw,jsp) & cell,lapw,jsp)
USE m_util , ONLY: intgrf,intgrf_init,chr,sphbessel,harmonicsr USE m_util , ONLY: intgrf,intgrf_init,chr,sphbessel,harmonicsr
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
! - arrays - ! - arrays -
INTEGER, INTENT(IN) :: irank2(nkpti)
LOGICAL, INTENT(IN) :: skip_kpt(nkpti) LOGICAL, INTENT(IN) :: skip_kpt(nkpti)
! - local scalars - ! - local scalars -
...@@ -314,11 +311,9 @@ ...@@ -314,11 +311,9 @@
END DO END DO
END DO END DO
rarr = sqrt ( rarr / (4*pi_const) ) rarr = sqrt ( rarr / (4*pi_const) )
! IF ( irank2(ikpt) == 0 ) THEN
! WRITE(outtext,'(I6,4X,F14.12,'' ('',F14.12,'')'')') & ! WRITE(outtext,'(I6,4X,F14.12,'' ('',F14.12,'')'')') &
! & ikpt,sum(rarr(:1)**2/nbands(ikpt)),maxval(rarr(:1)) ! & ikpt,sum(rarr(:1)**2/nbands(ikpt)),maxval(rarr(:1))
! CALL writeout(outtext,mpi%irank) ! CALL writeout(outtext,mpi%irank)
! END IF
! IF( iatom .eq. 6 ) THEN ! IF( iatom .eq. 6 ) THEN
! cdum = exp(2*pi*img*dot_product(bkf(:,ikpt),(/0d0,0d0,1d0/) )) ! cdum = exp(2*pi*img*dot_product(bkf(:,ikpt),(/0d0,0d0,1d0/) ))
! lm = 0 ! lm = 0
......
...@@ -21,7 +21,7 @@ MODULE m_exchange_core ...@@ -21,7 +21,7 @@ MODULE m_exchange_core
CONTAINS CONTAINS
SUBROUTINE exchange_vccv(nk,atoms, hybrid,hybdat, DIMENSION,jsp,lapw,& SUBROUTINE exchange_vccv(nk,atoms, hybrid,hybdat, DIMENSION,jsp,lapw,&
maxbands,mnobd,mpi,irank2, degenerat,symequivalent,results,& maxbands,mnobd,mpi,degenerat,symequivalent,results,&
ex_vv_r,ex_vv_c,l_real) ex_vv_r,ex_vv_c,l_real)
...@@ -43,7 +43,6 @@ CONTAINS ...@@ -43,7 +43,6 @@ CONTAINS
! -scalars - ! -scalars -
INTEGER,INTENT(IN) :: jsp INTEGER,INTENT(IN) :: jsp
INTEGER,INTENT(IN) ::nk ,maxbands, mnobd INTEGER,INTENT(IN) ::nk ,maxbands, mnobd
INTEGER,INTENT(IN) :: irank2
! - arays - ! - arays -
INTEGER,INTENT(IN) :: degenerat(hybrid%ne_eig(nk)) INTEGER,INTENT(IN) :: degenerat(hybrid%ne_eig(nk))
LOGICAL,INTENT(IN) :: l_real LOGICAL,INTENT(IN) :: l_real
...@@ -77,10 +76,8 @@ CONTAINS ...@@ -77,10 +76,8 @@ CONTAINS
LOGICAL :: ldum(hybrid%nbands(nk),hybrid%nbands(nk)) LOGICAL :: ldum(hybrid%nbands(nk),hybrid%nbands(nk))
IF ( irank2 == 0 ) THEN WRITE(6,'(A)') new_LINE('n') // new_LINE('n') // '### valence-core-core-valence exchange ###'
WRITE(6,'(A)') new_LINE('n') // new_LINE('n') // '### valence-core-core-valence exchange ###' WRITE(6,'(A)') new_LINE('n') // ' k-point band exchange (core contribution)'
WRITE(6,'(A)') new_LINE('n') // ' k-point band exchange (core contribution)'
END IF
! read in mt wavefunction coefficients from file cmt ! read in mt wavefunction coefficients from file cmt
CALL read_cmt(cmt,nk) CALL read_cmt(cmt,nk)
...@@ -237,9 +234,7 @@ CONTAINS ...@@ -237,9 +234,7 @@ CONTAINS
results%te_hfex%core = results%te_hfex%core - results%w_iks(n1,nk,jsp)*exchange(n1,n1) results%te_hfex%core = results%te_hfex%core - results%w_iks(n1,nk,jsp)*exchange(n1,n1)
END DO END DO
IF ( irank2 == 0 ) THEN WRITE(6,'(A,F20.15)') 'sum of the absolut real part of the non diagonal elements',sum_offdia
WRITE(6,'(A,F20.15)') 'sum of the absolut real part of the non diagonal elements',sum_offdia
END IF
END SUBROUTINE exchange_vccv END SUBROUTINE exchange_vccv
......
...@@ -58,7 +58,7 @@ CONTAINS ...@@ -58,7 +58,7 @@ CONTAINS
SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension,input,jsp,hybdat,mnobd,lapw,& SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension,input,jsp,hybdat,mnobd,lapw,&
eig_irr,results,parent,pointer_EIBZ,n_q,wl_iks,it,xcpot, noco,nsest,indx_sest,& eig_irr,results,parent,pointer_EIBZ,n_q,wl_iks,it,xcpot, noco,nsest,indx_sest,&
mpi,irank2,isize2,comm,mat_ex) mpi,mat_ex)
USE m_types USE m_types
USE m_wrapper USE m_wrapper
...@@ -93,7 +93,7 @@ SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension ...@@ -93,7 +93,7 @@ SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension
TYPE(t_mat), INTENT(INOUT) :: mat_ex TYPE(t_mat), INTENT(INOUT) :: mat_ex
! scalars ! scalars
INTEGER, INTENT(IN) :: it,irank2,isize2,comm INTEGER, INTENT(IN) :: it
INTEGER, INTENT(IN) :: jsp INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(IN) :: nk,nkpt_EIBZ INTEGER, INTENT(IN) :: nk,nkpt_EIBZ
INTEGER, INTENT(IN) :: mnobd INTEGER, INTENT(IN) :: mnobd
......
...@@ -16,7 +16,7 @@ MODULE m_gen_wavf ...@@ -16,7 +16,7 @@ MODULE m_gen_wavf
CONTAINS CONTAINS
SUBROUTINE gen_wavf (nkpti,kpts,it,sym,atoms,el_eig,ello_eig,cell,dimension,hybrid,vr0,& SUBROUTINE gen_wavf (nkpti,kpts,it,sym,atoms,el_eig,ello_eig,cell,dimension,hybrid,vr0,&
hybdat,noco,oneD,mpi,irank2,input,jsp,zmat) hybdat,noco,oneD,mpi,input,jsp,zmat)
! nkpti :: number of irreducible k-points ! nkpti :: number of irreducible k-points
! nkpt :: number of all k-points ! nkpt :: number of all k-points
...@@ -49,7 +49,6 @@ CONTAINS ...@@ -49,7 +49,6 @@ CONTAINS
INTEGER, INTENT(IN) :: nkpti, it INTEGER, INTENT(IN) :: nkpti, it
INTEGER, INTENT(IN) :: jsp INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(IN) :: irank2(nkpti)
REAL, INTENT(IN) :: vr0(:,:,:)!(jmtd,ntype,jspd) REAL, INTENT(IN) :: vr0(:,:,:)!(jmtd,ntype,jspd)
REAL, INTENT(IN) :: el_eig(0:atoms%lmaxd,atoms%ntype) REAL, INTENT(IN) :: el_eig(0:atoms%lmaxd,atoms%ntype)
REAL, INTENT(IN) :: ello_eig(atoms%nlod,atoms%ntype) REAL, INTENT(IN) :: ello_eig(atoms%nlod,atoms%ntype)
...@@ -179,12 +178,9 @@ CONTAINS ...@@ -179,12 +178,9 @@ CONTAINS
found = .false. found = .false.
#ifdef CPP_MPI #ifdef CPP_MPI
DO ikpt = 1, nkpti DO ikpt = 1, nkpti
IF (irank2(ikpt) == 0 .AND. .NOT.found) THEN IF (.NOT.found) THEN
lower = ikpt lower = ikpt
found = .true. found = .true.
ELSE IF (irank2(ikpt) /= 0 .AND. found) THEN
upper = ikpt-1
EXIT
END IF END IF
END DO END DO
#else #else
......
...@@ -9,7 +9,7 @@ MODULE m_hf_setup ...@@ -9,7 +9,7 @@ MODULE m_hf_setup
CONTAINS CONTAINS
SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,results,jsp,enpara,eig_id_hf,& SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,results,jsp,enpara,eig_id_hf,&
hybdat,irank2,it,l_real,vr0,eig_irr) hybdat,it,l_real,vr0,eig_irr)
USE m_types USE m_types
USE m_eig66_io USE m_eig66_io
USE m_util USE m_util
...@@ -33,7 +33,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res ...@@ -33,7 +33,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
TYPE(t_results), INTENT(INOUT) :: results TYPE(t_results), INTENT(INOUT) :: results
TYPE(t_hybdat), INTENT(INOUT) :: hybdat TYPE(t_hybdat), INTENT(INOUT) :: hybdat
INTEGER, INTENT(IN) :: irank2(:),it INTEGER, INTENT(IN) :: it
INTEGER, INTENT(IN) :: jsp,eig_id_hf INTEGER, INTENT(IN) :: jsp,eig_id_hf
REAL, INTENT(IN) :: vr0(:,:,:) REAL, INTENT(IN) :: vr0(:,:,:)
LOGICAL, INTENT(IN) :: l_real LOGICAL, INTENT(IN) :: l_real
...@@ -171,11 +171,11 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res ...@@ -171,11 +171,11 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
rcvreqd = rcvreqd + 1 rcvreqd = rcvreqd + 1
CALL MPI_IRECV(hybrid%nobd(nk),1,MPI_INTEGER4, MPI_ANY_SOURCE,TAG_SNDRCV_HYBDAT%NOBD+nk, mpi,rcvreq(rcvreqd),ierr(1)) CALL MPI_IRECV(hybrid%nobd(nk),1,MPI_INTEGER4, MPI_ANY_SOURCE,TAG_SNDRCV_HYBDAT%NOBD+nk, mpi,rcvreq(rcvreqd),ierr(1))
ELSE ELSE
i = MOD( mpi%irank + isize2(nk), mpi%isize ) i = MOD( mpi%irank + 1, mpi%isize )
DO WHILE ( i < mpi%irank-irank2(nk) .OR. i >= mpi%irank-irank2(nk)+isize2(nk) ) DO WHILE ( i < mpi%irank .OR. i >= mpi%irank+1 )
sndreqd = sndreqd + 1 sndreqd = sndreqd + 1
CALL MPI_ISSEND(hybrid%nobd(nk),1,MPI_INTEGER4,i, TAG_SNDRCV_HYBDAT%NOBD+nk,mpi, sndreq(sndreqd),ierr(1) ) CALL MPI_ISSEND(hybrid%nobd(nk),1,MPI_INTEGER4,i, TAG_SNDRCV_HYBDAT%NOBD+nk,mpi, sndreq(sndreqd),ierr(1) )
i = MOD( i + isize2(nk), mpi%isize ) i = MOD( i + 1, mpi%isize )
END DO END DO
END IF END IF
END DO END DO
...@@ -194,7 +194,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res ...@@ -194,7 +194,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
! generate eigenvectors z and MT coefficients from the previous iteration at all k-points ! generate eigenvectors z and MT coefficients from the previous iteration at all k-points
CALL gen_wavf(kpts%nkpt,kpts,it,sym,atoms,enpara%el0(:,:,jsp),enpara%ello0(:,:,jsp),cell,dimension,& CALL gen_wavf(kpts%nkpt,kpts,it,sym,atoms,enpara%el0(:,:,jsp),enpara%ello0(:,:,jsp),cell,dimension,&
hybrid,vr0,hybdat,noco,oneD,mpi,irank2,input,jsp,zmat) hybrid,vr0,hybdat,noco,oneD,mpi,input,jsp,zmat)
! generate core wave functions (-> core1/2(jmtd,hybdat%nindxc,0:lmaxc,ntype) ) ! generate core wave functions (-> core1/2(jmtd,hybdat%nindxc,0:lmaxc,ntype) )
CALL corewf(atoms,jsp,input,DIMENSION,vr0,hybdat%lmaxcd,hybdat%maxindxc,mpi,& CALL corewf(atoms,jsp,input,DIMENSION,vr0,hybdat%lmaxcd,hybdat%maxindxc,mpi,&
...@@ -206,7 +206,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res ...@@ -206,7 +206,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
#endif #endif
! check olap between core-basis/core-valence/basis-basis ! check olap between core-basis/core-valence/basis-basis
CALL checkolap(atoms,hybdat,hybrid,kpts%nkpt,kpts,dimension,mpi,irank2,skip_kpt,& CALL checkolap(atoms,hybdat,hybrid,kpts%nkpt,kpts,dimension,mpi,skip_kpt,&
input,sym,noco,cell,lapw,jsp) input,sym,noco,cell,lapw,jsp)
! set up pointer pntgpt ! set up pointer pntgpt
......
...@@ -45,7 +45,7 @@ MODULE m_hsfock ...@@ -45,7 +45,7 @@ MODULE m_hsfock
CONTAINS CONTAINS
SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,sym,cell,noco,& SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,sym,cell,noco,&
results,it,mnobd,xcpot,mpi,irank2,isize2,comm) results,it,mnobd,xcpot,mpi)
USE m_types USE m_types
USE m_symm_hf USE m_symm_hf
...@@ -76,7 +76,6 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s ...@@ -76,7 +76,6 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
! scalars ! scalars
INTEGER, INTENT(IN) :: jsp INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(IN) :: it INTEGER, INTENT(IN) :: it
INTEGER, INTENT(IN) :: irank2 ,isize2,comm
INTEGER, INTENT(IN) :: nk INTEGER, INTENT(IN) :: nk
INTEGER, INTENT(IN) :: mnobd INTEGER, INTENT(IN) :: mnobd
...@@ -151,9 +150,9 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s ...@@ -151,9 +150,9 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
parent = 0 parent = 0
CALL timestart("symm_hf") CALL timestart("symm_hf")
CALL symm_hf_init(sym,kpts,nk,irank2,nsymop,rrot,psym) CALL symm_hf_init(sym,kpts,nk,nsymop,rrot,psym)
CALL symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,lapw,jsp,mpi,irank2,& CALL symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,lapw,jsp,mpi,&
rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,pointer_EIBZ,nsest,indx_sest) rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,pointer_EIBZ,nsest,indx_sest)
CALL timestop("symm_hf") CALL timestop("symm_hf")
...@@ -171,7 +170,7 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s ...@@ -171,7 +170,7 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
ex%l_real=sym%invs ex%l_real=sym%invs
CALL exchange_valence_hf(nk,kpts,nkpt_EIBZ, sym,atoms,hybrid,cell,dimension,input,jsp,hybdat,mnobd,lapw,& CALL exchange_valence_hf(nk,kpts,nkpt_EIBZ, sym,atoms,hybrid,cell,dimension,input,jsp,hybdat,mnobd,lapw,&
eig_irr,results,parent,pointer_EIBZ,n_q,wl_iks,it,xcpot,noco,nsest,indx_sest,& eig_irr,results,parent,pointer_EIBZ,n_q,wl_iks,it,xcpot,noco,nsest,indx_sest,&
mpi,irank2,isize2,comm,ex) mpi,ex)
CALL timestop("valence exchange calculation") CALL timestop("valence exchange calculation")
WRITE(1224,'(a,i7)') 'kpoint: ', nk WRITE(1224,'(a,i7)') 'kpoint: ', nk
...@@ -186,8 +185,6 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s ...@@ -186,8 +185,6 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
END DO END DO
CALL timestart("core exchange calculation") CALL timestart("core exchange calculation")
! do the rest of the calculation only on master
IF (irank2 /= 0) RETURN
! calculate contribution from the core states to the HF exchange ! calculate contribution from the core states to the HF exchange
IF (xcpot%is_name("hse").OR.xcpot%is_name("vhse")) THEN IF (xcpot%is_name("hse").OR.xcpot%is_name("vhse")) THEN
......
...@@ -51,7 +51,6 @@ CONTAINS ...@@ -51,7 +51,6 @@ CONTAINS
LOGICAL :: l_restart=.FALSE. LOGICAL :: l_restart=.FALSE.
LOGICAL :: l_zref LOGICAL :: l_zref
INTEGER :: comm(kpts%nkpt),irank2(kpts%nkpt),isize2(kpts%nkpt)
REAL :: bkpt(3) REAL :: bkpt(3)
REAL, ALLOCATABLE :: eig_irr(:,:) REAL, ALLOCATABLE :: eig_irr(:,:)
...@@ -119,19 +118,19 @@ CONTAINS ...@@ -119,19 +118,19 @@ CONTAINS
CALL coulombmatrix(mpi,atoms,kpts,cell,sym,hybrid,xcpot,l_restart) CALL coulombmatrix(mpi,atoms,kpts,cell,sym,hybrid,xcpot,l_restart)
CALL timestop("generation of coulomb matrix") CALL timestop("generation of coulomb matrix")
CALL hf_init(hybrid,kpts,atoms,input,DIMENSION,hybdat,irank2,isize2,sym%invs) CALL hf_init(hybrid,kpts,atoms,input,DIMENSION,hybdat,sym%invs)
CALL timestop("Preparation for Hybrid functionals") CALL timestop("Preparation for Hybrid functionals")
CALL timestart("Calculation of non-local HF potential") CALL timestart("Calculation of non-local HF potential")
DO jsp = 1,input%jspins DO jsp = 1,input%jspins
CALL HF_setup(hybrid,input,sym,kpts,dimension,atoms,mpi,noco,cell,oneD,results,jsp,enpara,eig_id,& CALL HF_setup(hybrid,input,sym,kpts,dimension,atoms,mpi,noco,cell,oneD,results,jsp,enpara,eig_id,&
hybdat,irank2,iterHF,sym%invs,v%mt(:,0,:,:),eig_irr) hybdat,iterHF,sym%invs,v%mt(:,0,:,:),eig_irr)
DO nk = mpi%n_start,kpts%nkpt,mpi%n_stride DO nk = mpi%n_start,kpts%nkpt,mpi%n_stride
CALL lapw%init(input,noco, kpts,atoms,sym,nk,cell,l_zref) CALL lapw%init(input,noco, kpts,atoms,sym,nk,cell,l_zref)
CALL hsfock(nk,atoms,hybrid,lapw,DIMENSION,kpts,jsp,input,hybdat,eig_irr,sym,cell,& CALL hsfock(nk,atoms,hybrid,lapw,DIMENSION,kpts,jsp,input,hybdat,eig_irr,sym,cell,&
noco,results,iterHF,MAXVAL(hybrid%nobd),xcpot,mpi,irank2(nk),isize2(nk),comm(nk)) noco,results,iterHF,MAXVAL(hybrid%nobd),xcpot,mpi)
END DO END DO
END DO END DO
CALL timestop("Calculation of non-local HF potential") CALL timestop("Calculation of non-local HF potential")
......
...@@ -15,7 +15,7 @@ MODULE m_symm_hf ...@@ -15,7 +15,7 @@ MODULE m_symm_hf
CONTAINS CONTAINS
SUBROUTINE symm_hf_init(sym,kpts,nk,irank2,nsymop,rrot,psym) SUBROUTINE symm_hf_init(sym,kpts,nk,nsymop,rrot,psym)
USE m_types USE m_types
USE m_util ,ONLY: modulo1 USE m_util ,ONLY: modulo1
...@@ -25,7 +25,6 @@ SUBROUTINE symm_hf_init(sym,kpts,nk,irank2,nsymop,rrot,psym) ...@@ -25,7 +25,6 @@ SUBROUTINE symm_hf_init(sym,kpts,nk,irank2,nsymop,rrot,psym)
TYPE(t_sym), INTENT(IN) :: sym TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_kpts), INTENT(IN) :: kpts TYPE(t_kpts), INTENT(IN) :: kpts
INTEGER, INTENT(IN) :: nk INTEGER, INTENT(IN) :: nk
INTEGER, INTENT(IN) :: irank2
INTEGER, INTENT(OUT) :: nsymop INTEGER, INTENT(OUT) :: nsymop
INTEGER, INTENT(INOUT) :: rrot(3,3,sym%nsym) INTEGER, INTENT(INOUT) :: rrot(3,3,sym%nsym)
INTEGER, INTENT(INOUT) :: psym(sym%nsym) ! Note: psym is only filled up to index nsymop INTEGER, INTENT(INOUT) :: psym(sym%nsym) ! Note: psym is only filled up to index nsymop
...@@ -62,16 +61,14 @@ SUBROUTINE symm_hf_init(sym,kpts,nk,irank2,nsymop,rrot,psym) ...@@ -62,16 +61,14 @@ SUBROUTINE symm_hf_init(sym,kpts,nk,irank2,nsymop,rrot,psym)
END IF END IF
END DO END DO
IF (irank2 == 0) THEN WRITE(6,'(A,i3)') ' nk',nk
WRITE(6,'(A,i3)') ' nk',nk WRITE(6,'(A,3f10.5)') ' kpts%bkf(:,nk):',kpts%bkf(:,nk)
WRITE(6,'(A,3f10.5)') ' kpts%bkf(:,nk):',kpts%bkf(:,nk) WRITE(6,'(A,i3)') ' Number of elements in the little group:',nsymop
WRITE(6,'(A,i3)') ' Number of elements in the little group:',nsymop
END IF
END SUBROUTINE symm_hf_init END SUBROUTINE symm_hf_init
SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,& SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
lapw,jsp,mpi,irank2,rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,& lapw,jsp,mpi,rrot,nsymop,psym,nkpt_EIBZ,n_q,parent,&
pointer_EIBZ,nsest,indx_sest) pointer_EIBZ,nsest,indx_sest)
USE m_constants USE m_constants
...@@ -96,7 +93,6 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,& ...@@ -96,7 +93,6 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
! - scalars - ! - scalars -
INTEGER,INTENT(IN) :: nk INTEGER,INTENT(IN) :: nk
INTEGER,INTENT(IN) :: jsp INTEGER,INTENT(IN) :: jsp
INTEGER,INTENT(IN) :: irank2
INTEGER,INTENT(OUT) :: nkpt_EIBZ INTEGER,INTENT(OUT) :: nkpt_EIBZ
INTEGER,INTENT(IN) :: nsymop INTEGER,INTENT(IN) :: nsymop
...@@ -148,9 +144,7 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,& ...@@ -148,9 +144,7 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
COMPLEX,ALLOCATABLE :: rep_d(:,:,:) COMPLEX,ALLOCATABLE :: rep_d(:,:,:)
LOGICAL,ALLOCATABLE :: symequivalent(:,:) LOGICAL,ALLOCATABLE :: symequivalent(:,:)
IF ( irank2 == 0 ) THEN WRITE(6,'(A)') new_line('n') // new_line('n') // '### subroutine: symm ###'
WRITE(6,'(A)') new_line('n') // new_line('n') // '### subroutine: symm ###'
END IF
! determine extented irreducible BZ of k ( EIBZ(k) ), i.e. ! determine extented irreducible BZ of k ( EIBZ(k) ), i.e.
! those k-points, which can generate the whole BZ by ! those k-points, which can generate the whole BZ by
...@@ -212,9 +206,7 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,& ...@@ -212,9 +206,7 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
END IF END IF
END DO END DO
IF ( irank2 == 0 ) THEN WRITE(6,'(A,i5)') ' Number of k-points in the EIBZ',nkpt_EIBZ
WRITE(6,'(A,i5)') ' Number of k-points in the EIBZ',nkpt_EIBZ
END IF
! determine the factor n_q, that means the number of symmetrie operations of the little group of bk(:,nk) ! determine the factor n_q, that means the number of symmetrie operations of the little group of bk(:,nk)
...@@ -252,9 +244,8 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,& ...@@ -252,9 +244,8 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
tolerance = 1E-07 !0.00001 tolerance = 1E-07 !0.00001
degenerat = 1 degenerat = 1
IF ( irank2 == 0 ) THEN
WRITE(6,'(A,f10.8)') ' Tolerance for determining degenerate states=', tolerance WRITE(6,'(A,f10.8)') ' Tolerance for determining degenerate states=', tolerance
END IF
DO i=1,hybrid%nbands(nk) DO i=1,hybrid%nbands(nk)
DO j=i+1,hybrid%nbands(nk) DO j=i+1,hybrid%nbands(nk)
...@@ -277,13 +268,10 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,& ...@@ -277,13 +268,10 @@ SUBROUTINE symm_hf(kpts,nk,sym,dimension,hybdat,eig_irr,atoms,hybrid,cell,&
! number of different degenerate bands/states ! number of different degenerate bands/states
nddb = count( degenerat .ge. 1) nddb = count( degenerat .ge. 1)
WRITE(6,*) ' Degenerate states:'
IF ( irank2 == 0 ) THEN DO iband = 1,hybrid%nbands(nk)/5+1
WRITE(6,*) ' Degenerate states:' WRITE(6,'(5i5)')degenerat(iband*5-4:min(iband*5,hybrid%nbands(nk)))
DO iband = 1,hybrid%nbands(nk)/5+1 END DO
WRITE(6,'(5i5)')degenerat(iband*5-4:min(iband*5,hybrid%nbands(nk)))
END DO
END IF
IF( irreps ) THEN IF( irreps ) THEN
! calculate representation, i.e. the action of an element of ! calculate representation, i.e. the action of an element of
......
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