Skip to content

Commit

Permalink
Implement a hook in base for disabling threading (#30004)
Browse files Browse the repository at this point in the history
of libraries, use it to decouple Distributed from LinearAlgebra.
  • Loading branch information
fredrikekre authored and JeffBezanson committed Dec 7, 2018
1 parent 4c5e082 commit 6eef924
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name = "Distributed"
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
Expand Down
6 changes: 0 additions & 6 deletions src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ mutable struct LocalProcess
LocalProcess() = new(1)
end


import LinearAlgebra
function disable_threaded_libs()
LinearAlgebra.BLAS.set_num_threads(1)
end

worker_timeout() = parse(Float64, get(ENV, "JULIA_WORKER_TIMEOUT", "60.0"))


Expand Down
2 changes: 1 addition & 1 deletion src/process_messages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function handle_msg(msg::JoinPGRPMsg, header, r_stream, w_stream, version)
topology(msg.topology)

if !msg.enable_threaded_blas
disable_threaded_libs()
Base.disable_library_threading()
end

lazy = msg.lazy
Expand Down

0 comments on commit 6eef924

Please sign in to comment.