Commit 1b8c581d authored by timrov's avatar timrov

Moved parts of the PHonon code, which compute nbnd_occ and alpha_pv,

from phq_setup.f90 to separate subroutines setup_nbnd_occ.f90 
and setup_alpha_pv.f90 in LR_Modules. The reason for this is always the same:
these parts of PH were duplicated eslewhere (in TDDFPT) and now it is
time to merge them and move to LR_Modules.
Also some small changes in TDDFPT: removing the dependencies on PH variables.



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent 61f307b0
......@@ -32,6 +32,8 @@ lr_sm1_psi.o \
setup_dgc.o \
compute_vsgga.o \
setup_dmuxc.o \
setup_nbnd_occ.o \
setup_alpha_pv.o \
lrcom.o
TLDEPS=libfft mods
......
......@@ -181,6 +181,11 @@ set_int3_nc.o : ../Modules/noncol.o
set_int3_nc.o : ../Modules/uspp.o
set_int3_nc.o : ../PW/src/pwcom.o
set_int3_nc.o : lrcom.o
setup_alpha_pv.o : ../Modules/kind.o
setup_alpha_pv.o : ../Modules/mp.o
setup_alpha_pv.o : ../Modules/mp_pools.o
setup_alpha_pv.o : ../PW/src/pwcom.o
setup_alpha_pv.o : lrcom.o
setup_dgc.o : ../FFTXlib/fft_interfaces.o
setup_dgc.o : ../Modules/constants.o
setup_dgc.o : ../Modules/fft_base.o
......@@ -200,6 +205,12 @@ setup_dmuxc.o : ../Modules/noncol.o
setup_dmuxc.o : ../PW/src/pwcom.o
setup_dmuxc.o : ../PW/src/scf_mod.o
setup_dmuxc.o : lrcom.o
setup_nbnd_occ.o : ../Modules/constants.o
setup_nbnd_occ.o : ../Modules/io_global.o
setup_nbnd_occ.o : ../Modules/kind.o
setup_nbnd_occ.o : ../Modules/noncol.o
setup_nbnd_occ.o : ../PW/src/pwcom.o
setup_nbnd_occ.o : lrcom.o
setup_nscf.o : ../Modules/cell_base.o
setup_nscf.o : ../Modules/constants.o
setup_nscf.o : ../Modules/control_flags.o
......
!
! Copyright (C) 2001-2016 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
!-----------------------------------------------------------------------
SUBROUTINE setup_alpha_pv
!-----------------------------------------------------------------------
!
! This subroutine computes alpha_pv (i.e. the coefficient
! in front of the projector on occupied states in the
! linear response system, in order to avoid singularity problems)
! See Eq. (30) in Baroni et al., Rev. Mod. Phys. 73, 515 (2001)
! This coefficient is also used in orthogonalize.f90 when lgauss=.true.
!
USE kinds, ONLY : DP
USE wvfct, ONLY : nbnd, et
USE klist, ONLY : nks
USE mp, ONLY : mp_max, mp_min
USE mp_pools, ONLY : inter_pool_comm
USE klist, ONLY : lgauss
USE control_lr, ONLY : alpha_pv, nbnd_occ
!
IMPLICIT NONE
!
REAL(DP) :: target, emin, emax
! auxiliary variable used
! to set nbnd_occ in the metallic case
! minimum band energy
! maximum band energy
INTEGER :: ik, ibnd
!
CALL start_clock ('setup_alpha_pv')
!
emin = et (1, 1)
!
DO ik = 1, nks
DO ibnd = 1, nbnd
emin = min (emin, et (ibnd, ik) )
ENDDO
ENDDO
!
#ifdef __MPI
! Find the minimum across pools
CALL mp_min( emin, inter_pool_comm )
#endif
!
IF (lgauss) THEN
emax = target
alpha_pv = emax - emin
ELSE
emax = et (1, 1)
DO ik = 1, nks
DO ibnd = 1, nbnd_occ(ik)
emax = max (emax, et (ibnd, ik) )
ENDDO
ENDDO
#ifdef __MPI
! Find the maximum across pools
CALL mp_max( emax, inter_pool_comm )
#endif
alpha_pv = 2.d0 * (emax - emin)
ENDIF
!
! Avoid zero value for alpha_pv
!
alpha_pv = max (alpha_pv, 1.0d-2)
!
CALL stop_clock ('setup_alpha_pv')
!
RETURN
!
END SUBROUTINE setup_alpha_pv
!
! Copyright (C) 2001-2016 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
!-----------------------------------------------------------------------
SUBROUTINE setup_nbnd_occ
!-----------------------------------------------------------------------
!
! This subroutine computes the number of occupied bands for each k point
!
USE kinds, ONLY : DP
USE constants, ONLY : degspin, pi
USE klist, ONLY : xk, lgauss, degauss, ngauss, nks, &
nelec, nelup, neldw, two_fermi_energies, wk
USE ktetra, ONLY : ltetra
USE ener, ONLY : ef, ef_up, ef_dw
USE wvfct, ONLY : nbnd, et
USE control_lr, ONLY : nbnd_occ
USE io_global, ONLY : stdout
USE noncollin_module, ONLY : noncolin
USE lsda_mod, ONLY : lsda, isk
!
IMPLICIT NONE
!
REAL(DP) :: target, small, fac, xmax
! auxiliary variables used
! to set nbnd_occ in the metallic case
INTEGER :: ik, ibnd, ipol
REAL(DP), ALLOCATABLE :: wg_up(:,:), wg_dw(:,:)
!
CALL start_clock ('setup_nbnd_occ')
!
IF (lgauss) THEN
!
! Discard conduction bands such that w0gauss(x,n) < small
!
! hint:
! small = 1.0333492677046d-2 ! corresponds to 2 gaussian sigma
! small = 6.9626525973374d-5 ! corresponds to 3 gaussian sigma
! small = 6.3491173359333d-8 ! corresponds to 4 gaussian sigma
!
small = 6.9626525973374d-5
!
! - appropriate limit for gaussian broadening (used for all ngauss)
!
xmax = sqrt ( - log (sqrt (pi) * small) )
!
! - appropriate limit for Fermi-Dirac
!
IF (ngauss.eq. - 99) THEN
fac = 1.d0 / sqrt (small)
xmax = 2.d0 * log (0.5d0 * (fac + sqrt (fac * fac - 4.d0) ) )
ENDIF
!
target = ef + xmax * degauss
!
DO ik = 1, nks
DO ibnd = 1, nbnd
IF (et(ibnd, ik) .lt.target) nbnd_occ(ik) = ibnd
ENDDO
IF (nbnd_occ(ik) .eq. nbnd) WRITE( stdout, '(5x,/,&
&"Possibly too few bands at point ", i4,3f10.5)') &
ik, (xk (ipol, ik) , ipol = 1, 3)
ENDDO
!
ELSE IF (ltetra) THEN
CALL errore('setup_nbnd_occ','Tetrahedra not implemented', 1)
ELSE
!
IF (noncolin) THEN
nbnd_occ = nint (nelec)
ELSE
IF ( two_fermi_energies ) THEN
!
ALLOCATE(wg_up(nbnd,nks))
ALLOCATE(wg_dw(nbnd,nks))
CALL iweights( nks, wk, nbnd, nelup, et, ef_up, wg_up, 1, isk )
CALL iweights( nks, wk, nbnd, neldw, et, ef_dw, wg_dw, 2, isk )
!
DO ik = 1, nks
DO ibnd=1,nbnd
IF (isk(ik)==1) THEN
IF (wg_up(ibnd,ik) > 0.0_DP) nbnd_occ (ik) = nbnd_occ(ik)+1
ELSE
IF (wg_dw(ibnd,ik) > 0.0_DP) nbnd_occ (ik) = nbnd_occ(ik)+1
ENDIF
ENDDO
ENDDO
!
! the following line to prevent NaN in Ef
!
ef = ( ef_up + ef_dw ) / 2.0_dp
!
DEALLOCATE(wg_up)
DEALLOCATE(wg_dw)
!
ELSE
IF (lsda) CALL infomsg('setup_nbnd_occ', &
'Occupation numbers probably wrong')
DO ik = 1, nks
nbnd_occ (ik) = nint (nelec) / degspin
ENDDO
ENDIF
ENDIF
!
ENDIF
!
CALL stop_clock ('setup_nbnd_occ')
!
RETURN
!
END SUBROUTINE setup_nbnd_occ
......@@ -966,7 +966,6 @@ phq_recover.o : phcom.o
phq_recover.o : ramanm.o
phq_setup.o : ../../LR_Modules/lrcom.o
phq_setup.o : ../../Modules/cell_base.o
phq_setup.o : ../../Modules/constants.o
phq_setup.o : ../../Modules/control_flags.o
phq_setup.o : ../../Modules/fft_base.o
phq_setup.o : ../../Modules/funct.o
......@@ -974,7 +973,6 @@ phq_setup.o : ../../Modules/io_files.o
phq_setup.o : ../../Modules/io_global.o
phq_setup.o : ../../Modules/ions_base.o
phq_setup.o : ../../Modules/kind.o
phq_setup.o : ../../Modules/mp.o
phq_setup.o : ../../Modules/mp_pools.o
phq_setup.o : ../../Modules/noncol.o
phq_setup.o : ../../Modules/recvec.o
......
......@@ -53,13 +53,10 @@ subroutine phq_setup
USE kinds, ONLY : DP
USE ions_base, ONLY : tau, nat, ntyp => nsp, ityp
USE cell_base, ONLY : at, bg
USE io_global, ONLY : stdout, ionode
USE io_global, ONLY : ionode
USE io_files, ONLY : tmp_dir
USE ener, ONLY : ef, ef_up, ef_dw
USE klist, ONLY : xk, lgauss, degauss, ngauss, nks, nelec, nelup, &
neldw, two_fermi_energies, wk, nkstot
USE ktetra, ONLY : ltetra
USE lsda_mod, ONLY : nspin, lsda, starting_magnetization, isk
USE klist, ONLY : xk, nks, nkstot
USE lsda_mod, ONLY : nspin, starting_magnetization
USE scf, ONLY : v, vrs, vltot, kedtau
USE fft_base, ONLY : dfftp
USE gvect, ONLY : ngm
......@@ -69,9 +66,7 @@ subroutine phq_setup
USE uspp_param, ONLY : upf
USE uspp, ONLY : nlcc_any
USE spin_orb, ONLY : domag
USE constants, ONLY : degspin, pi
USE noncollin_module, ONLY : noncolin, m_loc, angle1, angle2, ux
USE wvfct, ONLY : nbnd, et
USE nlcc_ph, ONLY : drc
USE control_ph, ONLY : rec_code, lgamma_gamma, search_sym, start_irr, &
last_irr, niter_ph, alpha_mix, all_done, &
......@@ -94,23 +89,15 @@ subroutine phq_setup
USE ramanm, ONLY : lraman, elop, ramtns, eloptns, done_lraman, &
done_elop
USE mp, ONLY : mp_max, mp_min
USE mp_pools, ONLY : inter_pool_comm, npool
USE mp_pools, ONLY : npool
!
USE acfdtest, ONLY : acfdt_is_active, acfdt_num_der
USE lr_symm_base, ONLY : gi, gimq, irotmq, minus_q, invsymq, nsymq, rtau
USE qpoint, ONLY : xq, xk_col
USE control_lr, ONLY : alpha_pv, nbnd_occ, lgamma
USE lr_symm_base, ONLY : gi, gimq, irotmq, minus_q, invsymq, nsymq, rtau
USE qpoint, ONLY : xq, xk_col
USE control_lr, ONLY : lgamma
implicit none
real(DP) :: target, small, fac, xmax, emin, emax
! auxiliary variables used
! to set nbnd_occ in the metallic case
! minimum band energy
! maximum band energy
real(DP) :: sr_is(3,3,48)
integer :: isym, jsym, irot, ik, ibnd, ipol, &
......@@ -187,108 +174,15 @@ subroutine phq_setup
!
! 4) Computes the inverse of each matrix of the crystal symmetry group
!
call inverse_s ( )
call inverse_s()
!
! 5) Computes the number of occupied bands for each k point
!
if (lgauss) then
!
! discard conduction bands such that w0gauss(x,n) < small
!
! hint:
! small = 1.0333492677046d-2 ! corresponds to 2 gaussian sigma
! small = 6.9626525973374d-5 ! corresponds to 3 gaussian sigma
! small = 6.3491173359333d-8 ! corresponds to 4 gaussian sigma
!
small = 6.9626525973374d-5
!
! - appropriate limit for gaussian broadening (used for all ngauss)
!
xmax = sqrt ( - log (sqrt (pi) * small) )
!
! - appropriate limit for Fermi-Dirac
!
if (ngauss.eq. - 99) then
fac = 1.d0 / sqrt (small)
xmax = 2.d0 * log (0.5d0 * (fac + sqrt (fac * fac - 4.d0) ) )
endif
target = ef + xmax * degauss
do ik = 1, nks
do ibnd = 1, nbnd
if (et (ibnd, ik) .lt.target) nbnd_occ (ik) = ibnd
enddo
if (nbnd_occ (ik) .eq.nbnd) WRITE( stdout, '(5x,/,&
&"Possibly too few bands at point ", i4,3f10.5)') &
ik, (xk (ipol, ik) , ipol = 1, 3)
enddo
else if (ltetra) then
call errore('phq_setup','phonon + tetrahedra not implemented', 1)
else
if (noncolin) then
nbnd_occ = nint (nelec)
else
IF ( two_fermi_energies ) THEN
!
ALLOCATE(wg_up(nbnd,nks))
ALLOCATE(wg_dw(nbnd,nks))
CALL iweights( nks, wk, nbnd, nelup, et, ef_up, wg_up, 1, isk )
CALL iweights( nks, wk, nbnd, neldw, et, ef_dw, wg_dw, 2, isk )
DO ik = 1, nks
DO ibnd=1,nbnd
IF (isk(ik)==1) THEN
IF (wg_up(ibnd,ik) > 0.0_DP) nbnd_occ (ik) = nbnd_occ(ik)+1
ELSE
IF (wg_dw(ibnd,ik) > 0.0_DP) nbnd_occ (ik) = nbnd_occ(ik)+1
ENDIF
ENDDO
ENDDO
!
! the following line to prevent NaN in Ef
!
ef = ( ef_up + ef_dw ) / 2.0_dp
!
DEALLOCATE(wg_up)
DEALLOCATE(wg_dw)
ELSE
if (lsda) call infomsg('phq_setup', &
'occupation numbers probably wrong')
do ik = 1, nks
nbnd_occ (ik) = nint (nelec) / degspin
enddo
ENDIF
endif
endif
call setup_nbnd_occ()
!
! 6) Computes alpha_pv
!
emin = et (1, 1)
do ik = 1, nks
do ibnd = 1, nbnd
emin = min (emin, et (ibnd, ik) )
enddo
enddo
#ifdef __MPI
! find the minimum across pools
call mp_min( emin, inter_pool_comm )
#endif
if (lgauss) then
emax = target
alpha_pv = emax - emin
else
emax = et (1, 1)
do ik = 1, nks
do ibnd = 1, nbnd_occ(ik)
emax = max (emax, et (ibnd, ik) )
enddo
enddo
#ifdef __MPI
! find the maximum across pools
call mp_max( emax, inter_pool_comm )
#endif
alpha_pv = 2.d0 * (emax - emin)
endif
! avoid zero value for alpha_pv
alpha_pv = max (alpha_pv, 1.0d-2)
call setup_alpha_pv()
!
! 7) set all the variables needed to use the pattern representation
!
......
......@@ -15,29 +15,21 @@ SUBROUTINE lr_init_nfo()
! 2) Initialization of ikks, ikqs, and nksq.
! 3) EELS: Calculate phases associated with a q vector.
! 4) Compute the number of occupied bands for each k point.
! 5) Computes alpha_pv (needed in PH/orthogonalize.f90 when lgauss=.true.)
!
! Created by Osman Baris Malcioglu (2009)
! Modified by Iurii Timrov (2013)
! 5) Computes alpha_pv (needed by orthogonalize.f90 when lgauss=.true.)
!
USE kinds, ONLY : DP
USE ions_base, ONLY : nat, tau
USE klist, ONLY : nks,degauss,lgauss,ngauss,xk,wk,ngk,&
igk_k,nelec, two_fermi_energies, nelup, neldw
USE wvfct, ONLY : nbnd, et, igk, npw, g2kin
USE klist, ONLY : nks,xk,ngk,igk_k
USE wvfct, ONLY : nbnd, igk, npw, g2kin
USE realus, ONLY : real_space
USE lr_variables, ONLY : lr_verbosity, eels, nwordd0psi, &
nwordrestart, restart, size_evc, tmp_dir_lr
USE io_global, ONLY : stdout
USE constants, ONLY : pi, tpi, degspin, eps8
USE noncollin_module, ONLY : noncolin, npol
USE mp, ONLY : mp_max, mp_min
USE mp_global, ONLY : inter_pool_comm
USE constants, ONLY : tpi, eps8
USE noncollin_module, ONLY : npol
USE gvect, ONLY : ngm, g
USE cell_base, ONLY : at, bg, omega
USE ener, ONLY : ef, ef_up, ef_dw
USE ktetra, ONLY : ltetra
USE lsda_mod, ONLY : lsda, current_spin, nspin, isk
USE lsda_mod, ONLY : current_spin, nspin
USE wvfct, ONLY : npwx, wg
USE gvecw, ONLY : gcutw
USE io_files, ONLY : iunigk, seqopn, tmp_dir, prefix, &
......@@ -48,9 +40,8 @@ SUBROUTINE lr_init_nfo()
USE uspp, ONLY : vkb, okvan, nkb
USE wavefunctions_module, ONLY : evc
USE becmod, ONLY : calbec, allocate_bec_type
USE lrus, ONLY : becp1
USE control_lr, ONLY : alpha_pv, nbnd_occ
USE control_lr, ONLY : alpha_pv
USE qpoint, ONLY : xq, npwq, igkq, ikks, ikqs, nksq, eigqts
USE eqv, ONLY : evq
!
......@@ -58,9 +49,8 @@ SUBROUTINE lr_init_nfo()
!
! local variables
!
REAL(kind=DP) :: small, emin, emax, xmax, fac, targ, arg
REAL(kind=DP) :: arg
INTEGER :: i, ik, ibnd, ipol, ikk, ikq, ios, isym, na
REAL(DP), ALLOCATABLE :: wg_up(:,:), wg_dw(:,:)
LOGICAL :: exst ! logical variable to check file existence
!
! 1) Optical case: initialize igk_k and ngk
......@@ -182,79 +172,11 @@ SUBROUTINE lr_init_nfo()
!
ENDIF
!
! 4) Compute the number of occupied bands for each k point (PH/phq_setup.f90)
!
!if (.not. allocated (nbnd_occ) allocate( nbnd_occ (nks) )
! 4) Compute the number of occupied bands for each k point
!
IF (lgauss) THEN
!
! discard conduction bands such that w0gauss(x,n) < small
!
! hint
! small = 1.0333492677046d-2 ! corresponds to 2 gaussian sigma
! small = 6.9626525973374d-5 ! corresponds to 3 gaussian sigma
! small = 6.3491173359333d-8 ! corresponds to 4 gaussian sigma
!
small = 6.9626525973374d-5
!
! - appropriate limit for gaussian broadening (used for all ngauss)
!
xmax = sqrt ( - log (sqrt (pi) * small) )
!
! - appropriate limit for Fermi-Dirac
!
IF (ngauss== - 99) THEN
fac = 1.d0 / sqrt (small)
xmax = 2.d0 * log (0.5d0 * (fac + sqrt (fac * fac - 4.d0) ) )
ENDIF
targ = ef + xmax * degauss
DO ik = 1, nks
DO ibnd = 1, nbnd
IF (et (ibnd, ik) <targ) nbnd_occ (ik) = ibnd
ENDDO
IF (nbnd_occ (ik) ==nbnd) WRITE( stdout, '(5x,/,&
&"Possibly too few bands at point ", i4,3f10.5)') &
ik, (xk (ipol, ik) , ipol = 1, 3)
ENDDO
ELSEIF (ltetra) THEN
CALL errore('lr_init_nfo','tddfpt + tetrahedra not implemented', 1)
ELSE
IF (noncolin) THEN
nbnd_occ = nint (nelec)
ELSE
IF ( two_fermi_energies ) THEN
!
ALLOCATE(wg_up(nbnd,nks))
ALLOCATE(wg_dw(nbnd,nks))
CALL iweights( nks, wk, nbnd, nelup, et, ef_up, wg_up, 1, isk )
CALL iweights( nks, wk, nbnd, neldw, et, ef_dw, wg_dw, 2, isk )
DO ik = 1, nks
DO ibnd=1,nbnd
IF (isk(ik)==1) THEN
IF (wg_up(ibnd,ik) > 0.0_DP) nbnd_occ (ik) = nbnd_occ(ik)+1
ELSE
IF (wg_dw(ibnd,ik) > 0.0_DP) nbnd_occ (ik) = nbnd_occ(ik)+1
ENDIF
ENDDO
ENDDO
!
! the following line to prevent NaN in Ef
!
ef = ( ef_up + ef_dw ) / 2.0_dp
!
DEALLOCATE(wg_up)
DEALLOCATE(wg_dw)
ELSE
IF (lsda) call infomsg('lr_init_nfo', &
'occupation numbers probably wrong')
DO ik = 1, nks
nbnd_occ (ik) = nint (nelec) / degspin
ENDDO
ENDIF
ENDIF
ENDIF
CALL setup_nbnd_occ()
!
! 5) Computes alpha_pv
! 5) Compute alpha_pv
!
IF (eels) THEN
!
......@@ -262,38 +184,7 @@ SUBROUTINE lr_init_nfo()
!
ELSE
!
emin = et (1, 1)
DO ik = 1, nks
DO ibnd = 1, nbnd
emin = min (emin, et (ibnd, ik) )
ENDDO
ENDDO
!
#ifdef __MPI
! find the minimum across pools
CALL mp_min( emin, inter_pool_comm )
#endif
!
IF (lgauss) THEN
emax = targ
alpha_pv = emax - emin
ELSE
emax = et (1, 1)
DO ik = 1, nks
DO ibnd = 1, nbnd_occ(ik)
emax = max (emax, et (ibnd, ik) )
ENDDO
ENDDO
!
#ifdef __MPI
! find the maximum across pools
CALL mp_max( emax, inter_pool_comm )
#endif
!
alpha_pv = 2.d0 * (emax - emin)
ENDIF
! avoid zero value for alpha_pv
alpha_pv = max (alpha_pv, 1.0d-2)
CALL setup_alpha_pv()
!
ENDIF
!
......
......@@ -53,7 +53,6 @@ SUBROUTINE lr_readin
USE martyna_tuckerman, ONLY : do_comp_mt
USE esm, ONLY : do_comp_esm
USE qpoint, ONLY : xq
USE save_ph, ONLY : tmp_dir_save
USE xml_io_base, ONLY : create_directory
USE io_rho_xml, ONLY : write_rho
USE noncollin_module, ONLY : noncolin
......@@ -363,7 +362,6 @@ SUBROUTINE lr_readin
! writing of the turboEELS restart files.
!
IF (eels) THEN
tmp_dir_save = tmp_dir
tmp_dir_lr = TRIM (tmp_dir) // 'tmp_eels/'
CALL create_directory(tmp_dir_lr)
ENDIF
......
......@@ -14,14 +14,9 @@ SUBROUTINE lr_run_nscf( )
!
! Created by Iurii Timrov (2013)
!
USE control_flags, ONLY : conv_ions, twfcollect
USE control_flags, ONLY : conv_ions, twfcollect, restart
USE basis, ONLY : starting_wfc, starting_pot, startingconfig
USE io_files, ONLY : prefix, tmp_dir, wfc_dir, seqopn
USE lsda_mod, ONLY : nspin
USE control_flags, ONLY : restart
USE control_ph, ONLY : reduce_io, ext_restart
USE save_ph, ONLY : tmp_dir_save
USE io_global, ONLY : stdout
USE fft_base, ONLY : dffts
USE mp_bands, ONLY : ntask_groups
USE lr_variables, ONLY : tmp_dir_lr
......@@ -64,19 +59,17 @@ SUBROUTINE lr_run_nscf( )
!
CALL non_scf()
!
IF (.not.reduce_io) THEN
!
twfcollect = .FALSE.
CALL punch( 'all' )
!
ENDIF
! Save information for further processing
!
twfcollect = .FALSE.
CALL punch( 'all' )
!
CALL seqopn( 4, 'restart', 'UNFORMATTED', exst )
CLOSE( UNIT = 4, STATUS = 'DELETE' )
!
CALL close_files(.TRUE.)
!
! PWscf has run with task groups if available, but in the TDDFPT (phonon)
! PWscf has run with task groups if available, but in the TDDFPT
! they are used only in some places. In that case it is activated.
!
IF (ntask_groups > 1) dffts%have_task_groups = .FALSE.
......
!
! Copyright (C) 2001-2015 Quantum ESPRESSO group
! Copyright (C) 2001-2016 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......@@ -21,7 +21,6 @@ SUBROUTINE lr_setup_nscf ()
USE kinds, ONLY : DP
USE constants, ONLY : eps8
USE parameters, ONLY : npk
USE io_global, ONLY : stdout
USE constants, ONLY : pi, degspin
USE cell_base, ONLY : at, bg, alat, tpiba, tpiba2, ibrav, omega
USE ions_base, ONLY : nat, tau, ityp, zv
......@@ -40,9 +39,8 @@ SUBROUTINE lr_setup_nscf ()
USE start_k, ONLY : nks_start, xk_start, wk_start, &
nk1, nk2, nk3, k1, k2, k3
USE uspp_param, ONLY : n_atom_wfc
USE lr_symm_base, ONLY : nsymq, minus_q
USE qpoint, ONLY : xq
USE lr_symm_base, ONLY : nsymq, minus_q
USE qpoint, ONLY : xq
!
IMPLICIT NONE
!
......
......@@ -308,8 +308,6 @@ lr_init_nfo.o : ../../Modules/io_files.o
lr_init_nfo.o : ../../Modules/io_global.o
lr_init_nfo.o : ../../Modules/ions_base.o
lr_init_nfo.o : ../../Modules/kind.o
lr_init_nfo.o : ../../Modules/mp.o
lr_init_nfo.o : ../../Modules/mp_global.o
lr_init_nfo.o : ../../Modules/noncol.o
lr_init_nfo.o : ../../Modules/recvec.o
lr_init_nfo.o : ../../Modules/uspp.o
......@@ -426,7 +424,6 @@ lr_readin.o : ../../Modules/plugin_flags.o
lr_readin.o : ../../Modules/recvec.o
lr_readin.o : ../../Modules/uspp.o
lr_readin.o : ../../Modules/xml_io_base.o
lr_readin.o : ../../PHonon/PH/save_ph_input.o
lr_readin.o : ../../PW/src/esm.o
lr_readin.o : ../../PW/src/exx.o
lr_readin.o : ../../PW/src/io_rho_xml.o
......@@ -460,12 +457,8 @@ lr_restart.o : lr_variables.o
lr_run_nscf.o : ../../Modules/control_flags.o
lr_run_nscf.o : ../../Modules/fft_base.o
lr_run_nscf.o : ../../Modules/io_files.o
lr_run_nscf.o : ../../Modules/io_global.o