This site provides tools for solution of numerical problems in multiscale phenomena in three dimensions (3D). The most common example of such problem is Fast Fourier Transform (FFT), which is an important algorithm for simulations in a wide range of fields, including studies of turbulence, climatology, astrophysics and material science. Other algorithms of importance include Chebyshev transforms and high-order finite difference compact schemes.

Parallel Three-Dimensional Fast Fourier Transforms, dubbed P3DFFT, as well as its extension P3DFFT++, is a library for large-scale computer simulations on parallel platforms.This project was initiated at San Diego Supercomputer Center (SDSC) at UC San Diego by its main author Dmitry Pekurovsky, Ph.D.

P3DFFT uses 2D, or pencil, decomposition. This overcomes an important limitation to scalability inherent in FFT libraries implementing 1D (or slab) decomposition: the number of processors/tasks used to run this problem in parallel can be as large as N2, where N is the linear problem size. This approach has shown good scalability up to 524,288 cores.

P3DFFT is written in Fortran90 and is optimized for parallel performance. It uses Message Passing Interface (MPI) for interprocessor communication, and starting from v.2.7.5 there is a multithreading option for hybrid MPI/OpenMP implementation. C interface is available, as are detailed documentation and examples in both Fortran and C. A configure script is supplied for ease of installation. This package depends on a serial FFT library such as Fastest Fourier Transform in the West (FFTW) or IBM's ESSL. The library is provided under GPL 3.0 and is available from its github page.

In the forward transform, given an input of an array of 3D real values, an output of 3D complex array of Fourier coefficients is returned. Current features include:

  • real-to-complex/complex-to-real FFT in 3D
  • real-to-complex FFT in 2D followed by sine/cosine/Chebyshev/empty transform, and the reverse for backward transform.
  • pruned transforms (less than full input or output)
  • in-place or out-of-place transforms
  • multi-variable transforms
  • multithreaded version (MPI/OpenMP)

For more information see the User Guide. For installation instructions click here.

New developments

P3DFFT++ is the latest development extending the interface of P3DFFT to allow a wider range of use scenarios. It provides the user with a choice in defining their own data layout formats beyond the predefined 2D pencil blocks. This is a project in progress, with the base software framework already implemented. The library can be found at P3DFFT++ github space. P3DFFT++ is written in C++ and currently uses MPI. The goal is to create a powerful and extensible framework for a variety of common algorithms for multiscale problems in three dimensions, beyond the Fourier Transform.

Contributions and collaborations are welcomed. Please contact Dmitry Pekurovsky with any questions.

Citation information

Please acknowledge/cite use of P3DFFT as follows: D. Pekurovsky, P3DFFT: a framework for parallel computations of Fourier transforms in three dimensions, SIAM Journal on Scientific Computing 2012, Vol. 34, No. 4, pp. C192-C209. This paper can be obtained here.

Version History


2.7.2 - 2.7.6 - Added multithreaded capability (MPI/openMP); additional example programs; bug fixes; C++ support

2.7.1 - Added multi-variable transforms (p3dfft_ftran_r2c_many, p3dfft_btran_c2r_many)

2.6.1 - Added pruned transforms

Added user-defined communicator

2.5.1 - Added cosine/sine/Chebyshev/empty transform in addition to Fourier


3.0 Basic framework for a most general data layout complete. Interfaces and test programs in C, C++ and Fortran.


Be sure to subscribe to the project mailing list where you can discuss topics of interest with other users and developers and get timely news regarding this library. Click on Issues tab above to see the list of outstanding problems or report a new problem or suggestion. You can also reach the main author Dmitry Pekurovsky here.

We are interested to hear your experiences, and suggestions for future releases. Please let us know if you are interested in contributing to future development of the library. The author is also interested in collaborating on computational science projects where 3D FFT and related transforms are applied.

Future work

  • One-sided communication
This project was supported by National Science Foundation grant ACI-1339884.