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

Fixed unnecessary Pool creation in searchlight #386

Merged
merged 3 commits into from
Oct 16, 2018

Conversation

davidt0x
Copy link
Contributor

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

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
@buildbot-princeton
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@buildbot-princeton
Copy link
Collaborator

Can one of the admins verify this patch?

@mihaic
Copy link
Member

mihaic commented Oct 15, 2018

Jenkins, add to whitelist.

Copy link
Member

@mihaic mihaic left a 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?

@mihaic
Copy link
Member

mihaic commented Oct 16, 2018

Jenkins, retest this please.

@davidt0x
Copy link
Contributor Author

Do we need a unit test for pool_size = 1 to get coverage up? Am I reading this correctly?

@mihaic
Copy link
Member

mihaic commented Oct 16, 2018

Precisely!

@davidt0x
Copy link
Contributor Author

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 :)

@mihaic mihaic merged commit 8994231 into brainiak:master Oct 16, 2018
@mihaic
Copy link
Member

mihaic commented Oct 16, 2018

Thanks a lot, @davidt0x! This should make some people happy. :)

@davidt0x davidt0x deleted the searchlight_poolsize_1_opt branch October 17, 2018 01:53
mihaic added a commit to mihaic/brainiak that referenced this pull request Jun 21, 2019
mihaic added a commit to mihaic/brainiak that referenced this pull request Jun 21, 2019
mihaic added a commit that referenced this pull request Aug 14, 2019
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.

3 participants