Saturday, May 30, 2009

FORD: 3-D FFT with FFTW MPI


Purpose
  • "Ford" provides a test example of the 3-D fast Fourier transform using FFTW on a distributed system. The 3-D transform is built on a tensor product of 2-D transforms. Functions values are given as input in the real space, transformed into the frequency space (fft), and finally transformed back to the real space (inverse fft).

Specifications
  • Name: Ford.
  • Author: Feng Chen.
  • Finishing date: 05/30/2009.
  • Languages: MPI C++.
  • Required libraries: FFTW (version 2.1.5 or above).

Simple Example
  • Parameters: \begin{equation} N_x = N_y = N_z = 16, \quad N_{\text{cpu}}=2 \times 8. \end{equation}

Quick Start
  • Compiling and running:
    cd ./Ford
    make
    mpirun -np $NPROCS a.out
    
  • Output:
    The difference is: 4.1359e-25
    The working time is: 0.0540702
    ...
    
  • CPU: Intel(R) Xeon(R) CPU X5630 @2.53GHz.
  • OS: CentOS release 6.4 (Final).
  • Compiler: mpicc/gcc 4.5.1.

References
  • Fastest Fourier transform in the West (FFTW). Link.

Code Highlights
    
    MPI_Alltoall(&temp_B[0][0], nx, type_send, &temp_trans[0][0], 1, 
     type_recv, MPI_COMM_WORLD);
    fftw(p_1d_c2c,nx,&temp_trans[0][0],nx,1,NULL,nx,1);
    
    

No comments:

Post a Comment