Chris@10: Chris@10: Chris@10: Using MPI Plans - FFTW 3.3.3 Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10:
Chris@10: Chris@10:

Chris@10: Next: , Chris@10: Previous: MPI Initialization, Chris@10: Up: FFTW MPI Reference Chris@10:


Chris@10:
Chris@10: Chris@10:

6.12.3 Using MPI Plans

Chris@10: Chris@10:

Once an MPI plan is created, you can execute and destroy it using Chris@10: fftw_execute, fftw_destroy_plan, and the other functions Chris@10: in the serial interface that operate on generic plans (see Using Plans). Chris@10: Chris@10:

The fftw_execute and fftw_destroy_plan functions, applied to Chris@10: MPI plans, are collective calls: they must be called for all processes Chris@10: in the communicator that was used to create the plan. Chris@10: Chris@10:

You must not use the serial new-array plan-execution functions Chris@10: fftw_execute_dft and so on (see New-array Execute Functions) with MPI plans. Such functions are specialized to the Chris@10: problem type, and there are specific new-array execute functions for MPI plans: Chris@10: Chris@10:

Chris@10:

     void fftw_mpi_execute_dft(fftw_plan p, fftw_complex *in, fftw_complex *out);
Chris@10:      void fftw_mpi_execute_dft_r2c(fftw_plan p, double *in, fftw_complex *out);
Chris@10:      void fftw_mpi_execute_dft_c2r(fftw_plan p, fftw_complex *in, double *out);
Chris@10:      void fftw_mpi_execute_r2r(fftw_plan p, double *in, double *out);
Chris@10: 
Chris@10:

These functions have the same restrictions as those of the serial Chris@10: new-array execute functions. They are always safe to apply to Chris@10: the same in and out arrays that were used to Chris@10: create the plan. They can only be applied to new arrarys if those Chris@10: arrays have the same types, dimensions, in-placeness, and alignment as Chris@10: the original arrays, where the best way to ensure the same alignment Chris@10: is to use FFTW's fftw_malloc and related allocation functions Chris@10: for all arrays (see Memory Allocation). Note that distributed Chris@10: transposes (see FFTW MPI Transposes) use Chris@10: fftw_mpi_execute_r2r, since they count as rank-zero r2r plans Chris@10: from FFTW's perspective. Chris@10: Chris@10: Chris@10: