diff --git a/.mdformat.toml b/.mdformat.toml new file mode 100644 index 0000000..972483a --- /dev/null +++ b/.mdformat.toml @@ -0,0 +1,3 @@ +wrap = 89 +number = true +end_of_line = "lf" diff --git a/doc/conf.py b/doc/conf.py index aa500cb..0155ee8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -160,7 +160,7 @@ def save_fig_scaling(dir_name, dim, n0, n1, n2=None): # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ["_build"] +exclude_patterns = ["_build", "install/pfft-1.0.8-alpha/README.rst"] exclude_patterns.extend( [ f"install/{name}.md" diff --git a/doc/install.md b/doc/install.md index 7262f9c..660e013 100644 --- a/doc/install.md +++ b/doc/install.md @@ -2,17 +2,16 @@ # Installation and advice -As already written in the overview, Fluidfft is organized as a main package -provided few Fluidfft Python classes using standard packages (Numpy, pyfftw, -Dask, etc.) and plugins which can use other methods, in particular based on C++ -classes using more advanced libraries (as pfft and p3dfft). +As already written in the overview, Fluidfft is organized as a main package provided few +Fluidfft Python classes using standard packages (Numpy, pyfftw, Dask, etc.) and plugins +which can use other methods, in particular based on C++ classes using more advanced +libraries (as pfft and p3dfft). -In this page we focus on installing the base Fluidfft package for Fluidfft >= -0.4.0. +In this page we focus on installing the base Fluidfft package for Fluidfft >= 0.4.0. -First, ensure that you have a recent Python installed, since Fluidsim requires -Python >= 3.9. Some issues regarding the installation of Python and Python -packages are discussed in +First, ensure that you have a recent Python installed, since Fluidsim requires Python >= +3.9. Some issues regarding the installation of Python and Python packages are discussed +in [the main documentation of the project](http://fluiddyn.readthedocs.org/en/latest/install.html). ## Installation with pip @@ -29,7 +28,21 @@ Fluidfft can be installed without compilation with `pip`: ```sh pip install pip -U -pip install fluidsim +pip install fluidfft +``` + +However, fluidfft [works with plugins](./plugins.md), which have to be installed +additionally, for example using fluidfft optional dependencies. Installing [pyfftw] does +not require compilation: + +```sh +pip install "fluidfft[pyfftw]" +``` + +whereas installing other plugins will trigger local compilation. + +```sh +pip install "fluidfft[fftw,mpi-with-fftw,fftwmpi]" ``` ## Installation with conda @@ -40,17 +53,14 @@ conda install fluidfft ### Remark on Numpy installed with conda -In anaconda (or miniconda), Numpy installed with `conda install numpy` can be -built and linked with MKL (an Intel library). This can be a real plus for -performance since MKL replaces fftw functions by (usually) faster ones but it -has a drawback for fft using the library fftw3_mpi (an implementation of -parallel fft using 1D decomposition by fftw). MKL implements some fftw -functions but not all the functions defined in fftw3_mpi. Since the libraries -are loaded dynamically, if numpy is imported before the fftw_mpi libraries, -this can lead to very bad issues (segmentation fault, only if numpy is imported -before the class!). For security, we prefer to automatically disable the -building of the fft classes using fftw3_mpi when it is detected that numpy uses -the MKL library where some fftw symbols are defined. +In anaconda (or miniconda), Numpy installed with `conda install numpy` can be built and +linked with MKL (an Intel library). This can be a real plus for performance since MKL +replaces fftw functions by (usually) faster ones but it has a drawback for fft using the +library fftw3_mpi (an implementation of parallel fft using 1D decomposition by fftw). MKL +implements some fftw functions but not all the functions defined in fftw3_mpi. Since the +libraries are loaded dynamically, if numpy is imported before the fftw_mpi libraries, +this can lead to very bad issues (segmentation fault, only if numpy is imported before +the class!). To install with anaconda numpy linked with openblas: @@ -61,6 +71,7 @@ conda install "blas[build=*openblas]" numpy ## Environment variables -Fluidfft is sensible at runtime to the environment variable -`TRANSONIC_BACKEND`. The Transonic backend is "pythran" by default, but it can -also be set to "python" or "numba". +Fluidfft is sensible at runtime to the environment variable `TRANSONIC_BACKEND`. The +Transonic backend is "pythran" by default, but it can also be set to "python" or "numba". + +[pyfftw]: https://github.com/pyFFTW/pyFFTW/ diff --git a/pyproject.toml b/pyproject.toml index 28637cf..cc141ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ pyfftw = ["pyfftw >= 0.10.4"] dask = ["dask"] mpi = ["mpi4py"] fftw = ["fluidfft-fftw"] -mpi_with_fftw = ["fluidfft-mpi_with_fftw"] +mpi-with-fftw = ["fluidfft-mpi_with_fftw"] fftwmpi = ["fluidfft-fftwmpi"] pfft = ["fluidfft-pfft"] p3dfft = ["fluidfft-p3dfft"]