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 utest and ci #603

Merged
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
2d17034
First commit
MinsukJi-NOAA May 6, 2021
0f4c50c
Further modifications
MinsukJi-NOAA May 6, 2021
9dccbba
Try new tests in ci; run-ci
MinsukJi-NOAA May 6, 2021
d9c5741
run-ci
MinsukJi-NOAA May 6, 2021
61ae3a2
run-ci
MinsukJi-NOAA May 6, 2021
2ad90f7
Change number of tests to run; run-ci
MinsukJi-NOAA May 6, 2021
8e91ade
No of builds is 3; run-ci
MinsukJi-NOAA May 7, 2021
950526e
Fix input data date; run-ci
MinsukJi-NOAA May 7, 2021
2a498db
Merge remote-tracking branch 'upstream/develop' into feature/utest-up…
MinsukJi-NOAA May 12, 2021
f0bd2a6
First commit
MinsukJi-NOAA May 17, 2021
a556ee0
Change branch name in yml file
MinsukJi-NOAA May 17, 2021
323e8ec
run-ci
MinsukJi-NOAA May 17, 2021
30e2632
Change no of instances to 2. run-ci
MinsukJi-NOAA May 17, 2021
1987dcd
Do not delete workspace for now; run-ci
MinsukJi-NOAA May 17, 2021
316f9f9
run-ci
MinsukJi-NOAA May 18, 2021
69710bc
Try the image with 1008 1002; run-ci
MinsukJi-NOAA May 18, 2021
e23b920
Change docker version at another place; run-ci
MinsukJi-NOAA May 18, 2021
fe799dd
remove sudo; run-ci
MinsukJi-NOAA May 18, 2021
5b9f045
add -a flag to docker cp
MinsukJi-NOAA May 18, 2021
83e28bc
run-ci
MinsukJi-NOAA May 18, 2021
c3f31bc
Add tar; run-ci
MinsukJi-NOAA May 18, 2021
1c8c178
Fix path; run-ci
MinsukJi-NOAA May 18, 2021
10214df
Clean up the new workflow; run-ci
MinsukJi-NOAA May 20, 2021
cf4134d
Do not delete workspace
MinsukJi-NOAA May 20, 2021
1af84aa
run-ci
MinsukJi-NOAA May 20, 2021
15b2ad9
Only std is working at this point; run-ci
MinsukJi-NOAA May 20, 2021
4d9133b
Try path with checkout; run-ci
MinsukJi-NOAA May 20, 2021
c814924
Try creating workspace after deletion; run-ci
MinsukJi-NOAA May 20, 2021
7272dc4
Remove path for checkout
MinsukJi-NOAA May 20, 2021
22adf65
run-ci
MinsukJi-NOAA May 20, 2021
50c856a
Compress exe file; run-ci
MinsukJi-NOAA May 20, 2021
c0fd9a4
Minor fixes
MinsukJi-NOAA May 20, 2021
84cf31c
Delete workspace after test as well
MinsukJi-NOAA May 21, 2021
47f9ffc
Merge upstream/develop into feature/ci-workflow
MinsukJi-NOAA May 21, 2021
7a979aa
Merge remote-tracking branch 'upstream/develop' into feature/ci-workflow
MinsukJi-NOAA May 21, 2021
b38fea1
Merge remote-tracking branch 'upstream/develop' into feature/utest-up…
MinsukJi-NOAA May 21, 2021
5f02eec
Merge remote-tracking branch 'upstream/develop' into feature/utest-up…
MinsukJi-NOAA May 25, 2021
9d8900e
Remove cpld test
MinsukJi-NOAA May 25, 2021
0c072a2
Add compute mpi bind_to specification
MinsukJi-NOAA May 26, 2021
3ad8cec
Merge remote-tracking branch 'upstream/develop' into feature/utest-up…
MinsukJi-NOAA May 26, 2021
1d38f01
Change cdeps branch name in repocheck script
MinsukJi-NOAA May 26, 2021
cd1a96e
Fix command argument issue. Clean up
MinsukJi-NOAA May 27, 2021
a7780e6
Minor change
MinsukJi-NOAA May 27, 2021
9f2249b
Merge remote-tracking branch 'upstream/develop' into feature/ci-workflow
MinsukJi-NOAA May 27, 2021
2eee2b4
Merge with utest update
MinsukJi-NOAA May 27, 2021
e713d01
Do not delete workspace at end
MinsukJi-NOAA May 27, 2021
e53b0ef
Clean up
MinsukJi-NOAA May 27, 2021
bacd871
Merge remote-tracking branch 'upstream/develop' into feature/ci-workflow
MinsukJi-NOAA May 28, 2021
583c4cc
Change regional config. Add cpld
MinsukJi-NOAA May 28, 2021
9e56c21
Fix TASKS calculation for cpld thr
MinsukJi-NOAA May 28, 2021
29686ff
Merge upstream/develop into feature/ci-workflow
MinsukJi-NOAA Jun 2, 2021
e6dd149
Modify to keep up with latest develop. Some changes in run configs. F…
MinsukJi-NOAA Jun 2, 2021
bb4e1c8
Add docker rmi. Fix thr configs for cpld
MinsukJi-NOAA Jun 2, 2021
1c0a690
Revert docker rmi. Remove cpld from ci test. Change regional test name
MinsukJi-NOAA Jun 2, 2021
1d1ea10
Add back docker rmi with -f. Add cpld rst to ci
MinsukJi-NOAA Jun 2, 2021
8c84619
RT JOBS PASSED: cheyenne.gnu. Log file uploaded.
BrianCurtis-NOAA Jun 2, 2021
c862826
Add wcoss cray RT log: passed
MinsukJi-NOAA Jun 2, 2021
e0e122b
Merge remote-tracking branch 'origin/feature/ci-workflow' into featur…
MinsukJi-NOAA Jun 2, 2021
d5dc6a4
Change tests order
MinsukJi-NOAA Jun 2, 2021
d753612
Merge remote-tracking branch 'origin/feature/ci-workflow' into featur…
MinsukJi-NOAA Jun 2, 2021
78168dd
Add wcoss dell RT log: passed
MinsukJi-NOAA Jun 2, 2021
281488c
RT JOBS PASSED: cheyenne.intel. Log file uploaded.
BrianCurtis-NOAA Jun 2, 2021
3d10adc
RT JOBS PASSED: gaea.intel. Log file uploaded.
BrianCurtis-NOAA Jun 2, 2021
97cb6d3
Change test orders to reduce time. Fix a bug in setup script
MinsukJi-NOAA Jun 2, 2021
f6edd20
RT JOBS PASSED: hera.gnu. Log file uploaded.
BrianCurtis-NOAA Jun 2, 2021
e23636e
RT JOBS PASSED: hera.intel. Log file uploaded.
BrianCurtis-NOAA Jun 3, 2021
b7c79a2
Add Orion RT log: passed in 2 trials
MinsukJi-NOAA Jun 3, 2021
50ead78
Add Jet RT logs: passed in 2 trials
MinsukJi-NOAA Jun 3, 2021
2f12d4f
Exclude control from CI for now
MinsukJi-NOAA Jun 3, 2021
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
38 changes: 14 additions & 24 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,10 @@ jobs:
sudo docker rmi $(sudo docker image ls | grep -E -m1 '<none>' | awk '{ print $3 }')
sudo docker rmi $(sudo docker image ls | awk '/ubuntu-hpc/ { print $3 }')

- name: Prepare artifacts
run: |
cd tests/ci
sudo docker save ${{ needs.setup.outputs.img }} \
| gzip >${{ needs.setup.outputs.img }}.tar.gz
tar cvjf artifact.tar.bz2 ${{ needs.setup.outputs.img }}.tar.gz ci.sh ci.test

- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.bld_set }}.artifact.tar.bz2
path: tests/ci/artifact.tar.bz2
name: ${{ matrix.bld_set }}.artifact
path: ~/fv3.tar.gz


wait:
Expand Down Expand Up @@ -162,24 +155,24 @@ jobs:
steps:
- name: Clean up in case of left-over files
run: |
rm -f artifact.tar.bz2 ${{ needs.setup.outputs.img }}.tar.gz
rm -rf ${{ github.workspace }} && mkdir -p ${{ github.workspace }}
docker ps -a --filter "name=my-container" | grep my-container >/dev/null 2>&1 \
&& docker rm my-container >/dev/null 2>&1 && d=$? || d=$?
docker image ls | grep ${{ needs.setup.outputs.img }} >/dev/null 2>&1 \
&& docker rmi ${{ needs.setup.outputs.img }} >/dev/null 2>&1 && d=$? || d=$?

- uses: actions/download-artifact@v2
- uses: actions/checkout@v2
with:
name: ${{ matrix.artifact }}.artifact.tar.bz2
submodules: recursive

- name: Prepare artifacts
run: |
tar xvjf artifact.tar.bz2 && rm -f artifact.tar.bz2
docker load --input ${{ needs.setup.outputs.img }}.tar.gz \
&& rm -f ${{ needs.setup.outputs.img }}.tar.gz
- uses: actions/download-artifact@v2
with:
name: ${{ matrix.artifact }}.artifact
path: ${{ github.workspace}}/tests

- name: Run utest
run: ./ci.sh -n ${{ matrix.name }} -r ${{ matrix.case }}
run: |
cd ${{ github.workspace }}/tests && tar -xvzf fv3.tar.gz && rm -f fv3.tar.gz
cd ${{ github.workspace }}/tests/ci
./ci.sh -n ${{ matrix.name }} -r ${{ matrix.case }}

- uses: actions/upload-artifact@v2
if: ${{ always() }}
Expand All @@ -190,8 +183,5 @@ jobs:
- name: Clean up
if: ${{ always() }}
run: |
rm -f ci.sh ci.test
docker stop my-container && docker rm my-container \
&& docker rmi ${{ needs.setup.outputs.img }}:latest
docker stop my-container && docker rm my-container
docker volume rm DataVolume
rm -f memory_stat
4 changes: 2 additions & 2 deletions tests/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From noaaemc/ubuntu-hpc:v1.3
From noaaemc/ubuntu-hpc:v1.3b

ENV HOME=/home/builder
COPY --chown=builder:builder . $HOME/ufs-weather-model
Expand All @@ -15,5 +15,5 @@ ENV RT_COMPILER=gnu
ENV RT_MACHINE=linux.gnu

WORKDIR $HOME/ufs-weather-model/tests
RUN ./utest -n $test_name -c $build_case -z
RUN ./utest -n $test_name -c $build_case -z && tar -cvzf fv3.tar.gz fv3_*.exe modules.fv3_*
CMD ./utest -n $test_name -c $test_case -x
29 changes: 21 additions & 8 deletions tests/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,30 @@ fi

if [ $BUILD = "true" ]; then

sudo docker build --build-arg test_name=$TEST_NAME \
--build-arg build_case=$BUILD_CASE \
--no-cache \
--squash --compress \
-f Dockerfile -t ${IMG_NAME} ../..
exit $?
docker build --build-arg test_name=$TEST_NAME \
--build-arg build_case=$BUILD_CASE \
--no-cache \
--squash --compress \
-f Dockerfile -t ${IMG_NAME} ../..

docker create --name tmp-container ${IMG_NAME}
docker cp -a tmp-container:/home/builder/ufs-weather-model/tests/fv3.tar.gz ~
docker rm tmp-container

elif [ $RUN == "true" ]; then

docker run -d --rm -v DataVolume:/tmp minsukjinoaa/fv3-input-data:input-data-20210115
docker run -d -e test_case=${TEST_CASE} --shm-size=512m -v DataVolume:/home/builder/data/NEMSfv3gfs/input-data-20210115 --name my-container ${IMG_NAME}
docker run -d --rm -v DataVolume:/tmp minsukjinoaa/input-data:20210428

docker create -u builder -e "CI_TEST=true" -e "USER=builder" \
-e "RT_MACHINE=linux.gnu" -e "RT_COMPILER=gnu" \
-w "/home/builder/ufs-weather-model/tests" \
-v DataVolume:/home/builder/data/NEMSfv3gfs/input-data-20210428 \
--shm-size=512m --name my-container noaaemc/ubuntu-hpc:v1.3b \
/bin/bash -c "./utest -n ${TEST_NAME} -c ${TEST_CASE} -x"

cd $GITHUB_WORKSPACE
docker cp . my-container:/home/builder/ufs-weather-model
docker start my-container

echo 'cache,rss,shmem' >memory_stat
sleep 3
Expand Down
2 changes: 2 additions & 0 deletions tests/ci/ci.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
fv3_control
thr mpi dcp rst bit dbg
fv3_regional_control
dcp thr
2 changes: 1 addition & 1 deletion tests/ci/repo_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ datm[branch]='develop'
datm[dir]='DATM'

cdeps[repo]='https://github.com/NOAA-EMC/CDEPS'
cdeps[branch]='emc/develop'
cdeps[branch]='develop'
cdeps[dir]='CDEPS-interface/CDEPS'

cmake[repo]='https://github.com/NOAA-EMC/CMakeModules'
Expand Down
12 changes: 8 additions & 4 deletions tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,19 @@ elif [[ $MACHINE_ID = hera.* ]]; then

elif [[ $MACHINE_ID = linux.* ]]; then

if [[ $CI_TEST = true ]]; then
TASKS_dflt=42 ; TPN_dflt=48 ; INPES_dflt=3 ; JNPES_dflt=2
else
TASKS_dflt=150 ; TPN_dflt=40 ; INPES_dflt=3 ; JNPES_dflt=8
fi
TASKS_thrd=84 ; TPN_thrd=20 ; INPES_thrd=3 ; JNPES_thrd=4
TASKS_stretch=48 ; TPN_stretch=12 ; INPES_stretch=2 ; JNPES_stretch=4
TASKS_strnest=96 ; TPN_strnest=12 ; INPES_strnest=2 ; JNPES_strnest=4

TASKS_cpl_dflt=192; TPN_cpl_dflt=40; INPES_cpl_dflt=3; JNPES_cpl_dflt=8
THRD_cpl_dflt=1; WPG_cpl_dflt=6; MPB_cpl_dflt="0 143"; APB_cpl_dflt="0 149"
OPB_cpl_dflt="150 179"; IPB_cpl_dflt="180 191"

TASKS_cpl_thrd=120; TPN_cpl_thrd=40; INPES_cpl_thrd=3; JNPES_cpl_thrd=4
THRD_cpl_thrd=2; WPG_cpl_thrd=6; MPB_cpl_thrd="0 77"; APB_cpl_thrd="0 77"
OPB_cpl_thrd="78 107"; IPB_cpl_thrd="108 119"

elif [[ $MACHINE_ID = jet.* ]]; then

TASKS_dflt=150 ; TPN_dflt=24 ; INPES_dflt=3 ; JNPES_dflt=8
Expand Down
24 changes: 15 additions & 9 deletions tests/fv3_conf/cpld_control_run.IN
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ if [[ $CPLWAV == .T. ]]; then
cp @[INPUTDATA_ROOT_WW3]/mod_def.* .
fi

UNIT_TEST=${UNIT_TEST:-false}
SUFFIX=${RT_SUFFIX}
# No restart
if [ $WARM_START = .F. ]; then
# ICs
Expand All @@ -65,14 +67,18 @@ if [ $WARM_START = .F. ]; then

# Restart
else
if [[ ${UNIT_TEST} == true ]]; then
SUFFIX=${BL_SUFFIX}
fi

# Restart files
cp -r ../${DEP_RUN}${RT_SUFFIX}/RESTART/${RESTART_FILE_PREFIX}.* ./INPUT
cp -r ../${DEP_RUN}${SUFFIX}/RESTART/${RESTART_FILE_PREFIX}.* ./INPUT
rm -f INPUT/fv_core.res.*
rm -f INPUT/fv_srf_wnd.res.*
rm -f INPUT/fv_tracer.res.*
rm -f INPUT/phy_data.*
rm -f INPUT/sfc_data.*
for RFILE in ../${DEP_RUN}${RT_SUFFIX}/RESTART/${RESTART_FILE_PREFIX}.*; do
for RFILE in ../${DEP_RUN}${SUFFIX}/RESTART/${RESTART_FILE_PREFIX}.*; do
[ -e $RFILE ] || exit 1
RFILE_OLD=$(basename $RFILE)
RFILE_NEW="${RFILE_OLD//${RESTART_FILE_PREFIX}./}"
Expand All @@ -81,21 +87,21 @@ else

#if not mx025, then mom6 restart is a single file
if [[ $OCNRES == '025' ]]; then
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00.nc ./INPUT/MOM.res.nc
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00_1.nc ./INPUT/MOM.res_1.nc
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00_2.nc ./INPUT/MOM.res_2.nc
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00_3.nc ./INPUT/MOM.res_3.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00.nc ./INPUT/MOM.res.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00_1.nc ./INPUT/MOM.res_1.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00_2.nc ./INPUT/MOM.res_2.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00_3.nc ./INPUT/MOM.res_3.nc
else
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00.nc ./INPUT/MOM.res.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/MOM.res.${RESTART_FILE_SUFFIX_HRS}-00-00.nc ./INPUT/MOM.res.nc
fi

# CMEPS restart and pointer files
RFILE="ufs.cpld.cpl.r.${RESTART_FILE_SUFFIX_SECS}.nc"
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/${RFILE} .
cp ../${DEP_RUN}${SUFFIX}/RESTART/${RFILE} .
ls -1 ${RFILE}>rpointer.cpl

# CICE restart and pointer files
RFILE="iced.${RESTART_FILE_SUFFIX_SECS}.nc"
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/${RFILE} ./INPUT
cp ../${DEP_RUN}${SUFFIX}/RESTART/${RFILE} ./INPUT
ls -1 "./INPUT/"${RFILE}>ice.restart_file
fi
2 changes: 1 addition & 1 deletion tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ if [[ $SCHEDULER = 'none' ]]; then

ulimit -s unlimited
if [[ $CI_TEST = 'true' ]]; then
eval mpiexec -n ${TASKS} ${MPI_PROC_BIND} ./fv3.exe >out 2> >(tee err >&3)
eval ${OMP_ENV} mpiexec -n ${TASKS} ${MPI_PROC_BIND} ./fv3.exe >out 2> >(tee err >&3)
else
mpiexec -n ${TASKS} ./fv3.exe >out 2> >(tee err >&3)
fi
Expand Down
Loading