From c5cd8934ebd5da32151e17354cf89b227db396af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20And=C3=A9n?= Date: Tue, 13 Aug 2024 21:01:46 +0200 Subject: [PATCH 1/2] docs: add instructions for building py from source --- docs/python.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/python.rst b/docs/python.rst index 828c0fe44..ba4631e7b 100644 --- a/docs/python.rst +++ b/docs/python.rst @@ -9,10 +9,18 @@ The easiest way to install is to run:: pip install finufft which downloads and installs the latest precompiled binaries from PyPI. +If you would like to compile from source, you can tell ``pip`` to compile the library from source with the option ``--no-binary`` using the command:: + + pip install --no-binary finufft finufft + +Note that ``finufft`` has to be specified twice (first as an argument to ``--no-binary`` and second as the package the is to be installed). This option also allows you to switch out the default FFT library (FFTW) for DUCC0 using:: + + pip install --no-binary finufft finufft --config-settings=cmake.define.FINUFFT_USE_DUCC0=ON finufft + If you have ``pytest`` installed, you can test it with:: pytest python/finufft/test - + or, without having ``pytest`` you can run the older-style eyeball check:: python3 python/finufft/test/run_accuracy_tests.py From 277b0e5b8dfad7d3235111452bd3b882d7851733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20And=C3=A9n?= Date: Tue, 13 Aug 2024 21:20:50 +0200 Subject: [PATCH 2/2] docs: add note about performance for --no-binary --- docs/python.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/python.rst b/docs/python.rst index ba4631e7b..ba745e9fa 100644 --- a/docs/python.rst +++ b/docs/python.rst @@ -13,6 +13,7 @@ If you would like to compile from source, you can tell ``pip`` to compile the li pip install --no-binary finufft finufft +By default, this will use the ``-march=native`` flag when compiling the library, which should result in improved performance. Note that ``finufft`` has to be specified twice (first as an argument to ``--no-binary`` and second as the package the is to be installed). This option also allows you to switch out the default FFT library (FFTW) for DUCC0 using:: pip install --no-binary finufft finufft --config-settings=cmake.define.FINUFFT_USE_DUCC0=ON finufft