[Clp] Cholesky with Mumps and QPs + ABC

Jonathan Currie jonathan.currie at aut.ac.nz
Mon Apr 29 23:10:53 EDT 2013


Hi John, thanks for the speedy reply and answers below.

 

Still playing with Mumps and I think I have found a bug in the Cholesky
code. I have attached my source code (nice and brief) and a linear mps model
from netlib, with screenshot below:



 

Basically when deleting the array permuteInverse_ (after solving) it is
causing an error in free (from Microsoft's CRT), as it appears
permuteInverse_ has an address of NULL. This only happens when using Mumps
as the Cholesky code and only some models (but it is significantly faster
than the default ClpCholeskyBase code - so it would be nice to use!).

 

Also, a couple more questions to throw in the mix:

 

1)      When using the Simplex solver you can set the factorization
frequency and whether or not to use a sparse factorization. Is the
factorization mentioned in these options using the same Cholesky code /
interface as the interior point solver? If so, is it possible to set the
Cholesky to use Mumps? I can only find the required method in ClpInterior.

 

2)      I have been unable to get the event handler to work for ClpInterior.
In the attached code I would expect it to quit solving as soon as the first
event is hit (i.e. straight away?), as this is the behaviour in the
ClpSimplex solver. However it seems to ignore my return 5. is a different
status code required for the interior solver?

 

3)      Is it possible to set an initial guess of the primal decision
variables (x0 - or maybe even dual variables too?) for either the Simplex or
Interior solvers?

 

4)      I see when I use the barrier solver via the Clp executable
(ClpMain.cpp) on a QP it performs a presolve, however in
examples/testBarrier.cpp it says 'note this does not have a presolve'. Can
you point me to an example on how to use the presolver using the ClpInterior
object? 

 

Thanks again!

 

Jonathan

 

p.s. I am using Clp 1.15.0 and Mumps 4.10.0, both 32 bit builds using VC++
2012 and Intel Fortran XE 2013, and the Mumps build is a sequential build
linked against Intel MKL.

 

From: clp-bounces at list.coin-or.org [mailto:clp-bounces at list.coin-or.org] On
Behalf Of John Forrest
Sent: Tuesday, 30 April 2013 12:53 a.m.
To: clp at list.coin-or.org
Subject: Re: [Clp] Cholesky with Mumps and QPs + ABC

 

Jonathan,

A "Few" questions -:) - answers not so simple

On 29/04/13 10:41, Jonathan Currie wrote:

Hi,

 

I have been updating my MATLAB interface
(http://www.i2c2.aut.ac.nz/Wiki/OPTI/) to Clp to support most of the
options, together with experimenting with the interior point solver and
various Cholesky options for Window's users.

 

I had a few questions I can't seem to find answers for in the code (or in
the user's guide) if anyone could help!

 

1)      If I create a ClpSimplex object (simplex), load an LP into it using
loadProblem(..), then do the following, what algorithm is being called? I
presume it is the interior point.

 

ClpSolve options;

options.setSolveType(ClpSolve::useBarrier);

simplex.initialSolve(options);

Yes Interior point using home-grown cholesky



 

2)      How does the ClpSolve::automatic mode work (using similar code as
the above)?

 

automatic is only choosing between dual and various forms of crash+primal.
It will never choose interior point.



3)      If I create a ClpInterior object (interior), load a QP into it using
loadProblem(..) and loadQuadraticObjective(..), then call
interior.primalDual(), which Cholesky factorization code is being used? I.e.
I have not specified it anywhere, I have not added any COIN_HAS_MUMPS etc
defines, and my problem is typically large and sparse.

 

If you just do that you will get
Clp6005E Quadratic barrier needs a KKT factorization

     ClpCholeskyBase * cholesky = new ClpCholeskyBase();
     cholesky->setKKT(true);
     interior.setCholesky(cholesky);

will work using home-grown cholesky.



4)      I have access to the Mumps solver (sequential version) on Windows,
and would like to use it with Clp. However when I try and use it with the
interior point solver and a QP I get the message "Quadratic Barrier needs a
KKT factorization". My first guess was to do the following:

 

ClpCholeskyMumps clpMumps;

clpMumps.setKKT(true);

interior.setCholesky(&clpMumps);

 

However using my MATLAB interface it promptly crashes when trying to solve
the model. I see in the source files only Wssmp has a KKT suffix header
file, is this the only Cholesky code setup to solve the KKT system of a QP
with the barrier (interior) solver?

Have not used Mumps for a long time - will get back to you



 

5)      If I solve LPs using the barrier solver and sequential Mumps, will I
still expect (in general - for sparse problems) to see a speedup over the
CholeskyBase / CholeskyDense implementations supplied with Clp?

Without Cilk home-grown cholesky is sequential so yes.  With cilk the dense
part goes parallel (as it is a nice easy case for cilk)



 

6)      I have bought Intel Parallel Studio XE and therefore have access to
the Cilk libraries and would like to try using ABC for solving LPs (and
QPs?) in parallel. However I cannot find any examples.. Is it as simple as
replacing ClpSimplex with AbcSimplex, or is there a bit more to it? I have
not managed to compile the Abc part of Clp yet, so not quite at a point to
jump in and experiment.

 

In configure add --enable-aboca=4

Abc is only simplex (but you do get the cilk bit of cholesky as mentioned
above) - no QP at present.

If using initialSolve then add 
simplex.setAbcState(4) or (8) to partition work into 4/8 chunks.  Cilk will
use it's default number of workers - unless you override.  On my laptop that
is 4 as I have hyperthreading turned off.

Will get back to you on Mumps.

John Forrest



 

Thanks for any help!

 

JONATHAN CURRIE [BE Hons]

LECTURER
ELECTRICAL & ELECTRONIC ENGINEERING
AUT UNIVERSITY


ph: (+64) 09 921 9999 x6608 | mob: (+64) 021 550 483 | web:
www.i2c2.aut.ac.nz <http://www.i2c2.aut.ac.nz/> 
INDUSTRIAL INFORMATION & CONTROL CENTRE | AUCKLAND | NEW ZEALAND

 






_______________________________________________
Clp mailing list
Clp at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/clp

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20130430/54139ac2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 78505 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20130430/54139ac2/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scsd1.mps
Type: application/octet-stream
Size: 102979 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20130430/54139ac2/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Source.cpp
URL: <http://list.coin-or.org/pipermail/clp/attachments/20130430/54139ac2/attachment-0001.ksh>


More information about the Clp mailing list