[Pw_forum] difference between nr1 and nrx1

Paolo Giannozzi giannozz at nest.sns.it
Thu May 1 17:40:58 CEST 2008


On May 1, 2008, at 16:14 , Timo Thonhauser wrote:

> As I understand it, the nrx? are only constructs to make the
> fft easier on certain machines, but there are no extra real
> space density grid points associated with them. If we use only
> one processor then nr1*nr2*nr3 = nrxx and the charge density is
> defined as rho(1:nrxx). But if nr? is different from nrx? then
> nrx1*nrx2*nrx3 IS NOT nrxx, but yet the charge density still
> only has rho(1:nrxx) values, right?

some time ago I answered "wrong" to some question on this
mailing list, and Nicola - who knows English way better than
me - told me that it gave a bad impression. So I am not
going to do it again, but I should :-)

On one processor, nrx1, nrx2, nrx3 are the physical dimensions
of rho (and of all FFT arrays in real space). rho contains
nrxx=nrx1*nrx2*nrx3 elements, but only rho(i,j,k) with
i=1,...,nr1, j =1,..,nr2, k=1,...,nr3, correspond to "true" elements.
The remaining ones have to be set to zero. Note that
(i,j,k) => 1+(i-1)+(j-1)*nrx1+(k-1)*nrx1*nrx2 in fortran.

Complicated? yes, and a frequent source of nasty errors.
Unfortunately memory conflicts on some architectures are
so serious that without this trick execution times for FFTs
may double or triple.

Paolo
---
Paolo Giannozzi, Dept of Physics, University of Udine
via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222






More information about the users mailing list