cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:
cannam@167:cannam@167: Next: 2d MPI example, Previous: FFTW MPI Installation, Up: Distributed-memory FFTW with MPI [Contents][Index]
cannam@167:Programs using the MPI FFTW routines should be linked with
cannam@167: -lfftw3_mpi -lfftw3 -lm
on Unix in double precision,
cannam@167: -lfftw3f_mpi -lfftw3f -lm
in single precision, and so on
cannam@167: (see Precision). You will also need to link with whatever library
cannam@167: is responsible for MPI on your system; in most MPI implementations,
cannam@167: there is a special compiler alias named mpicc
to compile and
cannam@167: link MPI code.
cannam@167:
cannam@167:
cannam@167:
cannam@167:
Before calling any FFTW routines except possibly
cannam@167: fftw_init_threads
(see Combining MPI and Threads), but after calling
cannam@167: MPI_Init
, you should call the function:
cannam@167:
void fftw_mpi_init(void); cannam@167:
If, at the end of your program, you want to get rid of all memory and cannam@167: other resources allocated internally by FFTW, for both the serial and cannam@167: MPI routines, you can call: cannam@167:
cannam@167:void fftw_mpi_cleanup(void); cannam@167:
which is much like the fftw_cleanup()
function except that it
cannam@167: also gets rid of FFTW’s MPI-related data. You must not execute
cannam@167: any previously created plans after calling this function.
cannam@167: