Wiki

Clone wiki

OscaR / Ipopt

https://projects.coin-or.org/Ipopt/wiki/CompilationHints

Compiling

First get the source code with

Windows

MS Visual C++

I first used cygwin to get the Thirdparty tools (as described here under).

lapack and f2c libs http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html#install

copied the content of ASL/arith.h into ASL/solver/arith.h

  1. define IEEE_8087
  2. define Arith_Kind_ASL 1
  3. define Double_Align
  4. define QNaN0 0x0
  5. define QNaN1 0xfff80000

Didn\'t succeed yet...

Cygwin

Install missing packages and utilities in cygwin like g++, gcc (version4), wget, patch, gfortran, ,gcc4-java + gcj stuffs (for the Java wrapper)

Be careful that the make 3.81 is buggy and should be replaced: https://projects.coin-or.org/BuildTools/wiki/current-issues

Get the source code of third party tools

Before configuring, there might be some problems with the dos format while cygwin expect unixformat. Use dos2unix to clean configure, config.guess, config.sub then you can run configure

Linux

I\'m using Virtual Box and Ubuntu 10.10

On the fresh ubuntu I had to install

  • Java (from oracle website). I put it in /opt/ directory.
  • \$
  • \$
  • \$
  • \$

Now than svn is installed, get the source code of Ipopt:

Get the source code of third party tools

You can already set your java home:

For the configure you can add the fPIC option to avoid troubles during the make of the Java binding later on:

Then you can do

The Java binding ran almost smoothly for me. In the worst case you\'ll have to add manually to the make file the -fPIC argument in the definition of CXXFLAGS for the compilation and specify the correct path for Java.

In the contrib/JavaInterface just do

Mac-OS

My Config: Mac OS X 10.6.6 with Xcode installed

Compile Ipopt C++

The next instruction are inspired from here

  • Get the third party material with the nice shell script from Ipopt

Note that there was a problem in get.Lapack, I had to replace the part to get the lapack in the script with (copied from anoter get.* in ipopt)

  • Install a Linear Solver

Must download HSL per instructions from\ ThirdParty/HSL/INSTALL.HSL\ \ Or, download MUMPS and METIS\ I downloaded MUMPS via get.Mumps and METIS via MacPorts.

  • Set your correctly for MACOS to avoid to change JNI makefile later

  • Configure

  • Make

From the \$IPOPTDIR type:

  • Check if it is correclty compiled

You can for instance run the CPP test

  • Install it

  • ... and if you need a clean at some point

Make the Java Binding

  • Go to the JavaInterface directory

  • Set the correctly for MacOS if not already done

  • The jipopt makefile (produce by the make of ipopt) is not totally correct for MacOS because the JNI headers are not correct. In the Makefile introduce a new variable

  • change the INCL variable to include the JNI headers directory:

  • Now you can build the jni library

You should have in the in the JavaInterface directory and in the JavaInterface/lib directory

  • To create the jar you have to do producing ScalableProblems.jar in the JavaInterface directory
  • To test the HS071 java binding example you can do

Updated