Commit fade9f2d authored by Matthias Redies's avatar Matthias Redies

remove redundant mnodb

parent d1c643e6
......@@ -128,7 +128,7 @@ CONTAINS
nk = k_list(i)
CALL lapw%init(fi%input, fi%noco, nococonv,fi%kpts, fi%atoms, fi%sym, nk, fi%cell, l_zref)
CALL hsfock(fi,nk, mpdata, lapw, jsp, hybdat, eig_irr, &
nococonv, results, MAXVAL(hybdat%nobd(:,jsp)), xcpot, mpi)
nococonv, results, xcpot, mpi)
END DO
END DO
CALL timestop("Calculation of non-local HF potential")
......
......@@ -60,7 +60,7 @@ MODULE m_exchange_valence_hf
CONTAINS
SUBROUTINE exchange_valence_hf(ik, kpts, nkpt_EIBZ, sym, atoms, mpdata, hybinp, cell, input, jsp, hybdat, mnobd, lapw, &
SUBROUTINE exchange_valence_hf(ik, kpts, nkpt_EIBZ, sym, atoms, mpdata, hybinp, cell, input, jsp, hybdat, lapw, &
eig_irr, results, pointer_EIBZ, n_q, wl_iks, xcpot, noco,nococonv, oneD, nsest, indx_sest, &
mpi, mat_ex)
......@@ -95,7 +95,6 @@ CONTAINS
! scalars
INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(IN) :: ik, nkpt_EIBZ
INTEGER, INTENT(IN) :: mnobd
! arrays
INTEGER, INTENT(IN) :: n_q(:)
......@@ -129,8 +128,8 @@ CONTAINS
COMPLEX :: dcprod(hybdat%nbands(ik), hybdat%nbands(ik), 3)
COMPLEX :: exch_vv(hybdat%nbands(ik), hybdat%nbands(ik))
COMPLEX :: hessian(3, 3)
COMPLEX :: proj_ibsc(3, mnobd, hybdat%nbands(ik))
COMPLEX :: olap_ibsc(3, 3, mnobd, mnobd)
COMPLEX :: proj_ibsc(3, MAXVAL(hybdat%nobd(:,jsp)), hybdat%nbands(ik))
COMPLEX :: olap_ibsc(3, 3, MAXVAL(hybdat%nobd(:,jsp)), MAXVAL(hybdat%nobd(:,jsp)))
REAL :: carr1_v_r(hybdat%maxbasm1)
COMPLEX :: carr1_v_c(hybdat%maxbasm1)
COMPLEX, ALLOCATABLE :: phase_vv(:, :)
......@@ -165,9 +164,9 @@ CONTAINS
! determine package size loop over the occupied bands
rdum = hybdat%maxbasm1*hybdat%nbands(ik)*4/1048576.
psize = 1
DO iband = mnobd, 1, -1
DO iband = MAXVAL(hybdat%nobd(:,jsp)), 1, -1
! ensure that the packages have equal size
IF (modulo(mnobd, iband) == 0) THEN
IF (modulo(MAXVAL(hybdat%nobd(:,jsp)), iband) == 0) THEN
! choose packet size such that cprod is smaller than memory threshold
IF (rdum*iband <= maxmem) THEN
psize = iband
......@@ -176,7 +175,7 @@ CONTAINS
END IF
END DO
IF (psize /= mnobd) THEN
IF (psize /= MAXVAL(hybdat%nobd(:,jsp))) THEN
WRITE (6, '(A,A,i3,A,f7.2,A)') ' Divide the loop over the occupied hybinp%bands in packages', &
' of the size', psize, ' (cprod=', rdum*psize, 'MB)'
END IF
......@@ -225,7 +224,7 @@ CONTAINS
END IF
END IF
DO ibando = 1, mnobd, psize
DO ibando = 1, MAXVAL(hybdat%nobd(:,jsp)), psize
IF (mat_ex%l_real) THEN
CALL wavefproducts_inv(ibando, ibando + psize - 1, input, jsp, atoms, &
......@@ -345,7 +344,7 @@ CONTAINS
IF (ibs_corr) THEN
CALL ibs_correction(ik, atoms, input, jsp, hybdat, mpdata, hybinp,&
lapw, kpts, cell, mnobd, &
lapw, kpts, cell, MAXVAL(hybdat%nobd(:,jsp)), &
sym, noco,nococonv, proj_ibsc, olap_ibsc)
END IF
END IF
......
......@@ -31,7 +31,6 @@ MODULE m_hsfock
! nbands := number of bands for which the exchange matrix (mat_ex) c
! in the space of the wavefunctions is calculated c
! te_hfex := hf exchange contribution to the total energy c
! mnobd := maximum number of occupied bands c
! parent := parent(ikpt) points to the symmetry equivalent point c
! under the little group of kpoint nk c
! symop := symop(ikpt) points to the symmetry operation, which c
......@@ -45,7 +44,7 @@ CONTAINS
SUBROUTINE hsfock(fi, nk, mpdata, lapw, jsp, hybdat, &
eig_irr, nococonv, &
results, mnobd, xcpot, mpi)
results, xcpot, mpi)
use m_ex_to_vx
USE m_judft
......@@ -72,7 +71,6 @@ CONTAINS
! scalars
INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(IN) :: nk
INTEGER, INTENT(IN) :: mnobd
! arrays
REAL, INTENT(IN) :: eig_irr(:, :)
......@@ -154,7 +152,7 @@ CONTAINS
! calculate contribution from valence electrons to the
! HF exchange
ex%l_real = fi%sym%invs
CALL exchange_valence_hf(nk, fi%kpts, nkpt_EIBZ, fi%sym, fi%atoms, mpdata, fi%hybinp, fi%cell, fi%input, jsp, hybdat, mnobd, lapw, &
CALL exchange_valence_hf(nk, fi%kpts, nkpt_EIBZ, fi%sym, fi%atoms, mpdata, fi%hybinp, fi%cell, fi%input, jsp, hybdat, lapw, &
eig_irr, results, pointer_EIBZ, n_q, wl_iks, xcpot, fi%noco, nococonv, fi%oneD, nsest, indx_sest, &
mpi, ex)
......
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