Hi, I've recently picked up the Quantum Espresso 4.1 code, and am interested in the parallel 3D FFT - I wanted to try to isolate just the FFT part of the PW code, but I noticed something odd that when I do a forward FFT (G->R) then an inverse FFT (R->G) some of the numbers on the grid are not the same e.g. the following code (hacked into PW/cft3s.f90 at the moment):
f1 = f CALL tg_cft3s( f, dffts, sign ) CALL tg_cft3s( f, dffts, -sign ) diff = ABS(f1 - f) write(*,*) COUNT(diff .LT. 1e-17) write(*,*) COUNT(diff .LT. 1e-16) write(*,*) COUNT(diff .LT. 1e-15) Gives 13788 14191 14191 (There are 16200 grid points on this processor - the total grid is 90x90x90 on 64 processes, so 1 or 2 planes per processor). So it looks like while most of the grid is giving the right answer i.e. a FFT followed by an inverse FFT gives this initial data (within double precision rounding errors), there are some elements (nearly 2000) for this grid, that are not correct. Any idea what might be causing this? Cheers - Iain -- Iain Bethune Applications Consultant, EPCC Email: ibethune at epcc.ed.ac.uk Tel/Fax: +44 (0)131 650 5201/6555 Mob: +44 (0)7598317015 Addr: 2404 JCMB, King's Buildings, Mayfield Road, Edinburgh, EH9 3JZ The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
