Expand description
§OxiFFT MPI Adapter
oxifft-adapter-mpi is a Pure-Rust-v2 §5 quarantine crate. It isolates the
C MPI FFI (the mpi → mpi-sys / libffi-sys / clang-sys dependency chain)
out of the core oxifft facade so that oxifft’s --all-features dependency
closure stays 100% Pure Rust. All distributed-FFT functionality that needs to
link against a system MPI library lives here instead of in oxifft.
This crate provides distributed FFT computation using MPI, similar to FFTW-MPI. It enables computing large-scale FFTs across multiple processes.
§Features
- 2D, 3D, and N-D distributed FFTs
- Slab decomposition (row-major distribution)
- Pencil decomposition (2D process grid) for 3D transforms
- Efficient all-to-all transpose operations
- Compatible with FFTW-MPI data layouts
§Example
ⓘ
use oxifft_adapter_mpi::{MpiPool, MpiPlan2D, MpiFlags};
use mpi::topology::Communicator;
// Initialize MPI
let universe = mpi::initialize().unwrap();
let world = universe.world();
// Create MPI pool
let pool = MpiPool::new(world.duplicate());
// Get local allocation size
let (local_n0, local_0_start, alloc_local) = local_size_2d(n0, n1, &pool);
// Create plan
let plan = MpiPlan2D::new(n0, n1, Direction::Forward, MpiFlags::default(), &pool)?;
// Execute
let mut data = vec![Complex::zero(); alloc_local];
plan.execute_inplace(&mut data);Structs§
- Local
Partition - Describes the local partition of data owned by a process.
- MpiFlags
- MPI-specific planning flags.
- MpiPlan2D
- 2D distributed FFT plan.
- MpiPlan3D
- 3D distributed FFT plan.
- MpiPlanND
- N-dimensional distributed FFT plan.
- MpiPool
- MPI process pool for distributed FFT computation.
- MpiReal
Plan2D - 2D distributed real FFT plan (slab decomposition over the first dimension).
- MpiReal
Plan3D - 3D distributed real FFT plan (slab decomposition over the first dimension).
- Pencil
Grid - 2D process grid configuration for pencil decomposition.
- Pencil
Plan3D - 3D distributed FFT plan using pencil decomposition.
Enums§
- Distribution
- How data is distributed across processes.
- MpiError
- Error type for MPI FFT operations.
Traits§
- MpiFloat
- Trait for float types that can be used with MPI.
Functions§
- distributed_
transpose - Perform a distributed transpose of a 2D array.
- distributed_
transpose_ batched - Perform a batched distributed transpose of a 3D array in a single collective.
- distributed_
transpose_ inplace - Perform in-place distributed transpose.
- local_
size_ 2d - Calculate local size for a 2D distributed FFT.
- local_
size_ 2d_ r2c - Calculate local buffer sizes for a 2D distributed real FFT (r2c / c2r).
- local_
size_ 2d_ transposed - Get local partition info for both normal and transposed layouts.
- local_
size_ 3d - Calculate local size for a 3D distributed FFT.
- local_
size_ 3d_ r2c - Calculate local buffer sizes for a 3D distributed real FFT (r2c / c2r).
- local_
size_ nd - Calculate local size for an N-D distributed FFT.