fftMPI documentation

Quick tour

You can quickly try out fftMPI if you

You can do all 3 steps in one command from the test dir, as follows:

% cd fftmpi/test
% sh Run.sh 

Or you can do it step-by-step (below).

The Run.sh script builds the apps in double precision for all languages (C++, C, Fortran, Python) and uses the provided KISS library for 1d FFTs. If you want to use single precision or another 1d FFT library, see the 3-step process below. If support for some language is not available on your system, those test apps will simply not build.

It then runs each of the apps for one FFT size in all the languages, both in serial and parallel. The apps allow for a variety of command-line args, which are discussed on the runtest doc page.

IMPORTANT NOTE: To run the Python apps, you must enable Python to find the fftMPI shared library and src/fftmpi.py wrapper script. You must also have mpi4py installed in your Python so it can pass an MPI communicator to fftMPI. See the usage doc page for details on both these topics.

You can examine the source code of any of the apps in the test dir to see the logic and syntax for using fftMPI from your application. They invoke all the methods provided by fftMPI.


Step 1

Build fftMPI with one of these make commands. This should produce two shared-library lib*.so files, for 2d and 3d FFTs. They will use the default KISS FFT library for 1d FFTs, and operate on double-precision complex data.

% cd fftmpi/src
% make 

The builds will be performed with mpicxx, which uses whatever MPI you have installed on your system, and wraps the C++ compiler installed on your system.

The compile doc page explains how to choose a different 1d FFT library and/or change to single precision.


Step 2

Build the test apps, written in C++, C, and Fortran 90. This should produce 6 executables: test3d, test2d, test3d_c, test2d_c, test3d_f90, test2d_f90. Test3d and test2d are C++ executables. Two Python test apps, test2d.py and test3d.py, are also in the test dir.

% cd fftmpi/test
% make 

As with step 1, The builds will be performed with mpicxx, which uses whatever MPI you have installed on your system, and wraps the C++, C, or Fortran compilers installed on your system.

The buildtest doc page explains how to change to single precision.

IMPORTANT NOTE: You must use build the fftMPI library and the test apps with the same precision setting.


Step 3

Run the test programs from the test dir.

See the Run.sh file for examples of how to launch each of the apps in the various languages. See the runtest doc page for a list of command-line arguments recognized by all the apps.