# [Pw_forum] Grid differences between machines - why?

Paolo Giannozzi giannozz at nest.sns.it
Fri Mar 12 09:43:43 CET 2004

```On Friday 12 March 2004 02:51, Konstantin Kudin wrote:

> On the IBM SP box I get:
>      G cutoff = 1309.2944  (  99231 G-vectors)     FFT
> grid: ( 80, 80, 80)
>      G cutoff = 1047.4356  (  71005 G-vectors)  smooth
> grid: ( 66, 66, 66)
>
> On the Intel:
>      G cutoff = 1309.2944  (  99231 G-vectors)     FFT
> grid: ( 75, 75, 75)
>      G cutoff = 1047.4356  (  71005 G-vectors)  smooth
> grid: ( 72, 72, 72)

Guido and Stefano have already answered with the theory,
here is the math:

ESSL doesn't like 75=3*5*5 because it is odd (FFTW likes it),
so we try 76=2*2*19 (19 is not allowed), 77 is odd, 78=2*3*13
(13 is not allowed), 79 is odd, until 80=2*2*2*2*5 (good)

FFTW doesn't like 66=2*3*11 (11 is not allowed; it is with
ESSL), 67, 68=2*2*17, 69=3*23, 70=2*5*7 (7 is not allowed),
71, so we reach 72=2*2*2*3*3 (good). (Actually I am not sure
whether transforms with dimension > 5 are not allowed in
FFTW, not efficiently implemented, or discarded because
this is the tradition...)

FFT grids calculated by the code are slightly overestimated,
so you may try - carefully - to reduce them a little bit (i.e. 64
for the smooth grid in the above example). If the grid is too
small, the code will complain.

By the way: in parallel execution, it is convenient to have fft
grids along z that are a multiple of the number of processors,
so consider this as an additional constraint.

Paolo
--
Paolo Giannozzi             e-mail:  giannozz at nest.sns.it
Scuola Normale Superiore    Phone:   +39/050-509876, Fax:-563513
Piazza dei Cavalieri 7      I-56126 Pisa, Italy

```