nfft
nfft copied to clipboard
Matlab Linux changes the number of threads in some built-in Matlab functions
I have noticed that certain Matlab functions in Linux change the default number of threads. Calling nfft_get_num_threads
in Matlab, which internelly refers to the omp_get_num_threads
routine, usually returns the number of available threads. However, calling the Matlab built-in function smooth3
changes the number of OMP threads to 1, such that later on the NFFT is executed on only one thread. I tested it with Matlab 2020b in Linux, it does not occur in Windows.
This is not particularly a problem of the NFFT, so we cannot change this behavior. However, one can manually change the number of threads used by the NFFT with the function nfft_set_num_threads
introduced in #113.