-
Notifications
You must be signed in to change notification settings - Fork 88
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
BUG: segfault when calling CouplingAnalysis.mutual_information()
and CouplingAnalysis.information_transfer()
#187
Comments
funcnet.coupling_analysis.mutual_information()
and funcnet.coupling_analysis.information_transfer()
CouplingAnalysis.mutual_information()
and CouplingAnalysis.information_transfer()
#162 looks like it might be related to this issue. The cython/C functions
and
used in |
The test suite passes on the freshly installed
|
That's curious. I did a fresh install on a new conda environment and still get the segfaults wenn running the test suite via tox. I admit my system is not the latest, running on macOS 10.13, not sure if that might be a problem. I still have a conda=23.3 and python=3.10 though. I could not do full reverts of the above commits because that breaks the cython compilation on reinstall, so I tried reverting only changes concerning which all compiled fine, but didn't fix the segfault. I also tried python 3.9 and 3.11 but no difference. (won't install on python=3.8 because numpy=1.25 needs python>=3.9) Any more ideas at this point? Otherwise I will try porting Thanks for the hint by the way, didn't realize |
This sounds like a bug whose manifestation is compiler/platform-dependent. Cythonizing would therefore probably be of comparable effort to debugging the C version, and reducing the language diversity would be beneficial independently of fixing this bug. Sorry, I overlooked I fixed the Numpy issue in a9a70b2. |
Thanks for fixing the numpy issue! Will look into cythonizing the remaining C functions for |
- port remaining C functions to cython and delete C file - resolve multiple `index out of bounds` errors in ported cython code which had previously led to segfaults - all tests passing again, issue pik-copan#187 resolved
Might be a similar problem as in issue #128, pointing to an indexation error in an underlying C function.
Discovered this behaviour when running the test suite. The corresponding tests
test_mutual_information
andtest_information_transfer
currently remain the only ones failing.coupling_analysis.mutual_information()
andcoupling_analysis.information_transfer()
are the only methods in class callingcoupling_analysis.get_nearest_neighbors()
, which relies onfuncnet._ext.numerics._get_nearest_neighbors()
and the C function_get_nearest_neighbors_fast()
, so the bug might be somewhere in the latter two.@ntfrgl, it'd be awesome if you could have a look at this! I wasn't able to trace it back any further as I haven't installed a cython debugger yet, so I was hoping you might find the bug just by staring as you did in
0ce39ae
. :)If it really is a similar issue, I suppose you'd port those modules to cython as you did in
b7e546d
. Let me know if I should try and do that myself then, but it'd certainly take me a bit more time.The text was updated successfully, but these errors were encountered: