Skip to content

Commit

Permalink
correct benchmark diag_tables for coupled model configurations; move …
Browse files Browse the repository at this point in the history
…bm_ic directory out of inputdata directory; use aws ec2 for CI test; auto-rt fixes (#426)

* Modifications to run tests on aws ec2 instances
* Change layout numbers. Include all utests (#7)
* Remove unnecessary sleep in build_test.yml and buidl_status_check.py
* Increase sleep period in build_status_check.py to meet 60 requests/hr
* Add sleep back to build_status.check.py
* Minor changes. Change CI to develop branch
* update diag_tables
*add config variable for diag_table
*set up diag_table templates for benchmarks (pre/v16) versions
* fix diag table variable for v16 tests
* add 35 v16 bmark frac test
* add missing diag_table in bmark restart tests
* Move bm_ic directory out of input-data directory
* Replace sys exit with valueError in build_status_check.py
* updates for v16 stability
* remove un-used dz_min=6 parameter setting in bmark v16 tests
* add psm_bc variable and set to value of 1 (default 0) for v16 tests
* set dt_atmos=225 in v16 tests
* updates for dated BM_IC directory
* add INPUTDATA_ROOT_BMIC to rt.sh
* remove BM_IC variable in cpld_bmark_run.IN and use explict path to specify IC sources for ATM,MOM6,CICE5 and WW3 (only for 35d test)
* add variables in parm/input.benchmark_v16.nml.IN
* set dddmp = 0.2 and FSICL to 0 in v16 bmark tests
* modify v16 tests
* keep FSICL at default value for now
* reduce time for v16 wave test to 6hr
* update RTPWD to 20130308; skip-ci
* fix cpld_bmarkfrac_wave_v16 test
* fix timestamps on files for comparison to baseline after switching to 6hour test length
* remove restart file from WW3 comparison. Currently the restart file writes out only at hour 12. This is set in ww3_multi.inp. A change to allow writing a restart at hour 6 would require an update to the ww3 input data directory

Co-authored-by: MinsukJi-NOAA <[email protected]>
Co-authored-by: Brian Curtis <[email protected]>
Co-authored-by: climbfuji <[email protected]>
  • Loading branch information
4 people committed Mar 9, 2021
1 parent 35d1897 commit 9004b5e
Show file tree
Hide file tree
Showing 40 changed files with 2,256 additions and 1,731 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/main.yml → .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: Pull Request Tests
name: Pull request tests

on:
push:
branches:
- develop
pull_request:
branches:
- develop
branches: ['develop']
pull_request_review:
types: [submitted]
branches: ['develop']

jobs:
setup:
name: Set up
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

outputs:
tn: ${{ steps.parse.outputs.tn }}
Expand Down Expand Up @@ -46,7 +45,8 @@ jobs:
build:
name: Build (${{ matrix.bld_set }})
needs: setup
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event.review.state == 'approved' && toJson(github.event.pull_request.requested_reviewers) == '[]')
runs-on: ubuntu-20.04

strategy:
fail-fast: false
Expand Down Expand Up @@ -85,8 +85,7 @@ jobs:
utest:
name: Unit test (${{ needs.setup.outputs.tn }}, ${{ matrix.test_set }})
needs: [setup,build]
runs-on: ubuntu-latest
#runs-on: self-hosted
runs-on: self-hosted

strategy:
fail-fast: false
Expand All @@ -101,7 +100,7 @@ jobs:
- name: Prepare artifacts
run: |
tar xvjf artifact.tar.bz2 && rm -f artifact.tar.bz2
sudo docker load --input ${{ needs.setup.outputs.img }}.tar.gz && rm -f ${{ needs.setup.outputs.img }}.tar.gz
docker load --input ${{ needs.setup.outputs.img }}.tar.gz && rm -f ${{ needs.setup.outputs.img }}.tar.gz
- name: Run utest
run: ./ci.sh -n ${{ needs.setup.outputs.tn }} -r ${{ matrix.test_set }}
Expand All @@ -117,5 +116,7 @@ jobs:
if: ${{ always() }}
run: |
rm -f ci.sh ci.test
sudo docker rm my-container && sudo docker rmi ${{ needs.setup.outputs.img }}:latest
sudo docker volume rm DataVolume
docker stop my-container && docker rm my-container && docker rmi ${{ needs.setup.outputs.img }}:latest
docker volume rm DataVolume
#docker rmi minsukjinoaa/fv3-input-data:input-data-20210115
rm -f memory_stat
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ name: Manage workflows

on:
workflow_run:
workflows: ["Pull Request Tests"]
workflows: ["Pull request tests"]
types:
- requested

jobs:
job1:
name: Job 1
runs-on: ubuntu-latest
name: Cancel workflows
runs-on: ubuntu-20.04

steps:
- name: Checkout codes
uses: actions/checkout@v2

- name: Check if skip-ci is requested
run: |
sleep 40
cd ${GITHUB_WORKSPACE}/tests/ci
repo="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/actions/runs"
tr_id=$(cat ${GITHUB_EVENT_PATH} | ./json_helper.py get_trigger_id)
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/start_runners.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Start runners

on:
workflow_run:
workflows: ["Pull request tests"]
types:
- requested

jobs:
job1:
name: Start AWS runners
runs-on: ubuntu-20.04

steps:
- name: Check out codes
uses: actions/checkout@v2

- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Check the status of build and start self-hosted runners
env:
aws_instance_id: ${{ secrets.AWS_INSTANCE_ID }}
run: |
cd ${GITHUB_WORKSPACE}/tests/ci
conclusion=$(cat ${GITHUB_EVENT_PATH} | ./build_status_check.py)
if [[ $conclusion == "success" ]]; then
aws ec2 start-instances --instance-ids $aws_instance_id
fi
25 changes: 25 additions & 0 deletions .github/workflows/stop_runners.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Stop runners

on:
workflow_run:
workflows: ["Pull request tests"]
types:
- completed

jobs:
job1:
name: Stop AWS runners
runs-on: ubuntu-20.04

steps:
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Stop self-hosted runners
env:
aws_instance_id: ${{ secrets.AWS_INSTANCE_ID }}
run: aws ec2 stop-instances --instance-ids $aws_instance_id
Loading

0 comments on commit 9004b5e

Please sign in to comment.