fftw3: Avoiding MPI Deadlocks
6.9 Avoiding MPI Deadlocks
==========================
An MPI program can _deadlock_ if one process is waiting for a message
from another process that never gets sent. To avoid deadlocks when
using FFTW's MPI routines, it is important to know which functions are
_collective_: that is, which functions must _always_ be called in the
_same order_ from _every_ process in a given communicator. (For
example, 'MPI_Barrier' is the canonical example of a collective function
in the MPI standard.)
The functions in FFTW that are _always_ collective are: every
function beginning with 'fftw_mpi_plan', as well as
'fftw_mpi_broadcast_wisdom' and 'fftw_mpi_gather_wisdom'. Also, the
following functions from the ordinary FFTW interface are collective when
they are applied to a plan created by an 'fftw_mpi_plan' function:
'fftw_execute', 'fftw_destroy_plan', and 'fftw_flops'.