[CP2K:6327] Re: FFTW "Wisdom" support removed?

Iain Bethune ibet... at epcc.ed.ac.uk
Mon Mar 30 13:29:40 UTC 2015

Hi Martin,

The FFT size depends directly on the number of points on the planewave grids for Quickstep calculations.  It will also be used for ewald summation in classical or QM/MM simulations, and for various other things. For QS, if you turn the print level up from the default of MEDIUM, you will see a section which shows exactly which grid configurations are used.  Typically there are 4 grid levels, the finest is maybe 125 - 300 grid points across, and the coarsest could be as little as ~10-20.  This depends on a number of factors, including the size of the simulation box, the accuracy of gaussian-grid mapping (see http://www.cp2k.org/howto:converging_cutoff for discussion of the control of this, and the MGRID section of the input: http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/MGRID.html), the sharpness or smoothness of basis functions in your system.  Once the grid sizes are chosen (say x1*y1*z1 .. x4*y4*z4) then the FFTs can be planned.

For a parallel 3D FFT each dimension is done independently, with a parallel transpose of the data between successive 1D FFTs.  Since the length of the 1D FFT depends only on the grid size, not the decomposition (this only affects how many 1D FFTs are performed per process), then the wisdom file should be portable between calculations on the same grid size.

>From my understanding of FFTW, wisdom is accumulated i.e. start with no wisdom, run a calculation (saving wisdom to a file), then run another calculation with different grid (read old wisdom, save wisdom to file), after the second run the wisdom file contains wisdom for the transform lengths used by both calculations.  So you should probably just set FFTW_WISDOM_FILE_NAME to some file in e.g. your home directory, and over time you will build up wisdom for a wide range of relevant transform lengths.

As I said before, this feature is not often used (since most people will run as non-root!), so please do feed back if you think it’s not working as described.


- Iain


Iain Bethune
Project Manager, EPCC

Email: ibet... at epcc.ed.ac.uk
Twitter: @IainBethune
Web: http://www2.epcc.ed.ac.uk/~ibethune
Tel/Fax: +44 (0)131 650 5201/6555
Mob: +44 (0)7598317015
Addr: 2404 JCMB, The King's Buildings, Peter Guthrie Tait Road, Edinburgh, EH9 3FD

> On 30 Mar 2015, at 14:04, M. Brehm <brehmin... at googlemail.com> wrote:
> Hi,
> thank you, this sounds very useful and interesting. I did not even know about this feature. I was running CP2k many times as root, so it always wrote this wisdom file, and I never noticed it :-) I will try this out.
> Can you tell me on which factors it depends which sizes of FFTs CP2k performs? I assume there are many such factors (basis set, atom count, and even number of MPI processes...). So this Wisdom file which is written for a certain run will then only be useful for the exactly same calculation of the same system, right?
> Best regards,
> Martin
> -- 
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com.
> To post to this group, send email to cp... at googlegroups.com.
> Visit this group at http://groups.google.com/group/cp2k.
> For more options, visit https://groups.google.com/d/optout.

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

More information about the CP2K-user mailing list