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

Tesseroid forward modeling takes an optional open multiprocessing.Pool #183

Merged
merged 4 commits into from Mar 17, 2015

Conversation

Projects
None yet
1 participant
@leouieda
Member

leouieda commented Mar 17, 2015

The forward modeling functions in gravmag.tesseroid take an option
multiprocessing.Pool object to run things in parallel. This way, a pool
object can be reused for multiple calls, avoiding the repeated spawning
of processes.

Refactored the function code in the process to have less repetition. The
_dispatcher function now: checks arguments, spawns the pool if
necessary, dispatches the work, and returns the result.

Fixes #182

Checklist:

  • Make tests for new code
  • Create/update docstrings
  • Include relevant equations and citations in docstrings
  • Code follows PEP8 style conventions
  • Code and docs have been spellchecked
  • Include new dependencies in docs, requirements.txt, README, and .travis.yml
  • Documentation builds properly
  • All tests pass
  • Can be merged
  • Changelog entry

leouieda added some commits Mar 17, 2015

Tesseroid fwd modeling takes an open Pool
The forward modeling functions in gravmag.tesseroid take an option
multiprocessing.Pool object to run things in parallel. This way, a pool
object can be reused for multiple calls, avoiding the repeated spawning
of processes.

Refactored the function code in the process to have less repetition. The
_dispatcher function now: checks arguments, spawns the pool if
necessary, dispatches the work, and returns the result.
Fix links to functions in module docstring
The links were to the gravmag.prism functions, no gravmag.tesseroid

leouieda added a commit that referenced this pull request Mar 17, 2015

Merge pull request #183 from fatiando/reuse-pool
Tesseroid forward modeling takes an optional open multiprocessing.Pool

@leouieda leouieda merged commit 327ec74 into master Mar 17, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@leouieda leouieda deleted the reuse-pool branch Mar 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment