cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:
cannam@167:cannam@167: Next: MPI Wisdom Communication, Previous: MPI Data Distribution Functions, Up: FFTW MPI Reference [Contents][Index]
cannam@167:Plans for complex-data DFTs (see 2d MPI example) are created by: cannam@167:
cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:fftw_plan fftw_mpi_plan_dft_1d(ptrdiff_t n0, fftw_complex *in, fftw_complex *out, cannam@167: MPI_Comm comm, int sign, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_2d(ptrdiff_t n0, ptrdiff_t n1, cannam@167: fftw_complex *in, fftw_complex *out, cannam@167: MPI_Comm comm, int sign, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2, cannam@167: fftw_complex *in, fftw_complex *out, cannam@167: MPI_Comm comm, int sign, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft(int rnk, const ptrdiff_t *n, cannam@167: fftw_complex *in, fftw_complex *out, cannam@167: MPI_Comm comm, int sign, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_many_dft(int rnk, const ptrdiff_t *n, cannam@167: ptrdiff_t howmany, ptrdiff_t block, ptrdiff_t tblock, cannam@167: fftw_complex *in, fftw_complex *out, cannam@167: MPI_Comm comm, int sign, unsigned flags); cannam@167:
These are similar to their serial counterparts (see Complex DFTs)
cannam@167: in specifying the dimensions, sign, and flags of the transform. The
cannam@167: comm
argument gives an MPI communicator that specifies the set
cannam@167: of processes to participate in the transform; plan creation is a
cannam@167: collective function that must be called for all processes in the
cannam@167: communicator. The in
and out
pointers refer only to a
cannam@167: portion of the overall transform data (see MPI Data Distribution)
cannam@167: as specified by the ‘local_size’ functions in the previous
cannam@167: section. Unless flags
contains FFTW_ESTIMATE
, these
cannam@167: arrays are overwritten during plan creation as for the serial
cannam@167: interface. For multi-dimensional transforms, any dimensions >
cannam@167: 1
are supported; for one-dimensional transforms, only composite
cannam@167: (non-prime) n0
are currently supported (unlike the serial
cannam@167: FFTW). Requesting an unsupported transform size will yield a
cannam@167: NULL
plan. (As in the serial interface, highly composite sizes
cannam@167: generally yield the best performance.)
cannam@167:
The advanced-interface fftw_mpi_plan_many_dft
additionally
cannam@167: allows you to specify the block sizes for the first dimension
cannam@167: (block
) of the n0 × n1 × n2 × … × nd-1
cannam@167: input data and the first dimension
cannam@167: (tblock
) of the n1 × n0 × n2 ×…× nd-1
cannam@167: transposed data (at intermediate
cannam@167: steps of the transform, and for the output if
cannam@167: FFTW_TRANSPOSED_OUT
is specified in flags
). These must
cannam@167: be the same block sizes as were passed to the corresponding
cannam@167: ‘local_size’ function; you can pass FFTW_MPI_DEFAULT_BLOCK
cannam@167: to use FFTW’s default block size as in the basic interface. Also, the
cannam@167: howmany
parameter specifies that the transform is of contiguous
cannam@167: howmany
-tuples rather than individual complex numbers; this
cannam@167: corresponds to the same parameter in the serial advanced interface
cannam@167: (see Advanced Complex DFTs) with stride = howmany
and
cannam@167: dist = 1
.
cannam@167:
The flags
can be any of those for the serial FFTW
cannam@167: (see Planner Flags), and in addition may include one or more of
cannam@167: the following MPI-specific flags, which improve performance at the
cannam@167: cost of changing the output or input data formats.
cannam@167:
FFTW_MPI_SCRAMBLED_OUT
, FFTW_MPI_SCRAMBLED_IN
: valid for
cannam@167: 1d transforms only, these flags indicate that the output/input of the
cannam@167: transform are in an undocumented “scrambled” order. A forward
cannam@167: FFTW_MPI_SCRAMBLED_OUT
transform can be inverted by a backward
cannam@167: FFTW_MPI_SCRAMBLED_IN
(times the usual 1/N normalization).
cannam@167: See One-dimensional distributions.
cannam@167:
cannam@167: FFTW_MPI_TRANSPOSED_OUT
, FFTW_MPI_TRANSPOSED_IN
: valid
cannam@167: for multidimensional (rnk > 1
) transforms only, these flags
cannam@167: specify that the output or input of an n0 × n1 × n2 × … × nd-1
cannam@167: transform is
cannam@167: transposed to n1 × n0 × n2 ×…× nd-1
cannam@167: . See Transposed distributions.
cannam@167:
cannam@167: Plans for real-input/output (r2c/c2r) DFTs (see Multi-dimensional MPI DFTs of Real Data) are created by: cannam@167:
cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:fftw_plan fftw_mpi_plan_dft_r2c_2d(ptrdiff_t n0, ptrdiff_t n1, cannam@167: double *in, fftw_complex *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_r2c_2d(ptrdiff_t n0, ptrdiff_t n1, cannam@167: double *in, fftw_complex *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_r2c_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2, cannam@167: double *in, fftw_complex *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_r2c(int rnk, const ptrdiff_t *n, cannam@167: double *in, fftw_complex *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_c2r_2d(ptrdiff_t n0, ptrdiff_t n1, cannam@167: fftw_complex *in, double *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_c2r_2d(ptrdiff_t n0, ptrdiff_t n1, cannam@167: fftw_complex *in, double *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_c2r_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2, cannam@167: fftw_complex *in, double *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_dft_c2r(int rnk, const ptrdiff_t *n, cannam@167: fftw_complex *in, double *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167:
Similar to the serial interface (see Real-data DFTs), these
cannam@167: transform logically n0 × n1 × n2 × … × nd-1
cannam@167: real data to/from n0 × n1 × n2 × … × (nd-1/2 + 1)
cannam@167: complex
cannam@167: data, representing the non-redundant half of the conjugate-symmetry
cannam@167: output of a real-input DFT (see Multi-dimensional Transforms).
cannam@167: However, the real array must be stored within a padded n0 × n1 × n2 × … × [2 (nd-1/2 + 1)]
cannam@167:
cannam@167: array (much like the in-place serial r2c transforms, but here for
cannam@167: out-of-place transforms as well). Currently, only multi-dimensional
cannam@167: (rnk > 1
) r2c/c2r transforms are supported (requesting a plan
cannam@167: for rnk = 1
will yield NULL
). As explained above
cannam@167: (see Multi-dimensional MPI DFTs of Real Data), the data
cannam@167: distribution of both the real and complex arrays is given by the
cannam@167: ‘local_size’ function called for the dimensions of the
cannam@167: complex array. Similar to the other planning functions, the
cannam@167: input and output arrays are overwritten when the plan is created
cannam@167: except in FFTW_ESTIMATE
mode.
cannam@167:
As for the complex DFTs above, there is an advance interface that
cannam@167: allows you to manually specify block sizes and to transform contiguous
cannam@167: howmany
-tuples of real/complex numbers:
cannam@167:
fftw_plan fftw_mpi_plan_many_dft_r2c cannam@167: (int rnk, const ptrdiff_t *n, ptrdiff_t howmany, cannam@167: ptrdiff_t iblock, ptrdiff_t oblock, cannam@167: double *in, fftw_complex *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_many_dft_c2r cannam@167: (int rnk, const ptrdiff_t *n, ptrdiff_t howmany, cannam@167: ptrdiff_t iblock, ptrdiff_t oblock, cannam@167: fftw_complex *in, double *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167:
There are corresponding plan-creation routines for r2r
cannam@167: transforms (see More DFTs of Real Data), currently supporting
cannam@167: multidimensional (rnk > 1
) transforms only (rnk = 1
will
cannam@167: yield a NULL
plan):
cannam@167:
fftw_plan fftw_mpi_plan_r2r_2d(ptrdiff_t n0, ptrdiff_t n1, cannam@167: double *in, double *out, cannam@167: MPI_Comm comm, cannam@167: fftw_r2r_kind kind0, fftw_r2r_kind kind1, cannam@167: unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_r2r_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2, cannam@167: double *in, double *out, cannam@167: MPI_Comm comm, cannam@167: fftw_r2r_kind kind0, fftw_r2r_kind kind1, fftw_r2r_kind kind2, cannam@167: unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_r2r(int rnk, const ptrdiff_t *n, cannam@167: double *in, double *out, cannam@167: MPI_Comm comm, const fftw_r2r_kind *kind, cannam@167: unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_many_r2r(int rnk, const ptrdiff_t *n, cannam@167: ptrdiff_t iblock, ptrdiff_t oblock, cannam@167: double *in, double *out, cannam@167: MPI_Comm comm, const fftw_r2r_kind *kind, cannam@167: unsigned flags); cannam@167:
The parameters are much the same as for the complex DFTs above, except
cannam@167: that the arrays are of real numbers (and hence the outputs of the
cannam@167: ‘local_size’ data-distribution functions should be interpreted as
cannam@167: counts of real rather than complex numbers). Also, the kind
cannam@167: parameters specify the r2r kinds along each dimension as for the
cannam@167: serial interface (see Real-to-Real Transform Kinds). See Other Multi-dimensional Real-data MPI Transforms.
cannam@167:
FFTW also provides routines to plan a transpose of a distributed
cannam@167: n0
by n1
array of real numbers, or an array of
cannam@167: howmany
-tuples of real numbers with specified block sizes
cannam@167: (see FFTW MPI Transposes):
cannam@167:
fftw_plan fftw_mpi_plan_transpose(ptrdiff_t n0, ptrdiff_t n1, cannam@167: double *in, double *out, cannam@167: MPI_Comm comm, unsigned flags); cannam@167: fftw_plan fftw_mpi_plan_many_transpose cannam@167: (ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t howmany, cannam@167: ptrdiff_t block0, ptrdiff_t block1, cannam@167: double *in, double *out, MPI_Comm comm, unsigned flags); cannam@167:
These plans are used with the fftw_mpi_execute_r2r
new-array
cannam@167: execute function (see Using MPI Plans), since they count as (rank
cannam@167: zero) r2r plans from FFTW’s perspective.
cannam@167:
cannam@167: Next: MPI Wisdom Communication, Previous: MPI Data Distribution Functions, Up: FFTW MPI Reference [Contents][Index]
cannam@167: