Skip to content

Fixed unnecessary Pool creation in searchlight#386

Merged
mihaic merged 3 commits into
brainiak:masterfrom
davidt0x:searchlight_poolsize_1_opt
Oct 16, 2018
Merged

Fixed unnecessary Pool creation in searchlight#386
mihaic merged 3 commits into
brainiak:masterfrom
davidt0x:searchlight_poolsize_1_opt

Conversation

@davidt0x

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Can one of the admins verify this patch?

1 similar comment
@buildbot-princeton

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@mihaic

mihaic commented Oct 15, 2018

Copy link
Copy Markdown
Member

Jenkins, add to whitelist.

@mihaic mihaic left a comment

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.

@davidt0x, thanks for the PR. It makes sense. Could you please fix the lint errors?

@mihaic

mihaic commented Oct 16, 2018

Copy link
Copy Markdown
Member

Jenkins, retest this please.

@davidt0x

Copy link
Copy Markdown
Contributor Author

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

@mihaic

mihaic commented Oct 16, 2018

Copy link
Copy Markdown
Member

Precisely!

@davidt0x

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

mihaic commented Oct 16, 2018

Copy link
Copy Markdown
Member

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