File tree 5 files changed +23
-23
lines changed
plugins/fluidfft-mpi4pyfft/src/fluidfft_mpi4pyfft
5 files changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,6 @@ def get_seq_indices_first_X(self):
137
137
138
138
139
139
if __name__ == "__main__" :
140
- # mpirun -np 2 python -m fluidfft.fft3d.mpi_with_mpi4pyfft
141
-
142
140
offt = FFTclass (6 , 14 , 4 )
143
141
offt .print_summary_for_debug ()
144
142
offt .run_tests ()
Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ class FFT3DMPIWithMPI4PYFFTSlab(FFT3DMPIWithMPI4PYFFT):
30
30
FFTclass = FFT3DMPIWithMPI4PYFFTSlab
31
31
32
32
if __name__ == "__main__" :
33
- # mpirun -np 2 python -m fluidfft.fft3d.mpi_with_mpi4pyfft_slab
34
-
35
33
offt = FFTclass (6 , 14 , 4 )
36
34
offt .print_summary_for_debug ()
37
35
offt .run_tests ()
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ build-backend = 'mesonpy'
5
5
6
6
[project ]
7
7
name = " fluidfft"
8
- version = " 0.4.0rc0 "
8
+ version = " 0.4.0rc1 "
9
9
description = " Efficient and easy Fast Fourier Transform (FFT) for Python."
10
10
authors = [
11
11
{
name =
" Pierre Augier" ,
email =
" [email protected] " },
Original file line number Diff line number Diff line change 17
17
from fluiddyn .util import mpi
18
18
from fluiddyn .util .compat import cached_property
19
19
20
- from fluidfft import create_fft_object
20
+ from fluidfft import create_fft_object , import_fft_class
21
21
from fluidfft .base import OperatorsBase
22
22
23
23
@@ -44,23 +44,25 @@ def _make_str_length(length):
44
44
45
45
46
46
def get_simple_2d_seq_method ():
47
+ """Get a simple 2d sequential method"""
47
48
try :
48
49
import pyfftw
49
50
50
- fft = "fft2d.with_pyfftw"
51
51
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"
54
56
55
57
56
58
def get_simple_2d_mpi_method ():
59
+ """Get a simple 2d parallel method"""
60
+ method = "fft2d.mpi_with_fftwmpi2d"
57
61
try :
58
- import fluidfft .fft2d .mpi_with_fftwmpi2d
59
-
60
- fft = "fft2d.mpi_with_fftwmpi2d"
62
+ import_fft_class (method )
61
63
except ImportError :
62
- fft = "fft2d.mpi_with_fftw1d"
63
- return fft
64
+ method = "fft2d.mpi_with_fftw1d"
65
+ return method
64
66
65
67
66
68
@boost
Original file line number Diff line number Diff line change 14
14
from transonic import boost , Array , Type
15
15
from fluiddyn .util import mpi
16
16
17
- from fluidfft import create_fft_object
17
+ from fluidfft import create_fft_object , import_fft_class
18
18
from fluidfft .base import OperatorsBase
19
19
from fluidfft .fft2d .operators import _make_str_length
20
20
@@ -105,23 +105,25 @@ def loop_spectra_kzkh(
105
105
106
106
107
107
def get_simple_3d_seq_method ():
108
+ """Get a simple 3d sequential method"""
108
109
try :
109
110
import pyfftw
110
111
111
- fft = "fft3d.with_pyfftw"
112
112
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"
115
117
116
118
117
119
def get_simple_3d_mpi_method ():
120
+ """Get a simple 3d parallel method"""
121
+ method = "fft3d.mpi_with_fftwmpi3d"
118
122
try :
119
- import fluidfft .fft3d .mpi_with_fftwmpi3d
120
-
121
- fft = "fft3d.mpi_with_fftwmpi3d"
123
+ import_fft_class (method )
122
124
except ImportError :
123
- fft = "fft3d.mpi_with_fftw1d"
124
- return fft
125
+ method = "fft3d.mpi_with_fftw1d"
126
+ return method
125
127
126
128
127
129
@boost
You can’t perform that action at this time.
0 commit comments