3340
Comment: preliminary documentation
|
4755
Added instructions for Mac OS X
|
Deletions are marked like this. | Additions are marked like this. |
Line 32: | Line 32: |
After the installation, set the following environment variables (you may need different paths if you did not install in the default location). {{{ CPLEX_INCDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/include/ilcplex CPLEX_LIBDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/lib/x86_sles10_4.1/static_pic }}} |
|
Line 33: | Line 38: |
== Installing the Open Solver Interface === | == Installing the Open Solver Interface on Linux == |
Line 37: | Line 42: |
CPLEX_INCDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/include/ilcplex CPLEX_LIBDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/lib/x86_sles10_4.1/static_pic |
For this instruction, we assume that CPLEX and gurobi are installed and the environment variables CPLEX_INCDIR, CPLEX_LIBDIR, GUROBI_INCDIR, and GUROBI_LIBDIR are set up correctly. We only tested CPLEX so far but other sovlers should work analogously. Include options for (only) the solvers you have installed. |
Line 40: | Line 44: |
Download the current version of COIN/OSI from their website: http://www.coin-or.org/download/source/Osi/ In the following description we assume version 0.103.0 since this was the last version that was bundled with Fast Downward. |
In the following description we assume version 0.103.0 of COIN/OSI since this was the last version that was bundled with Fast Downward. However, it should also work with the newest version from http://www.coin-or.org/download/source/Osi/ |
Line 48: | Line 51: |
Line 50: | Line 54: |
LDFLAGS="-L$CPLEX_LIBDIR -L$GUROBI_LIBDIR" \ | |
Line 51: | Line 56: |
--with-cplex-incdir=$CPLEX_INCDIR \ --with-cplex-lib=$CPLEX_LIBDIR/libcplex.a \ --with-gurobi-incdir=$GUROBI_INCDIR \ --with-gurobi-lib=$GUROBI_LIBDIR/libgurobi.a |
--prefix="/opt/coin" --with-cplex-incdir=$CPLEX_INCDIR --with-cplex-lib="-lcplex -lm" --with-gurobi-incdir=$GUROBI_INCDIR --with-gurob-lib="-lgurobi" sudo make sudo make install cd .. rm -rf Osi-0.103.0 rm Osi-0.103.0.tgz |
Line 57: | Line 66: |
--prefix "$BASEDIR/coin" | After the installation, set the environment variable {{{COIN_ROOT}}} to the prefix you used in the call to ./configure. |
Line 59: | Line 68: |
== Installing the Open Solver Interface on Mac OS X == The installation above does not seem to work on Mac OS X (See [[http://issues.fast-downward.org/issue295|issue295]]). The problem back then was a bugged configure script in the subdirectory {{{CoinUtils}}}. The [[attachment:coinutils-configure.patched|patched file]] is attached to this page. Download it, make it executable and replace the file {{{Osi-0.103.0/CoinUtils/configure}}} with it. {{{ cp Dowloads/coinutils-configure.patched Osi-0.103.0/CoinUtils/configure chmod +x Osi-0.103.0/CoinUtils/configure }}} It also is necessary to change {{{-m32}}} to {{{-arch i386}}} and {{{--enable-static=yes}}} to {{{--enable-static=no}}} in the above description. |
Back to Doc/Heuristic.
LP solver support
Some configurations of the search component of Fast Downward, such as optimal cost partitioning for landmark heuristics, require an Linear Programming (LP) solver and will complain if the planner has not been built with support for such a solver.
Fast Downward uses the COIN-OR LP Solver (CLP) with the Open Solver Interface.
Instructions for building Fast Downward with LP support
To enable LP support in Fast Downward, you need OSI and (optionally but recommended) an external solver such as CPLEX installed on your system (see below). Once OSI is installed, change the line
USE_LP=0
in the Makefile to
USE_LP=1
and run
make clean make
Installing CPLEX
IBM has a free academic license that includes access to CPLEX. Once you are registered, you can download a binary from the member area of the Academic Initiative Website. Execute the binary and follow the guided installation. If you want to install in a global location, you have to execute the installer as root.
After the installation, set the following environment variables (you may need different paths if you did not install in the default location).
CPLEX_INCDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/include/ilcplex CPLEX_LIBDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/lib/x86_sles10_4.1/static_pic
Installing the Open Solver Interface on Linux
OSI provides a common interface to different LP solvers. To build an interface to a solver, the solver has to be installed before compiling OSI. If you install a solver later, repeat the installation steps of OSI to use it in Fast Downward.
For this instruction, we assume that CPLEX and gurobi are installed and the environment variables CPLEX_INCDIR, CPLEX_LIBDIR, GUROBI_INCDIR, and GUROBI_LIBDIR are set up correctly. We only tested CPLEX so far but other sovlers should work analogously. Include options for (only) the solvers you have installed.
In the following description we assume version 0.103.0 of COIN/OSI since this was the last version that was bundled with Fast Downward. However, it should also work with the newest version from http://www.coin-or.org/download/source/Osi/
wget http://www.coin-or.org/download/source/Osi/Osi-0.103.0.tgz tar xvzf Osi-0.103.0.tgz cd Osi-0.103.0 sudo ./configure CC="gcc" CFLAGS="-m32 -pthread -Wno-long-long" \ CXX="g++" CXXFLAGS="-m32 -pthread -Wno-long-long" \ LDFLAGS="-L$CPLEX_LIBDIR -L$GUROBI_LIBDIR" \ --without-lapack --enable-static=yes \ --prefix="/opt/coin" --with-cplex-incdir=$CPLEX_INCDIR --with-cplex-lib="-lcplex -lm" --with-gurobi-incdir=$GUROBI_INCDIR --with-gurob-lib="-lgurobi" sudo make sudo make install cd .. rm -rf Osi-0.103.0 rm Osi-0.103.0.tgz
After the installation, set the environment variable COIN_ROOT to the prefix you used in the call to ./configure.
Installing the Open Solver Interface on Mac OS X
The installation above does not seem to work on Mac OS X (See issue295). The problem back then was a bugged configure script in the subdirectory CoinUtils. The patched file is attached to this page. Download it, make it executable and replace the file Osi-0.103.0/CoinUtils/configure with it.
cp Dowloads/coinutils-configure.patched Osi-0.103.0/CoinUtils/configure chmod +x Osi-0.103.0/CoinUtils/configure
It also is necessary to change -m32 to -arch i386 and --enable-static=yes to --enable-static=no in the above description.
If LP setup fails
The LP solver has a number of dependencies which might not be installed on your system. If for some reason the LP setup step fails, we'd appreciate if you attempt to troubleshoot it yourself. Check the contents of the setup script in the lp directory to see what it does, try to run the various steps manually, have a look at the errors generated, and consult the Osi documentation.
If after troubleshooting you can get the LP package to work, do let us know of your problem and its solution so that we can improve these instructions. If you still cannot get it to work, we may be able to provide some help, but note that the LP solver is an external package not developed by us.