106-109. LCORE1 - LCORE4

The LCORE1, LCORE2, LCORE3 and LCORE4 parameters are used in conjunction with the LCORES parameter to perform parallel solves of linear programs on multiple-cored machines.  One of four different linear solvers is chosen for each core, with assignments controlled by the LCORE1 - LCORE4 parameters.  LINGO will take the solution from the solver that finishes first and then interrupt the remaining solver threads.

The LCORES parameter gives the number of parallel solves that are to be performed on linear programs, while LCORE1 - LCORE4 control the selection of the actual LP solver to use in each core.  Parameters LCORE1 - LCORE4 are meaningful only when LCORES is greater than 1.  In addition, if LCORES=<n>, then only the parameters LCORE1 - LCORE<n> are meaningful.  When the default 1 option is selected for LCORES, the multi-core feature is disabled, and LINGO will run only one solver on linear programs, namely the one specified as part of the SOLVEL option detailed above.  When either option 2, 3, or 4 is selected for LCORES, LINGO will run linear solvers in the requested number of cores.  The choice of the actual solvers used are controlled by the LCORE1 - LCORE4 parameters.

The idea behind this approach is that different linear solvers will have relatively better or worse performance on different classes of models.  However, it may be difficult to predict beforehand the solver that is most likely to outperform.  So, by enabling multi-core solves, you guarantee that you will always get top performance, even without knowledge beforehand of which solver is likely to run the fastest.

Note:The multi-core feature requires that your machine have at least one core free for each solver you wish to run.  Using this feature with an inadequate number of cores will tend to decrease overall performance.

For each of the LCORE1-4 parameters, you have the following choices:

LCORE(i) Setting

LP Solver Used in Core i

1

Primal1 Primal simplex algorithm 1

2

Dual Dual simplex algorithm

3

Barrier Barrier/Interior point solver (available as a option)

4

Primal2 Primal simplex algorithm 2, installed as part of the Barrier option

As an example, the following session runs an LP model in two cores (LCORES=2), with the barrier solver in core 1 (LCORE1=3) and the dual simplex solver in core2 (LCORE2=2):

: set lcores 2   !run in 2 cores

 

  Parameter        Old Value     New Value

   LCORES             1             2

 

: set lcore1 3   !barrier in core 1

 

  Parameter        Old Value     New Value

   LCORE1             1             3

 

: set lcore2 2   !dual simplex in core 2

 

  Parameter        Old Value     New Value

   LCORE2             2             2

 

: take lp.lng    !load the model

: set terseo 1   !minimal output

 

  Parameter        Old Value     New Value

   TERSEO             0             1

 

: go             !solve the model

 First returning solver: BARRIER

 Global optimal solution found.

 Objective value:                              1272282.

 Infeasibilities:                              0.000000

 Total solver iterations:                            27

 

:

Once optimization is complete, LINGO will display a line indicating the solver that finished first.  In the solution report excerpt above, we see that the barrier  solver was the first to completion.