sage crashes while interpolating

asked 2012-07-11 09:29:36 +0200

Cosmos gravatar image

updated 2022-09-01 08:20:28 +0200

FrédéricC gravatar image
f_interpolation = scipy.interpolate.interp2d(*zip(*matrix(A)),kind='cubic')
               plot_interpolation = contour_plot(lambda x,y:
                   f_interpolation(x,y)[0], (22.423,22.439),(37.07,37.08) ,cmap='jet', contours=numpy.arange(0,1400,100), colorbar=True)

               plot_all = plot_interpolation

               plot_all.show(,axes_labels=["m", "m"])

I am running this command to interpolate the data contained in matrix(A). matrix(A) is 1800 x 3 dense matrix over Real Double Field. Sage crashes everytime i do this both in a quad core Amd with 8GB of ram(kubuntu 12.04 64bit, in both the binary and compiled from source versions) and a netbook Lenovo s9e with Intel Atom and 1GB of ram(kubuntu 12.04 32bit, binary version of sage).It returns this message:

/home/user/Sage/sage-5.0.1/local/lib/libcsage.so(print_backtrace+0\
x31)[0x7fc18b464ea9]
/home/user/Sage/sage-5.0.1/local/lib/libcsage.so(sigdie+0x14)[0x7f\
c18b464edb]
/home/user/Sage/sage-5.0.1/local/lib/libcsage.so(sage_signal_handl\
er+0x20c)[0x7fc18b464b06]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fc18f3f4cb0]
/home/user/Sage/sage-5.0.1/local/lib/python2.7/site-packages/scipy\
/interpolate/_fitpack.so(fprank_+0xdb0)[0x7fc15d29f4e0]
/home/user/Sage/sage-5.0.1/local/lib/python2.7/site-packages/scipy\
/interpolate/_fitpack.so(fpsurf_+0x67b8)[0x7fc15d2990d8]
/home/user/Sage/sage-5.0.1/local/lib/python2.7/site-packages/scipy\
/interpolate/_fitpack.so(surfit_+0xa08)[0x7fc15d289c18]
/home/user/Sage/sage-5.0.1/local/lib/python2.7/site-packages/scipy\
/interpolate/_fitpack.so(+0x4c7b)[0x7fc15d26cc7b]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyEval_Ev\
alFrameEx+0x53a5)[0x7fc18f6f0e45]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyEval_Ev\
alCodeEx+0x855)[0x7fc18f6f2a95]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyEval_Ev\
alFrameEx+0x5420)[0x7fc18f6f0ec0]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyEval_Ev\
alCodeEx+0x855)[0x7fc18f6f2a95]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(+0x73843)\
[0x7fc18f675843]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyObject_\
Call+0x53)[0x7fc18f64d7a3]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(+0x58f1f)\
[0x7fc18f65af1f]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyObject_\
Call+0x53)[0x7fc18f64d7a3]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(+0xac660)\
[0x7fc18f6ae660]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(+0xa8458)\
[0x7fc18f6aa458]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyObject_\
Call+0x53)[0x7fc18f64d7a3]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyEval_Ev\
alFrameEx+0x2b2a)[0x7fc18f6ee5ca]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyEval_Ev\
alCodeEx+0x855)[0x7fc18f6f2a95]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(+0x7374c)\
[0x7fc18f67574c]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyObject_\
Call+0x53)[0x7fc18f64d7a3]
/home/user/Sage/sage-5.0.1/local/lib/libpython2.7.so.1.0(PyEval_Ev ...
(more)
edit retag flag offensive close merge delete

Comments

I assume that this happens just with the `f_interpolation = scipy.interpolate.interp2d(*zip(*matrix(A)),kind='cubic')` command as well, without the plots? It may be that Scipy can't handle this and it's an upstream issue. Can you reproduce this with a Numpy array instead of a Sage matrix?

kcrisman gravatar imagekcrisman ( 2012-07-11 22:31:59 +0200 )edit

I didn't see your comment earlier. The binary version of sage was upgraded today and after this the problem i had was gone. Now however big the matrix is it doesn't crash. EDIT: It finally crashed again in sage 5.1

Cosmos gravatar imageCosmos ( 2012-07-12 06:58:12 +0200 )edit

Again, since the top few things in the traceback appear to be from Scipy, getting a "pure" example would be useful. Another idea is to run `sage -gdb` instead of just `sage`, and then do `bt` when it gets to the error - at least I think that's the right command, it's been a while since I did it.

kcrisman gravatar imagekcrisman ( 2012-07-12 21:31:57 +0200 )edit