Skip to content

Conversation

@NicolasHug
Copy link
Member

Follow up on #14265

ping @ogrisel @jeremiedbb please make sure I didn't write any nonsense :)

Copy link
Contributor

@albertcthomas albertcthomas left a comment

Choose a reason for hiding this comment

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

I cannot really assess the correctness but I find it very clear. I also like the small example with the 4 * 4 threads in total. Thanks!

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Thanks @NicolasHug ! A few comments

@NicolasHug NicolasHug changed the title [MRG] DOC for controlling number of OpenMP threads [MRG] DOC More details about parallelism (joblib, openMP, MKL...) Oct 2, 2019
@NicolasHug
Copy link
Member Author

I made a big update.

Tried to trim down the n_jobs glossary description and added more details in the UG.

That's pretty much all I know about this... Hope that's useful, feedback welcome

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Look good overall. I find it very clear, thanks !

Numpy recently added the possibility to link against BLIS (another multi-threaded BLAS implementation). For completeness you could add BLIS everywhere you mention MKL and OpenBLAS :)
It also has a env var: BLIS_NUM_THREADS.

@NicolasHug
Copy link
Member Author

Thanks a lot for the comments. @jeremiedbb joblib doesn't protect from oversubscription from BLIS for now, right?

@jeremiedbb
Copy link
Member

jeremiedbb commented Oct 3, 2019

joblib doesn't protect from oversubscription from BLIS for now, right?

Actually it does because BLIS looks for OMP_NUM_THREADS as well.

(That might change in the future:
Note: We highly discourage use of the OMP_NUM_THREADS environment variable and may remove support for it in the future. If you wish to set parallelism globally via environment variables, please use BLIS_NUM_THREADS.)

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM !

Copy link
Contributor

@tomMoral tomMoral left a comment

Choose a reason for hiding this comment

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

This is very clear and synthetic! Thanks @NicolasHug for doing this.
2/3 comments on some specific points.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Overall, LGTM. Just a few improvement suggestions:

@ogrisel ogrisel merged commit 60ce68c into scikit-learn:master Oct 15, 2019
@ogrisel
Copy link
Member

ogrisel commented Oct 15, 2019

Merged! Thanks @NicolasHug.

@NicolasHug
Copy link
Member Author

This might need an update depending on the outcome of #14196

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.

7 participants