Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Benchmark branch to use NDSL v2024.09.00 #96

Draft
wants to merge 13 commits into
base: benchmark
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/pull_request_template.md

This file was deleted.

5 changes: 2 additions & 3 deletions .github/workflows/lint.yml → .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: "Lint"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
lint:
Expand All @@ -11,10 +10,10 @@ jobs:
uses: actions/[email protected]
with:
submodules: 'recursive'
- name: Step Python 3.8.12
- name: Step Python 3.11.7
uses: actions/[email protected]
with:
python-version: '3.8.12'
python-version: '3.11.7'
- name: Install OpenMPI for gt4py
run: |
sudo apt-get install libopenmpi-dev
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/main_unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "pace main unit tests"
on:
workflow_call:
inputs:
component_trigger:
type: boolean
default: false
required: false
component_name:
type: string
default: ''
required: false
pull_request:

# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pace_main_unit_tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/noaa-gfdl/miniforge:mpich
steps:
- name: external trigger Checkout pace/develop
if: ${{ inputs.component_trigger }}
uses: actions/checkout@v4
with:
submodules: 'recursive'
repository: NOAA-GFDL/pace
path: pace
ref: develop

- name: external trigger Remove existing component in pace/develop
if: ${{ inputs.component_trigger }}
run: rm -rf ${GITHUB_WORKSPACE}/pace/${{inputs.component_name}}

- name: Checkout out hash that triggered CI
uses: actions/checkout@v4
with:
submodules: 'recursive'
path: pace/${{inputs.component_name}}

- name: install packages
run: |
cd ${GITHUB_WORKSPACE}/pace
pip3 install --upgrade pip setuptools wheel
pip3 install -r requirements_dev.txt -c constraints.txt

- name: prepare input files
run: |
cd ${GITHUB_WORKSPACE}/pace
mkdir tests/main/input
python3 examples/generate_eta_files.py
mv *eta*.nc tests/main/input

- name: run tests
run: |
cd ${GITHUB_WORKSPACE}/pace
pytest -x tests/main
31 changes: 0 additions & 31 deletions .github/workflows/main_unit_tests.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/main_unit_tests_mpich.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/main_unit_tests_openmpi.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ repos:
args: ["--profile", "black"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v1.4.1
hooks:
- id: mypy
additional_dependencies: [types-pyyaml]
name: mypy-pace
files: pace
args: [--config-file, setup.cfg]
Expand Down
14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.13-bullseye@sha256:2a01d88a1684e6d7f08030cf5ae73b536926c64076cab197e9e3d9f699255283
FROM python:3.11-slim-bookworm@sha256:7cd3fa11d619688317226bc93dc59bc8966e9aec6bc2a6abb847e8ab7d656706

RUN apt-get update && apt-get install -y make \
software-properties-common \
Expand All @@ -13,14 +13,11 @@ RUN apt-get update && apt-get install -y make \
proj-bin \
proj-data \
python3 \
python3-pip
python3-pip \
git

RUN pip3 install --upgrade setuptools wheel

COPY constraints.txt /pace/constraints.txt

RUN pip3 install -r /pace/constraints.txt

COPY . /pace

RUN cd /pace && \
Expand All @@ -32,14 +29,11 @@ RUN cd / && \
ENV CFLAGS="-I/usr/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"

RUN python3 -m pip install \
numpy==1.21.2 \
netCDF4==1.5.7 \
mpi4py==3.1.1 \
matplotlib==3.5.2 \
ipyparallel==8.4.1 \
jupyterlab==3.4.4 \
shapely==1.8.5 \
cartopy==0.18.0 \
cartopy==0.23.0 \
jupyterlab_code_formatter==1.5.2 \
isort==5.10.1 \
black==22.3.0 \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ make build

```shell
make dev
mpirun --mca btl_vader_single_copy_mechanism none -n 6 python3 -m pace.run /examples/configs/baroclinic_c12.yaml
mpirun --mca btl_vader_single_copy_mechanism none -n 6 python -m pace.run /examples/configs/baroclinic_c12.yaml
```

## History
Expand Down
Loading
Loading