cannam@95: cannam@95:
cannam@95:cannam@95: Next: MPI Data Distribution Functions, cannam@95: Previous: MPI Initialization, cannam@95: Up: FFTW MPI Reference cannam@95:
Once an MPI plan is created, you can execute and destroy it using
cannam@95: fftw_execute
, fftw_destroy_plan
, and the other functions
cannam@95: in the serial interface that operate on generic plans (see Using Plans).
cannam@95:
cannam@95:
The fftw_execute
and fftw_destroy_plan
functions, applied to
cannam@95: MPI plans, are collective calls: they must be called for all processes
cannam@95: in the communicator that was used to create the plan.
cannam@95:
cannam@95:
You must not use the serial new-array plan-execution functions
cannam@95: fftw_execute_dft
and so on (see New-array Execute Functions) with MPI plans. Such functions are specialized to the
cannam@95: problem type, and there are specific new-array execute functions for MPI plans:
cannam@95:
cannam@95:
void fftw_mpi_execute_dft(fftw_plan p, fftw_complex *in, fftw_complex *out); cannam@95: void fftw_mpi_execute_dft_r2c(fftw_plan p, double *in, fftw_complex *out); cannam@95: void fftw_mpi_execute_dft_c2r(fftw_plan p, fftw_complex *in, double *out); cannam@95: void fftw_mpi_execute_r2r(fftw_plan p, double *in, double *out); cannam@95:cannam@95:
These functions have the same restrictions as those of the serial
cannam@95: new-array execute functions. They are always safe to apply to
cannam@95: the same in
and out
arrays that were used to
cannam@95: create the plan. They can only be applied to new arrarys if those
cannam@95: arrays have the same types, dimensions, in-placeness, and alignment as
cannam@95: the original arrays, where the best way to ensure the same alignment
cannam@95: is to use FFTW's fftw_malloc
and related allocation functions
cannam@95: for all arrays (see Memory Allocation). Note that distributed
cannam@95: transposes (see FFTW MPI Transposes) use
cannam@95: fftw_mpi_execute_r2r
, since they count as rank-zero r2r plans
cannam@95: from FFTW's perspective.
cannam@95:
cannam@95:
cannam@95: