-
Notifications
You must be signed in to change notification settings - Fork 6
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
strange behaviour of sme
running in a jupyter notebook
#333
Comments
same issue occurs on readthedocs when trying to execute getting_started notebook:
https://readthedocs.org/projects/spatial-model-editor/builds/12126860/ |
update:
|
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - split getting started notebook - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - split getting started notebook - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - split getting started notebook - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - split getting started notebook - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - split getting started notebook - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
- add top level section "Python" to docs - add notebooks to docs/sme/notebooks - split getting started notebook - use nbsphinx sphinx extension - executes all ipython notebooks - converts them to rst - automatically add prologue to each notebook with colab link - add nbstripout to pre-commit hooks - removes all output from ipynb files before commit - resolves #344 also - improve passing of std::vectors to python - use opaque types & stl_bind to pass std::vector<SmeObject> by reference to python - resolves #368 - stop building manylinux2010 CPython wheels due to #333 - only build pypy wheels using manylinux2010 docker image - manylinux1 CPython wheels do not have this issue - pybind11 -> 2.6.0rc3
have now switched to only producing manylinux1 wheels:
|
enabling logging on the manylinux2010 python 3.8 wheel shows the imported sbml model is somehow being corrupted (only in jupyter notebook - in ipython this works fine):
|
This is caused by sme static linking The reason for doing this was to try to make it more portable by not depending on the available libstdc++ on the system - which is (still, I think) fine for a standalone binary like the GUI. But since sme is a library, it may be imported by another c++ binary (I guess in this case jupyter) which dynamically links to libstdc++, we can end up with a mix of old&new libstdc++ symbols in our process, and a call can resolve the wrong symbols. in the above error the line More generally, see this long discussion about an attempt to do the same thing for tensorflow wheels: tldr: we should not static link libstdc++ for the python wheels |
NB this probably also explains why manylinux1 wheels crashed on colab - there we are forced to statically link to get manylinux1 compatible wheels as we use a newer compiler. Todo:
|
also - remove static linking of libstdc++ in manylinux2010 wheels - also remove manylinux1 wheels - resolves #333 - use PYTHONMALLOC=malloc for ASAN CI python tests to reduce false positives - pybind11 -> 2.6.0
also - remove static linking of libstdc++ in manylinux2010 wheels - also remove manylinux1 wheels - resolves #333 - use PYTHONMALLOC=malloc for ASAN CI python tests to reduce false positives - pybind11 -> 2.6.0
On ubuntu, using
sme
v1.0.0 installed from pip on python 3.7, running this script:with python gives the correct output:
however in a jupyter notebook with the same kernel and sme installation it gives (incorrect):
and the script takes no time to run, so presumably the simulation is silently failing somehow.
If I compile
sme
locally withpip install .
(using the same static libs that the CI release uses) then the jupyter notebook versions also works as expected:I reproduced the same issue reproduced with other versions.
But the online google colab notebook works (with python 3.6).
It might be an issue with my local jupyter setup - but at the very least there should be an error message from
sme
in this situationThe text was updated successfully, but these errors were encountered: