Skip to content

Commit

Permalink
Update amici to v0.26.3-20-g8253a97d (#388)
Browse files Browse the repository at this point in the history
* Update amici to [8253a97d413cbbcfec335fb50fd1355107804e9e](AMICI-dev/AMICI@8253a97)
* GHA: disable ceres due to #391 
* Address amici deprecations

Mysterious amici errors on GHA, specifically for Weber_BMC2015, not locally reproducible, remain AMICI-dev/AMICI#2491. They already occurred (at least) with amici v0.26.1.

---

git subrepo clone --branch=8253a97d413cbbcfec335fb50fd1355107804e9e --force [email protected]:dweindl/AMICI.git deps/AMICI

subrepo:
  subdir:   "deps/AMICI"
  merged:   "8253a97d"
upstream:
  origin:   "[email protected]:dweindl/AMICI.git"
  branch:   "8253a97d413cbbcfec335fb50fd1355107804e9e"
  commit:   "8253a97d"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "110b9eb"
  • Loading branch information
dweindl authored Oct 19, 2024
1 parent 3147525 commit c76c7d3
Show file tree
Hide file tree
Showing 398 changed files with 46,354 additions and 35,930 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/benchmark_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${AMICI_PATH}/ThirdParty/SuiteSparse/install" \
&& cmake --build "${AMICI_PATH}/build" --parallel -- VERBOSE=1
- name: Configure parpe
run: |
cmake \
-S"${PARPE_BASE}" \
-B"${PARPE_BUILD}" \
-DPARPE_ENABLE_CERES=OFF \
-DIPOPT_INCLUDE_DIRS=/usr/include/coin/ \
-DIPOPT_LIBRARIES=/usr/lib/libipopt.so \
-DGCOVR_REPORT=TRUE \
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/parpe_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${AMICI_PATH}/ThirdParty/SuiteSparse/install" \
&& cmake --build "${AMICI_PATH}/build" --parallel -- VERBOSE=1
- name: Install parPE deps
Expand All @@ -75,7 +76,8 @@ jobs:
-DIPOPT_LIBRARIES=/usr/lib/libipopt.so \
-DGCOV_REPORT=TRUE \
-DBUILD_TESTING=TRUE \
-DPARPE_ENABLE_FIDES=TRUE
-DPARPE_ENABLE_FIDES=TRUE \
-DPARPE_ENABLE_CERES=FALSE
- name: Build parPE
# with sonar build wrapper
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/petab_testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${AMICI_PATH}/ThirdParty/SuiteSparse/install" \
&& cmake --build "${AMICI_PATH}/build" --parallel -- VERBOSE=1
- name: Configure parpe
run: |
cmake \
-S"${PARPE_BASE}" \
-B"${PARPE_BUILD}" \
-DPARPE_ENABLE_CERES=OFF \
-DIPOPT_INCLUDE_DIRS=/usr/include/coin/ \
-DIPOPT_LIBRARIES=/usr/lib/libipopt.so \
-DGCOVR_REPORT=TRUE \
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ described in [doc/petab_model_import.md](doc/petab_model_import.md).

For full functionality, parPE requires the following libraries:

* CMAKE (>=3.15)
* CMAKE (>=3.22)
* MPI ([OpenMPI](https://www.open-mpi.org/),
[MPICH](https://www.mpich.org/), ...)
* IPOPT (>= 1.2.7) (requires coinhsl)
Expand All @@ -60,7 +60,7 @@ For full functionality, parPE requires the following libraries:
* [AMICI](https://github.com/AMICI-dev/AMICI) (included in this repository)
(uses SuiteSparse, Sundials)
* C++17 compiler
* Python >= 3.9, including header files
* Python >= 3.10, including header files

On Debian-based systems, dependencies can be installed via:
```shell
Expand Down Expand Up @@ -109,10 +109,10 @@ Other sample build scripts are provided as `/build*.sh`.

## Recently tested compilers

* GCC 10.2.0
* Intel icpc (ICC) 17.0.6
* GCC 13.2.0
* Clang 18.1.3

## Docker
## Containers

There is a Dockerfile available in `container/charliecloud/` and images
can be found on [dockerhub](https://hub.docker.com/r/dweindl/parpe/).
Expand Down Expand Up @@ -153,7 +153,7 @@ parPE is being used or has been used in the following projects:

parPE has been developed within research projects receiving external funding:

* Through the European Union's Horizon 2020 research and innovation
* Through the European Union's Horizon 2020 research and innovation
programme under grant agreement no. 686282
([CanPathPro](http://canpathpro.eu/)).

Expand Down
4 changes: 2 additions & 2 deletions benchmark_collection/import_and_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ amici_root="${AMICI_ROOT:-${parpe_dir}/deps/AMICI/}"
cd "${petab_model_dir}"

echo "Running petablint on ${petab_yaml}..."
petablint -v -y "${model_name}".yaml
petablint -v "${model_name}".yaml

# import AMICI model
if [[ ! -d ${amici_model_dir} ]]; then
echo "Importing model..."
cmd="amici_import_petab.py --verbose -y ${model_name}.yaml -n ${model_name} -o ${amici_model_dir}"
cmd="amici_import_petab.py --verbose ${model_name}.yaml -n ${model_name} -o ${amici_model_dir}"
echo "${cmd}"
${cmd}
fi
Expand Down
5 changes: 4 additions & 1 deletion container/charliecloud/parpe_base/install_parpe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -euo pipefail
set -x

export PARPE_BASE="${PARPE_DIR:-/parPE}"
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:-""}

# unpack git archive
mkdir "$PARPE_BASE" && cd "$PARPE_BASE"
Expand All @@ -21,7 +22,8 @@ cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
.. && make -j
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${AMICI_PATH}/ThirdParty/SuiteSparse/install" \
.. && cmake --build . --parallel

# install fides optimizer
cd "$PARPE_BASE/ThirdParty" && ./installFides.sh
Expand All @@ -45,6 +47,7 @@ mpi_cmd="$mpi_cmd;--mca;orte_base_help_aggregate;0"
cmake \
-DPARPE_BUILD_OPTIMIZED=OFF \
-DPARPE_ENABLE_FIDES=ON \
-DPARPE_ENABLE_CERES=OFF \
-DIPOPT_INCLUDE_DIRS=/usr/include/coin/ \
-DIPOPT_LIBRARIES=/usr/lib/libipopt.so \
-DMPI_INCLUDE_DIRS=/usr/include/openmpi-x86_64/ \
Expand Down
5 changes: 0 additions & 5 deletions deps/AMICI/.github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV

- name: Remove direct dependencies from setup.cfg
# Remove any "git+https"-based dependencies that are not supported
# by PyPI and are only required for testing.
run: sed -i '/git+https/d' python/sdist/pyproject.toml

- name: sdist
run: scripts/buildSdist.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ jobs:
run: |
git clone --depth 1 https://github.com/benchmarking-initiative/Benchmark-Models-PEtab.git \
&& export BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \
&& pip3 install -e $BENCHMARK_COLLECTION/../src/python \
&& AMICI_PARALLEL_COMPILE="" tests/benchmark-models/test_benchmark_collection.sh
# run gradient checks
- name: Run Gradient Checks
run: |
pip install git+https://github.com/ICB-DCM/fiddy.git \
&& cd tests/benchmark-models && pytest ./test_petab_benchmark.py
&& cd tests/benchmark-models && pytest --durations=10 ./test_petab_benchmark.py
# upload results
- uses: actions/upload-artifact@v4
Expand Down
10 changes: 8 additions & 2 deletions deps/AMICI/.github/workflows/test_petab_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build:
name: PEtab Testsuite

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

env:
ENABLE_GCOV_COVERAGE: TRUE
Expand Down Expand Up @@ -68,12 +68,18 @@ jobs:
&& source ./venv/bin/activate \
&& cd petab_test_suite && pip3 install -e .
- name: Install PEtab benchmark collection
run: |
git clone --depth 1 https://github.com/benchmarking-initiative/Benchmark-Models-PEtab.git \
&& export BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \
&& source venv/bin/activate && python -m pip install -e $BENCHMARK_COLLECTION/../src/python
- name: Install petab
run: |
source ./venv/bin/activate \
&& python3 -m pip uninstall -y petab \
&& python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@develop \
&& python3 -m pip install git+https://github.com/FFroehlich/pysb@fix_pattern_matching \
&& python3 -m pip install git+https://github.com/pysb/pysb@master \
&& python3 -m pip install sympy>=1.12.1
Expand Down
48 changes: 48 additions & 0 deletions deps/AMICI/.github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
- name: Set up AMICI C++ libraries
uses: ./.github/actions/setup-amici-cpp

- name: Install libsuitesparse-dev
# We don't need libsuitesparse-dev, but let's have it installed,
# to ensure that its presence does not break the build
run: sudo apt-get install -y libsuitesparse-dev

- name: C++ tests
run: scripts/run-cpp-tests.sh

Expand Down Expand Up @@ -125,6 +130,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cache/pooch
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- uses: actions/checkout@v4
- run: git fetch --prune --unshallow

Expand Down Expand Up @@ -201,6 +213,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cache/pooch
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- uses: actions/checkout@v4
- run: git fetch --prune --unshallow

Expand Down Expand Up @@ -259,6 +278,17 @@ jobs:
- name: C++ tests
run: scripts/run-cpp-tests.sh

- name: Get Pooch Cache Directory
id: get-pooch-cache
run: |
echo "pooch-cache=$(source venv/bin/activate && python -c 'import pooch; print(pooch.os_cache("pooch"))')" >> $GITHUB_ENV
- name: Cache Pooch Directory
uses: actions/cache@v4
with:
path: ${{ env.pooch-cache }}
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- name: Python tests
run: |
scripts/run-python-tests.sh \
Expand Down Expand Up @@ -301,6 +331,24 @@ jobs:
- name: Get BioNetGen
run: scripts/buildBNGL.sh


- name: Get Pooch Cache Directory
id: get-pooch-cache
run: |
echo "pooch-cache=$(source venv/bin/activate && python -c 'import pooch; print(pooch.os_cache("pooch"))')" >> $GITHUB_ENV
- name: Cache Pooch Directory
uses: actions/cache@v4
with:
path: ${{ env.pooch-cache }}
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- name: Install PEtab benchmark collection
run: |
git clone --depth 1 https://github.com/benchmarking-initiative/Benchmark-Models-PEtab.git \
&& export BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \
&& source venv/bin/activate && python -m pip install -e $BENCHMARK_COLLECTION/../src/python
- name: Python tests
run: |
scripts/run-python-tests.sh \
Expand Down
11 changes: 11 additions & 0 deletions deps/AMICI/.github/workflows/test_python_ver_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ jobs:
- run: source venv/bin/activate && pip3 install "sympy>=1.12.1"
if: matrix.python-version != '3.12'

- name: Get Pooch Cache Directory
id: get-pooch-cache
run: |
echo "pooch-cache=$(source venv/bin/activate && python -c 'import pooch; print(pooch.os_cache("pooch"))')" >> $GITHUB_ENV
- name: Cache Pooch Directory
uses: actions/cache@v4
with:
path: ${{ env.pooch-cache }}
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- name: Python tests
run: |
source venv/bin/activate \
Expand Down
12 changes: 12 additions & 0 deletions deps/AMICI/.github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ jobs:

- run: python -m amici

- name: Get Pooch Cache Directory
id: get-pooch-cache
run: |
echo "pooch-cache=$(python -c 'import pooch; print(pooch.os_cache("pooch"))')" >> $GITHUB_ENV
shell: bash

- name: Cache Pooch Directory
uses: actions/cache@v4
with:
path: ${{ env.pooch-cache }}
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- name: Run Python tests
shell: bash
run: |
Expand Down
2 changes: 2 additions & 0 deletions deps/AMICI/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ ThirdParty/sundials/build/*
ThirdParty/SuiteSparse/lib/*
ThirdParty/SuiteSparse/include/
ThirdParty/SuiteSparse/share/*
ThirdParty/SuiteSparse/install/*
ThirdParty/SuperLU_MT_3.1/
ThirdParty/superlu_mt_3.1.tar.gz
ThirdParty/swig-*
Expand All @@ -203,3 +204,4 @@ cache_fiddy/*
debug/*
tests/benchmark-models/cache_fiddy/*
venv/*
.coverage
6 changes: 3 additions & 3 deletions deps/AMICI/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
;
[subrepo]
remote = [email protected]:ICB-DCM/AMICI.git
branch = v0.26.1
commit = b0d79fffd3ab6e39296353d906e27033bc13dd4c
parent = 157fd81f04bd866127bc75f46887c4ce7c43566d
branch = 8253a97d413cbbcfec335fb50fd1355107804e9e
commit = 8253a97d413cbbcfec335fb50fd1355107804e9e
parent = 4b6205d1b4661c227beee7039416c516d47e91f9
cmdver = 0.4.6
method = merge
4 changes: 2 additions & 2 deletions deps/AMICI/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.1
rev: v0.6.7
hooks:
# Run the linter.
- id: ruff
Expand All @@ -28,7 +28,7 @@ repos:
- python/sdist/pyproject.toml

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.17.0
hooks:
- id: pyupgrade
args: ["--py310-plus"]
Expand Down
Loading

0 comments on commit c76c7d3

Please sign in to comment.