Skip to content
Sourav Chakraborty edited this page Jul 23, 2017 · 9 revisions

Installing P3DFFT

The latest version of P3DFFT can be found here. Once you have extracted the package, you must take the following steps to complete the setup:

  1. Run the configure script
  2. Run 'make'
  3. Run 'make install'

How to compile P3DFFT

P3DFFT uses a configure script to create Makefiles for compiling the library as well as several examples. This page will step you through the process of running the configure script properly.

Run "configure --help" for complete list of options. Recommended options: --enable-stride1. For Cray XT platforms also recommended --enable-useeven.

Currently the package supports four compiler suites: PGI, Intel, IBM and GNU. Some examples of compiling on several systems are given below. Users may need to customize as needed. If you wish to share more examples or to request or contribute in support for other compilers, please write to dmitry@sdsc.edu. If you give us an account on your system we will work with you to customize the installation.

Argument Notes Description Example
--prefix=PREFIX Mandatory for users without access to /usr/local This argument will install p3dfft to PREFIX when you run make install. By default, configure will install to /usr/local --prefix=$HOME/local/
--enable-gnu, --enable-ibm, --enable-intel, --enable-pgi, --enable-cray Mandatory These arguments will prepare p3dfft to be built by a specific compiler. You must only choose one option. --enable-pgi
--enable-fftw, --enable-essl Mandatory These arguments will prepare p3dfft to be used with either the FFTW or ESSL library. You must only choose one option. --enable-fftw
--with-fftw= FFTWLOCATION Mandatory if --enable-fftw is used This argument specifies the path location for the FFTW library; it is mandatory if you are planning to use p3dfft with the FFTW library. --enable-fftw --with-fftw=$FFTW_HOME
--enable-oned Optional, This argument is for 1D decomposition. The default is 2D decomposition but can be made to 1D by setting up a grid 1xn when running the code. --enable-oned
--enable-estimate Optional, use only with --enable-fftw If this argument is passed, the FFTW library will not use run-time tuning to select the fastest algorithm for computing FFTs. --enable-estimate
--enable-measure Optional, enabled by default, use only with --enable-fftw For search-once-for-the-fast algorithm (takes more time on p3dfft_setup()). --enable-measure
--enable-patient Optional, use only with --enable-fftw For search-once-for-the-fastest-algorithm (takes much more time on p3dfft_setup()). --enable-patient
--enable-dimsc Optional To assign processor rows and columns in the Cartesian processor grid according to C convention. The default is Fortran convention which is recommended. This option does not affect the order of storage of arrays in memory. --enable-dimsc
--enable-useeven Optional, recommended for Cray XT This argument is for using MPI_Alltoall instead of MPI_Alltotallv. This will pad the send buffers with zeros to make them of equal size; not needed on most architecture but may lead to better results on Cray XT. --enable-useeven
--enable-stride1 Optional, recommended To enable stride-1 data structures on output (this may in some cases give some advantage in performance). You can define loop blocking factors NLBX and NBLY to experiment, otherwise they are set to default values. --enable-stride1
--enable-nblx Optional To define loop blocking factor NBL_X --enable-nblx=32
--enable-nbly1 Optional To define loop blocking factor NBL_Y1 --enable-nbly1=32
--enable-nbly2 Optional To define loop blocking factor NBL_Y2 --enable-nbly2=32
--enable-nblz Optional To define loop blocking factor NBL_Z --enable-nblz=32
--enable-single Optional This argument will compile p3dfft in single-precision. By default, configure will setup p3dfft to be compiled in double-precision. --enable-single
FC= Optional Fortran compiler FC=mpfort
FCFLAGS="" Optional, recommended Fortran compiler flags FCFLAGS="-Mextend"
CC= Optional C compiler CC=mpcc
CFLAGS="" Optional, recommended C compiler flags CFLAGS="-fastsse"
LDFLAGS="" Mandatory (depending on platform) Linker flags LDFLAGS=-lmpi_f90 -lmpi_f77"

Compiling on Gordon/Comet (SDSC)

Compiler Modules Arguments
PGI pgi, fftw, mvapich2_ib ./configure --enable-pgi --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc
Intel intel, fftw, mvapich2_ib ./configure --enable-intel --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc
GNU gnu, fftw, mvapich2_ib ./configure --enable-gnu --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc

Compiling on Stampede (TACC)

Compiler Modules Arguments
Intel fftw3 ./configure --enable-fftw --enable-intel --with-fftw=$TACC_FFTW3_DIR FC=mpif90 CC=mpicc

Compiling on NERSC platforms (Cori, Edison)

Compiler Modules Arguments
PGI PrgEnv-pgi, fftw ./configure --enable-pgi --enable-fftw --with-fftw=$FFTW_DIR/.. FC=ftn CC=cc
Intel PrgEnv-intel, fftw ./configure --enable-intel --enable-fftw --with-fftw=$FFTW_DIR/.. FC=ftn CC=cc
GNU PrgEnv-gnu, fftw ./configure --enable-gnu --enable-fftw --with-fftw=$FFTW_DIR/.. FC=ftn CC=cc
Cray PrgEnv-cray, fftw ./configure --enable-cray --enable-fftw --with-fftw=$FFTW_DIR/.. FC=ftn CC=cc

Compiling on Blacklight (PSC)

Compiler Modules Arguments
Intel fftw ./configure --enable-fftw --enable-intel --with-fftw=$FFTW_LIB/.. CC=icc FC=ifort FCFLAGS=-lmpi

Compiling on Mira/Cetus/Vesta (ALCF)

Compiler Arguments
IBM XL ./configure --enable-ibm --enable-essl --with-essl=/soft/libraries/essl/current FC=mpixlf90_r CC=mpixlc_r
GNU ./configure --enable-gnu --enable-fftw --with-fftw=/soft/libraries/alcf/current/{xl,gcc}/FFTW3 FC=mpif90 CC=mpicc
Clone this wiki locally