Repository navigation
95 lines (78 loc) · 2.74 KB
/
Copy pathlinux_dev_landlab_uv.yml
File metadata and controls
95 lines (78 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: test_dev_landlab_uv
on:
push:
pull_request:
workflow_dispatch:
#concurrency:
# group: ${{ github.actor }}-${{ github.ref }}
# cancel-in-progress: true
env:
UV_PROJECT_ENVIRONMENT: .venv
OMPI_MCA_btl_base_warn_component_unused: 0
OMPI_MCA_mpi_yield_when_idle: 1
OMPI_MCA_rmaps_base_oversubscribe: 1
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
np: [1, 2, 4, 6, 8]
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (OpenMPI + build tools)
run: |
sudo apt-get update
sudo apt-get install -y \
libopenmpi-dev openmpi-bin \
build-essential gfortran pkg-config
- uses: astral-sh/setup-uv@v6
- name: Set up Python & venv (uv)
run: |
uv venv --python 3.12
.venv/bin/python -c "import sys; print('Using:', sys.executable)"
- name: Checkout landlab dev branch
uses: actions/checkout@v4
with:
repository: gantian127/landlab
ref: tian/remove-extra-links-voronoi-grid
path: landlab
- name: Install landlab dependencies (uv)
run: |
uv pip install \
bmipy \
matplotlib \
netcdf4 \
"numpy>=1.20" \
pandas \
"pyshp!=2.3.0" \
pyyaml \
rich-click \
scipy \
statsmodels \
"xarray>=0.16"
- name: Install parallel workflow dependencies (uv)
run: |
uv pip install mpi4py pymetis
uv pip install landlab_parallel==0.1.0
- name: Install landlab (editable) with uv
run: |
uv pip uninstall landlab || true
uv pip install -e "${{ github.workspace }}/landlab"
- name: Debug landlab used at runtime
run: |
.venv/bin/python -c "import landlab, os, inspect; from landlab import VoronoiDelaunayGrid; print('landlab file:', os.path.dirname(landlab.__file__)); print('VDG init:', inspect.signature(VoronoiDelaunayGrid.__init__))"
uv pip show landlab || true
- name: Check mpi4py works
run: |
.venv/bin/python -c "from mpi4py import MPI; print(MPI.Get_processor_name())"
- name: Run Landlab MPI Test linear diffusion (math equation)
run: |
mpiexec --oversubscribe -n ${{ matrix.np }} .venv/bin/python mpi_landlab/mpi_landlab_linear_diffusion.py
- name: Run Landlab MPI Test LEM workflow
shell: bash -el {0}
run: |
mpiexec --oversubscribe -n ${{ matrix.np }} .venv/bin/python mpi_landlab/mpi_landlab_lem_workflow.py