Ask Your Question
0

Bad alloc occurs during echelonization

asked 2013-04-29 05:44:33 +0100

Andrea gravatar image

updated 2015-01-14 14:30:34 +0100

FrédéricC gravatar image

Hi, I've tried to echelonize a 2500x2601 sparse matrix, constisting of 0-1.

I think Sage has consumed the entire RAM during the echelonization, and exited with a "bad alloc" error. This is the error stack:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
------------------------------------------------------------------------
/usr/lib/sagemath/local/lib/libcsage.so(print_backtrace+0x3b)[0xb6e930d8]
/usr/lib/sagemath/local/lib/libcsage.so(sigdie+0x43)[0xb6e9327d]
/usr/lib/sagemath/local/lib/libcsage.so(sage_signal_handler+0x187)[0xb6e929cc]
[0xb77a0400]
[0xb77a0424]
/lib/i386-linux-gnu/libc.so.6(gsignal+0x4f)[0xb74101df]
/lib/i386-linux-gnu/libc.so.6(abort+0x175)[0xb7413825]
/usr/lib/sagemath/local/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x178)[0xb6e4d130]
/usr/lib/sagemath/local/lib/libstdc++.so.6(+0xb1974)[0xb6e4a974]
/usr/lib/sagemath/local/lib/libstdc++.so.6(+0xb19a8)[0xb6e4a9a8]
/usr/lib/sagemath/local/lib/libstdc++.so.6(__cxa_rethrow+0x0)[0xb6e4abc1]
/usr/lib/sagemath/local/lib/libstdc++.so.6(_Znwj+0x73)[0xb6e4b4ef]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix_modn_dense_double.so(_ZN6LinBox10BlasMatrixINS_7ModularIdEEEC2IyEERKS2_RKyRKT_+0x6a)[0xb226e35a]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix_modn_dense_double.so(+0x32bdc)[0xb2260bdc]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x14d)[0xb766023d]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix_modn_dense_double.so(+0x1c0e0)[0xb224a0e0]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x14d)[0xb766023d]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix2.so(+0x3b98d)[0xb261f98d]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x14d)[0xb766023d]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix0.so(+0x14c31)[0xb2559c31]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x184)[0xb7660274]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix_integer_dense.so(+0x4c793)[0xb2396793]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x184)[0xb7660274]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix_rational_dense.so(+0x2c737)[0xb22f0737]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x14d)[0xb766023d]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix_rational_dense.so(+0x13a3b)[0xb22d7a3b]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x14d)[0xb766023d]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix0.so(+0x14c31)[0xb2559c31]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x184)[0xb7660274]
/usr/lib/sagemath/local/lib/libpython2.7.so.1.0(PyObject_Call+0x64)[0xb761fc94]
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/matrix/matrix2.so(+0xbc2d)[0xb25efc2d]
/usr/lib ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-04-29 12:44:31 +0100

tmonteil gravatar image

updated 2013-04-29 12:51:28 +0100

Dou you need your matrix M to stay in the Integer Ring ? If not, you could try to work on the Rational Field (so that Sage will be allowed to use an algotithm that uses division):

sage: M = M.change_ring(QQ)
sage: M.echelonize()

or even on the the Real Double Field (which will do some roundings, but may save more space and time):

sage: M = M.change_ring(RDF)
sage: M.echelonize()

No idea whether it will solve your problem.

edit flag offensive delete link more

Comments

Good question. Are the elements in GF(2)?

rickhg12hs gravatar imagerickhg12hs ( 2013-04-29 17:00:40 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-04-29 05:44:33 +0100

Seen: 363 times

Last updated: Apr 29 '13