-
Notifications
You must be signed in to change notification settings - Fork 135
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
Fixed unnecessary Pool creation in searchlight #386
Conversation
When pool_size=1 the creation of a multiprocessing pool is unnecessary and wasteful because data needs to be copied and sent to other process. This would double the needed memory for each MPI task. In addition, fork() can cause unpredictable behaviour in some MPI implementations, see: https://www.open-mpi.org/faq/?category=tuning#fork-warning
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
Jenkins, add to whitelist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidt0x, thanks for the PR. It makes sense. Could you please fix the lint errors?
Jenkins, retest this please. |
Do we need a unit test for pool_size = 1 to get coverage up? Am I reading this correctly? |
Precisely! |
Ok, I copied one of the previous tests with the only difference being pool_size=1. Test passes and coverage was good on my end. Third times the charm hopefully :) |
Thanks a lot, @davidt0x! This should make some people happy. :) |
When pool_size=1 the creation of a multiprocessing pool is unnecessary
and wasteful because data needs to be copied and sent to other process.
This would double the needed memory for each MPI task. In addition,
fork() can cause unpredictable behaviour in some MPI implementations,
see:
https://www.open-mpi.org/faq/?category=tuning#fork-warning