SHTns 3.7
|
To compile SHTns, you need a C compiler and the FFTW library version 3.0 (or better 3.3) or later, carefully optimized and installed. On modern x86 processors, we recommend using GCC 4.0 or later as it produces the fastest vectorized code.
First run
to see the available configure options. Then, for example run
if you want to install the multi-threaded transform library to $HOME/lib and the headers to $HOME/include.
To install the Python extension, see Using SHTns with Python.
The configure script will detect your FFTW library capabilities and other system dependant features. You may optionally adapt the resulting Makefile
and sht_config.h
to your architecture and compiler. Then compile with make
and install with make
install
.
SHTns requires FFTW, which can be installed as a compiled package on many operating systems. However, we recommend to compile it and install it yourself, as it can lead to much better performance. If FFTW has not been compiled and tuned carefully for your machine, you may get bad performance with SHTns (down to 50% slower !). Furthermore, if FFTW is more recent than 3.3, or has not been configured with --enable-openmp
(see below), SHTns cannot do the Fourier transform part in parallel.
You can download the latest FFTW package from http://www.fftw.org, compile it and install it. In order to use the parallel transforms, make sure to pass --enable-openmp
to the configure script. We also recommend passing --enable-sse2
or --enable-avx
to the configure script on x86 architectures. You may also take a look at the FFTW documentation for compilation advice.
For example:
That's it, FFTW is now installed and ready for use.
SHTns can use MKL instead of FFTW. To do this, pass --enable-mkl
to the configure script. Performance can be slightly better.
Run ./configure in the SHTns directory. You can use
--enable-openmp
to enable multi-threaded transforms, and --enable-long-double
to (maybe) increase accuracy during initialization (not recommended). You can then edit the resulting Makefile:
PREFIX=
to the desired install path.Simple tunings can be done by passing options to ./configure (see
./configure
--help
)
libshtns.a