Metadata-Version: 2.4
Name: dtfft-fftw-openmpi
Version: 3.2.0
Summary: Python bindings for the dtFFT library — distributed FFT via MPI
Home-page: https://github.com/ShatrovOA/dtFFT
Author: Oleg Shatrov
Author-email: 
License: GPL-3.0
Project-URL: Documentation, https://dtfft.readthedocs.io/latest/index.html
Project-URL: Source, https://github.com/ShatrovOA/dtFFT
Project-URL: Bug Tracker, https://github.com/ShatrovOA/dtFFT/issues
Keywords: fft,mpi,hpc,parallel,cuda,distributed
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: C++
Classifier: Programming Language :: Fortran
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: mpi4py
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# dtfft-fftw — CPU build with FFTW3 [OpenMPI]

[![License](https://img.shields.io/github/license/ShatrovOA/dtFFT?color=brightgreen)](https://github.com/ShatrovOA/dtFFT/blob/master/LICENSE)
[![Documentation](https://readthedocs.org/projects/dtfft/badge/?version=latest)](https://dtfft.readthedocs.io/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/dtfft-fftw-openmpi)](https://pypi.org/project/dtfft-fftw-openmpi/)
[![Python](https://img.shields.io/pypi/pyversions/dtfft-fftw-openmpi)](https://pypi.org/project/dtfft-fftw-openmpi/)

Python bindings for **[dtFFT](https://github.com/ShatrovOA/dtFFT)** — a high-performance library for parallel data transpositions and Fast Fourier Transforms via MPI.

> This is the **`dtfft-fftw-openmpi`** variant.
> Includes the [FFTW3](https://www.fftw.org/) FFT backend for CPU transforms.

## Included backends

| Backend | Available |
|---|---|
| Transpose (MPI) | ✓ |
| FFTW3 | ✓ |
| cuFFT | — |

## Installation

```bash
pip install dtfft-fftw-openmpi
```

> **Note**: FFTW3 shared libraries must be installed on the system (`libfftw3`).

### Requirements

- MPI runtime (OpenMPI or MPICH)
- Python ≥ 3.9
- FFTW3 (`libfftw3-dev` on Debian/Ubuntu, `fftw` via Homebrew)

## Quick start

```python
import numpy as np
from mpi4py import MPI
import dtfft

# Create a 3-D complex-to-complex plan
plan = dtfft.PlanC2C([256, 256, 256], comm=MPI.COMM_WORLD)

# Allocate MPI-decomposed buffers
x = plan.get_ndarray(plan.alloc_size)
y = plan.get_ndarray(plan.alloc_size)

x[...] = np.random.random(x.shape) + 1j * np.random.random(x.shape)

# Forward transform  (pencil decomposition applied automatically)
plan.execute(x, y, dtfft.Execute.FORWARD)

# Backward transform
plan.execute(y, x, dtfft.Execute.BACKWARD)
```

## Package variants

Multiple PyPI distributions are provided so you can declare an exact,
conflict-free dependency for your environment:

| PyPI package | FFT backend | MPI | Platform | Extra deps |
|---|---|---|---|---|
| `dtfft-openmpi` | none (transpose-only) | OpenMPI | CPU | — |
| `dtfft-mpich` | none (transpose-only) | MPICH | CPU | — |
| `dtfft-fftw-openmpi` | FFTW3 | OpenMPI | CPU | system libfftw3 |
| `dtfft-fftw-mpich` | FFTW3 | MPICH | CPU | system libfftw3 |
| `dtfft-cuda12x-openmpi` | cuFFT | OpenMPI | CPU + NVIDIA GPU (CUDA 12) | `cupy-cuda12x` |
| `dtfft-cuda12x-mpich` | cuFFT | MPICH | CPU + NVIDIA GPU (CUDA 12) | `cupy-cuda12x` |

All packages share the same importable namespace: `import dtfft`.

## Documentation

- [API reference](https://dtfft.readthedocs.io/latest/api_python.html)
- [Building from source](https://dtfft.readthedocs.io/latest/build.html)
- [Examples](https://github.com/ShatrovOA/dtFFT/tree/master/tests/python)

## License

GPL v3 — see [LICENSE](https://github.com/ShatrovOA/dtFFT/blob/master/LICENSE).
