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.
Cheers
- Iain
—