Skip to content

Latest commit

 

History

History
251 lines (180 loc) · 12 KB

install_p3dfft.rst

File metadata and controls

251 lines (180 loc) · 12 KB

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 Makefile 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. --with-fftw=$FFTW_HOME
--enable-openmp Mandatory if using multithreaded version This argument adds the appropriate compiler flags to enable OpenMP. --enable-openmp
--enable-openmpi Optional This argument uses the OpenMPI implementation of MPI. --enable-openmpi
--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=<Fortran compiler> Strongly recommended Fortran compiler FC=mpif90
FCFLAGS="<Fortran compiler flags>" Optional, recommended Fortran compiler flags FCFLAGS="-O3"
CC=<C compiler> Strongly Recommended C compiler CC=mpicc
CFLAGS="<C compiler flags>" Optional, recommended C compiler flags CFLAGS="-O3"
LDFLAGS="<linker flags>" Optional Linker flags
.tab { overflow: hidden; border: 1px solid #e1e4e5; background-color: #f1f1f1; } .tab button { background-color: inherit; float: left; border: none; outline: none; cursor: pointer; padding: 14px 16px; transition: 0.3s; font-size: 15px; } .tab button:hover { background-color: #ddd; } .tab button.active { background-color: #ccc; } .tabcontent { display: none; border-top: none; }

Compiling on Comet (XSEDE/SDSC)

Choose a MPI.

Intel MPI MVAPICH2 Open MPI
Compiler Modules Arguments
Intel intel, fftw ./configure --enable-intel --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc
GNU gnu, fftw ./configure --enable-gnu --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc LDFLAGS=-lm
PGI pgi, fftw ./configure --enable-pgi --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc
Compiler Modules Arguments
Intel intel, fftw ./configure --enable-intel --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc LDFLAGS=-lmpifort
GNU gnu, fftw ./configure --enable-gnu --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc LDFLAGS="-lm -lmpichf90"
PGI pgi, fftw ./configure --enable-pgi --enable-fftw --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc LDFLAGS=-lmpichf90
Compiler Modules Arguments
Intel intel, fftw ./configure --enable-intel --enable-fftw --enable-openmpi --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc
GNU gnu, fftw ./configure --enable-gnu --enable-fftw --enable-openmpi --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc LDFLAGS=-lm
PGI pgi, fftw ./configure --enable-pgi --enable-fftw --enable-openmpi --with-fftw=$FFTWHOME FC=mpif90 CC=mpicc

Compiling on Stampede2 (XSEDE/TACC)

Choose a MPI.

Intel MPI MVAPICH2
Compiler Modules Arguments
Intel intel, fftw3 ./configure --enable-intel --enable-fftw --with-fftw=$TACC_FFTW3_DIR FC=mpif90 CC=mpicc
GNU gcc ./configure --enable-gnu --enable-fftw --with-fftw=/PATH/TO/FFTW/LIBRARY FC=mpif90 CC=mpicc LDFLAGS=-lm

Note

User must install their own FFTW library for GNU compilers while using Intel MPI due to technical difficulties.

Compiler Modules Arguments
Intel intel ./configure --enable-intel --enable-fftw --with-fftw=/PATH/TO/FFTW/LIBRARY FC=mpif90 CC=mpicc LDFLAGS=-lmpifort

Note

Stampede2's FFTW module is not compatible with its MVAPICH2 module yet. Users must install their own FFTW library.

Compiling on Bridges (PSC)

Choose a MPI.

Intel MPI MVAPICH Open MPI
Compiler Modules Arguments
Intel intel, fftw3 ./configure --enable-intel --enable-fftw --with-fftw=$FFTW3_LIB/.. FC=mpiifort CC=mpicc LDFLAGS=-lm
Compiler Modules Arguments
Intel intel, fftw3 ./configure --enable-intel --enable-fftw --with-fftw=$FFTW3_LIB/.. FC=mpif90 CC=mpicc LDFLAGS=-lmpifort
GNU gcc, fftw3 ./configure --enable-gnu --enable-fftw --with-fftw=$FFTW3_LIB/.. FC=mpif90 CC=mpicc LDFLAGS="-lm -lmpichf90"
Compiler Modules Arguments
Intel intel, fftw3 ./configure --enable-intel --enable-fftw --enable-openmpi --with-fftw=$FFTW3_LIB/.. FC=mpif90 CC=mpicc
GNU fftw3 ./configure --enable-gnu --enable-fftw --enable-openmpi --with-fftw=$FFTW3_LIB/.. FC=mpif90 CC=mpicc LDFLAGS=-lm
PGI pgi, fftw3 ./configure --enable-pgi --enable-fftw --enable-openmpi --with-fftw=$FFTW3_LIB/.. FC=mpif90 CC=mpicc