firedrakeproject / asQ

A library for implementing ParaDIAG timestepping algorithms using Firedrake
MIT License
4 stars 1 forks source link

Replace scipy.fft calls with FFTW ones #21

Open colinjcotter opened 2 years ago

werner-bauer commented 2 years ago

Here is a comment on how I installed firedrake with threading in order to be able to run fftw that is provided by mpi4py:

INSTALLATION OF MPI4PY-FFT ON FIREDRAKE:

i) Install firedrake using: curl -O https://raw.githubusercontent.com/firedrakeproject/firedrake/master/scripts/firedrake-install PETSC_CONFIGURE_OPTIONS="--download-fftw=1 --download-fftw-configure-arguments='--enable-threads --enable-shared'" \~/firedrake/bin/python3 firedrake-install --venv-name firedrake-fftw1" ii) Install mpi4py-fft: start venv git clone git@github.com:mpi4py/mpi4py-fft.git (does not matter where to download this) cd mpi4py-fft export FFTW_LIBRARY_DIR=\~/Programmes/firedrake-fftw1/src/petsc/default/lib/ export FFTW_INCLUDE_DIR=\~/Programmes/firedrake-fftw1/src/petsc/default/include/ python -m pip install -e . iii) Not clear if needed: linking libraries with ldd

JHopeCollins commented 3 months ago

The FFT takes up a very small proportion of the runtime with scipy.fft. Updating to FFTW is not a priority at the moment. See runtime profile for scalar advection below. component_timed_named