Large QP problems

73 views
Skip to first unread message

Anil Raj

unread,
Dec 2, 2009, 7:53:43 PM12/2/09
to cvxopt
Hi,
I'm trying to solve a large QP (~100,000 variables) with the simple
constraints 0 <= w_i <= d_i (where w_i are the variables and d is a
100000x1 constant vector). According to the documentation for 'qp',
this would require constructing a sparse 'G' matrix.

Here's the piece of code I use to construct it (the top block of G
contains upper bounds and the lower block contains the lower bound)

import cvxopt as C
N = 100000
G = C.sparse([C.spdiag(1., (N,1)), C.spdiag(-1., (N,1))])

When doing this, my code exits with a 'Segmentation fault' error (I'm
not sure if this is due to memory issues). Is there a better way to
construct the G matrix? Or to incorporate such simple constraints?

Any tips on how to resolve this would be much appreciated!

Thanks
Anil

Anil Raj

unread,
Dec 2, 2009, 8:06:00 PM12/2/09
to cvxopt
Sorry, that code was wrong; here's the corrected code.

import cvxopt as C
N = 100000
G = C.sparse([C.spdiag(C.matrix(1., (N,1))), C.spdiag(C.matrix(-1., (N,1)))])

Strangely, these three lines of code alone seem to work perfectly
fine; but they break when part of my bigger code. I'm not sure if this
is due to memory issues or not.

Anil

Joachim Dahl

unread,
Dec 3, 2009, 2:20:50 AM12/3/09
to cvx...@googlegroups.com
We will release a new version in a few days. Perhaps you can see if the
problem
remains. Otherwise it will be helpful with a complete example, which fails.

Best regards
joachim
> --
>
> You received this message because you are subscribed to the Google Groups "CVXOPT" group.
> To post to this group, send email to cvx...@googlegroups.com.
> To unsubscribe from this group, send email to cvxopt+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cvxopt?hl=en.
>
>
>

Kevin Jacobs <jacobs@bioinformed.com>

unread,
Dec 3, 2009, 6:52:18 AM12/3/09
to cvx...@googlegroups.com
On Thu, Dec 3, 2009 at 2:20 AM, Joachim Dahl <dahl.j...@gmail.com> wrote:
We will release a new version in a few days.  Perhaps you can see if the
problem
remains.  Otherwise it will be helpful with a complete example, which fails.


I'm not sure if you've picked up the two patches I posted a few months ago, but it would be very nice if they could be included in your new release.  One corrects bounds checking in order to produce a subset of eigenvalues and eigenvectors and the other improves support for configuring optimized/platform-specific BLAS and LAPACK libraries in setup.py.

I'm happy to repost the patch if that would help.

Thanks,
-Kevin

Reply all
Reply to author
Forward
0 new messages