4755
Comment: Added instructions for Mac OS X
|
7730
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
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. | Some configurations of the search component of Fast Downward, such as optimal cost partitioning for landmark heuristics, require a linear programming (LP) solver and will complain if the planner has not been built with support for such a solver. Setting up LP support requires three steps, explained below: |
Line 7: | Line 7: |
Fast Downward uses the [[http://www.coin-or.org/|COIN-OR]] LP Solver ([[http://www.coin-or.org/Clp/|CLP]]) with the [[https://projects.coin-or.org/Osi|Open Solver Interface]]. | 1. Installing one or more LP solvers. 1. Installing the Open Solver Interface. 1. Building Fast Downward with LP support. |
Line 9: | Line 11: |
== Instructions for building Fast Downward with LP support == | == Installing one or more LP solvers == |
Line 11: | Line 13: |
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 | Fast Downward uses a generic interface (see next step) for accessing LP solvers and hence can be used together with different LP solvers. Currently, three LP solvers are supported: CPLEX, Gurobi, and COIN-LP. You can install one, two or all three solvers without causing conflicts. The solver used by the planner is selected by command-line arguments, not at compile time. We recommend using CPLEX, which in our experiments has led to better performance than COIN-LP. We have no experience with Gurobi, but others recommend it over CPLEX. (If you have data comparing these two within Fast Downward, we would be very interested in hearing about it.) === Installing one or more LP solvers: CPLEX === IBM offers a [[http://www-304.ibm.com/ibm/university/academic/pub/page/ban_ilog_programming|free academic license]] that includes access to CPLEX. Once you are registered, you can download a binary from the member area of the [[http://www-304.ibm.com/ibm/university/academic/member/page/mem_login|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 (adapt the paths if you did not install in the default location): |
Line 13: | Line 22: |
USE_LP=0 }}} in the {{{Makefile}}} to {{{ USE_LP=1 |
export DOWNWARD_CPLEX_INCDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/include/ilcplex export DOWNWARD_CPLEX_LIBDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/lib/x86_sles10_4.1/static_pic |
Line 20: | Line 26: |
and run | If you don't want to permanently modify your environment, you can also set these variables directly in {{{src/search/Makefile}}}. The variables need to be set for when installing the Open Solver Interface (Step 2.) and when building Fast Downward's search component (Step 3.). === Step 1. Installing one or more LP solvers: Gurobi === We have no experience with installing Gurobi. After the installation, set the following environment variables (adapt the paths if you did not install in the default location): |
Line 22: | Line 34: |
make clean make |
export DOWNWARD_GUROBI_INCDIR=/path/to/gurobi/include_dir export DOWNWARD_GUROBI_LIBDIR=/path/to/gurobi/library_dir |
Line 26: | Line 38: |
If you don't want to permanently modify your environment, you can also set these variables directly in {{{src/search/Makefile}}}. The variables need to be set for when installing the Open Solver Interface (Step 2.) and when building Fast Downward's search component (Step 3.). | |
Line 27: | Line 40: |
== Installing CPLEX == | === Installing one or more LP solvers: COIN-LP === |
Line 29: | Line 42: |
IBM has a [[http://www-304.ibm.com/ibm/university/academic/pub/page/ban_ilog_programming|free academic license]] that includes access to CPLEX. Once you are registered, you can download a binary from the member area of the [[http://www-304.ibm.com/ibm/university/academic/member/page/mem_login|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. |
COIN-LP is installed automatically be the following step, so it will be available without additional work. However, we recommend against using it in serious experiments unless you have established that it offers comparable performance to CPLEX in your setting. |
Line 32: | Line 44: |
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 }}} |
== Step 2. Installing the Open Solver Interface == |
Line 38: | Line 46: |
== Installing the Open Solver Interface on Linux == | The Open Solver Interface (OSI) provides a common interface to different LP solvers. OSI must be compiled '''after''' installing the LP solver(s) in Step 1. If you install a solver later, repeat the installation steps of OSI. We assume in the following that CPLEX and Gurobi are installed and the environment variables {{{DOWNWARD_CPLEX_INCDIR}}}, {{{DOWNWARD_CPLEX_LIBDIR}}}, {{{DOWNWARD_GUROBI_INCDIR}}} and {{{DOWNWARD_GUROBI_LIBDIR}}} are set up correctly. |
Line 40: | Line 48: |
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. | These instructions apply to COIN/OSI 0.103.0, which was the last version that was bundled with Fast Downward. Newer versions from http://www.coin-or.org/download/source/Osi/ should work, too. If you experience problems, please [[HomePage#contact|let us know]]. |
Line 42: | Line 50: |
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. | === Installing the Open Solver Interface on Linux === |
Line 44: | Line 52: |
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/ |
Run the following commands. If you have installed only one of the two solvers, omit the options for the other one: |
Line 47: | Line 54: |
{{{ | {{{#!highlight bash |
Line 54: | Line 61: |
LDFLAGS="-L$CPLEX_LIBDIR -L$GUROBI_LIBDIR" \ | LDFLAGS="-L$DOWNWARD_CPLEX_LIBDIR -L$DOWNWARD_GUROBI_LIBDIR" \ |
Line 56: | Line 63: |
--prefix="/opt/coin" --with-cplex-incdir=$CPLEX_INCDIR --with-cplex-lib="-lcplex -lm" --with-gurobi-incdir=$GUROBI_INCDIR --with-gurob-lib="-lgurobi" |
--prefix="/opt/coin" \ --with-cplex-incdir=$DOWNWARD_CPLEX_INCDIR --with-cplex-lib="-lcplex -lm" \ --with-gurobi-incdir=$DOWNWARD_GUROBI_INCDIR --with-gurob-lib="-lgurobi" |
Line 66: | Line 73: |
After the installation, set the environment variable {{{COIN_ROOT}}} to the prefix you used in the call to ./configure. | After installation, set the environment variable {{{DOWNWARD_COIN_ROOT}}} to the prefix you used in the call to {{{./configure}}}. For example: {{{ export DOWNWARD_COIN_ROOT=/opt/coin }}} If you don't want to permanently modify your environment, you can also set this variables directly in {{{src/search/Makefile}}}. The variable need to be set when building Fast Downward's search component (Step 3.). |
Line 70: | Line 82: |
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. | Follow the Linux instructions above with the following changes: * Replace {{{-m32}}} with {{{-arch i386}}}. * Replace {{{--enable-static=yes}}} with {{{--enable-static=no}}}. |
Line 72: | Line 86: |
{{{ | Installation has been reported to fail on Mac OS X due to a bug in the {{{CoinUtils}}} configure script. (See [[http://issues.fast-downward.org/issue295|issue295]].) If you run into this problem, try downloading the [[attachment:coinutils-configure.patched|patched file]] attached to this page, make it executable, and replace the file {{{Osi-0.103.0/CoinUtils/configure}}} with it: {{{#! highlight bash |
Line 77: | Line 93: |
It also is necessary to change {{{-m32}}} to {{{-arch i386}}} and {{{--enable-static=yes}}} to {{{--enable-static=no}}} in the above description. | == Step 3. Building Fast Downward with LP support == |
Line 79: | Line 95: |
== If LP setup fails == | To enable LP support in Fast Downward, you need the [[https://projects.coin-or.org/Osi|Open Solver Interface]] (OSI) and (optionally but recommended) an external solver such as CPLEX installed on your system (see below). Once OSI is installed, you can build Fast Downward with LP support by calling make with the option {{{DOWNWARD_USE_LP=1}}}. This option can be either set as an environment variable or given to make in the commandline. If OSI is not installed in {{{/opt/coin}}}, you also need to set {{{DOWNWARD_COIN_ROOT}}} to its installation path. |
Line 81: | Line 97: |
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. | {{{ make distclean make DOWNWARD_USE_LP=1 DOWNWARD_COIN_ROOT=/path/to/coin }}} |
Line 83: | Line 102: |
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. | == Troubleshooting == The LP-related libraries have a number of dependencies which might not be installed on your system. If for some reason one of the above steps fails, we would appreciate if you could attempt to troubleshoot it yourself. If the configure step fails for COIN/OSI, have a look at their [[https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting|troubleshooting page]]. If you get warnings about unresolved references with CPLEX, visit their [[http://www-01.ibm.com/support/docview.wss?uid=swg21399926|help pages]]. If after troubleshooting you can get the LP package to work, please 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 solvers and OSI library are external packages not developed by us. |
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 a linear programming (LP) solver and will complain if the planner has not been built with support for such a solver. Setting up LP support requires three steps, explained below:
- Installing one or more LP solvers.
- Installing the Open Solver Interface.
- Building Fast Downward with LP support.
Installing one or more LP solvers
Fast Downward uses a generic interface (see next step) for accessing LP solvers and hence can be used together with different LP solvers. Currently, three LP solvers are supported: CPLEX, Gurobi, and COIN-LP. You can install one, two or all three solvers without causing conflicts. The solver used by the planner is selected by command-line arguments, not at compile time. We recommend using CPLEX, which in our experiments has led to better performance than COIN-LP. We have no experience with Gurobi, but others recommend it over CPLEX. (If you have data comparing these two within Fast Downward, we would be very interested in hearing about it.)
Installing one or more LP solvers: CPLEX
IBM offers 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 (adapt the paths if you did not install in the default location):
export DOWNWARD_CPLEX_INCDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/include/ilcplex export DOWNWARD_CPLEX_LIBDIR=/opt/ibm/ILOG/CPLEX_Studio1251/cplex/lib/x86_sles10_4.1/static_pic
If you don't want to permanently modify your environment, you can also set these variables directly in src/search/Makefile. The variables need to be set for when installing the Open Solver Interface (Step 2.) and when building Fast Downward's search component (Step 3.).
Step 1. Installing one or more LP solvers: Gurobi
We have no experience with installing Gurobi.
After the installation, set the following environment variables (adapt the paths if you did not install in the default location):
export DOWNWARD_GUROBI_INCDIR=/path/to/gurobi/include_dir export DOWNWARD_GUROBI_LIBDIR=/path/to/gurobi/library_dir
If you don't want to permanently modify your environment, you can also set these variables directly in src/search/Makefile. The variables need to be set for when installing the Open Solver Interface (Step 2.) and when building Fast Downward's search component (Step 3.).
Installing one or more LP solvers: COIN-LP
COIN-LP is installed automatically be the following step, so it will be available without additional work. However, we recommend against using it in serious experiments unless you have established that it offers comparable performance to CPLEX in your setting.
Step 2. Installing the Open Solver Interface
The Open Solver Interface (OSI) provides a common interface to different LP solvers. OSI must be compiled after installing the LP solver(s) in Step 1. If you install a solver later, repeat the installation steps of OSI. We assume in the following that CPLEX and Gurobi are installed and the environment variables DOWNWARD_CPLEX_INCDIR, DOWNWARD_CPLEX_LIBDIR, DOWNWARD_GUROBI_INCDIR and DOWNWARD_GUROBI_LIBDIR are set up correctly.
These instructions apply to COIN/OSI 0.103.0, which was the last version that was bundled with Fast Downward. Newer versions from http://www.coin-or.org/download/source/Osi/ should work, too. If you experience problems, please let us know.
Installing the Open Solver Interface on Linux
Run the following commands. If you have installed only one of the two solvers, omit the options for the other one:
1 wget http://www.coin-or.org/download/source/Osi/Osi-0.103.0.tgz
2 tar xvzf Osi-0.103.0.tgz
3 cd Osi-0.103.0
4
5 sudo ./configure CC="gcc" CFLAGS="-m32 -pthread -Wno-long-long" \
6 CXX="g++" CXXFLAGS="-m32 -pthread -Wno-long-long" \
7 LDFLAGS="-L$DOWNWARD_CPLEX_LIBDIR -L$DOWNWARD_GUROBI_LIBDIR" \
8 --without-lapack --enable-static=yes \
9 --prefix="/opt/coin" \
10 --with-cplex-incdir=$DOWNWARD_CPLEX_INCDIR --with-cplex-lib="-lcplex -lm" \
11 --with-gurobi-incdir=$DOWNWARD_GUROBI_INCDIR --with-gurob-lib="-lgurobi"
12 sudo make
13 sudo make install
14 cd ..
15 rm -rf Osi-0.103.0
16 rm Osi-0.103.0.tgz
After installation, set the environment variable DOWNWARD_COIN_ROOT to the prefix you used in the call to ./configure. For example:
export DOWNWARD_COIN_ROOT=/opt/coin
If you don't want to permanently modify your environment, you can also set this variables directly in src/search/Makefile. The variable need to be set when building Fast Downward's search component (Step 3.).
Installing the Open Solver Interface on Mac OS X
Follow the Linux instructions above with the following changes:
Replace -m32 with -arch i386.
Replace --enable-static=yes with --enable-static=no.
Installation has been reported to fail on Mac OS X due to a bug in the CoinUtils configure script. (See issue295.) If you run into this problem, try downloading the patched file attached to this page, 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
Step 3. Building Fast Downward with LP support
To enable LP support in Fast Downward, you need the Open Solver Interface (OSI) and (optionally but recommended) an external solver such as CPLEX installed on your system (see below). Once OSI is installed, you can build Fast Downward with LP support by calling make with the option DOWNWARD_USE_LP=1. This option can be either set as an environment variable or given to make in the commandline. If OSI is not installed in /opt/coin, you also need to set DOWNWARD_COIN_ROOT to its installation path.
make distclean make DOWNWARD_USE_LP=1 DOWNWARD_COIN_ROOT=/path/to/coin
Troubleshooting
The LP-related libraries have a number of dependencies which might not be installed on your system. If for some reason one of the above steps fails, we would appreciate if you could attempt to troubleshoot it yourself.
If the configure step fails for COIN/OSI, have a look at their troubleshooting page. If you get warnings about unresolved references with CPLEX, visit their help pages.
If after troubleshooting you can get the LP package to work, please 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 solvers and OSI library are external packages not developed by us.