Skip to content

Commit

Permalink
Merge branch 'main' into issue1105
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvan Sievers committed Jan 29, 2024
2 parents 7a1ee05 + 5d7a505 commit 8cb425a
Show file tree
Hide file tree
Showing 1,292 changed files with 3,155 additions and 153,895 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/experiments export-ignore
/misc export-ignore
/.gitattributes export-ignore
/.github export-ignore
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/autodoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:

- name: Run autodoc
run: |
python3 build.py
cd misc/autodoc
python3 -m pip install -r requirements.txt
python3 autodoc.py
...
4 changes: 2 additions & 2 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: macOS

on:
push:
branches: [main, issue*, release-*]
branches: [main, release-*]
pull_request:
branches: [main, issue*, release-*]
branches: [main, release-*]

jobs:
test:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/misc/cplex2211_windows_installer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ LICENSE_ACCEPTED=TRUE

#Choose installation directory
#-----------------------------
USER_INSTALL_DIR=D:\\a\\downward\\cplex_temp
USER_INSTALL_DIR=D:\\a\\cplex_temp

#Copy examples
#-------------------
CPLEX_STUDIO_EXAMPLES_DIR=D:\\a\\downward\\cplex_examples
CPLEX_STUDIO_EXAMPLES_DIR=D:\\a\\cplex_examples
CPLEX_STUDIO_SAMPLE_COPY_ACTIVATED=1

#Associate files with CPLEX
Expand All @@ -40,17 +40,17 @@ INSTALLER_UI=silent

#Install
#------------
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\README.html=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\Uninstall.lax=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\iawin64_x64.dll=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\iawin32.dll=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\win64_32_x64.exe=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\remove.exe=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\invoker.exe=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\ibm_uninsticon.ico=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\opl\\oplide\\oplide_installer.bat=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\opl\\oplide\\oplide.exe=Yes
-fileOverwrite_D\:\\a\\downward\\cplex_examples\\.samples=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\README.html=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\Uninstall\\Uninstall.lax=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\Uninstall\\resource\\iawin64_x64.dll=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\Uninstall\\resource\\iawin32.dll=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\Uninstall\\resource\\win64_32_x64.exe=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\Uninstall\\resource\\remove.exe=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\Uninstall\\resource\\invoker.exe=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\Uninstall\\ibm_uninsticon.ico=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\opl\\oplide\\oplide_installer.bat=Yes
-fileOverwrite_D\:\\a\\cplex_temp\\opl\\oplide\\oplide.exe=Yes
-fileOverwrite_D\:\\a\\cplex_examples\\.samples=Yes

#Post installation steps
#-------------------------------
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Code style tests

on:
push:
branches: [main, issue*, release-*]
branches: [main, release-*]
pull_request:
branches: [main, issue*, release-*]
branches: [main, release-*]

jobs:
style:
Expand All @@ -25,6 +25,13 @@ jobs:
pip3 install tox
sudo apt-get -y install clang-tidy-12
# TODO: Remove once issue with Ubuntu 22.04 and clang++-14 is resolved.
- name: Work around https://github.com/actions/runner-images/issues/8659
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-* libc6-dev=2.35-* libstdc++6=12.3.0-* libgcc-s1=12.3.0-*
- name: Install uncrustify
run: |
# Set up uncrustify.
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Ubuntu

on:
push:
branches: [main, issue*, release-*]
branches: [main, release-*]
pull_request:
branches: [main, issue*, release-*]
branches: [main, release-*]

# Some notes on file paths: the working directory is $GITHUB_WORKSPACE,
# which equals /home/runner/work/my-repo-name/my-repo-name. The code is
Expand All @@ -29,9 +29,9 @@ jobs:
CC: ${{ matrix.version.cc }}
CXX: ${{ matrix.version.cxx }}
CPLEX_URL: ${{ secrets.CPLEX2211_LINUX_URL }}
DOWNWARD_CPLEX_ROOT: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex
cplex_DIR: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex
CPLEX_LIB: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex/bin/x86-64_linux/libcplex2211.so
DOWNWARD_SOPLEX_ROOT: /home/runner/lib/soplex-6.0.3x
soplex_DIR: /home/runner/lib/soplex-6.0.3x
SOPLEX_LIB: /home/runner/lib/soplex-6.0.3x/lib/
SOPLEX_INCLUDE: /home/runner/lib/soplex-6.0.3x/include/
steps:
Expand All @@ -57,14 +57,22 @@ jobs:
run: |
sudo apt-get -y install ${{ matrix.version.cxx }}
# TODO: Remove once issue with Ubuntu 22.04 and clang++-14 is resolved.
- name: Work around https://github.com/actions/runner-images/issues/8659
if: matrix.version.cxx == 'clang++-14'
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-* libc6-dev=2.35-* libstdc++6=12.3.0-* libgcc-s1=12.3.0-*
# Only install CPLEX if its URL/secret is set.
- name: Install CPLEX
if: ${{ env.CPLEX_URL != 0 }}
run: |
# We redirect output of wget to hide the secret URLs.
wget -O cplex_installer $CPLEX_URL &> /dev/null
chmod +x cplex_installer
./cplex_installer -DLICENSE_ACCEPTED=TRUE -DUSER_INSTALL_DIR="$(dirname "${DOWNWARD_CPLEX_ROOT}")" -i silent
./cplex_installer -DLICENSE_ACCEPTED=TRUE -DUSER_INSTALL_DIR="$(dirname "${cplex_DIR}")" -i silent
rm cplex_installer
# Always install SoPlex
Expand All @@ -76,7 +84,7 @@ jobs:
cd ..
cmake -S soplex -B build
cmake --build build
cmake --install build --prefix "${DOWNWARD_SOPLEX_ROOT}"
cmake --install build --prefix "${soplex_DIR}"
rm -rf soplex build
- name: Compile planner
Expand Down Expand Up @@ -161,7 +169,7 @@ jobs:
- name: Run driver, translator and search tests
run: |
cd misc/
tox -e driver,translator,search
tox -e driver,translator,search,autodoc
- name: Run CPLEX tests
if: ${{ env.CPLEX_URL != 0 }}
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ name: Windows

on:
push:
branches: [main, issue*, release-*]
branches: [main, release-*]
pull_request:
branches: [main, issue*, release-*]
branches: [main, release-*]

env:
ARCH: "x64"
CC: cl
CXX: cl

DOWNWARD_CPLEX_ROOT: D:\a\downward\cplex
ZLIB_ROOT: D:\a\downward\zlib
cplex_DIR: D:\a\cplex

CPLEX_URL: "${{ secrets.CPLEX2211_WINDOWS_URL }}"
ZLIB_URL: "https://www.zlib.net/zlib1213.zip"
ZLIB_URL: "https://www.zlib.net/zlib13.zip"


jobs:
Expand Down Expand Up @@ -54,7 +53,7 @@ jobs:
cd zlib
echo "Set up zlib include directory"
move ../zlib-1.2.13 include
move ../zlib-1.3 include
echo "Compile zlib library"
cd include
Expand All @@ -73,11 +72,11 @@ jobs:
curl.exe --output cplex.exe $ENV:CPLEX_URL
echo "Install CPLEX"
Start-Process -FilePath .\cplex.exe -ArgumentList "-f", "D:\a\downward\downward\.github\workflows\misc\cplex2211_windows_installer.properties" -PassThru | Wait-Process
Start-Process -FilePath .\cplex.exe -ArgumentList "-f", "$ENV:GITHUB_WORKSPACE\.github\workflows\misc\cplex2211_windows_installer.properties" -PassThru | Wait-Process
del .\cplex.exe
echo "Copy the relevant directory to a location which is not magically protected against cmake"
Xcopy /E /I ..\cplex_temp\cplex ..\cplex
echo "Copy the relevant directory to a location which is not magically protected against CMake"
Xcopy /E /I D:\a\cplex_temp\cplex $ENV:cplex_DIR
- name: Compile planner
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ __pycache__/
/sas_plan
/sas_plan.*
/builds/
/experiments/issue*/.venv/
/experiments/issue*/data/
/misc/.tox/
/misc/autodoc/downward-xmlrpc.secret
120 changes: 120 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
## Dependencies
### Mandatory Dependencies

**Linux/MacOS:** you need a C++ compiler, CMake and GNU make.
To run the planner, you also need Python 3.

On Debian/Ubuntu, the following should install all these dependencies:
```
sudo apt install cmake g++ make python3
```

**Windows:** install [Visual Studio >= 2017](https://visualstudio.microsoft.com/de/vs/older-downloads/),
[Python](https://www.python.org/downloads/windows/), and [CMake](http://www.cmake.org/download/).
During the installation of Visual Studio, the C++ compiler is not installed by default, but the IDE prompts you to install it when you create a new C++ project.


### Optional: Linear-Programming Solvers

Some planner configurations depend on an LP or MIP solver. We support CPLEX (commercial, [free academic license](http://ibm.com/academic)) and SoPlex (Apache License, no MIP support). You can install one or both solvers without causing conflicts.

Once LP solvers are installed and the environment variables `cplex_DIR` and/or `soplex_DIR` are set up correctly, Fast Downward automatically includes each solver detected on the system in the build.

#### Installing CPLEX

Obtain CPLEX and follow the guided installation. See [troubleshooting](#troubleshooting) if you have problems accessing the installer.
On Windows, install CPLEX into a directory without spaces.

After the installation, set the environment variable `cplex_DIR` to the subdirectory `/cplex` of the installation.
For example on Ubuntu:
```bash
export cplex_DIR=/opt/ibm/ILOG/CPLEX_Studio2211/cplex
```
Note that on Windows, setting up the environment variable might require using `/` instead of the more Windows-common `\`.


#### Installing SoPlex on Linux/macOS

**Important:** The GNU Multiple Precision library (GMP) is critical for the performance of SoPlex but the build does not complain if it is not present.
Make sure that the build uses the library (check the output of CMake for `Found GMP`).

As of SoPlex 6.0.4, the release does not support C++-20, so we build from the tip of the [GitHub main branch](https://github.com/scipopt/soplex) (adapt the path if you install a different version or want to use a different location):
```bash
sudo apt install libgmp3-dev
git clone https://github.com/scipopt/soplex.git
export soplex_DIR=/opt/soplex-6.0.4x
export CXXFLAGS="$CXXFLAGS -Wno-use-after-free" # Ignore compiler warnings about use-after-free
cmake -S soplex -B build
cmake --build build
cmake --install build --prefix $soplex_DIR
rm -rf soplex build
```

After installation, permanently set the environment variable `soplex_DIR` to the value you used during the installation.

**Note:** Once [support for C++-20](https://github.com/scipopt/soplex/pull/15) has been included in a SoPlex release, we can update this and can recommend the [SoPlex homepage](https://soplex.zib.de/index.php#download) for downloads instead.


### Optional: Plan Validator

You can validate the found plans by passing `--validate` (implied by `--debug`) to the planner if the [VAL plan validation software](https://github.com/KCL-Planning/VAL)
is installed on your system and the binary `validate` is on the `PATH`.

**Note:** VAL has a [bug](https://github.com/KCL-Planning/VAL/issues/48) that prevents it from correctly handling the IPC 18 data network domain.
You can install an older version, e.g., under Debian/Ubuntu:

```bash
sudo apt install g++ make flex bison
git clone https://github.com/KCL-Planning/VAL.git
cd VAL
git checkout a5565396007eee73ac36527fbf904142b3077c74
make clean # Remove old binaries.
sed -i 's/-Werror //g' Makefile # Ignore warnings.
make
```

Don't forget to add the resulting `validate` binary to your `PATH`.

## Compiling the planner

To build the planner, from the top-level directory run:

```bash
./build.py
```

This creates the default build `release` in the directory `builds`. For information on alternative builds (e.g. `debug`) and further options, call
`./build.py --help`. [Our website](https://www.fast-downward.org/ForDevelopers/CMake) has details on how to set up development builds.


### Compiling on Windows

Windows does not interpret the shebang in Python files, so you have to call `build.py` as `python3 build.py` (make sure `python3` is on your `PATH`). Also note that options are passed without `--`, e.g., `python3 build.py build=debug`.

Note that compiling from the terminal is only possible with the right environment. The easiest way to get such an environment is to use the `Developer PowerShell for VS 2019` or `Developer PowerShell`.

Alternatively, you can [create a Visual Studio Project](https://www.fast-downward.org/ForDevelopers/CMake#Custom_Builds), open it in Visual Studio and build from there. Visual Studio creates its binary files in subdirectories of the project that our driver script currently does not recognize. If you build with Visual Studio, you have to run the individual components of the planner yourself.

## Testing the build

To test your build use:

```bash
./fast-downward.py misc/tests/benchmarks/miconic/s1-0.pddl --search "astar(lmcut())"
```

To test the LP support use:
```bash
./fast-downward.py misc/tests/benchmarks/miconic/s1-0.pddl --search "astar(operatorcounting([lmcut_constraints()]))"
```

## Troubleshooting

* If you changed the build environment, delete the `builds` directory and rebuild.
* **Windows:** If you cannot execute the Fast Downward binary in a new command line, then it might be unable to find a dynamically linked library.
Use `dumpbin /dependents PATH\TO\DOWNWARD\BINARY` to list all required libraries and ensure that they can be found in your `PATH` variable.
* **CPLEX:** After logging in at the IBM website, you find the Ilog studio software under Technology -> Data Science. Choose the right version and switch to HTTP download unless you have the IBM download manager installed. If you have problems using their website with Firefox, try Chrome instead. Execute the downloaded binary and follow the guided installation.
* **CPLEX:** If you get warnings about unresolved references with CPLEX, visit their [help pages](http://www-01.ibm.com/support/docview.wss?uid=swg21399926).
* **MacOS:** If your compiler doesn't find flex or bison when building VAL, your include directories might be in a non-standard location. In this case you probably have to specify where to look for includes and libraries in VAL's
Makefile (probably `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr`).

19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ For further information:
- Fast Downward mailing list: <https://groups.google.com/forum/#!forum/fast-downward>
- Fast Downward main repository: <https://github.com/aibasel/downward>

## Scientific experiments

## Tested software versions
We recommend to use the [latest release](https://github.com/aibasel/downward/releases/latest) instead of the tip of the main branch.
The [Downward Lab](https://lab.readthedocs.io/en/stable/) Python package helps running Fast Downward experiments.
Our separate [benchmark repository](https://github.com/aibasel/downward-benchmarks) contains a collection of planning tasks.

## Supported software versions

The planner is mainly developed under Linux; and all of its features should work with no restrictions under this platform.
The planner should compile and run correctly on macOS, but we cannot guarantee that it works as well as under Linux.
The same comment applies for Windows, where additionally some diagnostic features (e.g., reporting peak memory usage when the planner is terminated by a signal) are not supported.
Setting time and memory limits and running portfolios is not supported under Windows either.

This version of Fast Downward has been tested with the following software versions:

Expand All @@ -27,11 +37,15 @@ We test LP support with CPLEX 22.1.1 and SoPlex 6.0.3+. On Ubuntu we
test both CPLEX and SoPlex. On Windows we currently only test CPLEX,
and on macOS we do not test LP solvers (yet).

## Build instructions

See [BUILD.md](BUILD.md).


## Contributors

The following list includes all people that actively contributed to
Fast Downward, i.e. all people that appear in some commits in Fast
Fast Downward, i.e., all people that appear in some commits in Fast
Downward's history (see below for a history on how Fast Downward
emerged) or people that influenced the development of such commits.
Currently, this list is sorted by the last year the person has been
Expand All @@ -51,6 +65,7 @@ contributing, and finally by last name.
- 2022-2023 Remo Christen
- 2023 Simon Dold
- 2023 Claudia S. Grundke
- 2023 Victor Paléologue
- 2023 Emanuele Tirendi
- 2021-2022 Dominik Drexler
- 2016-2020 Cedric Geissmann
Expand Down
Loading

0 comments on commit 8cb425a

Please sign in to comment.