From c1061ae2bc52216b1afc9e8b04fe09c1fdf6f722 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Sun, 5 May 2024 13:45:01 +0200 Subject: [PATCH 1/6] Update CI branches for adios4dolfinx --- .github/workflows/build_docs.yml | 2 +- .github/workflows/check_formatting.yml | 2 +- .github/workflows/test_package.yml | 2 +- .github/workflows/test_package_openmpi.yml | 10 +++++----- .github/workflows/test_redhat.yml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 1ea73a8..dde4acf 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -19,7 +19,7 @@ jobs: DEB_PYTHON_INSTALL_LAYOUT: deb_system runs-on: ubuntu-22.04 - container: ghcr.io/fenics/dolfinx/dolfinx:v0.8.0 + container: ghcr.io/fenics/dolfinx/dolfinx:nightly steps: # This action sets the current path to the root of your github repo - uses: actions/checkout@v4 diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index bdc7f6b..3920d5c 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -9,7 +9,7 @@ jobs: DEB_PYTHON_INSTALL_LAYOUT: deb_system runs-on: ubuntu-22.04 - container: ghcr.io/fenics/dolfinx/dolfinx:v0.8.0 + container: ghcr.io/fenics/dolfinx/dolfinx:nightly steps: # This action sets the current path to the root of your github repo - uses: actions/checkout@v4 diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml index 1fbbc03..a61943c 100644 --- a/.github/workflows/test_package.yml +++ b/.github/workflows/test_package.yml @@ -33,7 +33,7 @@ jobs: test-code: runs-on: "ubuntu-22.04" needs: [create-datasets, create-legacy-datasets, check-formatting] - container: ghcr.io/fenics/dolfinx/dolfinx:v0.8.0 + container: ghcr.io/fenics/dolfinx/dolfinx:nightly env: DEB_PYTHON_INSTALL_LAYOUT: deb_system diff --git a/.github/workflows/test_package_openmpi.yml b/.github/workflows/test_package_openmpi.yml index 01dc928..58238df 100644 --- a/.github/workflows/test_package_openmpi.yml +++ b/.github/workflows/test_package_openmpi.yml @@ -49,14 +49,14 @@ jobs: run: python3 -m pip install --upgrade pip setuptools - name: Install DOLFINx - uses: jorgensd/actions/install-dolfinx@v0.3.0 + uses: jorgensd/actions/install-dolfinx@v0.3 with: adios2: ${{ matrix.adios2 }} petsc_arch: ${{ env.PETSC_ARCH }} - dolfinx: v0.8.0 - basix: v0.8.0 - ufl: 2024.1.0.post0 - ffcx: v0.8.0 + dolfinx: main + basix: main + ufl: main + ffcx: main working-directory: ${{ env.working-directory}} - name: Download legacy data diff --git a/.github/workflows/test_redhat.yml b/.github/workflows/test_redhat.yml index 0514dcb..f76283a 100644 --- a/.github/workflows/test_redhat.yml +++ b/.github/workflows/test_redhat.yml @@ -48,7 +48,7 @@ jobs: run: python3 -m pip install --upgrade pip setuptools - name: Install DOLFINx - uses: jorgensd/actions/install-dolfinx@v0.3.0 + uses: jorgensd/actions/install-dolfinx@v0.3 with: adios2: ${{ matrix.adios2 }} petsc_arch: ${{ env.PETSC_ARCH }} From 360945779dd15a22c73b78d2f2b08db894463fe9 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Sun, 5 May 2024 13:51:39 +0200 Subject: [PATCH 2/6] add --break-system-packages on CI --- .github/workflows/build_docs.yml | 4 ++-- .github/workflows/check_formatting.yml | 4 ++-- .github/workflows/create_legacy_checkpoint.yml | 2 +- .github/workflows/test_package.yml | 4 ++-- .github/workflows/test_package_openmpi.yml | 4 ++-- .github/workflows/test_redhat.yml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index dde4acf..fd53a58 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -25,10 +25,10 @@ jobs: - uses: actions/checkout@v4 - name: Update pip - run: python3 -m pip install --upgrade pip setuptools + run: python3 -m pip install --break-system-packages --upgrade pip setuptools - name: Install dependencies - run: python3 -m pip install -e ".[docs]" + run: python3 -m pip install --break-system-packages -e ".[docs]" - name: Build docs run: jupyter book build -W . diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index 3920d5c..3b48f41 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -15,10 +15,10 @@ jobs: - uses: actions/checkout@v4 - name: Update pip - run: python3 -m pip install --upgrade pip setuptools + run: python3 -m pip install --break-system-packages --upgrade pip setuptools - name: Install code - run: python3 -m pip install .[dev] + run: python3 -m pip install --break-system-packages.[dev] - name: Check code formatting with ruff run: | diff --git a/.github/workflows/create_legacy_checkpoint.yml b/.github/workflows/create_legacy_checkpoint.yml index abcf78a..7e0512c 100644 --- a/.github/workflows/create_legacy_checkpoint.yml +++ b/.github/workflows/create_legacy_checkpoint.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - name: Install legacy version of adios4dolfinx - run: python3 -m pip install adios4dolfinx==${adios4dolfinx_version} + run: python3 -m pip install --break-system-packages adios4dolfinx==${adios4dolfinx_version} - name: Create datasets run: python3 ./tests/create_legacy_checkpoint.py --output-dir=$data_dir diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml index a61943c..3523a73 100644 --- a/.github/workflows/test_package.yml +++ b/.github/workflows/test_package.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v4 - name: Update pip - run: python3 -m pip install --upgrade pip setuptools + run: python3 -m pip install --break-system-packages --upgrade pip setuptools - name: Download legacy data uses: actions/download-artifact@v4 @@ -56,7 +56,7 @@ jobs: path: ./legacy_checkpoint - name: Install package - run: python3 -m pip install .[test] + run: python3 -m pip install --break-system-packages .[test] - name: Run tests run: | diff --git a/.github/workflows/test_package_openmpi.yml b/.github/workflows/test_package_openmpi.yml index 58238df..06bf8cb 100644 --- a/.github/workflows/test_package_openmpi.yml +++ b/.github/workflows/test_package_openmpi.yml @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v4 - name: Update pip - run: python3 -m pip install --upgrade pip setuptools + run: python3 -m pip --break-system-packages install --upgrade pip setuptools - name: Install DOLFINx uses: jorgensd/actions/install-dolfinx@v0.3 @@ -72,7 +72,7 @@ jobs: path: ./legacy_checkpoint - name: Install package - run: python3 -m pip install .[test] + run: python3 -m pip install --break-system-packages .[test] - name: Run tests run: | diff --git a/.github/workflows/test_redhat.yml b/.github/workflows/test_redhat.yml index f76283a..e861e52 100644 --- a/.github/workflows/test_redhat.yml +++ b/.github/workflows/test_redhat.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - name: Update pip - run: python3 -m pip install --upgrade pip setuptools + run: python3 -m pip install --break-system-packages --upgrade pip setuptools - name: Install DOLFINx uses: jorgensd/actions/install-dolfinx@v0.3 @@ -72,7 +72,7 @@ jobs: path: ./legacy_checkpoint - name: Install package - run: python3 -m pip install .[test] + run: python3 -m pip install --break-system-packages .[test] - name: Run tests run: | From 27d0a68152ad612e321c115db089e5822d2dfb2b Mon Sep 17 00:00:00 2001 From: jorgensd Date: Sun, 5 May 2024 13:55:04 +0200 Subject: [PATCH 3/6] add missing space --- .github/workflows/check_formatting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index 3b48f41..0a11f91 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -18,7 +18,7 @@ jobs: run: python3 -m pip install --break-system-packages --upgrade pip setuptools - name: Install code - run: python3 -m pip install --break-system-packages.[dev] + run: python3 -m pip install --break-system-packages .[dev] - name: Check code formatting with ruff run: | From 30e0b273b9188055951a58bf2e90f49ad24160b4 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Sun, 5 May 2024 14:01:58 +0200 Subject: [PATCH 4/6] More mods --- .github/workflows/build_docs.yml | 2 +- .github/workflows/check_formatting.yml | 2 +- .github/workflows/test_package_openmpi.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index fd53a58..52276c2 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -18,7 +18,7 @@ jobs: env: DEB_PYTHON_INSTALL_LAYOUT: deb_system - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest container: ghcr.io/fenics/dolfinx/dolfinx:nightly steps: # This action sets the current path to the root of your github repo diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index 0a11f91..7b45df1 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -8,7 +8,7 @@ jobs: env: DEB_PYTHON_INSTALL_LAYOUT: deb_system - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest container: ghcr.io/fenics/dolfinx/dolfinx:nightly steps: # This action sets the current path to the root of your github repo diff --git a/.github/workflows/test_package_openmpi.yml b/.github/workflows/test_package_openmpi.yml index 06bf8cb..d81758d 100644 --- a/.github/workflows/test_package_openmpi.yml +++ b/.github/workflows/test_package_openmpi.yml @@ -28,7 +28,7 @@ jobs: artifact_name: "legacy_checkpoint_ompi" test-code: - runs-on: "ubuntu-22.04" + runs-on: ubuntu-latest needs: [create-datasets, create-legacy-datasets] container: ghcr.io/fenics/test-env:current-openmpi env: @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v4 - name: Update pip - run: python3 -m pip --break-system-packages install --upgrade pip setuptools + run: python3 -m pip install --upgrade pip setuptools - name: Install DOLFINx uses: jorgensd/actions/install-dolfinx@v0.3 From 504de0042bf568d0c2f54b9ae0edddbdc76f8256 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Sun, 5 May 2024 14:14:08 +0200 Subject: [PATCH 5/6] Add back break system packages --- .github/workflows/test_package_openmpi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_package_openmpi.yml b/.github/workflows/test_package_openmpi.yml index d81758d..13d0ef9 100644 --- a/.github/workflows/test_package_openmpi.yml +++ b/.github/workflows/test_package_openmpi.yml @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v4 - name: Update pip - run: python3 -m pip install --upgrade pip setuptools + run: python3 -m pip install --break-system-packages --upgrade pip setuptools - name: Install DOLFINx uses: jorgensd/actions/install-dolfinx@v0.3 From b18f4a230909072eb9a65418a7cc07b68112b877 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Sun, 5 May 2024 14:29:50 +0200 Subject: [PATCH 6/6] Add element dtype --- tests/test_checkpointing.py | 2 ++ tests/test_checkpointing_vector.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_checkpointing.py b/tests/test_checkpointing.py index 153fb3f..1ba0863 100644 --- a/tests/test_checkpointing.py +++ b/tests/test_checkpointing.py @@ -87,6 +87,7 @@ def test_read_write_P_3D( degree, basix.LagrangeVariant.gll_warped, shape=(mesh.geometry.dim,), + dtype=mesh.geometry.x.dtype, ) def f(x): @@ -178,6 +179,7 @@ def test_read_write_P_3D_time( degree, basix.LagrangeVariant.gll_warped, shape=(mesh.geometry.dim,), + dtype=mesh.geometry.x.dtype, ) def f(x): diff --git a/tests/test_checkpointing_vector.py b/tests/test_checkpointing_vector.py index 039ec23..ce8716c 100644 --- a/tests/test_checkpointing_vector.py +++ b/tests/test_checkpointing_vector.py @@ -56,7 +56,7 @@ def test_read_write_2D( ): mesh = simplex_mesh_2D f_dtype = get_dtype(mesh.geometry.x.dtype, is_complex) - el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree) + el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree, dtype=mesh.geometry.x.dtype) def f(x): values = np.empty((2, x.shape[1]), dtype=f_dtype) @@ -81,7 +81,7 @@ def test_read_write_3D( ): mesh = simplex_mesh_3D f_dtype = get_dtype(mesh.geometry.x.dtype, is_complex) - el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree) + el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree, dtype=mesh.geometry.x.dtype) def f(x): values = np.empty((3, x.shape[1]), dtype=f_dtype) @@ -114,7 +114,7 @@ def test_read_write_2D_quad( ): mesh = non_simplex_mesh_2D f_dtype = get_dtype(mesh.geometry.x.dtype, is_complex) - el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree) + el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree, dtype=mesh.geometry.x.dtype) def f(x): values = np.empty((2, x.shape[1]), dtype=f_dtype) @@ -146,7 +146,7 @@ def test_read_write_hex( ): mesh = non_simplex_mesh_3D f_dtype = get_dtype(mesh.geometry.x.dtype, is_complex) - el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree) + el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree, dtype=mesh.geometry.x.dtype) def f(x): values = np.empty((3, x.shape[1]), dtype=f_dtype) @@ -179,7 +179,7 @@ def test_read_write_multiple( ): mesh = non_simplex_mesh_2D f_dtype = get_dtype(mesh.geometry.x.dtype, is_complex) - el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree) + el = basix.ufl.element(family, mesh.ufl_cell().cellname(), degree, dtype=mesh.geometry.x.dtype) def f(x): values = np.empty((2, x.shape[1]), dtype=f_dtype)