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

Issue using scikits.odes with Python 3.5 and 3.7 but not with 3.6 #92

Open
fcooper8472 opened this issue Feb 25, 2019 · 3 comments
Open

Comments

@fcooper8472
Copy link

We're using scikits.odes in a battery modelling project PyBaMM. We've run into the following difficulty getting it working as expected with our continuous integration: everything works fine with Python 3.6, but not with Python 3.5 and 3.7.

Example failure on 3.5
Example success on 3.6
Example failure on 3.7

In each of the failures the errors are reported as

ValueError: Integrator name <ida or cvode> does not exsist

With these specific failures I have tried using your Sundials installation scripts, and can't see any obvious reason that there would be any difference between python versions.

Have you seen this before? Any ideas what the problem might be? Thanks for your help!

@bmcage
Copy link
Owner

bmcage commented Mar 6, 2019

I don't fully follow the bug. @aragilar is the resident build expert.
Our Travis build succeeds I see. I did a PR now, it is rebuilding, but I assume all will be fine.
Integrator name not found means the sundials libs are not found on loading odes, so they cannot be used.

@aragilar
Copy link
Collaborator

aragilar commented Mar 7, 2019

I looked at the logs, the important part is:

Could not load IDA solver numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject
ImportError: No module named 'numpy.core._multiarray_umath'
numpy.core.multiarray failed to import
ImportError: No module named 'numpy.core._multiarray_umath'
numpy.core.multiarray failed to import

So somehow there's a issue with numpy, which is affecting the cython code. Either numpy didn't build/link properly, or there are multiple versions of numpy involved. I'm guessing that scikits.odes was built against a different version of numpy to that imported in the unit tests.

@fcooper8472
Copy link
Author

Many thanks for looking into this @bmcage and @aragilar.

The problem does seem to be that there are several version of numpy involved. Looking at the output from this failure (Python 3.5), installing our software requires (arbitrarily) numpy>=1.14 and this is already satisfied in the travis environment:

Requirement already satisfied: numpy>=1.14 in /home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages (from pybamm==0.0.0) (1.15.4)

Later, through, we pip install -v scikits.odes, and that acquires a different version of numpy:

Installing build dependencies ...   Running command /home/travis/virtualenv/python3.5.6/bin/python -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-qp3k4ksz --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel numpy cython

which ends up with Using version 1.16.1.

So the issue seems to be that installing scikits.odes ignores the already-installed numpy and pulls in the latest one available. Any idea why? (Probably something to do with the --ignore-installed?)

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

No branches or pull requests

3 participants