[Clp] [Coin-lpsolver] Best way to bring an instance into CLP?
Lasse Kliemann
lasse-coin-2008 at plastictree.net
Tue Mar 11 13:50:25 EDT 2008
* Message by -John J Forrest- from Fri 2008-01-18:
> If memory is an issue the most efficient way takes more effort but is
> doable if you have a reasonable (over)estimate of numbers of rows, columns
> and elements. I have updated Clp/examples/addRows.cpp to create a model
> from scratch. The example matrix is built by column. You could build by
> row and then transpose before handing to model.
>
> Hope the example is clear enough.
Hello John, finally I found time to go back to that problem. I implemented it
the way you demonstrated in the example. It became perfectly clear from the
example how to do it. Thanks!
Unfortunately, my problem persists. It appears that I did not look closely
enough before to notice that building the instance is in fact not the
problem, but solving it. No matter which of the two build methods I use
(addColumn or the manual way), at a certain threshold of instance size
a call to model.initialSolve() gives an out-of-memory error. Judging from
runs on smaller instances, there seems to be a memory peak directly after
the call to initialSolve(). This seems to be due to presolve, for it goes
away when I do it like this:
ClpSolve options;
options.setPresolveType(ClpSolve::presolveOff);
model->initialSolve(options);
In fact, I can solve slightly larger instances without presolve.
Without presolve, for instances larger than that slightly higher threshold, I
do not get out-of-memory errors, but:
Clp3002W Empty problem - 3000 rows, 0 columns and 0 elements
The solver continues, but does not terminate (in the expected time).
Now, in the example, you use model.dual(). When I try that, the solving
process is much slower, about a factor 30 to 40, but it seems to continue on
larger instances without warning messages or error.
I also tried
ClpSolve options;
options.setDoDual(true);
model->initialSolve(options);
but that doesn't seems to make a difference compared to just calling
initialSolve() without options.
I'm using https://projects.coin-or.org/svn/Osi/stable/0.98.
There is one more thing: in cases where the program aborts with an
out-of-memory error, only about 40% of total memory is used. The system is
Linux 2.6.24.x, and there is no ulimit:
$ ulimit -a
coredump(blocks) 0
data(KiB) unlimited
file(blocks) unlimited
flocks unlimited
lockedmem(KiB) 32
memory(KiB) unlimited
nofiles(descriptors) 1024
processes 32768
stack(KiB) unlimited
time(cpu-seconds) unlimited
vmemory(KiB) unlimited
Thank you a lot for advice on any of these issues!
Lasse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20080311/a38a5f0c/attachment.sig>
More information about the Clp
mailing list