From 11d7cc292e31e24fe1a3afb2dd995c5c4a3ad91d Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Tue, 18 Jul 2023 10:55:05 +0300 Subject: [PATCH] ci: Fix test names and other minor fixes --- .github/workflows/examples.yml | 2 +- .github/workflows/pytest-core-nompi.yml | 76 +++++++++---------- .github/workflows/tutorials.yml | 14 ++-- docker/Dockerfile.cpu | 2 +- .../seismic/tutorials/14_tti_qp_pure.ipynb | 10 +-- 5 files changed, 48 insertions(+), 56 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index d70cd93203f..f3e9ccce36d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -86,7 +86,7 @@ jobs: python examples/cfd/example_diffusion.py - name: Upload coverage to Codecov - if: matrix.name != 'pytest-docker-py38-gcc-omp' + if: matrix.name != 'pytest-docker-py39-gcc-omp' uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/pytest-core-nompi.yml b/.github/workflows/pytest-core-nompi.yml index 88fe6b4c280..6b5e7e1dfec 100644 --- a/.github/workflows/pytest-core-nompi.yml +++ b/.github/workflows/pytest-core-nompi.yml @@ -30,19 +30,32 @@ jobs: matrix: name: [ + pytest-ubuntu-py39-gcc11-noomp, + pytest-ubuntu-py38-gcc12-omp, pytest-ubuntu-py37-gcc7-omp, + pytest-ubuntu-py310-gcc10-noomp, pytest-ubuntu-py38-gcc8-omp, pytest-ubuntu-py39-gcc9-omp, - pytest-ubuntu-py39-gcc11-noomp, - pytest-ubuntu-py310-gcc10-noomp, - pytest-ubuntu-py311-gcc12-omp, - pytest-osx-py38-clang-omp, - pytest-docker-py38-gcc-omp, - pytest-docker-py38-icc-omp, - pytest-docker-py38-icx-omp + pytest-osx-py37-clang-omp, + pytest-docker-py39-gcc-omp, + pytest-docker-py39-icx-omp ] set: [base, adjoint] include: + - name: pytest-ubuntu-py39-gcc11-noomp + python-version: '3.9' + os: ubuntu-22.04 + arch: "gcc-11" + language: "C" + sympy: "1.11" + + - name: pytest-ubuntu-py38-gcc12-omp + python-version: '3.8' + os: ubuntu-22.04 + arch: "gcc-12" + language: "openmp" + sympy: "1.10" + - name: pytest-ubuntu-py37-gcc7-omp python-version: '3.7' os: ubuntu-20.04 @@ -50,6 +63,13 @@ jobs: language: "openmp" sympy: "1.9" + - name: pytest-ubuntu-py310-gcc10-noomp + python-version: '3.10' + os: ubuntu-20.04 + arch: "gcc-10" + language: "C" + sympy: "1.10" + - name: pytest-ubuntu-py38-gcc8-omp python-version: '3.8' os: ubuntu-20.04 @@ -64,50 +84,22 @@ jobs: language: "openmp" sympy: "1.9" - - name: pytest-ubuntu-py39-gcc11-noomp - python-version: '3.9' - os: ubuntu-22.04 - arch: "gcc-11" - language: "C" - sympy: "1.11" - - - name: pytest-ubuntu-py310-gcc10-noomp - python-version: '3.10' - os: ubuntu-20.04 - arch: "gcc-10" - language: "C" - sympy: "1.10" - - - name: pytest-ubuntu-py311-gcc12-omp - python-version: '3.11' - os: ubuntu-22.04 - arch: "gcc-12" - language: "openmp" - sympy: "1.10" - - - name: pytest-osx-py38-clang-omp - python-version: '3.8' + - name: pytest-osx-py37-clang-omp + python-version: '3.7' os: macos-latest arch: "clang" language: "C" sympy: "1.9" - - name: pytest-docker-py38-gcc-omp - python-version: '3.8' + - name: pytest-docker-py39-gcc-omp + python-version: '3.9' os: ubuntu-latest arch: "gcc" language: "openmp" sympy: "1.12" - - name: pytest-docker-py38-icc-omp - python-version: '3.8' - os: ubuntu-22.04 - arch: "icc" - language: "openmp" - sympy: "1.11" - - - name: pytest-docker-py38-icx-omp - python-version: '3.8' + - name: pytest-docker-py39-icx-omp + python-version: '3.9' os: ubuntu-22.04 arch: "icx" language: "openmp" @@ -120,7 +112,7 @@ jobs: test-set: 'adjoint' exclude: - - name: pytest-osx-py38-clang-omp + - name: pytest-osx-py37-clang-omp set: adjoint steps: diff --git a/.github/workflows/tutorials.yml b/.github/workflows/tutorials.yml index 4a6f5e7be0c..dfc828e70c7 100644 --- a/.github/workflows/tutorials.yml +++ b/.github/workflows/tutorials.yml @@ -22,7 +22,7 @@ jobs: env: DEVITO_ARCH: "${{ matrix.compiler }}" DEVITO_LANGUAGE: ${{ matrix.language }} - PYTHON_VERSION: "3.8" + PYTHON_VERSION: "3.9" strategy: # Prevent all build to stop if a single one fails @@ -36,17 +36,17 @@ jobs: ] include: - - name: tutos-ubuntu-gcc-py38 + - name: tutos-ubuntu-gcc-py39 os: ubuntu-latest compiler: gcc language: "openmp" - - name: tutos-osx-gcc-py38 + - name: tutos-osx-gcc-py39 os: macos-latest compiler: gcc-11 language: "openmp" - - name: tutos-osx-clang-py38 + - name: tutos-osx-clang-py39 os: macos-latest compiler: clang language: "C" @@ -60,11 +60,11 @@ jobs: - name: Checkout devito uses: actions/checkout@v3 - - name: Set up Python 3.8 - if: matrix.name != 'tutos-docker-gcc-py38' + - name: Set up Python 3.9 + if: "!contains(matrix.name, 'docker')" uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.9 - uses: maxim-lobanov/setup-xcode@v1 if: runner.os == 'macOS' diff --git a/docker/Dockerfile.cpu b/docker/Dockerfile.cpu index f0d46352ba8..afa26ceff47 100644 --- a/docker/Dockerfile.cpu +++ b/docker/Dockerfile.cpu @@ -3,7 +3,7 @@ # This Dockerfile contains the Devito codes and can be built using different base images. ############################################################## -ARG pyversion=python:3.8 +ARG pyversion=python:3.9 ARG arch=gcc ARG OMPI_BRANCH="v4.1.4" diff --git a/examples/seismic/tutorials/14_tti_qp_pure.ipynb b/examples/seismic/tutorials/14_tti_qp_pure.ipynb index e043db69cd8..3aad0a15ddf 100644 --- a/examples/seismic/tutorials/14_tti_qp_pure.ipynb +++ b/examples/seismic/tutorials/14_tti_qp_pure.ipynb @@ -73,10 +73,10 @@ "source": [ "# NBVAL_IGNORE_OUTPUT \n", "\n", - "shape = (101,101) # 101x101 grid\n", - "spacing = (10.,10.) # spacing of 10 meters\n", - "origin = (0.,0.) \n", - "nbl = 0 # number of pad points\n", + "shape = (101, 101) # 101x101 grid\n", + "spacing = (10., 10.) # spacing of 10 meters\n", + "origin = (0., 0.) \n", + "nbl = 0 # number of pad boundary layers\n", "\n", "model = demo_model('layers-tti', spacing=spacing, space_order=8,\n", " shape=shape, nbl=nbl, nlayers=1)\n", @@ -178,7 +178,7 @@ "t0 = 0. # Simulation time start\n", "tn = 150. # Simulation time end (0.15 second = 150 msec)\n", "dt = (dvalue/(np.pi*vmax))*np.sqrt(1/(1+etamax*(max_cos_sin)**2)) # eq. above (cell 3)\n", - "time_range = TimeAxis(start=t0,stop=tn,step=dt)\n", + "time_range = TimeAxis(start=t0,stop=tn,step=dt.data[()])\n", "print(\"time_range; \", time_range)" ] },