Skip to content

Commit

Permalink
Updates to the NCO mode (#443)
Browse files Browse the repository at this point in the history
* Add a move step to binaries for NCO purposes.

* Pass COMROOT to setpdy.

* Correct path of post dependency on forecat.

* Remove DATA_SHARED directory.

* Remove symlinks and use unique id for run_fcst instead.

* Remove forecast directory after post is done.

* Use raw workflow_id

* Add templated data paths to wcoss2 that use compath.py.

* Remove cron relaunch from config.nco

* Undo for_ICS/LBCS stuff in NCO mode.

* Remove RESTART symlinking because DATAFCST is accessible to all other tasks.

* Undo cyc addition to COMIN.

* Update devclean.

* Follow symlinks when tarring log files in Jenkins.

* Add memory otpion for get_extrn_ics/lbcs.

* Optimize fundamental test coverage.

* Reduce work load on orion.

* Add minimum memory requirement to all serial tasks.

* Simplify set_predef_grid_params.

* Simplify generate_FV3LAM_wflow.

* Simplify link_fix.

* Simplify to get rid of export_vars from setup.

* Import only necessary variables from environment.

* Use `eval echo` or `eval` depending on situation.

* Add cyc back to COMIN.

* Fix calculate_cost.

* Fix gaea test list.

* Remove a test case from cheyenne that is taking extremely long.

* Reduce memory requirement for serial job to 1G.

* Create COMINaws ics/lbcs staging directory.

* Also symlink gfs ics/lbcs if on disk and in community mode.

* Remove failing tests on orion.

* Exclude gaea from --mem specification.

* Add a run_vx modulefile for orion.

* Add separate fundamental list for cheyenne GNU runs.

* Bug fix for wcoss2 GFS version

* Load prod_util on wcoss2.

* Rename AWSROOT to EXTROOT.

* Remove leftover COMINaws.
  • Loading branch information
danielabdi-noaa authored Nov 5, 2022
1 parent 63897f0 commit 474ab7d
Show file tree
Hide file tree
Showing 46 changed files with 557 additions and 596 deletions.
2 changes: 1 addition & 1 deletion .cicd/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pipeline {
post {
always {
// Archive the test log files
sh 'cd "${SRW_WE2E_EXPERIMENT_BASE_DIR}" && tar --create --gzip --verbose --file "${WORKSPACE}/we2e_test_logs-${SRW_PLATFORM}-${SRW_COMPILER}.tgz" */log.generate_FV3LAM_wflow */log.launch_FV3LAM_wflow */log/*'
sh 'cd "${SRW_WE2E_EXPERIMENT_BASE_DIR}" && tar --create --gzip --verbose --dereference --file "${WORKSPACE}/we2e_test_logs-${SRW_PLATFORM}-${SRW_COMPILER}.tgz" */log.generate_FV3LAM_wflow */log.launch_FV3LAM_wflow */log/*'
// Remove the data sets from the experiments directory to conserve disk space
sh 'find "${SRW_WE2E_EXPERIMENT_BASE_DIR}" -regextype posix-extended -regex "^.*(orog|[0-9]{10})$" -type d | xargs rm -rf'
s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'woc-epic-jenkins-artifacts', excludedFile: '', flatten: false, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: 'we2e_test_results-*-*.txt', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false], [bucket: 'woc-epic-jenkins-artifacts', excludedFile: '', flatten: false, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: 'we2e_test_logs-*-*.tgz', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 'main', userMetadata: []
Expand Down
27 changes: 22 additions & 5 deletions devbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ OPTIONS
does a "make clean"
--build
does a "make" (build only)
--move
move binaries to final location.
--build-dir=BUILD_DIR
build directory
--install-dir=INSTALL_DIR
Expand Down Expand Up @@ -125,6 +127,7 @@ BUILD_RRFS_UTILS="off"
# Make options
CLEAN=false
BUILD=false
MOVE=false
USE_SUB_MODULES=false #change default to true later

# process required arguments
Expand Down Expand Up @@ -155,6 +158,7 @@ while :; do
--continue=?*|--continue=) usage_error "$1 argument ignored." ;;
--clean) CLEAN=true ;;
--build) BUILD=true ;;
--move) MOVE=true ;;
--build-dir=?*) BUILD_DIR=${1#*=} ;;
--build-dir|--build-dir=) usage_error "$1 requires argument." ;;
--install-dir=?*) INSTALL_DIR=${1#*=} ;;
Expand Down Expand Up @@ -398,18 +402,31 @@ module list
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}

printf "... Generate CMAKE configuration ...\n"
cmake ${SRW_DIR} ${CMAKE_SETTINGS} 2>&1 | tee log.cmake

if [ "${CLEAN}" = true ]; then
printf "... Clean executables ...\n"
make ${MAKE_SETTINGS} clean 2>&1 | tee log.make
if [ -f $PWD/Makefile ]; then
printf "... Clean executables ...\n"
make ${MAKE_SETTINGS} clean 2>&1 | tee log.make
fi
elif [ "${BUILD}" = true ]; then
printf "... Generate CMAKE configuration ...\n"
cmake ${SRW_DIR} ${CMAKE_SETTINGS} 2>&1 | tee log.cmake

printf "... Compile executables ...\n"
make ${MAKE_SETTINGS} build 2>&1 | tee log.make
else
printf "... Generate CMAKE configuration ...\n"
cmake ${SRW_DIR} ${CMAKE_SETTINGS} 2>&1 | tee log.cmake

printf "... Compile and install executables ...\n"
make ${MAKE_SETTINGS} install 2>&1 | tee log.make

if [ "${MOVE}" = true ]; then
if [[ ! ${SRW_DIR} -ef ${INSTALL_DIR} ]]; then
printf "... Moving executables to final locations ...\n"
mkdir -p ${SRW_DIR}/${BIN_DIR}
mv ${INSTALL_DIR}/${BIN_DIR}/* ${SRW_DIR}/${BIN_DIR}
fi
fi
fi

exit 0
4 changes: 3 additions & 1 deletion devclean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ elif [ "${CLEAN}" = true ]; then
printf '%s\n' " from the installation directory = ${INSTALL_DIR} "
[[ -d "${BUILD_DIR}" ]] && rm -rf ${BUILD_DIR} && printf '%s\n' "rm -rf ${BUILD_DIR}"
[[ -d "${INSTALL_DIR}/${BIN_DIR}" ]] && ( rm -rf ${INSTALL_DIR}/${BIN_DIR} && printf '%s\n' "rm -rf ${INSTALL_DIR}/${BIN_DIR}" )
[[ -d "${INSTALL_DIR}/lib" ]] && ( rm -rf ${INSTALL_DIR}/share && printf '%s\n' "rm -rf ${INSTALL_DIR}/share" )
[[ -d "${SRW_DIR}/${BIN_DIR}" ]] && ( rm -rf ${SRW_DIR}/${BIN_DIR} && printf '%s\n' "rm -rf ${SRW_DIR}/${BIN_DIR}" )
[[ -d "${INSTALL_DIR}/share" ]] && ( rm -rf ${INSTALL_DIR}/share && printf '%s\n' "rm -rf ${INSTALL_DIR}/share" )
[[ -d "${INSTALL_DIR}/include" ]] && ( rm -rf ${INSTALL_DIR}/include && printf '%s\n' "rm -rf ${INSTALL_DIR}/include" )
[[ -d "${INSTALL_DIR}/lib" ]] && rm -rf ${INSTALL_DIR}/lib && printf '%s\n' "rm -rf ${INSTALL_DIR}/lib"
[[ -d "${INSTALL_DIR}/lib64" ]] && rm -rf ${INSTALL_DIR}/lib && printf '%s\n' "rm -rf ${INSTALL_DIR}/lib64"
[[ -d "${SRW_DIR}/manage_externals/manic" ]] && rm -f ${SRW_DIR}/manage_externals/manic/*.pyc && printf '%s\n' "rm -f ${SRW_DIR}/manage_externals/manic/*.pyc"
echo " "
fi
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_GET_EXTRN_MDL_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ esac
#-----------------------------------------------------------------------
#
if [ $RUN_ENVIR = "nco" ]; then
export EXTRN_MDL_STAGING_DIR="${COMIN}/for_${ICS_OR_LBCS}"
export EXTRN_MDL_STAGING_DIR="${COMINext}"
mkdir_vrfy -p "${EXTRN_MDL_STAGING_DIR}"
else
export EXTRN_MDL_STAGING_DIR="${COMIN}/${EXTRN_MDL_NAME}/for_${ICS_OR_LBCS}"
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_FCST
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
. ${GLOBAL_VAR_DEFNS_FP}
. $USHdir/source_util_funcs.sh
. $USHdir/job_preamble.sh
. $USHdir/job_preamble.sh "TRUE"
#
#-----------------------------------------------------------------------
#
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/orion/run_vx.local.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
load("miniconda_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/get_extrn_ics.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/get_extrn_lbcs.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/get_obs.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/make_grid.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/make_ics.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/make_lbcs.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/make_sfc_climo.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 3 additions & 0 deletions modulefiles/tasks/wcoss2/python_regional_workflow.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load(pathJoin("prod_util", os.getenv("prod_util_ver")))
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/run_fcst.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
3 changes: 1 addition & 2 deletions modulefiles/tasks/wcoss2/run_vx.local.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
load(pathJoin("intel", os.getenv("intel_ver")))
load(pathJoin("python", os.getenv("python_ver")))
load("python_regional_workflow")
Loading

0 comments on commit 474ab7d

Please sign in to comment.