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/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.

P3DFFT++ is the next generation of P3DFFT (versions starting with 3.0). It extends 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. It is written in C++ with C and Fortran interfaces, and currently uses MPI. The library can be found at P3DFFT++ github space. P3DFFT++ will be developed and new features will be added. Contributions are welcome.

The following table compares P3DFFT family 2.x and 3.x (P3DFFT++).

Feature P3DFFT 2.x P3DFFT++
real-to-complex and complex-to-real FFT Yes Yes
complex FFT No Yes
sine and cosine transforms In 1 dimension Yes
Chebyshev transform In 1 dimension Yes
pruned transforms Yes No
In-place and out-of-place Yes Yes
Multiple grids No Yes
Hybrid MPI/OpenMP Yes No

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. 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.

This project was supported by National Science Foundation grant ACI-1339884.