Skip to content

Segmentation fault with large matrices in qp  #126

@tcchiao

Description

@tcchiao

Hi there,

I'm getting Segmentation fault (core dumped) errors when passing somewhat large matrices to solvers.qp(). The P matrix has shape (34638, 34638), and G matrix has shape (138552, 34638) (both sparse matrices). It doesn't seem to be a memory issue since the machine has 100GB of allocated memory and peak memory usage remained at ~30GB before the crash.

After googling a bit, I tried to reproduce this behavior on my local machine (with considerably less memory) and found that segmentation fault appears after the matrices exceeds a certain threshold, while under the threshold I get a memory error instead. This is very similar to what's described in https://groups.google.com/forum/#!topic/cvxopt/nxBXtv5WUV4.

In [1]: import cvxopt

In [2]: cvxopt.__version__
Out[2]: u'1.2.0'

In [3]: i = 32750

In [4]: G = cvxopt.spmatrix(1,(0,i*4),(0,i))

In [5]: G + 1
---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
<ipython-input-5-d684893d245a> in <module>()
----> 1 G + 1

MemoryError:

In [6]: i = 32780

In [7]: G = cvxopt.spmatrix(1,(0,i*4),(0,i))

In [8]: G + 1
Segmentation fault: 11

The original post mentioned that this is fixed in 1.1.9, and I'm using 1.2.0 here. Any pointers/thoughts on how I should go about debugging this? Thanks a lot in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions