Skip to content

Commit cba9804

Browse files
authored
Switch suitesparse to v7.8.3 (#38)
* Switch version * Fix include path * Update build scripts * Get rid of excess script * Minor patch * Revert change * Apply suggestions from code review * Update .github/workflows/build_wheels.yml * Put script changes back * Re-trigger ci
1 parent 914743b commit cba9804

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/build_wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
submodules: 'true'
2525
- uses: actions/setup-python@v5
2626
with:
27-
python-version: 3.11
27+
python-version: 3.12
2828

2929
- name: Build wheels on Windows
3030
run: pipx run cibuildwheel --output-dir wheelhouse
@@ -59,7 +59,7 @@ jobs:
5959

6060
- uses: actions/setup-python@v5
6161
with:
62-
python-version: 3.11
62+
python-version: 3.12
6363

6464
- name: Build wheels on Linux
6565
run: pipx run cibuildwheel --output-dir wheelhouse
@@ -95,7 +95,7 @@ jobs:
9595
submodules: 'true'
9696
- uses: actions/setup-python@v5
9797
with:
98-
python-version: '3.11'
98+
python-version: 3.12
9999

100100
- name: Install cibuildwheel
101101
run: python -m pip install cibuildwheel

install_KLU_Sundials.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515

1616
def build_solvers():
17-
SUITESPARSE_VERSION = "6.0.3"
18-
SUNDIALS_VERSION = "6.5.0"
17+
SUITESPARSE_VERSION = "7.8.3"
1918
SUITESPARSE_URL = f"https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v{SUITESPARSE_VERSION}.tar.gz"
20-
SUNDIALS_URL = f"https://github.com/LLNL/sundials/releases/download/v{SUNDIALS_VERSION}/sundials-{SUNDIALS_VERSION}.tar.gz"
2119
SUITESPARSE_CHECKSUM = (
22-
"7111b505c1207f6f4bd0be9740d0b2897e1146b845d73787df07901b4f5c1fb7"
20+
"ce39b28d4038a09c14f21e02c664401be73c0cb96a9198418d6a98a7db73a259"
2321
)
22+
SUNDIALS_VERSION = "6.5.0"
23+
SUNDIALS_URL = f"https://github.com/LLNL/sundials/releases/download/v{SUNDIALS_VERSION}/sundials-{SUNDIALS_VERSION}.tar.gz"
2424
SUNDIALS_CHECKSUM = (
2525
"4e0b998dff292a2617e179609b539b511eb80836f5faacf800e688a886288502"
2626
)
@@ -81,7 +81,7 @@ def install_sundials(download_dir, install_dir):
8181
# Ex: if install_dir -> "/usr/local/" then
8282
# KLU_INCLUDE_DIR -> "/usr/local/include"
8383
# KLU_LIBRARY_DIR -> "/usr/local/lib"
84-
KLU_INCLUDE_DIR = os.path.join(install_dir, "include")
84+
KLU_INCLUDE_DIR = os.path.join(install_dir, "include", "suitesparse")
8585
KLU_LIBRARY_DIR = os.path.join(install_dir, "lib")
8686
cmake_args = [
8787
"-DENABLE_LAPACK=ON",

install_sundials.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function extract {
2727
tar -xf $1
2828
}
2929

30-
SUITESPARSE_VERSION=6.0.3
30+
SUITESPARSE_VERSION=7.8.3
3131
SUNDIALS_VERSION=6.5.0
3232

3333
SUITESPARSE_ROOT_ADDR=https://github.com/DrTimothyAldenDavis/SuiteSparse/archive
@@ -69,7 +69,7 @@ yum -y install openblas-devel
6969

7070
mkdir -p build_sundials
7171
cd build_sundials
72-
KLU_INCLUDE_DIR=/usr/local/include
72+
KLU_INCLUDE_DIR=/usr/local/include/suitesparse
7373
KLU_LIBRARY_DIR=/usr/local/lib
7474
SUNDIALS_DIR=sundials-$SUNDIALS_VERSION
7575
cmake -DENABLE_LAPACK=ON\

vcpkg-configuration.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
"kind": "git",
99
"repository": "https://github.com/pybamm-team/sundials-vcpkg-registry.git",
1010
"baseline": "13d432fcf5da8591bb6cb2d46be9d6acf39cd02b",
11+
"reference": "13d432fcf5da8591bb6cb2d46be9d6acf39cd02b",
1112
"packages": ["sundials"]
1213
},
1314
{
1415
"kind": "git",
1516
"repository": "https://github.com/pybamm-team/casadi-vcpkg-registry.git",
1617
"baseline": "e4b797736790af90de505e0296b07e87719cb1a6",
18+
"reference": "e4b797736790af90de505e0296b07e87719cb1a6",
1719
"packages": ["casadi"]
1820
}
1921
]

0 commit comments

Comments
 (0)