From f9c2caa24f06505fe997792e455c1e4b291d0c06 Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Thu, 17 Oct 2024 16:04:46 +0200 Subject: [PATCH 1/6] update GSL on GitHub Actions CI --- .github/workflows/ode-toolbox-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ode-toolbox-build.yml b/.github/workflows/ode-toolbox-build.yml index 6483fb54..e8d8896c 100644 --- a/.github/workflows/ode-toolbox-build.yml +++ b/.github/workflows/ode-toolbox-build.yml @@ -62,9 +62,9 @@ jobs: - name: Install GSL run: | cd .. - wget http://ftp.wrz.de/pub/gnu/gsl/gsl-2.5.tar.gz - tar -xzf gsl-2.5.tar.gz - cd gsl-2.5 + wget https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz + tar -xzf gsl-latest.tar.gz + cd gsl-2.* ./configure && make && sudo make install - name: Install Python dependencies From f0d159436813c89b6879df3978164b7f953d8d30 Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Thu, 17 Oct 2024 16:18:20 +0200 Subject: [PATCH 2/6] update GSL on GitHub Actions CI --- .github/workflows/ode-toolbox-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ode-toolbox-build.yml b/.github/workflows/ode-toolbox-build.yml index e8d8896c..364313f7 100644 --- a/.github/workflows/ode-toolbox-build.yml +++ b/.github/workflows/ode-toolbox-build.yml @@ -71,7 +71,7 @@ jobs: run: | python -m pip install --upgrade pip pytest pycodestyle codecov pytest-cov wheel python -m pip install numpy - if [ "${{ matrix.with_gsl }}" == "1" ]; then python -m pip install pygsl ; fi + if [ "${{ matrix.with_gsl }}" == "1" ]; then python3 -m pip install -v https://github.com/pygsl/pygsl/archive/refs/tags/v2.4.1.tar.gz ; fi python -m pip install -r requirements.txt export PYTHON_VERSION=`python -c "import sys; print('.'.join(map(str, [sys.version_info.major, sys.version_info.minor])))"` echo "Python version detected:" From a94a747af785358b79c3130bd9b16eb411e8029f Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Tue, 19 Nov 2024 23:45:47 +0100 Subject: [PATCH 3/6] update GSL on GitHub Actions CI --- .github/workflows/ode-toolbox-build.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ode-toolbox-build.yml b/.github/workflows/ode-toolbox-build.yml index 364313f7..b5c6a943 100644 --- a/.github/workflows/ode-toolbox-build.yml +++ b/.github/workflows/ode-toolbox-build.yml @@ -6,12 +6,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout ODE-toolbox code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install apt dependencies run: | @@ -47,12 +47,12 @@ jobs: steps: - name: Checkout ODE-toolbox code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install apt dependencies run: | @@ -60,11 +60,13 @@ jobs: sudo apt install pkg-config python3-all-dev - name: Install GSL + if: ${{ matrix.with_gsl == '1' }} run: | + sudo apt remove libgsl27 libgsl-dev # remove system-wide GSL version that is installed by default cd .. - wget https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz - tar -xzf gsl-latest.tar.gz - cd gsl-2.* + wget https://mirror.ibcp.fr/pub/gnu/gsl/gsl-2.7.tar.gz # this should be "gsl-latest.tar.gz", but there is an issue with GSL 2.8 (see https://github.com/pygsl/pygsl/issues/62) + tar -xzf gsl-2.7.tar.gz + cd gsl-2.7 ./configure && make && sudo make install - name: Install Python dependencies From 4a6b20c8e467e7ff818337f26813afe02e82176a Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Wed, 20 Nov 2024 00:33:27 +0100 Subject: [PATCH 4/6] update GSL on GitHub Actions CI --- doc/index.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 610f7cdb..f592d28e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -41,9 +41,9 @@ ODE-toolbox is written in Python and leverages SymPy for the symbolic manipulati Installation ------------ -.. Attention:: SymPy releases after 1.4 introduce a fourfold regression in runtime performance on the ODE-toolbox unit tests, compared to SymPy 1.4. Unless this conflicts with other version requirements, we would recommend to use SymPy 1.4 for now (for example, by editing ``requirements.txt`` to read ``sympy==1.4``). +.. Attention:: SymPy releases after 1.4 introduce a regression in runtime performance when computing matrix exponentials. Unless this conflicts with other version requirements, we recommend to use SymPy 1.4 for now (for example, by editing ``requirements.txt`` to read ``sympy==1.4``). This issue is being tracked at https://github.com/sympy/sympy/issues/23417. -.. Attention:: The latest SymPy release at time of writing, 1.10.1, introduces an issue that prevents ODE-toolbox from being used with many common neuron models. Please see https://github.com/sympy/sympy/issues/23417 and use an older SymPy version until this issue has been resolved. +.. Attention:: To perform solver benchmarking, ODE-toolbox relies on GSL and PyGSL. Currently, the latest PyGSL release is not compatible with GSL. We recommend to use GSL 2.7 for now. This issue is being tracked at https://github.com/pygsl/pygsl/issues/62. Prerequisites @@ -350,6 +350,10 @@ The following global options are defined. Note that all are typically formatted - :python:`"sympy.simplify(expr)"` - string - For all expressions ``expr`` that are rewritten internally: the contents of this parameter string are evaluated with ``eval()`` in Python to obtain the final output expression. Override for custom expression simplification steps. Example: ``"sympy.logcombine(sympy.powsimp(sympy.expand(expr)))"``. + * - ``forbidden_names`` + - :python:`["oo", "zoo", "nan", "NaN", "__h"]` + - list of strings + - For each forbidden name: emit an error if a variable or parameter by this name occurs in the input. Output From 51842aea5660095c0b8289ae0746c695e415b4bc Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Wed, 20 Nov 2024 00:36:04 +0100 Subject: [PATCH 5/6] update GSL on GitHub Actions CI --- doc/index.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index f592d28e..4f53bdac 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -350,10 +350,6 @@ The following global options are defined. Note that all are typically formatted - :python:`"sympy.simplify(expr)"` - string - For all expressions ``expr`` that are rewritten internally: the contents of this parameter string are evaluated with ``eval()`` in Python to obtain the final output expression. Override for custom expression simplification steps. Example: ``"sympy.logcombine(sympy.powsimp(sympy.expand(expr)))"``. - * - ``forbidden_names`` - - :python:`["oo", "zoo", "nan", "NaN", "__h"]` - - list of strings - - For each forbidden name: emit an error if a variable or parameter by this name occurs in the input. Output From 8a86b5eb275ab903a241b9fe3b40b62d52793d79 Mon Sep 17 00:00:00 2001 From: "C.A.P. Linssen" Date: Thu, 21 Nov 2024 09:51:02 +0100 Subject: [PATCH 6/6] add note about PyGSL PyPI release --- .github/workflows/ode-toolbox-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ode-toolbox-build.yml b/.github/workflows/ode-toolbox-build.yml index b5c6a943..b5126dfb 100644 --- a/.github/workflows/ode-toolbox-build.yml +++ b/.github/workflows/ode-toolbox-build.yml @@ -73,7 +73,7 @@ jobs: run: | python -m pip install --upgrade pip pytest pycodestyle codecov pytest-cov wheel python -m pip install numpy - if [ "${{ matrix.with_gsl }}" == "1" ]; then python3 -m pip install -v https://github.com/pygsl/pygsl/archive/refs/tags/v2.4.1.tar.gz ; fi + if [ "${{ matrix.with_gsl }}" == "1" ]; then python3 -m pip install -v https://github.com/pygsl/pygsl/archive/refs/tags/v2.4.1.tar.gz ; fi # this should be "pip install pygsl", but see https://github.com/pygsl/pygsl/issues/59 python -m pip install -r requirements.txt export PYTHON_VERSION=`python -c "import sys; print('.'.join(map(str, [sys.version_info.major, sys.version_info.minor])))"` echo "Python version detected:"