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

Fixes error with tesseroid modeling on latest numba #328

Merged
merged 15 commits into from Nov 26, 2016

Conversation

Projects
None yet
1 participant
@leouieda
Member

leouieda commented Sep 28, 2016

The fatiando.gravmag.tesseroid code fails with the latest numba (0.28). This
was uncaught because installing Mayavi limits numba to 0.26, where the error
doesn't occur. The problem was in the engine_factory function. The looplift
argument to numba.jit doesn't seem to work anymore. The fix was to move the
array allocations out of the jitted function into the calling Python function.
This breaks the numpy only functions. They were too slow to be usable anyway so
I removed them from the code.

Caught the error by running the CI builds without installing Mayavi, but kept a
separate build with Mayavi to generate the documentation HTML. This forced to
configure the CI builds. Now there are separate builds for compiling the docs,
testing in Linux, and testing in OSX.

Checklist:

  • Make tests for new code (at least 80% coverage)
  • Create/update docstrings
  • Include relevant equations and citations in docstrings
  • Docstrings follow the style conventions
  • Code follows PEP8 style conventions
  • Code and docs have been spellchecked
  • Include new dependencies in doc/install.rst, requirements.txt, environment.yml, ci/requirements-conda.txt and ci/requirements-pip.txt.
  • Documentation builds properly (run cd doc; make locally)
  • Changelog entry (leave for last to avoid conflicts)

@leouieda leouieda added the bug label Sep 28, 2016

@leouieda leouieda added this to the 0.5 milestone Sep 28, 2016

@leouieda leouieda referenced this pull request Sep 28, 2016

Merged

Remove Mayavi plots from the gallery #327

10 of 10 tasks complete

@leouieda leouieda force-pushed the tesseroid-numba-latest branch from 6ce847d to 426b5e4 Nov 26, 2016

leouieda added some commits Sep 28, 2016

CI builds with no Mayavi
Only install Mayavi on the build that makes the docs. Run without on
others to catch a bug in the tesseroid code with the latest numba.
Moves array allocations out of numba jitted func
The allocations were pushed the calling Python function. This breaks the
numpy version of the code, which I disabled because it was practically
unusable (so slow).
If in single line in travis config
Also simplifies the ci shell scripts and use "set -e" to make them fail
if any command inside fails.
Fix missing space in run tests script
Add some more verbosity to the script as well.
Install coveralls by itself in travis only
Of course putting it in ci/requirements-pip.txt wouldn't get run when
running coverage, only when building the docs.
Workaround for failing TravisCI OSX tests
Add "set +e" to the end of scripts as suggested in
travis-ci/travis-ci#6522

@leouieda leouieda force-pushed the tesseroid-numba-latest branch from 25691b2 to 0a257b3 Nov 26, 2016

@leouieda leouieda merged commit e15f498 into master Nov 26, 2016

5 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 71.752%
Details

@leouieda leouieda deleted the tesseroid-numba-latest branch Nov 26, 2016

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