Skip to content

Commit cf59cbb

Browse files
authored
Merge pull request #2423 from devitocodes/omp-arm
deps: Drop python 3.8
2 parents d848426 + 9ca3bac commit cf59cbb

8 files changed

+28
-31
lines changed

.github/workflows/examples.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ jobs:
3737
uses: actions/checkout@v4
3838

3939
- name: Setup conda
40-
uses: conda-incubator/setup-miniconda@v2
40+
uses: conda-incubator/setup-miniconda@v3
4141
with:
42-
python-version: 3.8
4342
activate-environment: devito
4443
environment-file: environment-dev.yml
4544
auto-activate-base: false

.github/workflows/pytest-core-mpi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-20.04
2121
strategy:
2222
matrix:
23-
python-version: ['3.8','3.9']
23+
python-version: ['3.9', '3.11']
2424

2525
env:
2626
DEVITO_LANGUAGE: "openmp"

.github/workflows/pytest-core-nompi.yml

+17-17
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
matrix:
3232
name: [
3333
pytest-ubuntu-py311-gcc11-noomp,
34-
pytest-ubuntu-py38-gcc12-omp,
35-
pytest-ubuntu-py38-gcc7-omp,
34+
pytest-ubuntu-py312-gcc12-omp,
35+
pytest-ubuntu-py39-gcc7-omp,
3636
pytest-ubuntu-py310-gcc10-noomp,
3737
pytest-ubuntu-py312-gcc13-omp,
3838
pytest-ubuntu-py39-gcc9-omp,
@@ -49,15 +49,15 @@ jobs:
4949
language: "C"
5050
sympy: "1.11"
5151

52-
- name: pytest-ubuntu-py38-gcc12-omp
53-
python-version: '3.8'
54-
os: ubuntu-22.04
52+
- name: pytest-ubuntu-py312-gcc12-omp
53+
python-version: '3.12'
54+
os: ubuntu-24.04
5555
arch: "gcc-12"
5656
language: "openmp"
57-
sympy: "1.10"
57+
sympy: "1.13"
5858

59-
- name: pytest-ubuntu-py38-gcc7-omp
60-
python-version: '3.8'
59+
- name: pytest-ubuntu-py39-gcc7-omp
60+
python-version: '3.9'
6161
os: ubuntu-20.04
6262
arch: "gcc-7"
6363
language: "openmp"
@@ -82,14 +82,14 @@ jobs:
8282
os: ubuntu-20.04
8383
arch: "custom"
8484
language: "openmp"
85-
sympy: "1.9"
85+
sympy: "1.10"
8686

8787
- name: pytest-osx-py312-clang-omp
8888
python-version: '3.12'
8989
os: macos-latest
9090
arch: "clang"
91-
language: "C"
92-
sympy: "1.9"
91+
language: "openmp"
92+
sympy: "1.13"
9393

9494
- name: pytest-docker-py39-gcc-omp
9595
python-version: '3.9'
@@ -124,6 +124,7 @@ jobs:
124124
uses: actions/setup-python@v5
125125
with:
126126
python-version: ${{ matrix.python-version }}
127+
allow-prereleases: true
127128

128129
- name: Build docker image
129130
if: contains(matrix.name, 'docker')
@@ -147,9 +148,8 @@ jobs:
147148
- name: Set tests (reduced number for OSX)
148149
run : |
149150
if [ "${{ runner.os }}" == 'macOS' ]; then
150-
echo "TESTS=tests/test_operator.py" >> $GITHUB_ENV
151-
else
152-
echo "TESTS=tests/" >> $GITHUB_ENV
151+
brew install llvm libomp
152+
echo "/opt/homebrew/bin:/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
153153
fi
154154
id: set-tests
155155

@@ -162,9 +162,9 @@ jobs:
162162
- name: Install dependencies
163163
if: "!contains(matrix.name, 'docker')"
164164
run: |
165-
pip install ${{ env.PIPFLAGS }} --upgrade pip
166-
pip install ${{ env.PIPFLAGS }} sympy==${{matrix.sympy}}
167-
pip install ${{ env.PIPFLAGS }} -e .[tests]
165+
python3 -m pip install ${{ env.PIPFLAGS }} --upgrade pip
166+
python3 -m pip install ${{ env.PIPFLAGS }} sympy==${{matrix.sympy}}
167+
python3 -m pip install ${{ env.PIPFLAGS }} -e .[tests,extras]
168168
169169
- name: Check configuration
170170
run: |

requirements-optional.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
matplotlib
2-
pandas
32
pyrevolve==2.2.4
43
scipy
54
distributed

setup.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import versioneer
22

33
import os
4-
import sys
54
import pkg_resources
65
from setuptools import setup, find_packages
76

@@ -19,10 +18,6 @@ def numpy_compat(required):
1918
new_reqs = [r for r in required if "numpy" not in r and "sympy" not in r]
2019
sympy_lb, sympy_ub = min_max(required, "sympy")
2120
numpy_lb, numpy_ub = min_max(required, "numpy")
22-
if sys.version_info < (3, 9):
23-
# Numpy 2.0 requires python > 3.8
24-
new_reqs.extend([f"sympy>={sympy_lb},<1.12.1", f"numpy>{numpy_lb},<2.0"])
25-
return new_reqs
2621

2722
# Due to api changes in numpy 2.0, it requires sympy 1.12.1 at the minimum
2823
# Check if sympy is installed and enforce numpy version accordingly.
@@ -108,7 +103,7 @@ def numpy_compat(required):
108103
},
109104
url='http://www.devitoproject.org',
110105
platforms=["Linux", "Mac OS-X", "Unix"],
111-
python_requires=">=3.8",
106+
python_requires=">=3.9",
112107
classifiers=[
113108
'Development Status :: 5 - Production/Stable',
114109
'Intended Audience :: Developers',
@@ -120,7 +115,6 @@ def numpy_compat(required):
120115
'Operating System :: Unix',
121116
'Programming Language :: Python',
122117
'Programming Language :: Python :: 3',
123-
'Programming Language :: Python :: 3.8',
124118
'Programming Language :: Python :: 3.9',
125119
'Programming Language :: Python :: 3.10',
126120
'Programming Language :: Python :: 3.11',

tests/test_buffering.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
from conftest import skipif
55
from devito import (Constant, Grid, TimeFunction, Operator, Eq, SubDimension,
6-
SubDomain, ConditionalDimension)
6+
SubDomain, ConditionalDimension, configuration, switchconfig)
7+
from devito.arch.archinfo import AppleArm
78
from devito.ir import FindSymbols, retrieve_iteration_tree
89
from devito.exceptions import InvalidOperator
910

@@ -672,6 +673,7 @@ def test_everything():
672673

673674

674675
@pytest.mark.parametrize('subdomain', ['domain', 'interior'])
676+
@switchconfig(safe_math=True, condition=isinstance(configuration['platform'], AppleArm))
675677
def test_stencil_issue_1915(subdomain):
676678
nt = 5
677679
grid = Grid(shape=(6, 6))

tests/test_gradient.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class TestGradient:
1616

17-
@skipif(['chkpnt', 'cpu64-icc'])
17+
@skipif(['chkpnt', 'cpu64-icc', 'cpu64-arm'])
1818
@switchconfig(safe_math=True)
1919
@pytest.mark.parametrize('dtype', [np.float32, np.float64])
2020
@pytest.mark.parametrize('opt', [('advanced', {'openmp': True}),
@@ -59,7 +59,7 @@ def test_gradient_checkpointing(self, dtype, opt, space_order, kernel, shape, sp
5959

6060
assert np.allclose(gradient.data, gradient2.data, atol=0, rtol=0)
6161

62-
@skipif('cpu64-icc')
62+
@skipif(['cpu64-icc', 'cpu64-arm'])
6363
@pytest.mark.parametrize('tn', [750.])
6464
@pytest.mark.parametrize('spacing', [(10, 10)])
6565
@pytest.mark.parametrize("dtype, tolerance", [(np.float32, 1e-4),

tests/test_roundoff.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22
import numpy as np
33

4+
from conftest import skipif
45
from devito import Grid, Constant, TimeFunction, Eq, Operator, switchconfig
56

67

@@ -84,6 +85,7 @@ def test_lm_backward(self, dat, dtype):
8485
@pytest.mark.parametrize('dat', [0.5, 0.624, 1.0, 1.5, 2.0, 3.0, 3.6767, 4.0])
8586
@pytest.mark.parametrize('dtype', [np.float32, np.float64])
8687
@switchconfig(log_level='DEBUG', safe_math=True)
88+
@skipif('cpu64-arm')
8789
def test_lm_fb(self, dat, dtype):
8890
"""
8991
Test logistic map with forward and backward terms that should cancel.
@@ -123,6 +125,7 @@ def test_lm_fb(self, dat, dtype):
123125
@pytest.mark.parametrize('dat', [0.5, 0.624, 1.0, 1.5, 2.0, 3.0, 3.6767, 4.0])
124126
@pytest.mark.parametrize('dtype', [np.float32, np.float64])
125127
@switchconfig(log_level='DEBUG', safe_math=True)
128+
@skipif('cpu64-arm')
126129
def test_lm_ds(self, dat, dtype):
127130
"""
128131
Test logistic map with 2nd derivative term that should cancel.

0 commit comments

Comments
 (0)