[SCIP] HSL library for IPOPT=true option

Gregor Hendel hendel at zib.de
Fri Jun 2 08:46:29 CEST 2017


Dear Oleg,

I suppose your time measurement addresses the SCIP solution process as a 
whole, not only the IPOPT routines? Note that IPOPT is only used inside 
a couple of heuristics, so that it should (usually) not be the bottleneck.

I would suggest two additional setup steps for SCIP without a closer 
look at any log:
1. Make sure that the variables in your problem are reasonably bounded. 
This is crucial for nonlinear problems.
2. Sometimes you may encounter stalling of the solution process. The 
optimal solution is found after almost no time, and then the solution 
process continues a while at a relative gap of 0.00 % until it can prove 
optimality. In such cases, you may want to increase the gap limit to a 
nonzero value, e.g., something in the range 10^-4 to 10^-8. You can 
achieve this by setting the double parameter "limits/gap" using "set 
limits gap 1e-8" from the interactive shell, loading a settings file 
that contains the line "limits/gap = 1e-8", or SCIPsetRealParam(scip, 
"limits/gap", 1e-8) within your code.

Kind regards,
Gregor

Am 01.06.2017 um 23:40 schrieb Shigiltchoff, Oleg:
> Hi,
>
> Thank you for the pointer to Mumps. It does work now. However the performance is somewhat slow: ~300,000 micro-seconds against ~30 micro-second for IMSL, which is 4 orders of magnitude difference. Our problem contains one quadratic and three linear constraints. Would it considerably speed up the execution, if we buy and use MA27/HSL? Are there any other ways to improve SCIP performance?
>
> Thanks,
>
> Oleg
>
> -----Original Message-----
> From: Stefan Vigerske [mailto:stefan at math.hu-berlin.de]
> Sent: Tuesday, May 30, 2017 10:12 AM
> To: Shigiltchoff, Oleg <oleg.shigiltchoff at sap.com>; scip at zib.de
> Subject: Re: [SCIP] HSL library for IPOPT=true option
>
> Hi,
>
> someone must have build Ipopt on your system. When you build SCIP the
> first time with IPOPT=true, it must have asked you where to find that
> Ipopt installation. The SCIP buildsystem has then created a symlink in
> lib/static/ that points to this Ipopt build.
> The one who has build Ipopt on your system seems to have forgotten to
> include any linear solver in the Ipopt build. Please contact the person
> responsible for your Ipopt installation to rebuild Ipopt with Mumps.
>
> In the original e-mail you said you were interested in activating the
> Lapack link, so I thought you didn't need solving NLPs.
>
> Stefan
>
> On 05/30/2017 03:32 PM, Shigiltchoff, Oleg wrote:
>> Hi Stefan,
>>
>> Thank you for your reply. I cannot turn off NLP, that was the whole point to solve my problem with quadratic constraints. I can however consider to replace the default MA27 with Mumps. I'm not sure though how to enforce the build with Mumps. I don't build Ipopt separately, I just build SCIP with option IPOPT=true. Can you give me some pointers on how to redirect Ipopt from MA27 to Mumps?
>>
>> Thank you,
>>
>> Oleg
>>
>> -----Original Message-----
>> From: Stefan Vigerske [mailto:stefan at math.hu-berlin.de]
>> Sent: Saturday, May 27, 2017 6:47 AM
>> To: Shigiltchoff, Oleg <oleg.shigiltchoff at sap.com>; scip at zib.de
>> Subject: Re: [SCIP] HSL library for IPOPT=true option
>>
>> Hi,
>>
>> if Ipopt was build without any linear solvers, then it will try to load
>> MA27 from a libhsl.so library at runtime. It's up to the user to provide
>> this library. If Ipopt was build with a linear solver (e.g., MA27,
>> Mumps), then it will use the one it was build with.
>> HSL provides a special Ipopt package of their solvers at
>> http://www.hsl.rl.ac.uk/ipopt/ One can use this to build Ipopt with HSL
>> codes, or to build a libhsl.so that Ipopt can load at runtime. HSL codes
>> are free for academics, I don't know what would apply for SAP.
>>
>> Alternatively, you could just build Ipopt with Mumps as linear solver.
>> That is open source, though performance can be different than with MA27.
>> But if you are mainly interested in having SCIP use the Lapack interface
>> of Ipopt, then that doesn't matter.
>>
>> Finally, you could also try to turn off everything that tries to solve a
>> NLP in SCIP, so it doesn't even try to call Ipopt as a solver. By
>> setting parameters this would be, e.g.,
>>      constraints/quadratic/gaugecuts = FALSE
>>      constraints/quadratic/sepanlpmincont = 2.0
>>      heuristics/subnlp/freq = -1
>>      heuristics/nlpdiving/freq = -1
>> Or just remove the creation of nlpi-ipopt towards the end of
>> src/scip/scipdefplugins.c
>>
>> Hope that helps,
>> Stefan
>>
>>
>> On 05/26/2017 08:43 PM, Shigiltchoff, Oleg wrote:
>>> I'm trying to use SCIP in our c++ library. I am compiling (suse linux) with IPOPT=true option to activate LAPACK (fortran library). After installing libgfortran.so.3,the linking gives the following error (see below). Apparently I need libhsl.so library, which is available at https://github.com/casadi/casadi/wiki/Obtaining-HSL. Now, the question is if I need HSL production license? Our company (SAP) has SCIP license for OFL (our SAP product), but they don't use LAPACK. So, if HSL is part of SCIP, how do I obtain libhsl.co library?
>>>
>>> Original Problem:
>>> STATISTICS
>>>      Problem name     : problem1
>>>      Variables        : 5 (0 binary, 0 integer, 0 implicit integer, 5 continuous)
>>>      Constraints      : 0 initial, 2 maximal
>>> OBJECTIVE
>>>      Sense            : minimize
>>> VARIABLES
>>>      [continuous] <x1>: obj=0, original bounds=[-3,3]
>>>      [continuous] <x2>: obj=0, original bounds=[-3,3]
>>>      [continuous] <x3>: obj=0, original bounds=[-3,3]
>>>      [continuous] <x4>: obj=0, original bounds=[-3,3]
>>>      [continuous] <obj>: obj=1, original bounds=[-inf,+inf]
>>> CONSTRAINTS
>>>      [linear] <constrj>:  -0.103111371376616<x1>[C] -0.0918254105621112<x2>[C] -0.0360826398483436<x3>[C] +0.0683195483527113<x4>[C] >= -1;
>>>      [quadratic] <constrm>:  +13.1200771409643<x1>[C] +57.2279181564708<x1>[C]^2 +3.95909498225939<x2>[C] +53.2052128347995<x2>[C]^2 +23.5748721949639<x3>[C] +51.4737147305889<x3>[C]^2 +23.2133345748624<x4>[C] +41.831859605578<x4>[C]^2 -<obj>[C] +95.7868558769789<x1>[C]<x2>[C] +91.0132323375585<x1>[C]<x3>[C] +67.4959089332421<x1>[C]<x4>[C] +97.4849344358596<x2>[C]<x3>[C] +74.6177976486421<x2>[C]<x4>[C] +79.4290929005315<x3>[C]<x4>[C] <= 0;
>>> END
>>>
>>> Solving...
>>> feasible solution found by trivial heuristic after 0.0 seconds, objective value 0.000000e+00
>>> presolving:
>>> (round 1, fast)       0 del vars, 1 del conss, 0 add conss, 1 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
>>> (round 2, fast)       0 del vars, 1 del conss, 0 add conss, 2 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
>>> presolving (3 rounds: 3 fast, 1 medium, 1 exhaustive):
>>>     0 deleted vars, 1 deleted constraints, 0 added constraints, 2 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
>>>     0 implications, 0 cliques
>>> presolved problem has 5 variables (0 bin, 0 int, 0 impl, 5 cont) and 1 constraints
>>>          1 constraints of type <quadratic>
>>> Presolving Time: 0.00
>>> transformed 1/2 original solutions to the transformed problem space
>>> Exception of type: OPTION_INVALID in file "IpAlgBuilder.cpp" at line 271:
>>>     Exception message: Selected linear solver MA27 not available.
>>> Tried to obtain MA27 from shared library "libhsl.so", but the following error occured:
>>> libhsl.so: cannot open shared object file: No such file or directory
>>> [src/nlpi/nlpi_ipopt.cpp:1110] ERROR: Ipopt returned with application return status -12
>>> [src/nlpi/nlpi.c:503] ERROR: Error <0> in function call
>>> [src/scip/cons_quadratic.c:7117] ERROR: Error <0> in function call
>>> [src/scip/cons_quadratic.c:7286] ERROR: Error <0> in function call
>>> [src/scip/cons_quadratic.c:10662] ERROR: Error <0> in function call
>>> [src/scip/cons.c:2623] ERROR: Error <0> in function call
>>> [src/scip/set.c:4559] ERROR: Error <0> in function call
>>> [src/scip/scip.c:13864] ERROR: Error <0> in function call
>>> [src/scip/scip.c:14650] ERROR: Error <0> in function call
>>> [../../AFL/SCAL/EDS/optimize.cpp:233] ERROR: Error <0> in function call
>>>
>>>
>>>
>>> _______________________________________________
>>> Scip mailing list
>>> Scip at zib.de
>>> https://listserv.zib.de/mailman/listinfo/scip
>>>
>>
>



More information about the Scip mailing list