Skip to content

Commit ad107eb

Browse files
authored
Merge pull request #4 from E3SM-Project/develop_e3sm_update
This PR updates the WW3 source code to include the CMake build system and CPP directives for switch options.
2 parents 83ece2b + 187fa39 commit ad107eb

File tree

1,545 files changed

+109673
-58900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,545 files changed

+109673
-58900
lines changed

.github/ISSUE_TEMPLATE/add-development-request.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bug report
3-
about: Create a report to help us improve WW3
3+
about: Create a bug report to help us improve WW3
44
title: ''
55
labels: 'bug'
66
assignees: ''
@@ -11,7 +11,7 @@ assignees: ''
1111
A clear and concise description of what the bug is.
1212

1313
**To Reproduce**
14-
Steps to reproduce the behavior:
14+
Steps to reproduce the behavior.
1515

1616
**Expected behavior**
1717
A clear and concise description of what you expected to happen.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Q&A about using WW3
4+
url: https://github.com/NOAA-EMC/WW3/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: General
7+
url: https://github.com/NOAA-EMC/WW3/discussions/new?category=general
8+
about: Chat about anything and everything here
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
---
2-
name: Documentation request/update
3-
about: Add new section in the documentation or report a type/mistake in the documentation
2+
name: Documentation
3+
about: Any issues in documentation including reporting a typo/mistake in the documentation or a missing section.
44
title: ''
55
labels: 'documentation'
66
assignees: ''
77

88
---
99

10-
**Describe the section in the documentation that is missing or requires an update?**
10+
<!-- Describe the section in the documentation that is missing or requires an update? -->
1111

12-
**Report a bug/typo in the documentation**
13-
14-
**Link the issue(s) associated with this documentation update**
1512

.github/pull_request_template.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
11
# Pull Request Summary
2-
(Instructions: this, and all subsequent sections of text should be removed and filled in as appropriate.)
3-
Please describe the PR summary
2+
<!-- A short overview of the PR -->
43

54
## Description
5+
<!--
66
Provide a detailed description of what this PR does.
77
What bug does it fix, or what feature does it add?
88
Is a change of answers expected from this PR?
99
10-
### Issue(s) addressed
11-
* Is there an issue associated with this development (bug fix, enhancement, new feature)?
12-
Please add a reference to a related issue(s) in WW3 repository (Follow [link](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)).
13-
Link the issues to be closed with this PR, whether in this repository, or in another repository.
14-
(Remember, issues should always be created before starting work on a PR branch!).
15-
Note that properly "linked issues" (either automatic links, or manual ones using the correct keywords) will be automatically closed when the PR is merged.
10+
Please also include the following information:
11+
* Add any suggestions for a reviewer
12+
* Mention any labels that should be added: _bug_, _documentation_, _enhancement_, _new feature_
13+
* Are answer changes expected from this PR? Please describe the changes and the reason why in addition to which of the following labels would apply: _mod_def change_, _out_grd change_, _out_pnt change_, _restart file change_, _Regression test_
14+
-->
1615

16+
### Issue(s) addressed
17+
<!--
18+
* Please list any issues associated with this PR, including those the PR will fix/close. For example:
1719
- fixes #<issue_number>
1820
- fixes noaa-emc/ww3/issues/<issue_number>
21+
-->
22+
23+
### Commit Message
24+
<!--
25+
Please provide a short summary of this PR, which will be used during _Squash and Merge_ and will be shown as a git log message. Be sure to add any co-authors here.
26+
-->
1927

2028
### Check list
21-
* Is your feature branch up to date with the authoritative repository (NOAA/develop)?
22-
* Make sure you have checked the [checklist for a developer submitting to develop](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-a-developer-submitting-to-develop), [checklist for a developer submitting to develop](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-a-developer-submitting-to-develop) and [updating version number](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-updating-version-number)
23-
* Reviewers: @mentions of suggested reviewers of the proposed changes.
2429

30+
<!-- After creating the PR you can check each of the items below that have been completed -->
2531

32+
- [ ] Branch is up to date with the authoritative repository (NOAA-EMC) develop branch.
33+
- [ ] Checked the [checklist for a developer submitting to develop](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-a-developer-submitting-to-develop).
34+
- [ ] If a version number update is required, checked the [updating version number](https://github.com/NOAA-EMC/WW3/wiki/Code-Management#checklist-for-updating-version-number) checklist.
35+
- [ ] If a new feature was added, a regression test for testing the new feature is added.
36+
2637
### Testing
38+
2739
* How were these changes tested?
2840
* Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
29-
* If a new feature was added, was a new regression test added?
30-
* Have regression tests been run?
31-
* Which compiler / HPC you used to run the regression tests in the PR?
32-
* Please provide the summary output of matrix.comp (_matrix.Diff.out_, _matrixCompFull.out_ and _matrixCompSummary.out_):
33-
Please indicate the expected changes in the outputs ([excluding the known list of non-identical tests](https://github.com/NOAA-EMC/WW3/wiki/How-to-use-matrix.comp-to-compare-regtests-with-master#4-look-at-results)).
34-
35-
36-
37-
38-
39-
40-
41-
42-
41+
* Have the matrix regression tests been run (if yes, please note HPC and compiler)?
42+
* Please provide the summary output of matrix.comp (_matrix.Diff.txt_, _matrixCompFull.txt_ and _matrixCompSummary.txt_):
43+
* Please indicate the expected changes in the regression test output ([Note the known list of non-identical tests](https://github.com/NOAA-EMC/WW3/wiki/How-to-use-matrix.comp-to-compare-regtests-with-master#4-look-at-results)).
44+
* Please provide the summary output of matrix.comp (_matrix.Diff.txt_, _matrixCompFull.txt_ and _matrixCompSummary.txt_):
4345

.github/workflows/gnu.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: GNU Linux Build
2+
on: [push, pull_request]
3+
4+
env:
5+
cache_key: gnu4
6+
CC: gcc-10
7+
FC: gfortran-10
8+
CXX: g++-10
9+
10+
# Split into a steup step, and a WW3 build step which
11+
# builds multiple switches in a matrix. The setup is run once and
12+
# the environment is cached so each build of WW3 can share the dependencies.
13+
14+
jobs:
15+
setup:
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
# Cache spack, OASIS, and compiler
20+
# No way to flush Action cache, so key may have # appended
21+
- name: cache-env
22+
id: cache-env
23+
uses: actions/cache@v2
24+
with:
25+
path: |
26+
spack
27+
~/.spack
28+
work_oasis3-mct
29+
key: spack-${{ runner.os }}-${{ env.cache_key }}
30+
31+
- name: checkout-ww3
32+
if: steps.cache-env.outputs.cache-hit != 'true'
33+
uses: actions/checkout@v2
34+
with:
35+
path: ww3
36+
37+
# Build WW3 spack environment
38+
- name: install-dependencies-with-spack
39+
if: steps.cache-env.outputs.cache-hit != 'true'
40+
run: |
41+
# Install NetCDF, ESMF, g2, etc using Spack
42+
git clone -c feature.manyFiles=true https://github.com/spack/spack.git
43+
source spack/share/spack/setup-env.sh
44+
spack env create ww3-gnu ww3/model/ci/spack.yaml
45+
spack env activate ww3-gnu
46+
spack compiler find
47+
spack external find
48+
49+
spack concretize
50+
spack install --dirty -v
51+
52+
- name: build-oasis
53+
if: steps.cache-env.outputs.cache-hit != 'true'
54+
run: |
55+
source spack/share/spack/setup-env.sh
56+
spack env activate ww3-gnu
57+
export WWATCH3_DIR=${GITHUB_WORKSPACE}/ww3/model
58+
export OASIS_INPUT_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/oasis3-mct
59+
export OASIS_WORK_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct
60+
cd ww3/regtests/ww3_tp2.14/input/oasis3-mct/util/make_dir
61+
cmake .
62+
make VERBOSE=1
63+
cp -r ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct ${GITHUB_WORKSPACE}
64+
65+
build:
66+
needs: setup
67+
strategy:
68+
matrix:
69+
switch: [Ifremer1, NCEP_st2, NCEP_st4, ite_pdlib, NCEP_st4sbs, NCEP_glwu, OASACM, UKMO, MULTI_ESMF]
70+
runs-on: ubuntu-20.04
71+
72+
steps:
73+
- name: checkout-ww3
74+
uses: actions/checkout@v2
75+
with:
76+
path: ww3
77+
78+
- name: cache-env
79+
id: cache-env
80+
uses: actions/cache@v2
81+
with:
82+
path: |
83+
spack
84+
~/.spack
85+
work_oasis3-mct
86+
key: spack-${{ runner.os }}-${{ env.cache_key }}
87+
88+
- name: build-ww3
89+
run: |
90+
source spack/share/spack/setup-env.sh
91+
spack env activate ww3-gnu
92+
cd ww3
93+
export CC=mpicc
94+
export FC=mpif90
95+
export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct
96+
mkdir build && cd build
97+
if [[ ${{ matrix.switch }} == "MULTI_ESMF" ]]; then
98+
cmake .. -DMULTI_ESMF=ON -DSWITCH=multi_esmf
99+
else
100+
cmake .. -DSWITCH=${{ matrix.switch }}
101+
fi
102+
make -j2 VERBOSE=1
103+
104+

.github/workflows/intel.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Intel Linux Build
2+
on: [push, pull_request]
3+
4+
# Use custom shell with -l so .bash_profile is sourced which loads intel/oneapi/setvars.sh
5+
# without having to do it in manually every step
6+
defaults:
7+
run:
8+
shell: bash -leo pipefail {0}
9+
10+
# Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran
11+
env:
12+
cache_key: intel5
13+
CC: icc
14+
FC: ifort
15+
CXX: icpc
16+
I_MPI_CC: icc
17+
I_MPI_F90: ifort
18+
19+
# Split into a dependency build step, and a WW3 build step which
20+
# builds multiple switches in a matrix. The setup is run once and
21+
# the environment is cached so each build of WW3 can share the dependencies.
22+
23+
jobs:
24+
setup:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
# Cache spack, OASIS, and compiler
29+
# No way to flush Action cache, so key may have # appended
30+
- name: cache-env
31+
id: cache-env
32+
uses: actions/cache@v2
33+
with:
34+
path: |
35+
spack
36+
~/.spack
37+
work_oasis3-mct
38+
/opt/intel
39+
key: spack-${{ runner.os }}-${{ env.cache_key }}
40+
41+
- name: install-intel-compilers
42+
if: steps.cache-env.outputs.cache-hit != 'true'
43+
run: |
44+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
45+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
46+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
47+
sudo apt-get update
48+
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
49+
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
50+
51+
- name: checkout-ww3
52+
if: steps.cache-env.outputs.cache-hit != 'true'
53+
uses: actions/checkout@v2
54+
with:
55+
path: ww3
56+
57+
# Build WW3 spack environment
58+
- name: install-dependencies-with-spack
59+
if: steps.cache-env.outputs.cache-hit != 'true'
60+
run: |
61+
# Install NetCDF, ESMF, g2, etc using Spack
62+
git clone -c feature.manyFiles=true https://github.com/spack/spack.git
63+
source spack/share/spack/setup-env.sh
64+
spack env create ww3-intel ww3/model/ci/spack.yaml
65+
spack env activate ww3-intel
66+
spack compiler find
67+
spack external find
68+
spack add intel-oneapi-mpi
69+
spack concretize
70+
spack install --dirty -v
71+
72+
- name: build-oasis
73+
if: steps.cache-env.outputs.cache-hit != 'true'
74+
run: |
75+
source spack/share/spack/setup-env.sh
76+
spack env activate ww3-intel
77+
export WWATCH3_DIR=${GITHUB_WORKSPACE}/ww3/model
78+
export OASIS_INPUT_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/oasis3-mct
79+
export OASIS_WORK_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct
80+
cd ww3/regtests/ww3_tp2.14/input/oasis3-mct/util/make_dir
81+
cmake .
82+
make
83+
cp -r ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct ${GITHUB_WORKSPACE}
84+
85+
build:
86+
needs: setup
87+
strategy:
88+
matrix:
89+
switch: [Ifremer1, NCEP_st2, NCEP_st4, ite_pdlib, NCEP_st4sbs, NCEP_glwu, OASACM, UKMO, MULTI_ESMF]
90+
runs-on: ubuntu-latest
91+
92+
steps:
93+
- name: checkout-ww3
94+
uses: actions/checkout@v2
95+
with:
96+
path: ww3
97+
98+
- name: install-intel
99+
run: |
100+
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
101+
102+
- name: cache-env
103+
id: cache-env
104+
uses: actions/cache@v2
105+
with:
106+
path: |
107+
spack
108+
~/.spack
109+
work_oasis3-mct
110+
/opt/intel
111+
key: spack-${{ runner.os }}-${{ env.cache_key }}
112+
113+
- name: build-ww3
114+
run: |
115+
source spack/share/spack/setup-env.sh
116+
spack env activate ww3-intel
117+
cd ww3
118+
export CC=mpicc
119+
export FC=mpif90
120+
export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct
121+
mkdir build && cd build
122+
if [[ ${{ matrix.switch }} == "MULTI_ESMF" ]]; then
123+
cmake .. -DMULTI_ESMF=ON -DSWITCH=multi_esmf
124+
else
125+
cmake .. -DSWITCH=${{ matrix.switch }}
126+
fi
127+
make -j2
128+
129+

0 commit comments

Comments
 (0)