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