SourceForge logo
SourceForge logo
Menu

[matplotlib-devel] weird error with gcc 4.4, gomp, cython, and matplotlib

From: Hoyt K. <ho...@gm...> - 2010年01月28日 05:51:54
I'm really not sure which mailing list to report this on -- it has got
to rank up there with one of the most obscure errors of all times. I
suspect it's an error in gcc's new openmp implementation, gomp, but
not sure; I can report it there if people think I should.
In gcc 4.4.1, when I compile a completely empty .pyx module in (1) c++
mode and (2) pass -lgomp to the linker, simply (3) importing that
empty module causes any subsequent use of matplotlib to segfault the
program. Changing either (1), (2) or (3) makes the error go away.
I'm using the latest 32bit ubuntu (9.10), python 2.6.4, with the
latest cython-devel (2820:105c661599c9) and the latest matplotlib from
svn (8097). In matplotlib, I'm using the qt4agg backend. Everything
else appears to be working save for this error.
If my main file is simply:
import tests.emptymodule
import tests.plottest
where emptymodules is a completely empty cython module and plottest is
from matplotlib.pylab import *
figure()
plot([0,1], [0,1], '-b')
show()
The program segfaults on the plot() call, with backtrace
(gdb) bt 8
#0 0x00e03bc7 in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
#1 0x0093f282 in py_to_agg_transformation_matrix (obj=0x8223f58,
errors=false) at src/agg_py_transforms.cpp:20
#2 0x00946ff3 in _path_module::update_path_extents (this=0x8856098,
args=...) at src/path.cpp:346
#3 0x0094e2fd in
Py::ExtensionModule<_path_module>::invoke_method_varargs (this=<value
optimized out>, method_def=0x8476e00, args=...)
 at ./CXX/Python2/ExtensionModule.hxx:184
#4 0x0093ae26 in method_varargs_call_handler
(_self_and_name_tuple=0x888448c, _args=0x8f052fc) at
CXX/Python2/cxx_extensions.cxx:1714
#5 0x080dc0d0 in PyEval_EvalFrameEx ()
#6 0x080dddf2 in PyEval_EvalCodeEx ()
#7 0x080dc1b4 in PyEval_EvalFrameEx ()
Other commands like imshow also cause a segfault.
Anyway, I can get by for now without openmp, but I'm curious if anyone
has ideas about this bug. I've attached a tarball with the code that
reproduces it for me; simply run build.sh and run.
Thanks!
-- hoyt
++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ ho...@gm...
++++++++++++++++++++++++++++++++++++++++++

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /