From 2f85283b10bc6c477921434005685612f5773e3c Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 11 Oct 2024 09:00:35 +0200 Subject: [PATCH 01/13] Try backport of cffi. --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index a2a4eddcf62..3c31ca26874 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -21,7 +21,7 @@ authors = [ ] dependencies = [ "numpy>=1.21", - "cffi<1.17", # See https://github.com/FEniCS/dolfinx/issues/3340 + "cffi@git+https://github.com/nitzmahone/cffi.git@backports/1.17/111", "mpi4py", "fenics-basix>=0.10.0.dev0,<0.11.0", "fenics-ffcx>=0.10.0.dev0,<0.11.0", From c2dda794448080e10ddc8958b6920f5076bff97a Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 11 Oct 2024 09:13:18 +0200 Subject: [PATCH 02/13] Didnt work, try main --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 3c31ca26874..5da8411f92e 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -21,7 +21,7 @@ authors = [ ] dependencies = [ "numpy>=1.21", - "cffi@git+https://github.com/nitzmahone/cffi.git@backports/1.17/111", + "cffi@git+https://github.com/python-cffi/cffi@main", "mpi4py", "fenics-basix>=0.10.0.dev0,<0.11.0", "fenics-ffcx>=0.10.0.dev0,<0.11.0", From d0ca004c732977ab72b7e4ebcdfaa8fe8c2a7de3 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 10:43:19 +0200 Subject: [PATCH 03/13] Install libffi-dev --- .github/workflows/ccpp.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 88add093759..de84ec749c6 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -79,8 +79,7 @@ jobs: env: OMPI_ALLOW_RUN_AS_ROOT: 1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 - PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe # Newer OpenMPI - OMPI_MCA_rmaps_base_oversubscribe: true # Older OpenMPI + PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe name: Build and test steps: @@ -102,6 +101,8 @@ jobs: - name: Install FEniCS Python components (default branches/tags) if: github.event_name != 'workflow_dispatch' run: | + apt update + apt install libffi-dev pip install git+https://github.com/FEniCS/ufl.git pip install git+https://github.com/FEniCS/basix.git pip install git+https://github.com/FEniCS/ffcx.git From 1eb970ec6cb0145d2098f94d91707e96674990cd Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 10:53:15 +0200 Subject: [PATCH 04/13] Install libffi-dev in more workflows. --- .github/workflows/ccpp.yml | 1 + .github/workflows/oneapi.yml | 8 +++++--- .github/workflows/redhat.yml | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index de84ec749c6..0a3da398214 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -88,6 +88,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update + sudo apt-get install libffi-dev sudo apt-get install catch2 cmake g++ libboost-dev libboost-timer-dev libhdf5-mpi-dev libparmetis-dev libpugixml-dev libspdlog-dev mpi-default-dev ninja-build pkg-config - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/oneapi.yml b/.github/workflows/oneapi.yml index 09b96b25359..0741c7b81a8 100644 --- a/.github/workflows/oneapi.yml +++ b/.github/workflows/oneapi.yml @@ -37,8 +37,8 @@ jobs: steps: - name: Install compiler dependencies run: | - apt-get -y update - apt-get -y install binutils libstdc++-14-dev + apt-get update + apt-get install binutils libstdc++-14-dev - uses: actions/checkout@v4 @@ -97,7 +97,9 @@ jobs: ctest -R demo -R mpi_2 - name: Build DOLFINx Python interface - run: pip -v install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" python/ + run: | + apt-get -y install libffi-dev + pip -v install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" python/ - name: Run DOLFINx demos (Python, serial) run: python -m pytest -v -n=2 -m serial --durations=10 python/demo/test.py - name: Run DOLFINx demos (Python, MPI (np=2)) diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index 76aaadca04e..ed0d9f90c50 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -30,6 +30,7 @@ jobs: - name: Install FEniCS Python components run: | + yum install -y libffi-devel python3 -m pip install git+https://github.com/FEniCS/ufl.git python3 -m pip install git+https://github.com/FEniCS/basix.git python3 -m pip install git+https://github.com/FEniCS/ffcx.git From 4658a7d97ca995a2c23fd5622b9ce2aa4a7463f1 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 10:55:18 +0200 Subject: [PATCH 05/13] Fix. --- .github/workflows/ccpp.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 0a3da398214..69ee18cb1a6 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -181,6 +181,8 @@ jobs: - name: Install FEniCS Python components if: github.event_name == 'workflow_dispatch' run: | + apt-get update + apt-get install libffi-dev pip install git+https://github.com/FEniCS/ufl.git@${{ github.event.inputs.ufl_ref }} pip install git+https://github.com/FEniCS/basix.git@${{ github.event.inputs.basix_ref }} pip install git+https://github.com/FEniCS/ffcx.git@${{ github.event.inputs.ffcx_ref }} @@ -252,6 +254,8 @@ jobs: - name: Install FEniCS Python components (default branches/tags) if: github.event_name != 'workflow_dispatch' run: | + apt-get update + apt-get install libffi-dev pip install git+https://github.com/FEniCS/ufl.git pip install git+https://github.com/FEniCS/basix.git pip install git+https://github.com/FEniCS/ffcx.git From b984cc1da6551cf20fddb6d04617168a4b7e39ca Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 11:00:49 +0200 Subject: [PATCH 06/13] Fixes. --- .github/workflows/ccpp.yml | 8 ++++---- .github/workflows/oneapi.yml | 4 ++-- .github/workflows/redhat.yml | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 69ee18cb1a6..c67a0d32388 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -181,8 +181,8 @@ jobs: - name: Install FEniCS Python components if: github.event_name == 'workflow_dispatch' run: | - apt-get update - apt-get install libffi-dev + apt-get -y update + apt-get -y install libffi-dev pip install git+https://github.com/FEniCS/ufl.git@${{ github.event.inputs.ufl_ref }} pip install git+https://github.com/FEniCS/basix.git@${{ github.event.inputs.basix_ref }} pip install git+https://github.com/FEniCS/ffcx.git@${{ github.event.inputs.ffcx_ref }} @@ -254,8 +254,8 @@ jobs: - name: Install FEniCS Python components (default branches/tags) if: github.event_name != 'workflow_dispatch' run: | - apt-get update - apt-get install libffi-dev + apt-get -y update + apt-get -y install libffi-dev pip install git+https://github.com/FEniCS/ufl.git pip install git+https://github.com/FEniCS/basix.git pip install git+https://github.com/FEniCS/ffcx.git diff --git a/.github/workflows/oneapi.yml b/.github/workflows/oneapi.yml index 0741c7b81a8..032039a5082 100644 --- a/.github/workflows/oneapi.yml +++ b/.github/workflows/oneapi.yml @@ -37,8 +37,8 @@ jobs: steps: - name: Install compiler dependencies run: | - apt-get update - apt-get install binutils libstdc++-14-dev + apt-get -y update + apt-get -y install binutils libstdc++-14-dev - uses: actions/checkout@v4 diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index ed0d9f90c50..bd026b8889d 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -30,6 +30,7 @@ jobs: - name: Install FEniCS Python components run: | + yum update yum install -y libffi-devel python3 -m pip install git+https://github.com/FEniCS/ufl.git python3 -m pip install git+https://github.com/FEniCS/basix.git From 427df921af4503d6aec95209a46e00618a2afd04 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 11:03:19 +0200 Subject: [PATCH 07/13] Fix. --- .github/workflows/redhat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index bd026b8889d..d64337b1788 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -30,7 +30,7 @@ jobs: - name: Install FEniCS Python components run: | - yum update + yum -y update yum install -y libffi-devel python3 -m pip install git+https://github.com/FEniCS/ufl.git python3 -m pip install git+https://github.com/FEniCS/basix.git From a15fd259d26701adc171b0307d36d44fe2e0b387 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 11:04:57 +0200 Subject: [PATCH 08/13] and for macOS. --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6ff1ceda5d2..5488e0c5ef8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -30,6 +30,7 @@ jobs: - name: Install Homebrew dependencies run: | + brew install libffi brew install adios2 boost cmake hdf5-mpi make ninja open-mpi pkg-config pugixml spdlog # FEniCS brew install bison flex gfortran # PETSc From 365b0d007d68665ad23c410f87986315a21c7b45 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 11:15:19 +0200 Subject: [PATCH 09/13] Fix. --- .github/workflows/ccpp.yml | 12 ++++++------ .github/workflows/oneapi.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index c67a0d32388..fdedc3a62b3 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -87,8 +87,6 @@ jobs: - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install libffi-dev sudo apt-get install catch2 cmake g++ libboost-dev libboost-timer-dev libhdf5-mpi-dev libparmetis-dev libpugixml-dev libspdlog-dev mpi-default-dev ninja-build pkg-config - name: Set up Python uses: actions/setup-python@v5 @@ -134,6 +132,8 @@ jobs: - name: Build Python interface run: | + sudo apt-get -y update + sudo apt-get -y install libffi-dev pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Debug" 'python/[test]' python -c "from mpi4py import MPI; import dolfinx; assert not dolfinx.has_petsc4py" @@ -181,8 +181,6 @@ jobs: - name: Install FEniCS Python components if: github.event_name == 'workflow_dispatch' run: | - apt-get -y update - apt-get -y install libffi-dev pip install git+https://github.com/FEniCS/ufl.git@${{ github.event.inputs.ufl_ref }} pip install git+https://github.com/FEniCS/basix.git@${{ github.event.inputs.basix_ref }} pip install git+https://github.com/FEniCS/ffcx.git@${{ github.event.inputs.ffcx_ref }} @@ -218,6 +216,8 @@ jobs: - name: Build Python interface run: | + apt-get -y update + apt-get -y install libffi-dev pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Debug" 'python/[test]' python -c "from mpi4py import MPI; import dolfinx; assert dolfinx.has_adios2; assert dolfinx.has_kahip; assert not dolfinx.has_parmetis; assert dolfinx.has_petsc; assert dolfinx.has_petsc4py; assert dolfinx.has_ptscotch; assert dolfinx.has_slepc; assert dolfinx.has_complex_ufcx_kernels" @@ -254,8 +254,6 @@ jobs: - name: Install FEniCS Python components (default branches/tags) if: github.event_name != 'workflow_dispatch' run: | - apt-get -y update - apt-get -y install libffi-dev pip install git+https://github.com/FEniCS/ufl.git pip install git+https://github.com/FEniCS/basix.git pip install git+https://github.com/FEniCS/ffcx.git @@ -274,6 +272,8 @@ jobs: - name: Build Python interface run: | + apt-get -y update + apt-get -y install libffi-dev pip install -r python/build-requirements.txt pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Debug" 'python/[docs]' diff --git a/.github/workflows/oneapi.yml b/.github/workflows/oneapi.yml index 032039a5082..69617691883 100644 --- a/.github/workflows/oneapi.yml +++ b/.github/workflows/oneapi.yml @@ -38,6 +38,7 @@ jobs: - name: Install compiler dependencies run: | apt-get -y update + apt-get -y install libffi-dev apt-get -y install binutils libstdc++-14-dev - uses: actions/checkout@v4 @@ -98,7 +99,6 @@ jobs: - name: Build DOLFINx Python interface run: | - apt-get -y install libffi-dev pip -v install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" python/ - name: Run DOLFINx demos (Python, serial) run: python -m pytest -v -n=2 -m serial --durations=10 python/demo/test.py From c20a16048ea8b1ca4845726962602bb29935f816 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 11:28:44 +0200 Subject: [PATCH 10/13] Fix. --- .github/workflows/ccpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index fdedc3a62b3..4921d50a07e 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -87,6 +87,8 @@ jobs: - name: Install dependencies run: | + sudo apt-get update + sudo apt-get install libffi-dev sudo apt-get install catch2 cmake g++ libboost-dev libboost-timer-dev libhdf5-mpi-dev libparmetis-dev libpugixml-dev libspdlog-dev mpi-default-dev ninja-build pkg-config - name: Set up Python uses: actions/setup-python@v5 @@ -100,8 +102,6 @@ jobs: - name: Install FEniCS Python components (default branches/tags) if: github.event_name != 'workflow_dispatch' run: | - apt update - apt install libffi-dev pip install git+https://github.com/FEniCS/ufl.git pip install git+https://github.com/FEniCS/basix.git pip install git+https://github.com/FEniCS/ffcx.git From 2f2f46ece4b94e8babe933a2783e764a4946723e Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 11:39:16 +0200 Subject: [PATCH 11/13] Add back openmpi oversubscribe --- .github/workflows/ccpp.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 4921d50a07e..0b0b7e4fe65 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -79,9 +79,10 @@ jobs: env: OMPI_ALLOW_RUN_AS_ROOT: 1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 - PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe + PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe # Newer OpenMPI + OMPI_MCA_rmaps_base_oversubscribe: true # Older OpenMPI - name: Build and test + name: Build and test steps: - uses: actions/checkout@v4 From 21a51b0d4a1e06e1f8f30c58cf5ffa781e0b9e79 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 11:42:21 +0200 Subject: [PATCH 12/13] Remove. --- .github/workflows/ccpp.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 0b0b7e4fe65..5f8ba20c9b2 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -133,8 +133,6 @@ jobs: - name: Build Python interface run: | - sudo apt-get -y update - sudo apt-get -y install libffi-dev pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Debug" 'python/[test]' python -c "from mpi4py import MPI; import dolfinx; assert not dolfinx.has_petsc4py" From 8a55d2bbed2d88eef9c191fe5d4a3cfa8db62031 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Fri, 18 Oct 2024 12:25:28 +0200 Subject: [PATCH 13/13] Fix. --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 5f8ba20c9b2..f9950f5f0f3 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -82,7 +82,7 @@ jobs: PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe # Newer OpenMPI OMPI_MCA_rmaps_base_oversubscribe: true # Older OpenMPI - name: Build and test + name: Build and test steps: - uses: actions/checkout@v4