Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ENH: expand OpenMP utilities and move from denspeed.pyx to dipy.utils #1050
I was recently working on adding OpenMP support to some functions in dipy.align and needed some utilities similar to the ones defined within
I propose moving these to a common location
The only change in functionality to
referenced this pull request
May 14, 2016
By default OMP_NUM_THREADS is probably not set on most systems unless the user has explicitly done so. In that case the max number of threads returned by omp_get_num_procs would be used.
OMP_NUM_THREADS is an environment variable that can be set by the user (e.g. via
However, looking more closely at these docs (https://gcc.gnu.org/onlinedocs/libgomp/OMP_005fNUM_005fTHREADS.html), I see that technically OMP_NUM_THREADS can also be set to a comma separated list. I have not supported that case here. The code as implemented here would fail to convert the list to an integer and fallback to the maximum number of threads as returned by omp_get_num_procs.