Next:
Data distribution    Previous: Pixelization


Fast Fourier Transforms

The transforms with respect to the azimuthal angle are computed using Fast Fourier Transforms. Since the version 2.5 the S2HAT package provides a choice for the specific FFT software to be used. The possibilities include the FFT transforms included in the HEALpix package, or those provided by FFTW, including both real-to-complex transforms as well as real-to-half complex ones, or AMCL libraries. The choice of the FFT package has to be made on the compilation stage as described in the compilation section, by setting an appropriate compilation flag. In all cases the libraries need to be provided by a user.

The calculation of the FFTs proceed usually in two steps. On the first step a so-called FFT plan is derived, which is subsequently used to speed up the actual transforms. Different FFT implementation differ in how much time is devoted to each of these steps as well as in their overall performance. To be applicable to the problem of spherical harmonic transform treated here, an FFT package has to be capable of dealing efficiently with an arbitrary length of the data vector, including odd and large prime numbers cases.

The guidelines for choosing the FFT transform:

  • We find that for a typical application in which only few transforms need to be applied and often to maps of a different resolution the HEALPix FFTs provide a flexible and efficient option. They are used by S2HAT in two steps as the plan computation is split from the actual transforms avoiding therefore some redundancies present in their original HEALpix usage.

  • For the opteron processors the ACML FFTs are generally found superior to all others considered here. This is therefore our suggested choice whenever available.

  • Out of the FFTW transforms the real-to-half-complex routines are found faster than the real-to-complex ones. In general the calculation of the FFT plans is quite time consuming and therefore FFTW is not the best choice unless massive computations of the identical transforms are envisaged, e.g., in the case of the Monte Carlo simulations. In the latter case, the plans can be precomputed once and reused (this is facilitated by the fft_mc_setup and fft_mc_clean routines). In all the cases of a plan computation for FFTW we use FFTW_ESTIMATE flag even if in the latter case FFTW_MEASURE one could be more appropriate. This is because we found that the latter results with some unexpected erorrs on some of the platforms the S2HAT package has been used to date.

    The azimuthal transforms amount usually only to a small fraction of a transform computation, so the FFT software choice may not be often crucial. However, in some circumstances, e.g., for small maps distributed over many processors, a proper choice may bring some noticeable effects on the overall runtime.

    Next: Data distribution    Previous: Pixelization

    radek stompor 2009-10-15