Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Nov 22, 2024
1 parent e339621 commit 707c9e4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,16 @@ jobs:
python -m pip install 'rtree>=1.2'
cd pip_venv/src
git clone https://github.com/firedrakeproject/libsupermesh.git
cd libsupermesh
mkdir -p build
cd build
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
-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
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/pyop2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Prepare venv
run: |
python -m venv venv
- name: Clone PETSc
uses: actions/checkout@v4
with:
Expand All @@ -57,6 +61,24 @@ jobs:
--with-fortran-bindings=0
make
- name: Install libsupermesh
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 PyOP2
uses: actions/checkout@v4
with:
Expand All @@ -66,18 +88,22 @@ jobs:
shell: bash
working-directory: PyOP2
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: PyOP2
run: python -m pip install -v ".[test]"
run: |
source venv/bin/activate
python -m pip install -v ".[test]"
- name: Run tests
shell: bash
working-directory: PyOP2
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
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ def __getitem__(self, key):
# -lsupermesh \
# -Wl,-rpath,$ORIGIN/../../supermesh
supermesh_ = ExternalDependency(
include_dirs=[sys.prefix],
library_dirs=[sys.prefix],
include_dirs=[f"{sys.prefix}/include"],
library_dirs=[f"{sys.prefix}/lib"],
libraries=["supermesh"],
)

Expand Down

0 comments on commit 707c9e4

Please sign in to comment.