Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Complex#30

Merged
JohanMabille merged 2 commits into
xtensor-stack:masterxtensor-stack/xtensor-python:masterfrom
JohanMabille:complexJohanMabille/xtensor-python:complexCopy head branch name to clipboard
Feb 28, 2017
Merged

Complex#30
JohanMabille merged 2 commits into
xtensor-stack:masterxtensor-stack/xtensor-python:masterfrom
JohanMabille:complexJohanMabille/xtensor-python:complexCopy head branch name to clipboard

Conversation

@JohanMabille

Copy link
Copy Markdown
Member

No description provided.

@nbecker

nbecker commented Feb 28, 2017

Copy link
Copy Markdown

I tried applying the patch for this commit, which applied without complaint. But:
python3 ./test_numpy_fncs.py
Segmentation fault (core dumped)

@nbecker

nbecker commented Feb 28, 2017

Copy link
Copy Markdown

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
void pybind11::cpp_function::initialize<pybind11_init()::{lambda(xt::pyarray<std::complex > const&)#1}, pybind11::tuple, xt::pyarray<std::complex > const&, pybind11::name, pybind11::scope, pybind11::sibling>(pybind11_init()::{lambda(xt::pyarray<std::complex > const&)#1}&&, pybind11::tuple (*)(xt::pyarray<std::complex > const&), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) [clone .lto_priv.229] ()
at /home/nbecker/.local/include/xtensor/xassign.hpp:201
��/home/nbecker/.local/include/xtensor/xassign.hpp:201:6251:beg:0x7fffe0c9f39b

@JohanMabille

JohanMabille commented Feb 28, 2017

Copy link
Copy Markdown
Member Author

@nbecker could you test with the last update ? If that doesn't work, could you tell me which compiler you use, the version of pybind11 and how you build your extension ?

@nbecker

nbecker commented Feb 28, 2017

Copy link
Copy Markdown

I did:

  1. git clone https://github.com/QuantStack/xtensor-python.git xtensor-python-johan

  2. git am --signoff 30.patch
    Applying: complex benchmark
    Applying: complex arrays fixed

  3. pybind11 is a bit of a mix:
    Head: fix-import-error merge
    Merge: dean0x7d/fix-import-error Fix handling of Python exceptions during module initialization
    Tag: v2.0.0 (42)
    CI: None

Unmerged into dean0x7d/fix-import-error (2)
d13f015 fix-import-error merge
2d6bc76 jagerman/array_t-overload-resolution array_t overload resolution support

  1. compiled as:
    g++ -o numpy_fncs.cpython-35m-x86_64-linux-gnu.os -c -g -std=c++1z -O3 -march=native -fvisibility=hidden -flto -DNDEBUG -ffast-math -fPIC -I/home/nbecker/.local/include -I/usr/include/eigen3 -I/home/nbecker/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m numpy_fncs.cc

@JohanMabille

Copy link
Copy Markdown
Member Author

Ok, the problem seems to happen with pybind11 >2.0.1 only (current master). However, the test I've added in the PR does not trigger the bug (even with master branch of pybind11), the crash occurs after many calls.

Since this PR seems to work fine with pybind11 2.0.1, I'll merge it and I'll open a specific issue for this problem.

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.