Sunday, October 5, 2008

AMPL/BONMIN (Linux/Ubuntu)

IMPORTANT LINKS FOR BONMIN

Below are the websites which are helpful in explaining how to download/install BONMIN in a linux box:
  • (getting started) https://projects.coin-or.org/Bonmin/wiki/GettingStarted
  • https://projects.coin-or.org/BuildTools/wiki/downloadUnix
The latest version of BONMIN can be downloaded from
  • http://www.coin-or.org/download/source/Bonmin/
CAUTION

Although, it's claimed that BONMIN is tested with "gcc version 3.* and 4.* up to 4.3", I encountered a compiler/linker error:
ERROR: ....rodata' defined in discarded section `.gnu.linkonce...
I've been using gcc-3.4.6. After googling, I found that it's because of a bug which is fixed in gcc-4.*. After switching to gcc-4.0, the error is gone.

SUMMARY

After downloading and untarring the BONMIN file, the main directory contains all the necessary tools (e.g., Bonmin, IpOpt, Cbc, CoinUtils, etc.). However, some 3rd party programs which are required for installation and run are not included (because of licencing issues).

The directories, however, for these 3rd party programs are already available:
.../Bonmin-0.100.2/ThirdParty
  • HSL
  • Blas
  • Lapack
  • ASL
You only need to download the source codes into the corresponding directories:
- Fill in "Registration Form". You don't need to activate your membership! After acquiring the username/passwd just go ahead!
- In the "Package(s) Required'' part, enter 'MA27'.
- Login the "HSL Archieve" with the acquired username and password.
- You will need the double precision versions of the MA27 (you don't need to download the dependencies such as ID05 and ZA02), MC19. In the HSL directory, you should save to files named ma27ad.f and mc19ad.f respectively.
Finally, create a new director called "build" under the main directory:
  • mkdir .../Bonmin-0.100.2/build
And, within the "build", execute the following commands
  1. ../configure -C
  2. make
  3. make test
  4. make install
"make install" will create the below directories under "build":
  • bin
  • lib
  • share
  • include
"bin" contains the executable "bonmin" and the solvers it uses: Cbc, Clp, and Ipopt. "lib" contains the neccesary libarary files for "bonmin" to run.

Create a symbolic link named "bonmin" (which points at .../Bonmin-0.100.2/build/bin/bonmin) under the directory where "ampl" executable resides so that ampl can use BONMIN as a solver.