Opened 15 years ago
Closed 15 years ago
#20491 closed defect (fixed)
shogun-0.7.3 python modular crashes silently with Abort trap
Reported by: | rike.schuppner@… | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | shogun |
Description
Hi. When executing
import shogun.Classifier shogun.Classifier.LibSVM().train()
in ipython2.5, python crashes with an ‘Abort trap’. No other information is given on the command line.
When I use my private installation of shogun, there is no such crash. A SystemError is thrown (which is correct, because an assertion in the underlying C code fails) but ipython still lives.
Attachments (1)
Change History (10)
comment:1 Changed 15 years ago by tobypeterson
comment:2 Changed 15 years ago by tobypeterson
Owner: | changed from macports-tickets@… to jameskyle@… |
---|---|
Version: | 1.7.1 |
comment:3 Changed 15 years ago by jameskyle@…
I am not seeing this behavior on a fresh compile of atlas & shogun.
>>> import shogun.Classifier >>> shogun.Classifier.LibSVM().train() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/shogun/Classifier.py", line 2428, in train return _Classifier.LibSVM_train(self) SystemError: [ERROR] assertion labels && labels->get_num_labels() failed in file classifier/svm/LibSVM.cpp line 33
Are you using the most recent version of both?
comment:4 Changed 15 years ago by rike.schuppner@…
Yes. It’s all up to date. At the moment it occurs only with ipython, though. Have you checked this?
comment:5 Changed 15 years ago by jameskyle@…
Just tried and yes, ipython does crash.
You say this does not occur with your private installation of shogun. When running that version are you also running your private installation of ipython or are you running the macports ipython?
comment:6 Changed 15 years ago by rike.schuppner@…
It’s with the macports version of ipython. But, I’ve just tried with a downloaded version of ipython and it’s the same there (together with macports python2.5). Private shogun: okay, macports shogun: crash.
comment:7 Changed 15 years ago by jameskyle@…
Owner: | changed from jameskyle@… to mcalhoun@… |
---|
I think I have found the potential in this error. It seems the numpy core is linking against the system blas/lapack instead of the macports atlas build.
/Users/jkyle/Projects/macports/mports/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy//core/_dotblas.so: /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib (compatibility version 1.0.0, current version 242.0.0)
I'm sure this is not good and the traceback goes straight to the veclib library. I would wager that your personal install of shogun and/or ipython are all linking against the same libraries. You could varify this of course with otool -L.
Since the issue lies in another package, I am reassigning this ticket to the numpy maintainer.
comment:8 Changed 15 years ago by jameskyle@…
I've modified the py26-numpy port to link against macport's atlas libraries and this fixes the issue you're seeing. Once I get the go ahead, I'll push those changes live and this ticket will be fixed:
Python 2.6.2 (r262:71600, Sep 27 2009, 15:19:09) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: import shogun.Classifier In [2]: shogun.Classifier.LibSVM().train() --------------------------------------------------------------------------- SystemError Traceback (most recent call last) /macports/dports/python/py26-numpy/<ipython console> in <module>() /macports/mports/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/shogun/Classifier.py in train(self) 1377 def train(self): 1378 """train(self) -> bool""" -> 1379 return _Classifier.LibSVM_train(self) 1380 1381 def get_classifier_type(self): SystemError: [ERROR] assertion labels && labels->get_num_labels() failed in file classifier/svm/LibSVM.cpp line 33
comment:9 Changed 15 years ago by jameskyle@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should no longer occur so long as the py26-numpy and py26-scipy ports are built to link against the macports atlas libs (which is now the default).
Attach crash log please...