NFFT / nfft

The official NFFT library repository
https://tu-chemnitz.de/~potts/nfft/
GNU General Public License v2.0
174 stars 45 forks source link

Matlab Linux changes the number of threads in some built-in Matlab functions #114

Closed michaelquellmalz closed 1 month ago

michaelquellmalz commented 3 years ago

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.

michaelquellmalz commented 1 month ago

This problem seems to be resolved with Matlab 2022