Skip to content

Commit

Permalink
Merged ufs-community develop into ufs_fire_cpl
Browse files Browse the repository at this point in the history
  • Loading branch information
masih-e committed Jul 17, 2024
2 parents 961c289 + 73424e2 commit 4529828
Show file tree
Hide file tree
Showing 79 changed files with 2,827 additions and 2,628 deletions.
2 changes: 1 addition & 1 deletion FV3
4 changes: 1 addition & 3 deletions doc/UsersGuide/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via sphinx
docutils==0.20.1
# via
# pybtex-docutils
Expand Down Expand Up @@ -74,5 +72,5 @@ sphinxcontrib-qthelp==1.0.7
# via sphinx
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
urllib3==2.2.1
urllib3==2.2.2
# via requests
6 changes: 3 additions & 3 deletions modulefiles/ufs_orion.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ help([[
loads UFS Model prerequisites for Orion/Intel
]])

prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/unified-env-rocky9/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2"
stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0"
load(pathJoin("stack-intel", stack_intel_ver))

stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1"
stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0"
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))

cmake_ver=os.getenv("cmake_ver") or "3.23.1"
Expand Down
2 changes: 1 addition & 1 deletion tests/bl_date.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export BL_DATE=20240614
export BL_DATE=20240624
2 changes: 1 addition & 1 deletion tests/ci/Jenkinsfile.combined
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def generateStage(nodeLabel) {
GIT_OWNER=$(echo $GIT_URL | cut -d '/' -f4)
GIT_REPO_NAME=$(echo $GIT_URL | cut -d '/' -f5 | cut -d '.' -f1)

curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels -d '{"labels":["$machine-.*RT|$machine-.*BL"]}'
curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels/{$machine-RT,$machine-BL}
'''
s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'noaa-epic-prod-jenkins-artifacts', excludedFile: '', flatten: true, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: "**/*tgz*", storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 'main', userMetadata: []
currentBuild.result = 'FAILURE'
Expand Down
107 changes: 107 additions & 0 deletions tests/ci/Jenkinsfile.ort
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
pipeline {
agent none
stages {
stage('Run ORTs') {
agent {
label 'built-in'
}
steps {
script {
for (label in pullRequest.labels) {
if ((label.matches("orion"))) {
env.CHOICE_NODE='orion'
}
else if ((label.matches("hera"))) {
env.CHOICE_NODE='hera'
}
else if ((label.matches("hercules"))) {
env.CHOICE_NODE='hercules'
}
else if ((label.matches("jet"))) {
env.CHOICE_NODE='jet'
}
else {
env.CHOICE_NODE='none'
}
}
// Why do I need another if..block, because it just works this way.

if (CHOICE_NODE == 'orion') {
echo "Starting up orion ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."

}
else if (CHOICE_NODE == 'jet') {
echo "Starting up jet ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
}
else if (CHOICE_NODE == 'hercules') {
echo "Starting up hera ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
}
else if (CHOICE_NODE == 'hera') {
echo "Starting up hera ${CHOICE_NODE}...this might take 5-10 minutes...please be patient."
}
else {
echo "${CHOICE_NODE} is NOT a platform, moving on..."
}
}
}
}
stage('Run ORT on Hera') {
agent {
label "hera"
}
environment {
ACCNR = 'epic'
NODE_PATH = '/scratch2/NAGAPE/epic/role.epic/'
}
steps {

cleanWs()
checkout scm
sh '''
git submodule update --init --recursive
cd tests/fv3_conf
sed 's/#SBATCH --time=.*/#SBATCH --time=02:00:00/g' -i fv3_slurm.IN_hera
cd ..
export machine=${NODE_NAME}
export PATH=$PATH:~/bin
echo $CHANGE_ID
export SSH_ORIGIN=$(curl --silent https://api.github.com/repos/ufs-community/ufs-weather-model/pulls/$CHANGE_ID | jq -r '.head.repo.ssh_url')
export FORK_BRANCH=$(curl --silent https://api.github.com/repos/ufs-community/ufs-weather-model/pulls/$CHANGE_ID | jq -r '.head.ref')
pwd
sed "s|intel|gnu|g" -i opnReqTest
export ACCNR=epic
./opnReqTest -n regional_control -a ${ACCNR} -c bit,dcp,thr
cd logs/
cp OpnReqTests_regional_control_hera.log /scratch2/NAGAPE/epic/role.epic/jenkins/workspace
cd ..
./opnReqTest -n cpld_control_nowave_noaero_p8 -a ${ACCNR} -c dbg,rst
cd logs/
cp OpnReqTests_cpld_control_nowave_noaero_p8_hera.log /scratch2/NAGAPE/epic/role.epic/jenkins/workspace
cd ..
./opnReqTest -n control_p8 -a ${ACCNR} -c std,dbg,bit,mpi,rst,thr,dcp
cd logs/
cp OpnReqTests_control_p8_hera.log /scratch2/NAGAPE/epic/role.epic/jenkins/workspace
git remote -v
git fetch --no-recurse-submodules origin
git reset FETCH_HEAD --hard
cd .. && cd .. && cd ..
cp OpnReqTests_control_p8_hera.log $WORKSPACE/tests/logs/
cp OpnReqTests_regional_control_hera.log $WORKSPACE/tests/logs/
cp OpnReqTests_cpld_control_nowave_noaero_p8_hera.log $WORKSPACE/tests/logs/
cd $WORKSPACE/tests/
git config user.email "[email protected]"
git config user.name "epic-cicd-jenkins"
echo "Testing concluded...removing labels for $machine from $GIT_URL"

export machine_name_logs=$(echo $machine | awk '{ print tolower($1) }')
git remote -v | grep -w sshorigin > /dev/null 2>&1 && git remote remove sshorigin > /dev/null 2>&1
git remote add sshorigin $SSH_ORIGIN > /dev/null 2>&1
git add logs/OpnReqTests_control_p8_hera.log logs/OpnReqTests_regional_control_hera.log logs/OpnReqTests_cpld_control_nowave_noaero_p8_hera.log
git commit -m "ORT Jobs Completed.\n\n\n on-behalf-of @ufs-community <[email protected]>"
git pull sshorigin $FORK_BRANCH
git push sshorigin HEAD:$FORK_BRANCH
'''
}
}
}
}
7 changes: 5 additions & 2 deletions tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ export DO_UGWP_V1_W_GSLDRAG=.false.
export DO_UGWP_V0_OROG_ONLY=.false.
export DO_GSL_DRAG_LS_BL=.false.
export DO_GSL_DRAG_SS=.true.
export DO_GWD_OPT_PSL=.false.
export PSL_GWD_DX_FACTOR=6.0
export DO_GSL_DRAG_TOFD=.false.
export DO_UGWP_V1=.false.
export DO_UGWP_V1_OROG_ONLY=.false.
Expand Down Expand Up @@ -1064,6 +1066,7 @@ export_cmeps() {
export RESTART_N=${FHMAX}
export CMEPS_RESTART_DIR=./RESTART/
export cap_dbug_flag=0
export WRITE_ENDOFRUN_RESTART=.false.
# MOM6 attributes
export use_coldstart=false
export use_mommesh=true
Expand Down Expand Up @@ -1142,7 +1145,7 @@ export_mom6
# Set WW3 component defaults
export_ww3

# Set CMEPS component defauls
# Set CMEPS component defaults
export_cmeps

# FV3 defaults
Expand Down Expand Up @@ -1324,7 +1327,7 @@ export_datm_cdeps ()
export MOM6_USE_WAVES=False
export WW3_DOMAIN=''

# Set CMEPS component defauls
# Set CMEPS component defaults
export_cmeps
# default configure
export UFS_CONFIGURE=ufs.configure.datm_cdeps.IN
Expand Down
3 changes: 2 additions & 1 deletion tests/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ elif [[ -d /scratch1 ]]; then
MACHINE_ID=hera
elif [[ -d /work ]]; then
# We are on MSU Orion or Hercules
if [[ -d /apps/other ]]; then
mount=$(findmnt -n -o SOURCE /home)
if [[ ${mount} =~ "hercules" ]]; then
# We are on Hercules
MACHINE_ID=hercules
else
Expand Down
2 changes: 1 addition & 1 deletion tests/fv3_conf/control_run.IN
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ $WARM_START = .false. ]; then
elif [ "$V2_SFC_FILE" = "true" ]; then
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_v2_sfc/* ./INPUT/.
else
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127/* ./INPUT/.
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_gfsv17/* ./INPUT/.
fi
else
mkdir INPUT RESTART
Expand Down
4 changes: 2 additions & 2 deletions tests/fv3_conf/cpld_control_run.IN
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ if [ $IAER = 1011 ]; then
fi

cp @[INPUTDATA_ROOT]/FV3_input_data/ugwp_c384_tau.nc ./ugwp_limb_tau.nc
cp @[INPUTDATA_ROOT]/${FV3_DIR}/INPUT_L127/oro_data_ls* ./INPUT
cp @[INPUTDATA_ROOT]/${FV3_DIR}/INPUT_L127/oro_data_ss* ./INPUT
cp @[INPUTDATA_ROOT]/${FV3_DIR}/INPUT_L127_gfsv17/oro_data_ls* ./INPUT
cp @[INPUTDATA_ROOT]/${FV3_DIR}/INPUT_L127_gfsv17/oro_data_ss* ./INPUT

if [ $IMP_PHYSICS = 8 ]; then
cp @[INPUTDATA_ROOT]/FV3_fix/CCN_ACTIVATE.BIN CCN_ACTIVATE.BIN
Expand Down
Loading

0 comments on commit 4529828

Please sign in to comment.