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

Use hpc-stack for Actions CI #299

Closed
wants to merge 7 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Free up disk space
run: |
sudo docker rmi $(sudo docker image ls | grep -E -m1 '<none>' | awk '{ print $3 }')
sudo docker rmi $(sudo docker image ls | awk '/ci-test-base/ { print $3 }')
sudo docker rmi $(sudo docker image ls | awk '/ubuntu-hpc/ { print $3 }')

- name: Prepare artifacts
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
tr_id=$(cat ${GITHUB_EVENT_PATH} | ./json_helper.py get_trigger_id)
tr_br=$(cat ${GITHUB_EVENT_PATH} | ./json_helper.py get_trigger_br)
check=$(cat ${GITHUB_EVENT_PATH} | ./json_helper.py check_skip)
echo "::set-env name=TRIGGER_ID::${tr_id}"
echo "::set-env name=TRIGGER_BR::${tr_br}"
echo "TRIGGER_ID=${tr_id}" >> $GITHUB_ENV
echo "TRIGGER_BR=${tr_br}" >> $GITHUB_ENV
echo "skip-ci: ${check}"
if [[ $check == yes ]]; then
echo "skip-ci is requested"
echo '::set-env name=CURR_JOB::cancelled'
echo "CURR_JOB=cancelled" >> $GITHUB_ENV
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" ${repo}/$tr_id/cancel
else
echo '::set-env name=CURR_JOB::running'
echo "CURR_JOB=running" >> $GITHUB_ENV
fi

- name: Cancel redundant jobs
Expand Down
6 changes: 3 additions & 3 deletions modulefiles/linux.gnu/fv3
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export CMAKE_Fortran_COMPILER=${FC}
##
## use own NetCDF library
##
export NETCDF=${NETCDF:-/usr/local}
export NETCDF=${NETCDF:-/home/builder/opt}

##
## use SIONlib library if installed and environment variable is set
Expand All @@ -41,10 +41,10 @@ fi
##
## use pre-compiled EMSF library for above compiler / MPI combination
##
export ESMFMKFILE=${ESMFMKFILE:-/usr/local/lib/esmf.mk}
export ESMFMKFILE=${ESMFMKFILE:-/home/builder/opt/lib/esmf.mk}

##
## NCEP libraries (need to download and build manually, see doc/README_{UBUNTU,CENTOS,...}.txt and https://github.com/NCAR/NCEPlibs)
##
export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/usr/local/NCEPlibs}
export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/home/builder/opt}
export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR}
11 changes: 5 additions & 6 deletions tests/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
From minsukjinoaa/ci-test-base:ubuntu20.04-v3.5
#From minsukjinoaa/ci-test-base:centos7-v3.5
From noaaemc/ubuntu-hpc:v1

ENV HOME=/home/tester
COPY --chown=tester:tester . $HOME/ufs-weather-model
ENV HOME=/home/builder
COPY --chown=builder:builder . $HOME/ufs-weather-model

USER tester
ENV USER=tester
USER builder
ENV USER=builder
ARG test_name
ARG build_case
ENV test_name=$test_name
Expand Down
2 changes: 1 addition & 1 deletion tests/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if [ $BUILD = "true" ]; then
elif [ $RUN == "true" ]; then

sudo docker run -d --rm -v DataVolume:/tmp minsukjinoaa/fv3-input-data:develop-20200713
sudo docker run -d -e test_case=${TEST_CASE} -v DataVolume:/home/tester/data/NEMSfv3gfs/develop-20200713 --name my-container ${IMG_NAME}
sudo docker run -d -e test_case=${TEST_CASE} -v DataVolume:/home/builder/data/NEMSfv3gfs/develop-20201118 --name my-container ${IMG_NAME}

echo 'cache,rss,shmem' >memory_stat
sleep 3
Expand Down
6 changes: 5 additions & 1 deletion tests/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ export CMAKE_FLAGS
bash -x ${PATHTR}/build.sh

mv ${BUILD_DIR}/ufs_model ${PATHTR}/tests/${BUILD_NAME}.exe
cp ${PATHTR}/modulefiles/${MACHINE_ID}/fv3 ${PATHTR}/tests/modules.${BUILD_NAME}
if [[ "${MAKE_OPT}" == "DEBUG=Y" ]]; then
cp ${PATHTR}/modulefiles/${MACHINE_ID}/fv3_debug ${PATHTR}/tests/modules.${BUILD_NAME}
else
cp ${PATHTR}/modulefiles/${MACHINE_ID}/fv3 ${PATHTR}/tests/modules.${BUILD_NAME}
fi

if [ $clean_after = YES ] ; then
rm -rf ${BUILD_DIR}
Expand Down
2 changes: 1 addition & 1 deletion tests/rt_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ check_results() {
if [[ ${MACHINE_ID} =~ orion || ${MACHINE_ID} =~ hera || ${MACHINE_ID} =~ wcoss_dell_p3 || ${MACHINE_ID} =~ wcoss_cray ]]; then
printf ".......ALT CHECK.." >> ${REGRESSIONTEST_LOG}
printf ".......ALT CHECK.."
d=$( ${PATHRT}/compare_ncfile.py ${RTPWD}/${CNTL_DIR}/$i ${RUNDIR}/$i 2>/dev/null | wc -l )
d=$( ${PATHRT}/compare_ncfile.py ${RTPWD}/${CNTL_DIR}/$i ${RUNDIR}/$i 2>&1 | wc -l )
fi
fi

Expand Down
6 changes: 3 additions & 3 deletions tests/utest
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ elif [[ $MACHINE_ID = linux.* ]]; then
PARTITION=
QUEUE=
COMPILE_QUEUE=
dprefix=/home/tester
dprefix=/home/builder
DISKNM=${dprefix}/data
STMP=${dprefix}/stmp4
PTMP=${dprefix}/stmp2
Expand Down Expand Up @@ -711,9 +711,9 @@ fi
mkdir -p ${STMP}/${USER}
NEW_BASELINE=${STMP}/${USER}/FV3_UT/UNIT_TEST
if [[ $MACHINE_ID == hera.* || $MACHINE_ID == orion.* ]]; then
baseline_location=$DISKNM/NEMSfv3gfs/develop-20200713/${RT_COMPILER^^}
baseline_location=$DISKNM/NEMSfv3gfs/develop-20201118/${RT_COMPILER^^}
else
baseline_location=$DISKNM/NEMSfv3gfs/develop-20200713
baseline_location=$DISKNM/NEMSfv3gfs/develop-20201118
fi
RTPWD=$baseline_location

Expand Down