Python bindings for the dtFFT library — distributed FFT via MPI
Project description
dtfft
Python bindings for dtFFT — a high-performance library for parallel data transpositions and Fast Fourier Transforms via MPI.
This package is distributed as a source distribution (sdist) and is compiled locally during installation. It gives you full control over all build options via CMake flags.
If you need a pre-built wheel (no compiler required), use one of the variant packages:
dtfft-openmpi,dtfft-mpich,dtfft-fftw-openmpi,dtfft-cuda12x-openmpi, etc. See the full list on PyPI or the documentation.
Installation
Building from source requires a Fortran compiler (GCC ≥ 10, Intel, or NVHPC), CMake ≥ 3.25,
and an MPI implementation with development headers.
Build-time Python dependencies (scikit-build, cmake, ninja, pybind11) are installed
automatically by pip.
Important:
mpi4pyin your environment must be compiled against the same MPI implementation that dtFFT will be linked with. Install it from source:pip install --no-binary mpi4py mpi4py
Transpose-only (no FFT backend):
pip install dtfft
With FFTW3:
CMAKE_ARGS="-DDTFFT_WITH_FFTW=ON" pip install dtfft
With cuFFT (CUDA):
Also install
cupymatching your CUDA toolkit version first, e.g.pip install cupy-cuda12x.
CMAKE_ARGS="-DDTFFT_WITH_CUDA=ON -DDTFFT_WITH_CUFFT=ON" pip install dtfft
Any CMake option documented on the
build page
can be passed via CMAKE_ARGS.
Quick start
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)
Documentation
License
GPL v3 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dtfft-3.2.0.tar.gz.
File metadata
- Download URL: dtfft-3.2.0.tar.gz
- Upload date:
- Size: 307.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f3d512095e7c63b191bdc091cbf121f82de4f84ec5ad4ca1c8ea6f6f1b9b17
|
|
| MD5 |
786765cedb47edff0bfc1511bf1cfc20
|
|
| BLAKE2b-256 |
99eda0bd15fa57c64f6c69ff9c0b157379771d7c8dd4b2197181dc54a4ba35d8
|
Provenance
The following attestation bundles were made for dtfft-3.2.0.tar.gz:
Publisher:
build_wheels.yml on ShatrovOA/dtFFT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dtfft-3.2.0.tar.gz -
Subject digest:
a0f3d512095e7c63b191bdc091cbf121f82de4f84ec5ad4ca1c8ea6f6f1b9b17 - Sigstore transparency entry: 1137720356
- Sigstore integration time:
-
Permalink:
ShatrovOA/dtFFT@62032b6be639060fb59e3f3e5195ccaa76073c1c -
Branch / Tag:
refs/tags/v3.2.0 - Owner: https://github.com/ShatrovOA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@62032b6be639060fb59e3f3e5195ccaa76073c1c -
Trigger Event:
push
-
Statement type: