Skip to content

Commit 3c1a96e

Browse files
committed
Merge branch 'topic/default/prepare_rc1' into 'branch/default'
Prepare 0.4.0rc1 See merge request fluiddyn/fluidfft!57
2 parents 1ba3899 + 68f3f06 commit 3c1a96e

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

plugins/fluidfft-mpi4pyfft/src/fluidfft_mpi4pyfft/mpi_with_mpi4pyfft.py

-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ def get_seq_indices_first_X(self):
137137

138138

139139
if __name__ == "__main__":
140-
# mpirun -np 2 python -m fluidfft.fft3d.mpi_with_mpi4pyfft
141-
142140
offt = FFTclass(6, 14, 4)
143141
offt.print_summary_for_debug()
144142
offt.run_tests()

plugins/fluidfft-mpi4pyfft/src/fluidfft_mpi4pyfft/mpi_with_mpi4pyfft_slab.py

-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class FFT3DMPIWithMPI4PYFFTSlab(FFT3DMPIWithMPI4PYFFT):
3030
FFTclass = FFT3DMPIWithMPI4PYFFTSlab
3131

3232
if __name__ == "__main__":
33-
# mpirun -np 2 python -m fluidfft.fft3d.mpi_with_mpi4pyfft_slab
34-
3533
offt = FFTclass(6, 14, 4)
3634
offt.print_summary_for_debug()
3735
offt.run_tests()

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = 'mesonpy'
55

66
[project]
77
name = "fluidfft"
8-
version = "0.4.0rc0"
8+
version = "0.4.0rc1"
99
description = "Efficient and easy Fast Fourier Transform (FFT) for Python."
1010
authors = [
1111
{name = "Pierre Augier", email = "[email protected]"},

src/fluidfft/fft2d/operators.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from fluiddyn.util import mpi
1818
from fluiddyn.util.compat import cached_property
1919

20-
from fluidfft import create_fft_object
20+
from fluidfft import create_fft_object, import_fft_class
2121
from fluidfft.base import OperatorsBase
2222

2323

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

4545

4646
def get_simple_2d_seq_method():
47+
"""Get a simple 2d sequential method"""
4748
try:
4849
import pyfftw
4950

50-
fft = "fft2d.with_pyfftw"
5151
except ImportError:
52-
fft = "fft2d.with_fftw2d"
53-
return fft
52+
return "fft2d.with_fftw2d"
53+
else:
54+
del pyfftw
55+
return "fft2d.with_pyfftw"
5456

5557

5658
def get_simple_2d_mpi_method():
59+
"""Get a simple 2d parallel method"""
60+
method = "fft2d.mpi_with_fftwmpi2d"
5761
try:
58-
import fluidfft.fft2d.mpi_with_fftwmpi2d
59-
60-
fft = "fft2d.mpi_with_fftwmpi2d"
62+
import_fft_class(method)
6163
except ImportError:
62-
fft = "fft2d.mpi_with_fftw1d"
63-
return fft
64+
method = "fft2d.mpi_with_fftw1d"
65+
return method
6466

6567

6668
@boost

src/fluidfft/fft3d/operators.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from transonic import boost, Array, Type
1515
from fluiddyn.util import mpi
1616

17-
from fluidfft import create_fft_object
17+
from fluidfft import create_fft_object, import_fft_class
1818
from fluidfft.base import OperatorsBase
1919
from fluidfft.fft2d.operators import _make_str_length
2020

@@ -105,23 +105,25 @@ def loop_spectra_kzkh(
105105

106106

107107
def get_simple_3d_seq_method():
108+
"""Get a simple 3d sequential method"""
108109
try:
109110
import pyfftw
110111

111-
fft = "fft3d.with_pyfftw"
112112
except ImportError:
113-
fft = "fft3d.with_fftw3d"
114-
return fft
113+
return "fft3d.with_fftw3d"
114+
else:
115+
del pyfftw
116+
return "fft3d.with_pyfftw"
115117

116118

117119
def get_simple_3d_mpi_method():
120+
"""Get a simple 3d parallel method"""
121+
method = "fft3d.mpi_with_fftwmpi3d"
118122
try:
119-
import fluidfft.fft3d.mpi_with_fftwmpi3d
120-
121-
fft = "fft3d.mpi_with_fftwmpi3d"
123+
import_fft_class(method)
122124
except ImportError:
123-
fft = "fft3d.mpi_with_fftw1d"
124-
return fft
125+
method = "fft3d.mpi_with_fftw1d"
126+
return method
125127

126128

127129
@boost

0 commit comments

Comments
 (0)