From c93c5ea868c72feefcef546068428306fcd17bbb Mon Sep 17 00:00:00 2001 From: giannozz Date: Thu, 18 Nov 2004 10:01:58 +0000 Subject: [PATCH] Reduction in memory requirements for phonon calculation with uspp (routine dvanqq) - courtesy of N. Mounet git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1454 c92efa57-630b-4861-b058-cf58834340f0 --- Doc/CREDITS | 10 +++++----- Doc/ChangeLog | 12 ++++++++++++ Doc/manual.tex | 3 +++ PH/dvanqq.f90 | 45 +++++++++++++++++++++++++-------------------- PH/phq_setup.f90 | 2 +- 5 files changed, 46 insertions(+), 26 deletions(-) diff --git a/Doc/CREDITS b/Doc/CREDITS index d00c496eb..1552a6e12 100644 --- a/Doc/CREDITS +++ b/Doc/CREDITS @@ -47,11 +47,11 @@ A list of further contributors includes: Dario Alfe', Francesco Antoniella, Mauro Boero, Claudia Bungaro, Paolo Cazzato, Gabriele Cipriani, Matteo Cococcioni, Alberto Debernardi, Gernot Deinzer, Oswaldo Dieguez, Guido Fratesi, -Ralph Gebauer, Yosuke Kanai, Axel Kohlmeyer, Konstantin Kudin, -Michele Lazzeri, Kurt Maeder, Francesco Mauri, Pasquale Pavone, -Mickael Profeta, Guido Roma, Manu Sharma, Alexander Smogunov, -Kurt Stokbro, Antonio Tilocca, Renata Wentzcovitch, Yudong Wu, -Xiaofei Wang, +Ralph Gebauer, Martin Hilgeman, Yosuke Kanai, Axel Kohlmeyer, +Konstantin Kudin, Michele Lazzeri, Kurt Maeder, Francesco Mauri, +Nicolas Mounet, Pasquale Pavone, Mickael Profeta, Guido Roma, +Manu Sharma, Alexander Smogunov, Kurt Stokbro, Pascal Thibaudeau, +Antonio Tilocca, Renata Wentzcovitch, Yudong Wu, Xiaofei Wang, and let us apologize to everybody we have forgotten. All the material included in this distribution is free software; diff --git a/Doc/ChangeLog b/Doc/ChangeLog index 3a436810f..333039bf4 100644 --- a/Doc/ChangeLog +++ b/Doc/ChangeLog @@ -1,7 +1,19 @@ +18 Nov 2004 Reduction in memory requirements for phonon calculation + with uspp (routine dvanqq) - courtesy of N. Mounet + +17 Nov 2004 Cleanup and merge of spherical bessel function routines (C.S.) + added script to compute dependencies of a subroutine [Gerardo] + +16 Nov 2004 Some non-declared variables explicitly declared (C.S.) + 15 Nov 2004 punch_plot can now write the charge density, the total potential and V_bare+V_H also in the noncollinear case. (ADC) Small update of the documentation in example02. (ADC) +14 Nov 2004 - more FPMD/CP merging + - new module for merged FPMD/CP restart subroutines + - starting work on XML restart/punchx (cp_restart.f90) + 5 Nov 2004 Fixed a bug in the way tetrahedra variables were read/written on the restart file: since tetra is not alway allocated, the read_restart_tetra() and write_restart_tetra() can be called diff --git a/Doc/manual.tex b/Doc/manual.tex index c105839b3..2446db0ee 100644 --- a/Doc/manual.tex +++ b/Doc/manual.tex @@ -190,18 +190,21 @@ Gernot Deinzer. Oswaldo Dieguez, Guido Fratesi, Ralph Gebauer, +Martin Hilgeman, Yosuke Kanai, Axel Kohlmeyer, Konstantin Kudin, Michele Lazzeri, Kurt Maeder, Francesco Mauri, +Nicolas Mounet, Pasquale Pavone, Mickael Profeta, Guido Roma, Manu Sharma, Alexander Smogunov, Kurt Stokbro, +Pascal Thibaudeau, Antonio Tilocca, Renata Wentzcovitch, Yudong Wu, diff --git a/PH/dvanqq.f90 b/PH/dvanqq.f90 index efa9d3f36..e6ab535ae 100644 --- a/PH/dvanqq.f90 +++ b/PH/dvanqq.f90 @@ -39,8 +39,8 @@ subroutine dvanqq ! the spherical harmonics complex(kind=DP) :: fact, fact1, ZDOTC - complex(kind=DP), allocatable :: sk (:), aux1 (:), aux2 (:),& - aux3 (:), aux5 (:,:,:), veff (:,:) + complex(kind=DP), allocatable :: aux1 (:), aux2 (:),& + aux3 (:), aux5 (:), veff (:,:) ! work space complex(kind=DP), allocatable, target :: qgm(:) ! the augmentation function at G @@ -56,11 +56,10 @@ subroutine dvanqq int2(:,:,:,:,:) = (0.d0, 0.d0) int4(:,:,:,:,:) = (0.d0, 0.d0) int5(:,:,:,:,:) = (0.d0, 0.d0) - allocate (sk ( ngm)) allocate (aux1( ngm)) allocate (aux2( ngm)) allocate (aux3( ngm)) - allocate (aux5( ngm ,nat, 3 )) + allocate (aux5( ngm)) allocate (qmodg( ngm)) allocate (veff ( nrxx , nspin)) allocate (ylmk0( ngm , lmaxq * lmaxq)) @@ -101,19 +100,19 @@ subroutine dvanqq ! We compute here four of the five integrals needed in the phonon ! fact1 = DCMPLX (0.d0, - tpiba * omega) - do na = 1, nat - nta = ityp (na) - do ig = 1, ngm - sk (ig) = vlocq (ig, nta) * eigts1 (ig1 (ig), na) & - * eigts2 (ig2 (ig), na) & - * eigts3 (ig3 (ig), na) - enddo - do ipol = 1, 3 - do ig = 1, ngm - aux5 (ig, na, ipol) = sk (ig) * (g (ipol, ig) + xq (ipol) ) - enddo - enddo - enddo + !do na = 1, nat + ! nta = ityp (na) + ! do ig = 1, ngm + ! sk (ig) = vlocq (ig, nta) * eigts1 (ig1 (ig), na) & + ! * eigts2 (ig2 (ig), na) & + ! * eigts3 (ig3 (ig), na) + ! enddo + ! do ipol = 1, 3 + ! do ig = 1, ngm + ! aux5 (ig, na, ipol) = sk (ig) * (g (ipol, ig) + xq (ipol) ) + ! enddo + ! enddo + !enddo do ntb = 1, ntyp if (tvanp (ntb) ) then ijh = 0 @@ -143,13 +142,20 @@ subroutine dvanqq ! ! nb is the atom of the augmentation function ! + nta = ityp (na) do ipol = 1, 3 + do ig=1, ngm + aux5(ig)=vlocq(ig,nta)*eigts1(ig1 (ig),na) & + * eigts2 (ig2 (ig), na) & + * eigts3 (ig3 (ig), na) & + * (g (ipol, ig) + xq (ipol) ) + enddo int2 (ih, jh, ipol, na, nb) = fact * fact1 * & - ZDOTC (ngm, aux1, 1, aux5(1,na,ipol), 1) + ZDOTC (ngm, aux1, 1, aux5, 1) do jpol = 1, 3 if (jpol >= ipol) then do ig = 1, ngm - aux3 (ig) = aux5 (ig, na, ipol) * & + aux3 (ig) = aux5 (ig) * & (g (jpol, ig) + xq (jpol) ) enddo int5 (ijh, ipol, jpol, na, nb) = & @@ -243,7 +249,6 @@ subroutine dvanqq deallocate (aux3) deallocate (aux2) deallocate (aux1) - deallocate (sk) call stop_clock ('dvanqq') return diff --git a/PH/phq_setup.f90 b/PH/phq_setup.f90 index 789f49b85..279f3894b 100644 --- a/PH/phq_setup.f90 +++ b/PH/phq_setup.f90 @@ -138,7 +138,7 @@ subroutine phq_setup enddo enddo ! - ! 5) Computes the number of occupated bands for each k point + ! 5) Computes the number of occupied bands for each k point ! if (degauss.ne.0.d0) then !