From 01daa9b329e793fee248eae8db1d42000bdf2ed2 Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Tue, 2 Nov 2021 22:21:05 +0000 Subject: [PATCH] mpi: add support for python3.9 --- .github/workflows/pytest-core-mpi.yml | 7 +++++++ .github/workflows/pytest-core-nompi.yml | 12 ++++++------ devito/data/data.py | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pytest-core-mpi.yml b/.github/workflows/pytest-core-mpi.yml index 202b9f9d19..4bb822f721 100644 --- a/.github/workflows/pytest-core-mpi.yml +++ b/.github/workflows/pytest-core-mpi.yml @@ -14,6 +14,9 @@ jobs: build: name: pytest-mpi runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: ['3.8','3.9'] env: DEVITO_LANGUAGE: "openmp" @@ -22,6 +25,10 @@ jobs: CXX: "g++-9" steps: + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Checkout devito uses: actions/checkout@v2 diff --git a/.github/workflows/pytest-core-nompi.yml b/.github/workflows/pytest-core-nompi.yml index 49f42f1e6d..84b0bc1c49 100644 --- a/.github/workflows/pytest-core-nompi.yml +++ b/.github/workflows/pytest-core-nompi.yml @@ -30,8 +30,8 @@ jobs: pytest-ubuntu-py38-gcc6-omp, pytest-ubuntu-py36-gcc7-omp, pytest-ubuntu-py37-gcc7-noomp, - pytest-ubuntu-py37-gcc8-omp, - pytest-ubuntu-py38-gcc9-omp, + pytest-ubuntu-py38-gcc8-omp, + pytest-ubuntu-py39-gcc9-omp, pytest-osx-py37-clang-omp, pytest-docker-py36-gcc-omp ] @@ -65,15 +65,15 @@ jobs: language: "C" sympy: 1.8 - - name: pytest-ubuntu-py37-gcc8-omp - python-version: 3.7 + - name: pytest-ubuntu-py38-gcc8-omp + python-version: 3.8 os: ubuntu-18.04 arch: "gcc-8" language: "openmp" sympy: 1.9 - - name: pytest-ubuntu-py38-gcc9-omp - python-version: 3.8 + - name: pytest-ubuntu-py39-gcc9-omp + python-version: 3.9 os: ubuntu-20.04 arch: "gcc-9" language: "openmp" diff --git a/devito/data/data.py b/devito/data/data.py index ad45068725..45c6c47c2a 100644 --- a/devito/data/data.py +++ b/devito/data/data.py @@ -432,7 +432,7 @@ def _index_glb_to_loc(self, glb_idx): loc_idx.append(v) # Deal with NONLOCAL accesses - if NONLOCAL in loc_idx: + if any(j is NONLOCAL for j in loc_idx): if len(loc_idx) == self.ndim and index_is_basic(loc_idx): # Caller expecting a scalar -- it will eventually get None loc_idx = [NONLOCAL]