This is the home page for the fftMPI library. It performs 3d or 2d Fast Fourier Transforms (FFTs) in parallel where the FFT grid is distributed across processors.

The fftMPI library computes 3d and 2d FFTs in parallel as sets of 1d FFTs (via an external library) in each dimension of the FFT grid, interleaved with MPI communication to move data between processors.

- 3d or 2d FFTs
- complex-to-complex FFTs
- double or single precision
- compute FFTs in place, or output to separate memory
- runs on any number of processors, including 1 proc
- allowed grid size in each dimension = any product of 2,3,5 prime factors
- grid decomposition = arbitrary tiling across MPI tasks
- initial/final decompositions of grid can be different (useful for convolutions)
- auto-tuning option for a few parameters which affect performance
- 1d FFTs computed by an external library: FFTW, MKL, or KISS
- data movement/reordering methods can be used without FFTs
- invoke multiple instances of the library (e.g. with MPI sub-communicators)
- callable from C++ or any language via a C interface (e.g. C, Fortran, Python)
- test programs and interface files included for all 4 of these languages
- CPU only execution, currently no OpenMP or GPU support

The fftMPI library is open-source code, distributed freely under the terms of the modified Berkeley Software Distribution (BSD) License. See this page for more details. It was developed at Sandia National Laboratories, a US Department of Energy facility

The fftMPI library is used in LAMMPS, a parallel molecular dynamics (MD) code, to perform Poisson solves for long-range Coulombic interactions via the particle-particle particle-mesh (PPPM) method. It is also used in SPARTA, a parallel Direct Simulation Monte Carlo (DSMC) code, to perform analyses of turbulent flows.

The fftMPI library replaces the older Parallel FFT Package, which we developed in the late 1990s for LAMMPS. The older package is also available from this download site.

The main author of fftMPI is Steve Plimpton, who can be contacted at sjplimp at sandia.gov. These collaborators have also contributed:

- Axel Kohlmemer (Temple U): support for FFTW3 and KISS libraries
- Phil Blood (PSC): single precision option
- Paul Coffman (IBM): optimized MPI collective option

You can send me an email on any of these topics:

- If you use fftMPI for something interesting, you can let me know.
- If you write a paper using fftMPI, I can post a citation on this page
- If you have ideas for enhancing fftMPI, we can discuss including your improvements in a future release.

Funding to add some features and release fftMPI as a stand-alone library came from DOE's Office of Advanced Scientific Computing Program (OASCR) under the auspices of its Exascale Computing Program (ECP).

Other freely available parallel FFT libraries include:

- SWFFT from Adrian Pope (Argonne National Laboratory)
- PFFT from Michael Pippig (Technische Universitat Chemnitz)
- P3DFFT from Dmitry Pekurovsky (UCSD)
- FFTW (see this doc page) from Matteo Frigo and Steven G. Johnson (MIT)

The release of the SWFFT library, available on GitLab, was also funded by the DOE ECP. SWFFT is a stand-alone version of the FFTs used in HACC, a particle-based cosmology code that models the universe on the largest DOE supercomputers. The HACC project is led by Salman Habib at ANL.

The fftMPI and SWFFT libraries are similar in scope, but also have some algorithmic and feature differences, motivated by their use in different applications (LAMMPS and HACC).

- (10/18) Initial open-source release of fftMPI.