Skip to content

Commit 6eef924

Browse files
fredrikekreJeffBezanson
authored andcommitted
Implement a hook in base for disabling threading (#30004)
of libraries, use it to decouple Distributed from LinearAlgebra.
1 parent 4c5e082 commit 6eef924

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

Project.toml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name = "Distributed"
22
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
33

44
[deps]
5-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
65
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
76
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
87
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"

src/cluster.jl

-6
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,6 @@ mutable struct LocalProcess
163163
LocalProcess() = new(1)
164164
end
165165

166-
167-
import LinearAlgebra
168-
function disable_threaded_libs()
169-
LinearAlgebra.BLAS.set_num_threads(1)
170-
end
171-
172166
worker_timeout() = parse(Float64, get(ENV, "JULIA_WORKER_TIMEOUT", "60.0"))
173167

174168

src/process_messages.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ function handle_msg(msg::JoinPGRPMsg, header, r_stream, w_stream, version)
307307
topology(msg.topology)
308308

309309
if !msg.enable_threaded_blas
310-
disable_threaded_libs()
310+
Base.disable_library_threading()
311311
end
312312

313313
lazy = msg.lazy

0 commit comments

Comments
 (0)