A modern Fast Fourier Transform library inspired by FFTE subroutines, written in modern Fortran.
Requirement: Fortran 2003 compiler. Also, C99 compiler, if Spiral kernels are used. Also, OpenMP. Tested with GCC (Gfortran), NVIDIA HPC SDK (nvfortran), Flang, and Intel compilers.
To build:
cd src
make
make install PREFIX=/your/installation/folder
Edit the Makefile if necessary for your system setup.
To build with Spiral:
make WITHSPRL=1
To use compilers other than gfortran, for example Intel's Fortran compiler:
make FC=ifx
CMake build is also available:
cd src
mkdir build
cmake ../
make install
make WITHSPRL=1 WITHRVV=1
| function | Description / Functionality |
|---|---|
zfft1d(a, n, juffte_x) |
1-D complex-to-complex FFT |
zfft1d_out(a, n, juffte_x, a_out) |
1-D complex-to-complex FFT |
zfft2d(a, nx, ny, juffte_x) |
2-D complex-to-complex FFT |
zfft3d(a, nx, ny, nz, juffte_x) |
3-D complex-to-complex FFT |
dzfft1d(a, a_c, n, juffte_x) |
1-D real-to-complex FFT |
zdfft1d(a_c, a, n, juffte_x) |
1-D complex-to-real FFT |
dzfft2d(a, a_c, nx, ny, juffte_x) |
2-D real-to-complex FFT |
zdfft2d(a_c, a, nx, ny, juffte_x) |
2-D complex-to-real FFT |
dzfft3d(a, a_c, nx, ny, nz, juffte_x) |
3-D real-to-complex FFT |
zdfft3d(a_c, a, nx, ny, nz, juffte_x) |
3-D complex-to-real FFT |
juffte_xcan bejuffte_initfor initialization,juffte_fwfor forward FFT, orjuffte_bwfor backward._outdenotes the out-of-place transformation (output goes last).- Real-to-complex FFTs produce output in half-complex format with size
(n/2 + 1)in the first dimension. - The API supports both single-precision (FP32) and double-precision (FP64) floating-point types for Fortran.
| function | Description / Functionality |
|---|---|
fft_init(a) |
Initialize 1-D complex FFT plan |
fft_execute(a, juffte_x) |
Execute 1-D complex FFT |
| function | Description |
|---|---|
fftw_malloc(size) |
Allocate aligned memory |
fftw_plan_dft_1d(n, in, out, sign, flags) |
Create 1-D FFT plan |
fftw_execute_dft(plan) |
Execute FFT (C/C++ API) |
fftw_execute_dft(plan, in, out) |
Execute FFT (Fortran API) |
fftw_free(ptr) |
Free aligned memory |
See the example files fftw-test.c and fftw-test.F90 in the test folders.
The library uses OpenMP for parallelization. Ensure your compiler has OpenMP support enabled:
gfortran -fopenmp your_code.f90 -ljuffte
To use juFFTe, link the library with -ljuffte. For the Spiral version, use -ljufftesp instead. When using from C/C++, include Fortran runtime libraries, e.g., for GCC:
gcc your_code.c -ljuffte -lm -lgfortran
Contributions to juFFTe are welcome. Please see CONTRIBUTING.md for contribution instructions, maintainer information, and the definition of juFFTe developers.
juFFTe is licensed under the Apache License, Version 2.0. See LICENSES/Apache-2.0.txt for the full license text.
The project uses REUSE/SPDX metadata for license and copyright information.