cannam@95: cannam@95: cannam@95: Load balancing - FFTW 3.3.3 cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95:
cannam@95: cannam@95:

cannam@95: Next: , cannam@95: Previous: Basic and advanced distribution interfaces, cannam@95: Up: MPI Data Distribution cannam@95:


cannam@95:
cannam@95: cannam@95:

6.4.2 Load balancing

cannam@95: cannam@95:

cannam@95: Ideally, when you parallelize a transform over some P cannam@95: processes, each process should end up with work that takes equal time. cannam@95: Otherwise, all of the processes end up waiting on whichever process is cannam@95: slowest. This goal is known as “load balancing.” In this section, cannam@95: we describe the circumstances under which FFTW is able to load-balance cannam@95: well, and in particular how you should choose your transform size in cannam@95: order to load balance. cannam@95: cannam@95:

Load balancing is especially difficult when you are parallelizing over cannam@95: heterogeneous machines; for example, if one of your processors is a cannam@95: old 486 and another is a Pentium IV, obviously you should give the cannam@95: Pentium more work to do than the 486 since the latter is much slower. cannam@95: FFTW does not deal with this problem, however—it assumes that your cannam@95: processes run on hardware of comparable speed, and that the goal is cannam@95: therefore to divide the problem as equally as possible. cannam@95: cannam@95:

For a multi-dimensional complex DFT, FFTW can divide the problem cannam@95: equally among the processes if: (i) the first dimension cannam@95: n0 is divisible by P; and (ii), the product of cannam@95: the subsequent dimensions is divisible by P. (For the advanced cannam@95: interface, where you can specify multiple simultaneous transforms via cannam@95: some “vector” length howmany, a factor of howmany is cannam@95: included in the product of the subsequent dimensions.) cannam@95: cannam@95:

For a one-dimensional complex DFT, the length N of the data cannam@95: should be divisible by P squared to be able to divide cannam@95: the problem equally among the processes. cannam@95: cannam@95: cannam@95: