Skip to content

Commit

Permalink
Workflow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Dec 11, 2024
1 parent a240aec commit 274e154
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 108 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/pip-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/pyop2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -93,15 +63,13 @@ jobs:
shell: bash
working-directory: firedrake
run: |
source ../venv/bin/activate
python -m pip install -U pip
python -m pip install -U pytest-timeout
- name: Install PyOP2
shell: bash
working-directory: firedrake
run: |
source ../venv/bin/activate
export CC=mpicc
export HDF5_DIR="$PETSC_DIR/$PETSC_ARCH"
export HDF5_MPI=ON
Expand All @@ -111,15 +79,13 @@ 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

- name: Run PyOP2 tests
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
Expand Down
36 changes: 0 additions & 36 deletions scripts/firedrake-install
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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/")

Expand Down Expand Up @@ -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/")

Expand Down

0 comments on commit 274e154

Please sign in to comment.