NFFT Frequently Asked Questions with AnswersThis is the list of Frequently Asked Questions about NFFT.
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.
Internal compiler error when compiling fastsum
Due to a bug in GCC versions 7.1.0 and 7.2.0, compilation of the NFFT might abort with an internal compiler error in the fastsum module. A simple workaround is disabling the applications (configure option
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 (
NFFT for Windows
We offer compiled binaries of the NFFT library and Matlab interface for 64-bit Windows on our download page. If you want to compile NFFT by yourself, you can use the following manual which should work with NFFT 3.3.2 on a 64-bit Windows PC with 64-bit Matlab.
- Download and install MSYS2.
- Start the MinGW-w64 Win64 Shell, and type the following to update your installation and install the MinGW-w64 toolchain and FFTW
pacman -Syuu pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-fftw
- Download and unpack the NFFT source code from the download page to your MSYS2 home directory (e.g.
C:\msys64\home\JaneDoe\nfft-3.3.2, replace JaneDoe by your username).
- Open the NFFT directory in the MinGW shell
- Run the configure script
./configure --enable-all --enable-openmp --with-matlab=/c/Programme/MATLAB/R2015bHere are some useful optional flags:
--enable-allsays that all modules should be compiled,
--enable-openmpenables the multicore support, and
--with-matlabcontains the path to your Matlab installation. For a list of all available options, you can run
Note: You might run into trouble if the path of your Matlab installation contains a space (e.g.
C:\Program Files). An easy way to overcome this is creating a link to your Matlab directory.
- Compile the nfft by running
- The compiled programs need the proper libraries to run correctly,
i.e., they require
libgomp-1.dll(all in the folder
mingw64/bin, the latter two are only required if openmp is enabled in the configure script). For some executebles, you might also need the
.dllfile from the directory
nfft-3.3.2/.libs. The easiest way to add these libraries is to copy them all in the same directory you run the executeble from. Alternatively, you can put the dll files in a directory added to the Windows
%PATH%environment variable (see also How do I set or change the PATH system variable?). When having problems with dependecies, check out the Dependecy Walker.
Note: When running Matlab, the dll files should be in your current Matlab directory, adding it the Matlab path might be insufficient.