Opened 4 years ago
Closed 3 months ago
#52 closed defect (worksforme)
bonmin/ipopt execs not constructed on osx 10.10.1
Reported by: | compiler | Owned by: | pbonami |
---|---|---|---|
Priority: | major | Component: | Bonmin |
Version: | 1.5 | Keywords: | |
Cc: |
Description
Hello,
I am having trouble obtaining bonmin and ipopt executables although configure, make, and make test seems to be successful in both bonmin 1.7.4 and 1.8.
I have downloaded blas and lapack through get.blas and get.lapack execs in their respective folders. I also obtaines hsl with ma 28/57/68/77/86/97, named it coinhsl and put it under HSL folder.
In a build directory, I ran ../configure -C, make, make test, and make install. I didn't get any explicit errors but I get only cbc and clp executables under boinmin18/build/bin. I tried gcc 4.2, 4.3, 4.5, and 4.9, all with the same result.
When I clicked on "I have files to attach to this ticket" option, it didn't do anything for me, not on chrome nor on safari. So I am providing a dropbox link to logs:
https://www.dropbox.com/sh/t32upav6yc79k96/AAAdMHL7f8J_EtLzUjQv-4GGa?dl=0
Thanks! Serdar ps: i also got an error with 1.8 indicating it didn't recognize labs function used in CoinRational?.cpp. I solved the problem by including stdlib.h.
Change History (12)
comment:1 Changed 4 years ago by stefan
comment:2 follow-up: ↓ 3 Changed 4 years ago by compiler
First of all, thank you for your reply. I do not have AMPL and do not intend to use it in the future either. So I was trying to get executable and didn't think I would need to obtain ASL as I am not going to use it with AMPL. The bonmin manual clearly states that the following instructions: " BONMIN is compiled and installed using the commands: ./configure -C make make install This installs the executable bonmin in Bonmin-1.8/bin " Hence, the confusion.
As a second question, following your reply, I was also able to get executables with cplex. I do set "bonmin.milp_solver Cplex" however it continues using cbc... here is an output of bonmin solve command with a bonmin.opt file in working directory (with the cplex option in the .opt file):
Bonmin 1.8.0 using Cbc 2.9.0 and Ipopt 3.12.0
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt
NLP0012I
Num Status Obj It time Location
NLP0014I 1 OPT 980.60249 30 0.20872 build initial OA
NLP0014I 2 OPT 1664.7528 139 0.729486 OA decomposition
OA0003I New best feasible of 1664.7528 found after 61.418393 sec and
OA0009I OA interupted after 61.427386 seconds found solution of value 1664.7528 (lower bound 1202.6733 ).
OA0010I Performed 1 iterations, explored 8154 branch-and-bound nodes in total
Cbc0031I 37 added rows had average density of 3
Cbc0013I At root node, 37 cuts changed objective from 980.6023 to 980.6023 in 1 passes
Cbc0014I Cut generator 0 (Outer Approximation decomposition.) - 37 row cuts average 3.0 elements, 0 column cuts (0 active)
Cbc0014I Cut generator 1 (Outer Approximation feasibility check.) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)
Cbc0014I Cut generator 2 (Outer Approximation strong branching solution check.) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)
Cbc0020I Exiting on maximum time
Cbc0005I Partial search - best objective 1e+50 (best possible 980.6023), took 37 iterations and 0 nodes (61.19 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Outer Approximation decomposition. was tried 1 times and created 37 cuts of which 0 were active after adding rounds of cuts
bonmin: Optimization interrupted on limit.
"Not finished"
comment:3 in reply to: ↑ 2 Changed 4 years ago by stefan
Replying to compiler:
First of all, thank you for your reply. I do not have AMPL and do not intend to use it in the future either. So I was trying to get executable and didn't think I would need to obtain ASL as I am not going to use it with AMPL. The bonmin manual clearly states that the following instructions: " BONMIN is compiled and installed using the commands: ./configure -C make make install This installs the executable bonmin in Bonmin-1.8/bin " Hence, the confusion.
OK, we will try to make this more precise in the docu.
As a second question, following your reply, I was also able to get executables with cplex. I do set "bonmin.milp_solver Cplex" however it continues using cbc... here is an output of bonmin solve command with a bonmin.opt file in working directory (with the cplex option in the .opt file):
The "milp_solver" option referes to the solution of MIPs within Bonmin (e.g., MIP relaxations in the B-OA algorithm), not to how Bonmin's branch-and-bound tree is managed (when using B-BB, B-Hyb, B-QG). So there will (nowadays) always be a Cbc. The first line of output just states what Bonmin has been compiled with. It doesn't mention Cplex, even if it is there.
Bonmin 1.8.0 using Cbc 2.9.0 and Ipopt 3.12.0
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt
NLP0012I
Num Status Obj It time Location
NLP0014I 1 OPT 980.60249 30 0.20872 build initial OA
NLP0014I 2 OPT 1664.7528 139 0.729486 OA decomposition
OA0003I New best feasible of 1664.7528 found after 61.418393 sec and
OA0009I OA interupted after 61.427386 seconds found solution of value 1664.7528 (lower bound 1202.6733 ).
OA0010I Performed 1 iterations, explored 8154 branch-and-bound nodes in total
Cbc0031I 37 added rows had average density of 3
Cbc0013I At root node, 37 cuts changed objective from 980.6023 to 980.6023 in 1 passes
Cbc0014I Cut generator 0 (Outer Approximation decomposition.) - 37 row cuts average 3.0 elements, 0 column cuts (0 active)
Cbc0014I Cut generator 1 (Outer Approximation feasibility check.) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)
Cbc0014I Cut generator 2 (Outer Approximation strong branching solution check.) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)
Cbc0020I Exiting on maximum time
Cbc0005I Partial search - best objective 1e+50 (best possible 980.6023), took 37 iterations and 0 nodes (61.19 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Outer Approximation decomposition. was tried 1 times and created 37 cuts of which 0 were active after adding rounds of cuts
bonmin: Optimization interrupted on limit.
"Not finished"
comment:4 Changed 4 years ago by compiler
Thanks for your reply. Yet your reply to my second question is not very clear to me.
The "milp_solver" option refers to the solution of MIPs within Bonmin (e.g., MIP relaxations in the B-OA algorithm), not to how Bonmin's branch-and-bound tree is managed (when using B-BB, B-Hyb, B-QG).
That would imply that Bonmin is using Cplex as "LP solver" not "MILP" solver. First, I thought CLP was the LP solver. Second, I assumed when I compiled it with Cplex, it would actually use Cplex as tree manager. So did you mean Cplex is replacing CLP but not CBC? To be clear, I am interested in outer approximation algorithm, so I want the tree to be managed by cplex and not cbc. Is that possible?
I am going to include bonmin results in a refereed journal article and I want to make sure that it does what I am expecting it to do. Is there any way to make bonmin report that? Some kind of log or a query or a file in some location?
Thanks a lot for your time, I appreciate it.
comment:5 Changed 4 years ago by stefan
Well, depending on which algorithm you use, there are different relaxations to solve, different trees to manage, and different solvers used. This variety seems to generate some confusion.
So if you select the outer approximation algorithm (B-OA), then Bonmin will alternate between solving a MIP relaxation and NLP subproblems. These MIP relaxation will be solved by CPLEX (if setting milp_solver cplex), so also the B&B-tree of these MIP relaxations will be managed by CPLEX and, of course, CPLEX will be the LP solver within CPLEX. The NLP subproblems are solved by Ipopt.
I don't really know how to make Bonmin report this more clearly, as I'm not a Bonmin developer.
comment:6 Changed 4 years ago by compiler
I compiled Bonmin with Cplex, set milp solver to Cplex, and algorithm to B-OA. As you said, I was expecting the tree to be managed by cplex and NLP subproblems to be solved by IPOPT. However I see cbc output only in the log as I provided in my previous comments... To me it looks like it is not using cplex but cbc although I did everything as instructed in the manual... Thanks for your help!
comment:7 Changed 4 years ago by pbonami
I think that in the output above cplex is likely used to solve the MILP's in OK. If you set the option milp_log_level you should see output from CPLEX.
comment:8 Changed 4 years ago by compiler
Thanks for the suggestion. I did set milp log lvl to nonzero and all see is still CBC. I also set LP log level to nonzero, and I see CLP is used. I decided to provided logs of everything I did in case I might be missing something obvious. I would appreciate any help in this regard. Here are drop box links to step-by-step what I did:
- privide cplex to configure using ./share/config.site https://www.dropbox.com/s/93balr2oyuqkuf6/config.site?dl=0
- ../configure -C from build folder https://www.dropbox.com/s/j5tpzo3oz96eule/config.log?dl=0
- make https://www.dropbox.com/s/xt9bczff61iu3qi/make.log?dl=0
- make test https://www.dropbox.com/s/mf5eb4j21u1trf3/make_test.log?dl=0
- make install https://www.dropbox.com/s/6zugn083fs3ueg4/make_install.log?dl=0
- provide bonmin.opt file under ./bin (ask bonmin to use Cplex) https://www.dropbox.com/s/srl5c9aih59466z/bonmin.opt?dl=0
- run bonmin on .nl file (cplex) https://www.dropbox.com/s/tc0j9khfptnik2k/solve_with_cplex.log?dl=0
I also checked if I will get the same output if I was to use Cbc_D as milp solver and I did get exactly the same output, which suggests setting milp solver as cplex had no effect... here is the log file:
- run bonmin on .nl file (cbc) https://www.dropbox.com/s/6n5rbucabakbeql/solve_with_cbc_d.log?dl=0
Best,
Serdar
comment:9 Changed 4 years ago by pbonami
Hi, Try using the option milp_solver without the bonmin prefix. Best regards, Pierre
comment:10 Changed 4 years ago by compiler
That actually did work! I ended up with another problem though, but I think this is architecture mismatch?
Bonmin 1.8.0 using Cbc 2.9.0 and Ipopt 3.12.0
NLP0012I
Num Status Obj It time Location
NLP0014I 1 OPT 2378.8884 25 0.047786 build initial OA dyld: lazy symbol binding failed: Symbol not found: _CPXopenCPLEX
Referenced from: /Users/klaris/Applications/Bonmin-1.8.0/build-cpx/lib/libOsiCpx.1.dylib Expected in: flat namespace
dyld: Symbol not found: _CPXopenCPLEX
Referenced from: /Users/klaris/Applications/Bonmin-1.8.0/build-cpx/lib/libOsiCpx.1.dylib Expected in: flat namespace
Trace/BPT trap: 5
comment:11 Changed 4 years ago by compiler
I resolved this issue by compiling bonmin with static libraries rather than dynamic. Just wanted to give an update.
This ticket can now be closed. Thanks for your helps.
Best
comment:12 Changed 3 months ago by stefan
- Resolution set to worksforme
- Status changed from new to closed
Looks all normal to me. The ipopt and bonmin executables are only AMPL interfaces to these solvers, so they are only build if you also obtained the ASL source (ThirdParty/ASL/get.ASL).