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

Merged
merged 21 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e535ba6
working baroclinic test case example (#81)
oelbert Apr 19, 2024
fa6097e
fixing dockerfile overriding netcdf, mpi4py, and numpy versions with …
oelbert Apr 25, 2024
74ccf31
Update notebooks for eta file creations (#85)
mlee03 May 10, 2024
3fa59a8
Update pace to use python 3.11.9 (#82)
fmalatino May 17, 2024
392aa2d
Updated container for Github Action and reusable workflow (#87)
mlee03 Jun 26, 2024
777b332
Updated container for Github Action and reusable workflow - Redo (#89)
mlee03 Jun 26, 2024
e7f5a48
Matching packages between main and develop branches and removal of ou…
fmalatino Jul 8, 2024
ffbf851
reusable workflow CI - checkout corrrect repository (#90)
mlee03 Jul 9, 2024
4e2521d
add build script for intel oneapi and gcc compiler separately (#88)
Jul 10, 2024
6640a99
pace/tests/main/grid/test_eta.py moved to NDSL/tests/grid/test_eta.py…
fmalatino Sep 6, 2024
6915fc3
Updated constraints to reflect incoming new versions of subrepositori…
fmalatino Sep 13, 2024
ac20b45
Merge branch 'develop' into update/benchmark
fmalatino Oct 3, 2024
eb3fc14
Updating subrepositories
fmalatino Oct 3, 2024
a8152e5
Updated README to include directions for generating eta files (#99)
fmalatino Dec 13, 2024
d97c7e4
Merge branch 'NOAA-GFDL:develop' into update/benchmark
fmalatino Dec 19, 2024
ab7a66f
Updated submodules to latest versions as of 19 Dec 2024 10:27
fmalatino Dec 19, 2024
40cae4b
Merge branch 'update/benchmark' of github.com:fmalatino/pace into upd…
fmalatino Dec 19, 2024
8158413
Updated test_example_configs to exclude benchmarking configs
fmalatino Dec 19, 2024
581c63d
Misspelled one of the benchmark configs
fmalatino Dec 19, 2024
1dbe5ab
Updated submodules to most recent versions as of 3 Jan 2025 15:35 EST
fmalatino Jan 2, 2025
3a45e80
Updated c5 build script to match new methods
fmalatino Jan 3, 2025
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 NDSL
Submodule NDSL updated 43 files
+10 −0 .github/workflows/fv3_translate_tests.yaml
+6 −2 .github/workflows/lint.yaml
+10 −0 .github/workflows/pace_tests.yaml
+10 −0 .github/workflows/shield_tests.yaml
+24 −19 .github/workflows/unit_tests.yaml
+2 −1 .pre-commit-config.yaml
+667 −0 examples/Fortran_serialization/01_serialize_fortran_data.ipynb
+240 −0 examples/Fortran_serialization/02_read_serialized_data_python.ipynb
+546 −0 examples/NDSL/01_gt4py_basics.ipynb
+351 −0 examples/NDSL/02_NDSL_basics.ipynb
+167 −0 examples/NDSL/03_orchestration_basics.ipynb
+14 −0 examples/NDSL/README.md
+1 −1 external/dace
+1 −1 external/gt4py
+108 −0 ndsl/boilerplate.py
+67 −57 ndsl/constants.py
+136 −144 ndsl/dsl/dace/orchestration.py
+23 −1 ndsl/dsl/gt4py_utils.py
+11 −34 ndsl/dsl/stencil.py
+19 −1 ndsl/dsl/typing.py
+1 −3 ndsl/grid/eta.py
+29 −7 ndsl/grid/generation.py
+5 −4 ndsl/grid/geometry.py
+63 −2 ndsl/grid/helper.py
+6 −5 ndsl/initialization/allocator.py
+32 −0 ndsl/namelist.py
+20 −4 ndsl/quantity.py
+3 −0 ndsl/stencils/corners.py
+167 −41 ndsl/stencils/testing/conftest.py
+50 −0 ndsl/stencils/testing/grid.py
+9 −0 ndsl/stencils/testing/savepoint.py
+267 −0 ndsl/stencils/testing/serialbox_to_netcdf.py
+124 −141 ndsl/stencils/testing/test_translate.py
+16 −6 ndsl/stencils/testing/translate.py
+111 −0 ndsl/testing/README.md
+337 −55 ndsl/testing/comparison.py
+6 −6 ndsl/types.py
+11 −0 setup.cfg
+17 −5 setup.py
+17 −0 tests/dsl/test_stencil_factory.py
+399 −0 tests/grid/generate_eta_files.py
+223 −0 tests/grid/test_eta.py
+60 −0 tests/test_boilerplate.py
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ Shell scripts to install Pace on specific machines such as Gaea can be found in

### Run

With the environment activated, you can run an example baroclinic test case with the following command:
Located in the directory `examples/configs/` there are several example configurations to exhibit the current functionality of Pace. We suggest a new user start with the `baroclinic_c12.yaml` configuration.

Before starting any run, including unit tests, the user must ensure that the proper input files are available. For the `baroclinic_c12.yaml` configuration a script to generate these files and place them in the location referenced in the configuration file is available in the `examples/` directory; `generate_eta_files.py`. To generate the files use the following commands from the top level of the clone of Pace:

```shell
mkdir tests/main/input
python3 examples/generate_eta_files.py
mv *eta*.nc tests/main/input
```
These commands will generate the files necessary and place them in the `tests/main/input` directory. Once the files are generated the `baroclinic_c12.yaml` configuration can be used to generate a run:

```shell
mpirun -n 6 python3 -m pace.run examples/configs/baroclinic_c12.yaml
Expand Down Expand Up @@ -116,7 +125,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