Commit 5720e9a8 authored by Matthias Redies's avatar Matthias Redies

add new timers and use ylm4

parent 044deff0
......@@ -1726,6 +1726,7 @@ CONTAINS
USE m_util, ONLY: harmonicsr, rorderp, rorderpf
USE m_types
USE m_juDFT
use m_ylm
IMPLICIT NONE
TYPE(t_mpi), INTENT(IN) :: mpi
......@@ -1917,7 +1918,7 @@ CONTAINS
END IF
IF (ishell .GT. conv(maxl) .AND. maxl .NE. 0) maxl = maxl - 1
call timestart("harmonics")
CALL harmonicsr(y, ra, maxl)
call ylm4(maxl, ra, y)
call timestop("harmonics")
y = CONJG(y)
call timestart("kloop")
......
......@@ -183,6 +183,7 @@ SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension
INTEGER :: ierr,ierr2,length,rank
CHARACTER(LEN=MPI_MAX_ERROR_STRING) :: errmsg
#endif
CALL timestart("valence exchange calculation")
IF(initialize) THEN !it .eq. 1 .and. nk .eq. 1) THEN
call calc_divergence(cell,kpts,divergence)
......@@ -508,6 +509,7 @@ SUBROUTINE exchange_valence_hf(nk,kpts,nkpt_EIBZ,sym,atoms,hybrid,cell,dimension
ELSE
mat_ex%data_c=exch_vv
END IF
CALL timestop("valence exchange calculation")
END SUBROUTINE exchange_valence_hf
......
......@@ -121,6 +121,7 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
a_ex=xcpot%get_exchange_weight()
! read in lower triangle part of overlap matrix from direct acces file olap
call timestart("read in olap")
nbasfcn = MERGE(lapw%nv(1)+lapw%nv(2)+2*atoms%nlotot,lapw%nv(1)+atoms%nlotot,noco%l_noco)
call olap%alloc(sym%invs,nbasfcn)
call read_olap(olap, kpts%nkpt*(jsp-1)+nk)
......@@ -138,6 +139,7 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
END DO
olap%data_c=conjg(olap%data_c)
END IF
call timestop("read in olap")
IF(hybrid%l_calhf) THEN
ncstd = sum( (/ ( (hybdat%nindxc(l,itype)*(2*l+1)*atoms%neq(itype),l=0,hybdat%lmaxc(itype)), itype = 1,atoms%ntype) /) )
......@@ -166,12 +168,10 @@ SUBROUTINE hsfock(nk,atoms,hybrid,lapw,dimension,kpts,jsp,input,hybdat,eig_irr,s
! calculate contribution from valence electrons to the
! HF exchange
CALL timestart("valence exchange calculation")
ex%l_real=sym%invs
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,&
mpi,ex)
CALL timestop("valence exchange calculation")
CALL timestart("core exchange calculation")
......
......@@ -1587,6 +1587,7 @@
IF( iatom1 .gt. iatom2 ) CYCLE
IF( iatom1 .ne. iatom2 ) THEN
call timestart("iatom1 neq iatom2")
! loop over l of mixed basis
DO l = 0,hybrid%lcutm1(itype)
! loop over basis functions products, which belong to l
......@@ -1709,8 +1710,9 @@
lm_0 = lm_0 + hybrid%nindxm1(l,itype) * (2*l+1) ! go to the lm start index of the next l-quantum number
IF(lm.ne.lm_0) STOP 'wavefproducts_inv5: counting of lm-index incorrect (bug?)'
END DO !l
call timestop("iatom1 neq iatom2")
ELSE !case: iatom1==iatom2
call timestart("iatom1 eq iatom2")
! loop over l of mixed basis
monepl = -1
......@@ -2251,6 +2253,7 @@
IF(lm.ne.lm_0) STOP 'wavefproducts_inv5: counting of lm-index incorrect (bug?)'
END DO !l
call timestop("iatom1 eq iatom2")
END IF ! iatom1 .ne. iatom2
lm_0 = lm_00
......@@ -2258,10 +2261,6 @@
iiatom = iiatom + atoms%neq(itype)
lm_00 = lm_00 + atoms%neq(itype)*ioffset
END DO !itype
CALL timestop("wavefproducts_inv5")
......
......@@ -266,7 +266,7 @@
CALL MPI_BCAST(atoms%lmaxd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
call MPI_BCAST( input%preconditioning_param, 1, MPI_DOUBLE_PRECISION, 0, mpi%mpi_comm, ierr )
#endif
CALL ylmnorm_init(atoms%lmaxd)
CALL ylmnorm_init(max(atoms%lmaxd, 2*hybrid%lexp))
!
!--> determine more dimensions
!
......
......@@ -286,7 +286,7 @@ MODULE m_types_setup
LOGICAL :: l_calhf = .false.
LOGICAL :: l_addhf = .false.
INTEGER :: ewaldlambda
INTEGER :: lexp
INTEGER :: lexp = 0
INTEGER :: bands1 !Only read in
INTEGER :: nbasp
INTEGER :: maxlcutm1
......
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