cannam@127: cannam@127: cannam@127: cannam@127: cannam@127:
cannam@127:cannam@127: Next: Combining MPI and Threads, Previous: Avoiding MPI Deadlocks, Up: Distributed-memory FFTW with MPI [Contents][Index]
cannam@127:In this section, we collect a few tips on getting the best performance cannam@127: out of FFTW’s MPI transforms. cannam@127:
cannam@127:First, because of the 1d block distribution, FFTW’s parallelization is cannam@127: currently limited by the size of the first dimension. cannam@127: (Multidimensional block distributions may be supported by a future cannam@127: version.) More generally, you should ideally arrange the dimensions so cannam@127: that FFTW can divide them equally among the processes. See Load balancing. cannam@127: cannam@127: cannam@127:
cannam@127: cannam@127:Second, if it is not too inconvenient, you should consider working cannam@127: with transposed output for multidimensional plans, as this saves a cannam@127: considerable amount of communications. See Transposed distributions. cannam@127: cannam@127:
cannam@127: cannam@127:Third, the fastest choices are generally either an in-place transform
cannam@127: or an out-of-place transform with the FFTW_DESTROY_INPUT
flag
cannam@127: (which allows the input array to be used as scratch space). In-place
cannam@127: is especially beneficial if the amount of data per process is large.
cannam@127:
cannam@127:
Fourth, if you have multiple arrays to transform at once, rather than cannam@127: calling FFTW’s MPI transforms several times it usually seems to be cannam@127: faster to interleave the data and use the advanced interface. (This cannam@127: groups the communications together instead of requiring separate cannam@127: messages for each transform.) cannam@127:
cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: