Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
julia: start with a single thread for OpenBLAS
Add patch julia-0001-Allow-OpenBLAS-NUM_THREADS-to-be-overwritten.patch which makes it possible to specify the maximum number of threads to be used by OpenBLAS on the make command line instead of using the values computed by the julia build system which depend on the build host. Set the maxmum number of threads to be used by OpenBLAS to 80. Add patch julia-0002-Start-up-OpenBLAS-with-1-thread-per-default.patch which configures OpenBLAS to use only one thread instead of the maximum possible number from julia startup. To use more threads, julia can be started with and environment variable OPENBLAS_NUM_THREADS, e.g. OPENBLAS_NUM_THREADS=8 julia As a result, we default to one thread but can scale up to 80. buczek@nomatophobie:~$ julia -q julia> ccall((:openblas_get_num_threads64_, Base.libblas_name), Cint, ()) 1 julia> BLAS.set_num_threads(9999) julia> ccall((:openblas_get_num_threads64_, Base.libblas_name), Cint, ()) 80 julia> buczek@nomatophobie:~$ OPENBLAS_NUM_THREADS=8 julia -q julia> ccall((:openblas_get_num_threads64_, Base.libblas_name), Cint, ()) 8 julia>
- Loading branch information