Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple Distributed from LinearAlgebra #29975

Closed
wants to merge 1 commit into from
Closed

Conversation

fredrikekre
Copy link
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
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
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
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
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