help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Multithreading/parallelization


From: Harley Mackenzie
Subject: Re: [Help-glpk] Multithreading/parallelization
Date: Tue, 18 Dec 2012 21:43:41 +1100

OK now I get:

command line - cbc braemar_prices_dop.mod% -randomCbcSeed 0 -randomSeed
0 -proximity on -threads 8 -printi csv -solve -solu
braemar_prices_dop.csv (default strategy 1)
GMPL model file ./braemar_prices_dop.mod and data file ./
GLPK is not available
Aborted (core dumped)

That suggests the glpk code hasnt been included in the compile.

Harley

On Tue, Dec 18, 2012, at 21:42, Noli Sicad wrote:
> Harley,
> 
> I think I missed % in the example.
> 
> It should be like this:
> 
> cbc myMIPmodel.mod%
> 
> In you case:
> 
> cbc braemar_prices_dop.mod% -randomCbcSeed 0 -randomSeed 0 -proximity
>   on -threads 8 -printi csv -solve -solu braemar_prices_dop.csv
> 
> Noli
> 
> 
> 
> On 12/18/12, Harley Mackenzie <address@hidden> wrote:
> > Noli,
> >
> > I have nearly got this working. I used the get.glpk script in the third
> > party directory and then used your options below to compile the CBC
> > program on an Ubuntu 64 bit machine.
> >
> > I used this compilation command:
> >
> >   ./configure CFLAGS='-m64 -O3' CC=gcc-4.7 --enable-gnu-packages
> >   --enable-cbc-parallel --enable-debug -C --prefix=/usr/local
> >   make
> >   sudo make install
> >
> > I attempted to use the following command line with the compiled CBC
> > program.
> >
> >   cbc braemar_prices_dop.mod -randomCbcSeed 0 -randomSeed 0 -proximity
> >   on -threads 8 -printi csv -solve -solu braemar_prices_dop.csv
> >
> >   command line - cbc braemar_prices_dop.mod -randomCbcSeed 0 -randomSeed
> >   0 -proximity on -threads 8 -printi csv -solve -solu
> >   braemar_prices_dop.csv (default strategy 1)
> >   At line 1 param n_revenue >= 0;
> >   Unknown image param n_revenue >= 0; at line 1 of file
> >   ./braemar_prices_dop.mod
> >   Coin0008I  read with -2 errors
> >   There were -2 errors on input
> >   randomCbcSeed was changed from -1 to 0
> >   using time of day randomSeed was changed from 1234567 to 1355826052
> >   Option for proximitySearch changed from off to on
> >   threads was changed from 0 to 8
> >   Option for printingOptions changed from normal to csv
> >   ** Current model not valid
> >   ** Current model not valid
> >   No match for braemar_prices_dop.csv - ? for list of commands
> >   Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00
> >
> > The first line is a standard mathprog command:
> >
> >   param n_revenue >= 0;
> >
> > So it would seem that the mathprog interface is not being used for the
> > model as this is pretty straight forward mathprog line and the whole
> > model runs on GLPK. The mod file has the structure:
> >
> >   code
> >   solve
> >   date
> >   end
> >
> > All in the one file called braemar_prices_dop.mod.
> >
> > There wasnt any command in the ./configure step to include glpk - is
> > anything required? Or is there a command line option needed for CBC to
> > use mathprog to process the model?
> >
> > Any help or directions to any documentation would be greatly
> > appreciated. How did you work out how to set up CBC for mathprog?
> >
> > Regards,
> >
> > Harley
> >
> > On Tue, Dec 18, 2012, at 8:21, Noli Sicad wrote:
> >> Hi Harley,
> >>
> >> > I assume that you are using mathprog and then producing an MPS file for
> >> > CBC, and as you point out, you can't then use the mathprog output
> >> > statements and would have to process the results some other way.
> >>
> >> No, I run my MIP MathPog model in CBC solver. I compiled CBC with
> >> MathProg parser in Mac OS X. CBC has third parties "add-ons" and
> >> GLPK/MahtProg is one of these add-ons packages. Before you compile CBC
> >> get glpk first, if you like to include support of MathProg parser.
> >>
> >> CBC with MathProg parser support just ignores those MathProg scripts
> >> after the solve statement.
> >>
> >> Yes, you can use MPS and CPLEX LP format as input for the CBC solver.
> >>
> >> > Are you able to share the details on how you make this work? I presume
> >> > CBC is the COIN-OR MIP solver. How is easy is CBC to work with and how
> >> > do you handle the output processing?
> >>
> >> First download the CBC trunk. Yes, it is the COIN-OR MIP solver.
> >>
> >> CBC trunk has threads support with proximity search heuristic
> >> algorithm. Before compiling run the "get.glpk" script in the third
> >> parties folder > glpk folder. The default glpk is glpk-4.45, just use
> >> it. It does not interfere with your installed glpk (glpk-4.47).
> >>
> >> Compile with  --enable-cbc-parallel
> >>
> >> For linux and Mac OS X.
> >>
> >> #####
> >>
> >> ./configure CFLAGS='-m64 -O3' CC=gcc-4.7 --enable-gnu-packages
> >> --enable-cbc-parallel --enable-debug -C --prefix=/usr/local
> >>
> >> #####
> >>
> >> For Windows OS, it has support for various version of MSVisualStudio.
> >> Have a look at the MSVisualStudio folder in CBC after you download.
> >>
> >> Run the CBC solver with -print csv to get the solution.
> >>
> >> e.g.
> >>
> >> #####
> >>
> >> > cbc myMIP.mod -randomCbcSeed 0 -randomSeed 0 -proximity on -threads 8
> >> > -printi csv -solve -solu solution_math_period1-10p1.csv
> >>
> >> #####
> >>
> >> Noli
> >
> >
> > --
> > -----
> >   Dr. Harley Mackenzie
> >   HARD software
> >
> >   address@hidden
> >   www.hardsoftware.com
> >   + 61 3 5222 3435
> >


-- 
-----
  Dr. Harley Mackenzie
  HARD software

  address@hidden
  www.hardsoftware.com
  + 61 3 5222 3435



reply via email to

[Prev in Thread] Current Thread [Next in Thread]