Skip to content

update to new pygetm APIs #130

update to new pygetm APIs

update to new pygetm APIs #130

Workflow file for this run

name: Build and test
on:
push:
branches:
- "**"
pull_request:
jobs:
install_and_run:
runs-on: ${{ matrix.os }}
env:
RDMAV_FORK_SAFE: 1
CMAKE_BUILD_PARALLEL_LEVEL: 2
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-13", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Clone fabmos
uses: actions/checkout@v4
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
activate-environment: fabmos
- name: List installed conda packages
run: conda export
- name: Customize Windows build
if: matrix.os == 'windows-latest'
run: |
echo '[build_ext]' > setup.cfg
echo 'cmake_opts=-G "MSYS Makefiles"' >> setup.cfg
mv extern/fabm/extern/ersem extern/fabm/extern/ersem_bck
mv extern/fabm/extern/ogs extern/fabm/extern/ogs_bck
- name: Compile and install fabmos
run: pip install -v .
- name: Download TMM setup
run: curl -s http://kelvin.earth.ox.ac.uk/spk/Research/TMM/TransportMatrixConfigs/MITgcm_2.8deg.tar -o MITgcm_2.8deg.tar
- name: Extract TMM setup
run: tar -xvf MITgcm_2.8deg.tar --exclude "MITgcm_2.8deg/GCM/basepath.mat" --exclude "MITgcm_2.8deg/BiogeochemData/basepath.mat"
- name: Run TMM setup in serial
run: |
cd MITgcm_2.8deg
python ../examples/tmm/tracer.py --stop_time="2000-02-01 00:00:00"
env:
I_MPI_FABRICS: shm #:ofi
FI_PROVIDER: sockets #tcp
- name: Run TMM setup in parallel
run: |
cd MITgcm_2.8deg
mpiexec -n 2 python ../examples/tmm/tracer.py --stop_time="2000-02-01 00:00:00"
env:
I_MPI_FABRICS: shm #:ofi
FI_PROVIDER: sockets #tcp