[Pw_forum] Distribution of wavefunctions
Paolo Giannozzi
p.giannozzi at gmail.com
Sun Jan 8 10:46:56 CET 2017
On Sun, Jan 8, 2017 at 3:43 AM, jqli14 at fudan.edu.cn <jqli14 at fudan.edu.cn>
wrote:
When the number of points of of FFT mesh is divisible by CPU cores ,
> every CPU store the equal number of wavefunctions
>
no: every CPU stores an equal number of grid points for all wavefunctions,
at least with the default parallelization
> If not divisible, there would be many zero values in the variable *psic*
> after *call **invfft ('Wave', psic, dffts)* in subroutine *sum_band*,
> i.e., wavefunctions in real space.
>
So if I calculate something like <i|j>, I just evaluate it as sum(
> psi_i*psj ) /(nr1*nr2*nr3) but not sum( psi_i*psj ) /(nr1x*nr2x*nr3x),
> where nr1, nr2, nr3 shown as " Dense grid: XXXX
> G-vectors FFT dimensions: (nr1, nr2, nr3)" in standard output of QE.
>
you are mixing up two different aspects. The dimensions of arrays:
nr1x,nr2x,nr3x, may exceed the dimensions of FFT transforms: nr1,nr2,nr3,
for some values of the latter. Typically, it is convenient to set nr1x
=nr1+1 if nr1 is a power of 2, for obscure reasons related to how the
memory is organized and accessed. This holds for either serial or parallel
execution. In parallel execution, the size of the "slices" of the
real-space FFT grid may be different on different processors, but this is
taken into account by the code. In all cases, the correct volume element
for integration is Omega/(nr1*nr2*nr3), not Omega/(nr1x*nr2x*nr3x), so
<\psi_i|\psi_j> = \sum_k\psi^*_i(k)\psi_j(k) / (nr1*nr2*nr3) (in parallel:
summed over processors) where k runs over FFT grid points (in parallel:
over the local FFT grid)
Paolo
Paolo
Best regards!
Jiqiang Li
Fudan University
------------------------------
_______________________________________________
Pw_forum mailing list
Pw_forum at pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum
--
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20170108/cd761aa4/attachment.html>
More information about the users
mailing list