Skip to content

Commit

Permalink
Merge branch 'topic/default/prepare_rc1' into 'branch/default'
Browse files Browse the repository at this point in the history
Prepare 0.4.0rc1

See merge request fluiddyn/fluidfft!57
  • Loading branch information
paugier committed Feb 10, 2024
2 parents 1ba3899 + 68f3f06 commit 3c1a96e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ def get_seq_indices_first_X(self):


if __name__ == "__main__":
# mpirun -np 2 python -m fluidfft.fft3d.mpi_with_mpi4pyfft

offt = FFTclass(6, 14, 4)
offt.print_summary_for_debug()
offt.run_tests()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class FFT3DMPIWithMPI4PYFFTSlab(FFT3DMPIWithMPI4PYFFT):
FFTclass = FFT3DMPIWithMPI4PYFFTSlab

if __name__ == "__main__":
# mpirun -np 2 python -m fluidfft.fft3d.mpi_with_mpi4pyfft_slab

offt = FFTclass(6, 14, 4)
offt.print_summary_for_debug()
offt.run_tests()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = 'mesonpy'

[project]
name = "fluidfft"
version = "0.4.0rc0"
version = "0.4.0rc1"
description = "Efficient and easy Fast Fourier Transform (FFT) for Python."
authors = [
{name = "Pierre Augier", email = "[email protected]"},
Expand Down
20 changes: 11 additions & 9 deletions src/fluidfft/fft2d/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from fluiddyn.util import mpi
from fluiddyn.util.compat import cached_property

from fluidfft import create_fft_object
from fluidfft import create_fft_object, import_fft_class
from fluidfft.base import OperatorsBase


Expand All @@ -44,23 +44,25 @@ def _make_str_length(length):


def get_simple_2d_seq_method():
"""Get a simple 2d sequential method"""
try:
import pyfftw

fft = "fft2d.with_pyfftw"
except ImportError:
fft = "fft2d.with_fftw2d"
return fft
return "fft2d.with_fftw2d"
else:
del pyfftw
return "fft2d.with_pyfftw"


def get_simple_2d_mpi_method():
"""Get a simple 2d parallel method"""
method = "fft2d.mpi_with_fftwmpi2d"
try:
import fluidfft.fft2d.mpi_with_fftwmpi2d

fft = "fft2d.mpi_with_fftwmpi2d"
import_fft_class(method)
except ImportError:
fft = "fft2d.mpi_with_fftw1d"
return fft
method = "fft2d.mpi_with_fftw1d"
return method


@boost
Expand Down
20 changes: 11 additions & 9 deletions src/fluidfft/fft3d/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from transonic import boost, Array, Type
from fluiddyn.util import mpi

from fluidfft import create_fft_object
from fluidfft import create_fft_object, import_fft_class
from fluidfft.base import OperatorsBase
from fluidfft.fft2d.operators import _make_str_length

Expand Down Expand Up @@ -105,23 +105,25 @@ def loop_spectra_kzkh(


def get_simple_3d_seq_method():
"""Get a simple 3d sequential method"""
try:
import pyfftw

fft = "fft3d.with_pyfftw"
except ImportError:
fft = "fft3d.with_fftw3d"
return fft
return "fft3d.with_fftw3d"
else:
del pyfftw
return "fft3d.with_pyfftw"


def get_simple_3d_mpi_method():
"""Get a simple 3d parallel method"""
method = "fft3d.mpi_with_fftwmpi3d"
try:
import fluidfft.fft3d.mpi_with_fftwmpi3d

fft = "fft3d.mpi_with_fftwmpi3d"
import_fft_class(method)
except ImportError:
fft = "fft3d.mpi_with_fftw1d"
return fft
method = "fft3d.mpi_with_fftw1d"
return method


@boost
Expand Down

0 comments on commit 3c1a96e

Please sign in to comment.