Skip to content

Decouple Distributed from LinearAlgebra#29975

Closed
fredrikekre wants to merge 1 commit intomasterfrom
fe/decouple
Closed

Decouple Distributed from LinearAlgebra#29975
fredrikekre wants to merge 1 commit intomasterfrom
fe/decouple

Conversation

@fredrikekre
Copy link
Copy Markdown
Member

Decouples Distributed from LinearAlgebra; this makes it possible to have Distributed in the sysimg without the constraint to also have LinearAlgebra in there.

function disable_threaded_libs()
LinearAlgebra.BLAS.set_num_threads(1)
LA = Base.PkgId(Base.UUID((0x37e2e46d_f89d_539d,0xb4ee_838fcccc9c8e)), "LinearAlgebra")
if haskey(Base.loaded_modules, LA)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to make disabling blas threads depend on when you load LinearAlgebra. We should have a more comprehensive solution.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to make disabling blas threads depend on when you load LinearAlgebra.

I thought this was the intention. So this function is more: "don't let any threaded libraries use more than one thread" rather than, as I interpreted it: "disable all loaded libraries that use more than one thread"? (Also to have disable in the name is a bit weird.)

We should have a more comprehensive solution.

I feel like a hook in Base might be better then? Such that other libraries also can be disabled with this function?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was the intention.

I don't see how that could be a good thing. using LinearAlgebra followed by adding processors => threads disabled. Adding processors followed by using LinearAlgebra => threads enabled. Gotcha. A hook in Base would be better.

@fredrikekre
Copy link
Copy Markdown
Member Author

Replaced by #30004.

@fredrikekre fredrikekre closed this Dec 6, 2018
@fredrikekre fredrikekre deleted the fe/decouple branch December 6, 2018 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants