[Cbc] Slow CBC sample example

Haroldo Santos haroldo.santos at gmail.com
Mon May 31 17:19:44 EDT 2010


There are some defines which speed up CBC if you inform it at compile
time, such as
-DCLP_FAST_CODE -DCOIN_FAST_CODE.

Using GCC running in linux, I set the following flags before compiling CBC.

export CXXFLAGS="-O3 -funsafe-loop-optimizations -ffast-math
-fno-math-errno -funsafe-math-optimizations -fno-trapping-math -m32
-fomit-frame-pointer -mtune=native -march=native -g0
-fexpensive-optimizations -msse -msse2 -msse3 -ftree-vectorize"
export ADD_CXXFLAGS="-DCLP_FAST_CODE -DCOIN_FAST_CODE -DCOIN_USE_RESTRICT"
cd ~/src/coin-Cbc/
./configure --prefix=/usr/ --enable-static --enable-cbc-parallel

[]'s

On Mon, May 31, 2010 at 6:05 PM, Matěj Týč <matej.tyc at gmail.com> wrote:
>
> Hi Haroldo,
> thank you for your reply..
>
> On Mon, 2010-05-31 at 17:37 -0300, Haroldo Santos wrote:
> > Which compiler and compiler flags you use ?
>
> I use quite recent gcc and first of all, I have left flags as they were.
> Then I have compiled it with -O0 -g and this is the case even now.
> But I think that this is not of top importance since both my compiled
> example and the executable are supposed to use the same library compiled
> with the same flags anyway.
> I have tried to debug the executable to discover the trick, but as you
> can surely imagine, I got lost very quickly :-)
> Anyway, I attach the captured stdout.
> Regards,
> Matej
>
> > On Mon, May 31, 2010 at 5:30 PM, Matěj Týč <matej.tyc at gmail.com>
> > wrote:
> >         Hello,
> >         when I successfully build CBC, I also get an executable (that
> >         one called
> >         cbc), that, among other things, accepts MPS files and solves
> >         them.
> >
> >         I can also build an example application that does the same
> >         things,
> >         according the documentation:
> >
> >         http://www.coin-or.org/Cbc/ch02s02.html
> >
> >         The problem is that the same MPS file gets solved much faster
> >         using the
> >         compiled (and somewhat more complicated :-) executable,
> >         whereas it
> >         writes a lot of output (even if I try to reduce it) and takes
> >         longer
> >         when using the code from the example.
> >
> >         Any ideas?
> >         Regards,
> >         Matej
>



--
=============================================================
Haroldo Gambini Santos
Computing Department - Universidade Federal de Ouro Preto - UFOP
email: haroldo.santos at gmail.com
home/research page:  http://www.iceb.ufop.br/decom/prof/haroldo/

“BE the change you want to see in the world” -Mahatma Gandhi




More information about the Cbc mailing list