NFFT Frequently Asked Questions with AnswersThis is the list of Frequently Asked Questions about NFFT.
How do I compile and install the NFFT?
Please have a look at the Installation page.
Number of irregular samples (nodes), number of regular samples (frequencies)
The cut-off frequency (length of the regular grid) is N, i.e. the total number of regular samples is the product of N, ..., N[d-1]. The number of irregular samples (nodes) is M.
How do I convert my nonuniformly/irregularly sampled data from time/spatial domain to frequency domain?
First of all, please note that our definition of the NDFT/NFFT forward transform and its inverse is exactly the opposite of the FFTW notation. This means our NDFT/NFFT forward transform converts from a regular grid in frequency domain to (potentially) nonuniform/irregular evaluation nodes in time/spatial domain.
Moreover, since the NDFT/NFFT is not an orthogonal transform in general, its adjoint version is not the inverse transform.
In order to perform an inverse NDFT/NFFT, which transforms nonuniformly/irregularly sampled data from spatial/time domain to a regular grid in frequency domain, please have a look at the documentation of the inversion, the NFFT 3 manual, and some more details on the theoretical background in Chapter 5 of the PhD thesis of Stefan Kunis. An example on how to use the inverse NFFT can be found in examples/solver/simple_test.c of our NFFT software library.
Additionally, for the one-dimensional case, there is a new direct inversion method based on fast summation for Matlab, available since NFFT 3.4.1.
Is NFFT available for ...?
Please have a look at the Download page and Links page.
NFFT configure script can not find FFTW3 library
Please make sure that you have installed the development package of FFTW3. In particular, on Linux, please check if the files
libfftw3.aare available in
/usr/lib(or your usual library directory).
If you compile the FFTW3 source code yourself, please make sure to supply the option
--enable-static --enable-sharedto the FFTW3 configure script, e.g.
./configure --enable-static --enable-shared --enable-threads --with-pic --enable-sse2 --enable-avx --enable-avx2 --disable-fortran --prefix=FFTW_INSTALL_DIRwhere
FFTW_INSTALL_DIRis a directory of your choice.
Then, after running
make installfor the FFTW3 library, please execute the NFFT configure script with the switch
Inaccurate calculations in long double precision with OpenMP in Windows
The NFFT with long double precision and OpenMP in Windows does many calculations only in double precision. This is caused by a bug in MinGW. Other operating systems are not affected.
If you compile long double precision in Windows, please disable OpenMP support (configure switch "--disable-openmp" which is the default).
Wrong NFSOFT calculation with processors supporting AVX512 in certain GCC version
When compiling the NFFT on a CPU with AVX512 instructions (e.g. Intel Xeon newer than 2016) and in GCC version 7.4.0, the NFSOFT module might produce wrong results. The problem is solved with GCC 9.2.1.
Internal compiler error when compiling fastsum
Due to a bug in GCC versions 7.1.0, 7.2.0 and 7.3.0, compilation of the NFFT might abort with an internal compiler error in the fastsum module. A workaround was added in NFFT 3.4.0.
Wrong NFFT calculation when enabling the debug mode or overriding the compiler flags (CFLAGS)
Due to a bug in GCC versions 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0 and 4.6.1, compiling the NFFT without the compiler flag "-ffast-math" may lead to incorrect computation results and buffer overflows.
By default, this flag is set by the "configure" script.
If you enable the debug mode (configure switch "--enable-debug") or set the CFLAGS manually, please add the compiler flag "-ffast-math" to the CFLAGS environment variable.
Internal compiler error when compiling with MRI support
Due to a bug in GCC version 4.7.1, compilation of the NFFT with MRI module enabled (configure option
--enable-all) will abort with an internal compiler error.
This problem does not occur in earlier or later versions of the GCC. A workaround was added in nfft-3.2.3.
Compilation fails when MRI module enabled and NNFFT module disabled
When the NFFT is compiled with MRI and without NNFFT support, a compilation error eccurs in applications/mri/mri2d.
Please also enable the NNFFT module when building with MRI support (configure options
--enable-nnfft --enable-mri), or build all modules (
can be found on Github issue tracker