From 274e154e5440e1e8c546b6b0757e5a2e176f3ab8 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 11 Dec 2024 14:32:44 +0000 Subject: [PATCH] Workflow fixes --- .github/workflows/pip-mac.yml | 19 ------------------ .github/workflows/pip.yml | 19 ------------------ .github/workflows/pyop2.yml | 34 --------------------------------- scripts/firedrake-install | 36 ----------------------------------- 4 files changed, 108 deletions(-) diff --git a/.github/workflows/pip-mac.yml b/.github/workflows/pip-mac.yml index c8d1fbfe2e..1410a2f383 100644 --- a/.github/workflows/pip-mac.yml +++ b/.github/workflows/pip-mac.yml @@ -68,25 +68,6 @@ jobs: --download-superlu_dist make - - name: Install libsupermesh - run: | - source pip_venv/bin/activate - python -m pip install 'rtree>=1.2' - cd pip_venv/src - git clone https://github.com/firedrakeproject/libsupermesh.git - mkdir -p libsupermesh/build - cd libsupermesh/build - cmake .. \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_INSTALL_PREFIX="$VIRTUAL_ENV" \ - -DMPI_C_COMPILER=/opt/homebrew/bin/mpicc \ - -DMPI_CXX_COMPILER=/opt/homebrew/bin/mpicxx \ - -DMPI_Fortran_COMPILER=/opt/homebrew/bin/mpif90 \ - -DCMAKE_Fortran_COMPILER=/opt/homebrew/bin/mpif90 \ - -DMPIEXEC_EXECUTABLE=/opt/homebrew/bin/mpiexec - make - make install - - uses: actions/checkout@v4 with: path: pip_venv/src/firedrake diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index c358b70141..868c71cf9c 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -56,25 +56,6 @@ jobs: with: path: src/firedrake - - name: Install libsupermesh - run: | - source pip_venv/bin/activate - python -m pip install 'rtree>=1.2' - cd pip_venv/src - git clone https://github.com/firedrakeproject/libsupermesh.git - mkdir -p libsupermesh/build - cd libsupermesh/build - cmake .. \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_INSTALL_PREFIX="$VIRTUAL_ENV" \ - -DMPI_C_COMPILER="$MPICH_DIR/mpicc" \ - -DMPI_CXX_COMPILER="$MPICH_DIR/mpicxx" \ - -DMPI_Fortran_COMPILER="$MPICH_DIR/mpif90" \ - -DCMAKE_Fortran_COMPILER="$MPICH_DIR/mpif90" \ - -DMPIEXEC_EXECUTABLE="$MPICH_DIR/mpiexec" - make - make install - - name: Pip install run: | source pip_venv/bin/activate diff --git a/.github/workflows/pyop2.yml b/.github/workflows/pyop2.yml index aed26fbbe4..6530a5fc9f 100644 --- a/.github/workflows/pyop2.yml +++ b/.github/workflows/pyop2.yml @@ -35,17 +35,6 @@ jobs: id: setup-python with: python-version: ${{ matrix.python-version }} - # By default setup-python pollutes the environment in such a way that virtual - # environments cannot be used. This prevents us from building libsupermesh because - # it relies on having rtree installed into a venv. - # https://github.com/actions/setup-python/issues/851 - # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-update-environment-flag - update-environment: false - - - name: Create virtual environment - shell: bash - run: | - ${{ steps.setup-python.outputs.python-path }} -m venv venv - name: Clone PETSc uses: actions/checkout@v4 @@ -65,25 +54,6 @@ jobs: --with-fortran-bindings=0 make - - name: Install libsupermesh - shell: bash - run: | - source venv/bin/activate - python -m pip install 'rtree>=1.2' - git clone https://github.com/firedrakeproject/libsupermesh.git - mkdir -p libsupermesh/build - cd libsupermesh/build - cmake .. \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_INSTALL_PREFIX="$VIRTUAL_ENV" \ - -DMPI_C_COMPILER=mpicc \ - -DMPI_CXX_COMPILER=mpicxx \ - -DMPI_Fortran_COMPILER=mpif90 \ - -DCMAKE_Fortran_COMPILER=mpif90 \ - -DMPIEXEC_EXECUTABLE=mpiexec - make - make install - - name: Checkout Firedrake uses: actions/checkout@v4 with: @@ -93,7 +63,6 @@ jobs: shell: bash working-directory: firedrake run: | - source ../venv/bin/activate python -m pip install -U pip python -m pip install -U pytest-timeout @@ -101,7 +70,6 @@ jobs: shell: bash working-directory: firedrake run: | - source ../venv/bin/activate export CC=mpicc export HDF5_DIR="$PETSC_DIR/$PETSC_ARCH" export HDF5_MPI=ON @@ -111,7 +79,6 @@ jobs: shell: bash working-directory: firedrake run: | - source ../venv/bin/activate pytest --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v tests/tsfc timeout-minutes: 10 @@ -119,7 +86,6 @@ jobs: shell: bash working-directory: firedrake run: | - source ../venv/bin/activate # Running parallel test cases separately works around a bug in pytest-mpi pytest -k "not parallel" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v tests/pyop2 mpiexec -n 3 pytest -k "parallel[3]" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v tests/pyop2 diff --git a/scripts/firedrake-install b/scripts/firedrake-install index f4406a6ffb..7a1a5c28ab 100755 --- a/scripts/firedrake-install +++ b/scripts/firedrake-install @@ -1252,36 +1252,6 @@ def build_and_install_h5py(): log.info("No need to rebuild h5py") -def build_and_install_libsupermesh(cc, cxx, f90, mpiexec): - log.info("Installing libsupermesh") - url = "git+https://github.com/firedrakeproject/libsupermesh.git" - if os.path.exists("libsupermesh"): - changed = git_update("libsupermesh", url) - else: - git_clone(url) - changed = True - if changed: - with directory("libsupermesh"): - check_call(["git", "reset", "--hard"]) - check_call(["git", "clean", "-f", "-x", "-d"]) - check_call(["mkdir", "-p", "build"]) - with directory("build"): - cmd = [ - "cmake", "..", "-DBUILD_SHARED_LIBS=ON", - "-DCMAKE_INSTALL_PREFIX=" + firedrake_env, - "-DMPI_C_COMPILER=" + cc, - "-DMPI_CXX_COMPILER=" + cxx, - "-DMPI_Fortran_COMPILER=" + f90, - "-DCMAKE_Fortran_COMPILER=" + f90, - "-DMPIEXEC_EXECUTABLE=" + mpiexec, - ] - check_call(cmd) - check_call(["make"]) - check_call(["make", "install"]) - else: - log.info("No need to rebuild libsupermesh") - - def build_and_install_pythonocc(): log.info("Installing pythonocc-core") url = "git+https://github.com/tpaviot/pythonocc-core.git@595b0a4e8e60e8d6011bea0cdb54ac878efcfcd2" @@ -1877,9 +1847,6 @@ if mode == "install": install(p+"/") sys.path.append(os.getcwd() + "/" + p) - with environment(**compiler_env): - build_and_install_libsupermesh(cc, cxx, f90, mpiexec) - with pipargs("--no-deps"), environment(**compiler_env, **link_env): install("firedrake/") @@ -2059,9 +2026,6 @@ Please consider updating your PETSc manually. else: install(p+"/") - with environment(**compiler_env): - build_and_install_libsupermesh(cc, cxx, f90, mpiexec) - with pipargs("--no-deps"), environment(**compiler_env, **link_env): install("firedrake/")