Difference between revisions of "Installing IPOPT"
|Line 11:||Line 11:|
== Compiling IpOpt ==
== Compiling IpOpt ==
Revision as of 12:04, 12 June 2020
IpOpt can be installed as iCub dependency, as stand-alone binaries, or compiled by getting the sources directly from the web. See below.
Visit the iCub Software Installation page and follow the guide for installing from sources: this way you will get IpOpt installed as a dependency.
Let us enforce that INSTALLING IPOPT AS A DEPENDENCY IS THE RECOMMENDED SOLUTION, which minimizes how package maintenance impacts your system.
Install from binaries distribution
Ipopt can be easily installed via vcpkg:
./vcpkg.exe --overlay-ports=<repo_parent_directory>/robotology-vcpkg-binary-ports install ipopt-binary:x64-windows
sudo apt install coinor-libipopt-dev
Ipopt can be easily installed via homebrew:
brew install ipopt
You can compile the library yourself. Visit the IpOpt web site, download the source code archive (we support releases from 3.5.4 onward) and follow the documentation to compile it carefully. Among all the possible sparse symmetric linear solvers IpOpt can rely on, we suggest to use MUMPS: it is fully open source and it turns to be suitable for our needs. Moreover, if you are a linux user, make sure that the package gfortran is installed.
Hint: to check whether IpOpt is working along with iKin framework, compile and execute the examples located under the iKin tutorials directory: if the IpOpt banner is displayed when the examples are launched then IpOpt is correctly configured.
Hereafter a simple list is given resuming all the basic steps you need to compile IpOpt under Linux:
1) do "sudo apt-get install gfortran" (if you do not have it yet) 2) download IpOpt source code and put it wherever you like; call this location IPOPT_DWN_DIR 3) "cd $IPOPT_DWN_DIR/ThirdParty/Blas" and launch "./get.Blas" 4) "cd $IPOPT_DWN_DIR/ThirdParty/Lapack" and launch "./get.Lapack" 5) "cd $IPOPT_DWN_DIR/ThirdParty/MUMPS" and launch "./get.Mumps" 6) "cd $IPOPT_DWN_DIR/ThirdParty/Metis" and launch "./get.Metis" 7) "cd $IPOPT_DWN_DIR/ThirdParty/ASL" and launch "./get.ASL" 8) create a build directory wherever you like; call this location IPOPT_DIR and export it from within .bashrc 9) "cd $IPOPT_DIR" and launch "$IPOPT_DWN_DIR/configure" 10) launch "make" 11) launch "make test" 12) launch "make install"
Should you experience problems while downloading third-party code (e.g. Blas, Lapack), please replace the ftp protocol with http for the source address within the corresponding scripts (e.g. get.Blas, get.Lapack). For example: ftp://www.netlib.org/[...] becomes http://www.netlib.org/[...].
If, for any reason, the MUMPS package cannot be downloaded straightaway through the script, you need then to sign in here to receive the link to the archive via e-mail. Select options "Real, Symmetric" while submitting your request. Once got it (it takes a few minutes to receive the link), put the archive in "$IPOPT_DWN_DIR/ThirdParty/MUMPS" and proceed with the operations reported within the get.Mumps script (i.e. gunzip, tar, rm, mv).