From f8049a53b20d88b95cc21d52948f46dc1f84142d Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:56:24 +0530 Subject: [PATCH 1/5] Drop support for i686 manylinux, use `build` for sdist --- .github/workflows/publish_pypi.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 919a00d6ef..a0273d29cd 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -102,6 +102,8 @@ jobs: - name: Build wheels on Linux and MacOS run: python -m cibuildwheel --output-dir wheelhouse env: + # NumPy requires BLAS now which is no longer available on manylinux2014 i686, so skip it + CIBW_ARCHS_LINUX: x86_64 # TODO: openblas no longer available on centos 7 i686 image, use blas instead for now CIBW_BEFORE_ALL_LINUX: > yum -y install blas-devel lapack-devel && @@ -135,13 +137,13 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies - run: pip install wheel + run: pip install --upgrade pip setuptools wheel build - name: Build sdist - run: python setup.py sdist --formats=gztar + run: python -m build --sdist - name: Upload sdist uses: actions/upload-artifact@v3 @@ -171,7 +173,7 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - packages_dir: files/ + packages-dir: files/ - name: Publish on TestPyPI if: github.event.inputs.target == 'testpypi' @@ -179,5 +181,5 @@ jobs: with: user: __token__ password: ${{ secrets.TESTPYPI_TOKEN }} - packages_dir: files/ - repository_url: https://test.pypi.org/legacy/ + packages-dir: files/ + repository-url: https://test.pypi.org/legacy/ From 390b47f9b5c967361bf0e81c488db385b8cd2d82 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 5 Oct 2023 17:03:08 +0530 Subject: [PATCH 2/5] Update changelog about dropping 32-bit Linux support because it was already dropped for Windows earlier --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c400cc31ea..3344940521 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ ## Breaking changes +- Dropped support for i686 (32-bit) architectures on GNU/Linux distributions ([#3412](https://github.com/pybamm-team/PyBaMM/pull/3412)) - The class `pybamm.thermal.OneDimensionalX` has been moved to `pybamm.thermal.pouch_cell.OneDimensionalX` to reflect the fact that the model formulation implicitly assumes a pouch cell geometry ([#3257](https://github.com/pybamm-team/PyBaMM/pull/3257)) - The "lumped" thermal option now always used the parameters "Cell cooling surface area [m2]", "Cell volume [m3]" and "Total heat transfer coefficient [W.m-2.K-1]" to compute the cell cooling regardless of the chosen "cell geometry" option. The user must now specify the correct values for these parameters instead of them being calculated based on e.g. a pouch cell. An `OptionWarning` is raised to let users know to update their parameters ([#3257](https://github.com/pybamm-team/PyBaMM/pull/3257)) - Numpy functions now work with PyBaMM symbols (e.g. `np.exp(pybamm.Symbol("a"))` returns `pybamm.Exp(pybamm.Symbol("a"))`). This means that parameter functions can be specified using numpy functions instead of pybamm functions. Additionally, combining numpy arrays with pybamm objects now works (the numpy array is converted to a pybamm array) ([#3205](https://github.com/pybamm-team/PyBaMM/pull/3205)) From 319d0b4aa61ce9e60c286b51056244a659506805 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 5 Oct 2023 17:12:34 +0530 Subject: [PATCH 3/5] Remove comments and notes about BLAS Co-authored-by: Saransh Chopra --- .github/workflows/publish_pypi.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index a0273d29cd..f0ab7ffd2f 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -102,11 +102,9 @@ jobs: - name: Build wheels on Linux and MacOS run: python -m cibuildwheel --output-dir wheelhouse env: - # NumPy requires BLAS now which is no longer available on manylinux2014 i686, so skip it CIBW_ARCHS_LINUX: x86_64 - # TODO: openblas no longer available on centos 7 i686 image, use blas instead for now CIBW_BEFORE_ALL_LINUX: > - yum -y install blas-devel lapack-devel && + yum -y install openblas-devel lapack-devel && bash build_manylinux_wheels/install_sundials.sh 5.8.1 6.5.0 CIBW_BEFORE_BUILD_LINUX: "python -m pip install cmake casadi numpy" From 0893769e11875330b945cef06c5fe82e71cc8f7a Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Thu, 5 Oct 2023 18:28:08 +0530 Subject: [PATCH 4/5] Bump SuiteSparse to 6.0.3 --- .github/workflows/publish_pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index f0ab7ffd2f..a009828e6f 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -105,7 +105,7 @@ jobs: CIBW_ARCHS_LINUX: x86_64 CIBW_BEFORE_ALL_LINUX: > yum -y install openblas-devel lapack-devel && - bash build_manylinux_wheels/install_sundials.sh 5.8.1 6.5.0 + bash build_manylinux_wheels/install_sundials.sh 6.0.3 6.5.0 CIBW_BEFORE_BUILD_LINUX: "python -m pip install cmake casadi numpy" CIBW_BEFORE_BUILD_MACOS: > From 245a3faad9ff5dc940093ffa11d77c731ae5db82 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Thu, 5 Oct 2023 18:42:17 +0530 Subject: [PATCH 5/5] Try fixing KLU paths --- build_manylinux_wheels/install_sundials.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_manylinux_wheels/install_sundials.sh b/build_manylinux_wheels/install_sundials.sh index 709d9c13c7..3d14bde7c7 100644 --- a/build_manylinux_wheels/install_sundials.sh +++ b/build_manylinux_wheels/install_sundials.sh @@ -65,8 +65,8 @@ yum -y install openblas-devel mkdir -p build_sundials cd build_sundials -KLU_INCLUDE_DIR=/usr/include -KLU_LIBRARY_DIR=/usr/lib +KLU_INCLUDE_DIR=/usr/local/include +KLU_LIBRARY_DIR=/usr/local/lib SUNDIALS_DIR=sundials-$SUNDIALS_VERSION cmake -DENABLE_LAPACK=ON\ -DSUNDIALS_INDEX_SIZE=32\