Skip to content

Switch suitesparse to v7.8.3 #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@ jobs:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12

- name: Get number of cores on Windows
id: get_num_cores
shell: python
run: |
from os import environ, cpu_count
num_cpus = cpu_count()
output_file = environ['GITHUB_OUTPUT']
with open(output_file, "a", encoding="utf-8") as output_stream:
output_stream.write(f"count={num_cpus}\n")

- name: Build wheels on Windows
run: pipx run cibuildwheel --output-dir wheelhouse
Expand All @@ -36,6 +46,7 @@ jobs:
VCPKG_FEATURE_FLAGS=manifests,registries
CMAKE_GENERATOR="Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM=x64
CMAKE_BUILD_PARALLEL_LEVEL=${{ steps.get_num_cores.outputs.count }}
CIBW_ARCHS: AMD64
CIBW_BEFORE_BUILD: python -m pip install setuptools delvewheel # skip CasADi and CMake
CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair --add-path C:/Windows/System32 -w {dest_dir} {wheel}
Expand All @@ -59,7 +70,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12

- name: Build wheels on Linux
run: pipx run cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -95,7 +106,7 @@ jobs:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: 3.12

- name: Install cibuildwheel
run: python -m pip install cibuildwheel
Expand Down Expand Up @@ -192,7 +203,7 @@ jobs:
# 10.13 for Intel (macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest)
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-14' && '11.0' || '10.13' }}
CIBW_ARCHS_MACOS: auto
CIBW_BEFORE_BUILD: python -m pip install cmake casadi==3.6.7 setuptools delocate
CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools delocate
CIBW_REPAIR_WHEEL_COMMAND: |
if [[ $(uname -m) == "x86_64" ]]; then
delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}
Expand Down
10 changes: 5 additions & 5 deletions install_KLU_Sundials.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@


def build_solvers():
SUITESPARSE_VERSION = "6.0.3"
SUNDIALS_VERSION = "6.5.0"
SUITESPARSE_VERSION = "7.8.3"
SUITESPARSE_URL = f"https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v{SUITESPARSE_VERSION}.tar.gz"
SUNDIALS_URL = f"https://github.com/LLNL/sundials/releases/download/v{SUNDIALS_VERSION}/sundials-{SUNDIALS_VERSION}.tar.gz"
SUITESPARSE_CHECKSUM = (
"7111b505c1207f6f4bd0be9740d0b2897e1146b845d73787df07901b4f5c1fb7"
"ce39b28d4038a09c14f21e02c664401be73c0cb96a9198418d6a98a7db73a259"
)
SUNDIALS_VERSION = "6.5.0"
SUNDIALS_URL = f"https://github.com/LLNL/sundials/releases/download/v{SUNDIALS_VERSION}/sundials-{SUNDIALS_VERSION}.tar.gz"
SUNDIALS_CHECKSUM = (
"4e0b998dff292a2617e179609b539b511eb80836f5faacf800e688a886288502"
)
Expand Down Expand Up @@ -81,7 +81,7 @@ def install_sundials(download_dir, install_dir):
# Ex: if install_dir -> "/usr/local/" then
# KLU_INCLUDE_DIR -> "/usr/local/include"
# KLU_LIBRARY_DIR -> "/usr/local/lib"
KLU_INCLUDE_DIR = os.path.join(install_dir, "include")
KLU_INCLUDE_DIR = os.path.join(install_dir, "include", "suitesparse")
KLU_LIBRARY_DIR = os.path.join(install_dir, "lib")
cmake_args = [
"-DENABLE_LAPACK=ON",
Expand Down
2 changes: 2 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"kind": "git",
"repository": "https://github.com/pybamm-team/sundials-vcpkg-registry.git",
"baseline": "13d432fcf5da8591bb6cb2d46be9d6acf39cd02b",
"reference": "13d432fcf5da8591bb6cb2d46be9d6acf39cd02b",
"packages": ["sundials"]
},
{
"kind": "git",
"repository": "https://github.com/pybamm-team/casadi-vcpkg-registry.git",
"baseline": "e4b797736790af90de505e0296b07e87719cb1a6",
"reference": "e4b797736790af90de505e0296b07e87719cb1a6",
"packages": ["casadi"]
}
]
Expand Down
Loading