-
Notifications
You must be signed in to change notification settings - Fork 4
Add placeholders for ecflow suite and job cards #210
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
Open
CoryMartin-NOAA
wants to merge
17
commits into
main
Choose a base branch
from
feature/ecflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3175cee
commit first pass at a suite def file
CoryMartin-NOAA 0b3a2d8
start to some ecflow stuff
CoryMartin-NOAA 9918d80
placeholdler ecflow job cards
CoryMartin-NOAA 69752af
update resources
CoryMartin-NOAA 2f99e85
add EOL
CoryMartin-NOAA 9632da1
some changes; still does not work because of wxflow
33668a7
make some changes
CoryMartin-NOAA 2fb5984
Merge branch 'feature/ecflow' of https://github.com/NOAA-EMC/obsForge…
CoryMartin-NOAA 94efd84
use versions
CoryMartin-NOAA 3c3177b
Use build.ver versions
CoryMartin-NOAA 9ec2575
skip download test data
CoryMartin-NOAA 2d7a937
version changes
CoryMartin-NOAA 7221e6a
skip build tests because of missing nccmp on wcoss2
CoryMartin-NOAA aa0484e
Default to C++17
CoryMartin-NOAA 97d00d9
update hashes thanks to copilot
CoryMartin-NOAA 5ea9735
some changes
15273aa
Merge origin/main into feature/ecflow to resolve merge conflicts
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| suite obsforge_v1 | ||
| family primary | ||
| edit PACKAGEHOME '/lfs/h2/emc/da/noscrub/cory.r.martin/obsforge/git/release/obsforge.v1.0.0' | ||
| edit OUTPUTDIR '/lfs/h2/emc/ptmp/cory.r.martin/obsforge/output' | ||
| edit obsforge_ver 'v1.0.0' | ||
| edit QUEUE 'dev' | ||
| edit QUEUE_ARCH 'dev_transfer' | ||
| edit PROJENVIR 'DEV' | ||
| edit MACHINE_SITE 'development' | ||
| edit ENVIR 'para' | ||
| edit EXPDIR '%PACKAGEHOME%/parm/config/obsforge' | ||
| edit DATAROOT '/lfs/h2/emc/ptmp/cory.r.martin/obsforge/dataroot' | ||
| edit DBNLOGDIR '/lfs/h2/emc/ptmp/cory.r.martin/obsforge/com/dbnlog' | ||
| edit ECF_INCLUDE '/lfs/h2/emc/da/noscrub/cory.r.martin/obsforge/git/release/obsforge.v1.0.0/ecf/include' | ||
| family 00 | ||
| edit CYC '00' | ||
| family obsforge | ||
| family gfs | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/gfs' | ||
| edit JTYP 'gfs' | ||
| family marine | ||
| task jobsforge_gfs_marine_dump | ||
| trigger :TIME >= 0237 and :TIME <= 0837 | ||
| task jobsforge_gfs_marine_bufr_dump | ||
| trigger :TIME >= 0256 and :TIME <= 0837 | ||
| # trigger: /prod/primary/00/obsproc/v1.2/gfs/atmos/prep/jobsproc_gfs_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gfs | ||
| family gdas | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/scripts/gdas' | ||
| edit JTYP 'gdas' | ||
| family marine | ||
| task jobsforge_gdas_marine_dump | ||
| trigger :TIME >= 0540 and :TIME <= 1140 | ||
| task jobsforge_gdas_marine_bufr_dump | ||
| trigger :TIME >= 0559 and :TIME <= 1140 | ||
| # trigger: /prod/primary/00/obsproc/v1.2/gdas/atmos/prep/jobsproc_gdas_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gdas | ||
| endfamily # obsforge | ||
| endfamily # 00 | ||
| family 06 | ||
| edit CYC '06' | ||
| family obsforge | ||
| family gfs | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/scripts/gfs' | ||
| edit JTYP 'gfs' | ||
| family marine | ||
| task jobsforge_gfs_marine_dump | ||
| trigger :TIME >= 0837 and :TIME <= 1437 | ||
| task jobsforge_gfs_marine_bufr_dump | ||
| trigger :TIME >= 0856 and :TIME <= 1437 | ||
| # trigger: /prod/primary/06/obsproc/v1.2/gfs/atmos/prep/jobsproc_gfs_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gfs | ||
| family gdas | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/scripts/gdas' | ||
| edit JTYP 'gdas' | ||
| family marine | ||
| task jobsforge_gdas_marine_dump | ||
| trigger :TIME >= 1140 and :TIME <= 1740 | ||
| task jobsforge_gdas_marine_bufr_dump | ||
| trigger :TIME >= 1159 and :TIME <= 1740 | ||
| # trigger: /prod/primary/06/obsproc/v1.2/gdas/atmos/prep/jobsproc_gdas_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gdas | ||
| endfamily # obsforge | ||
| endfamily # 06 | ||
| family 12 | ||
| edit CYC '12' | ||
| family obsforge | ||
| family gfs | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/scripts/gfs' | ||
| edit JTYP 'gfs' | ||
| family marine | ||
| task jobsforge_gfs_marine_dump | ||
| trigger :TIME >= 1437 and :TIME <= 2037 | ||
| task jobsforge_gfs_marine_bufr_dump | ||
| trigger :TIME >= 1456 and :TIME <= 2037 | ||
| # trigger: /prod/primary/12/obsproc/v1.2/gfs/atmos/prep/jobsproc_gfs_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gfs | ||
| family gdas | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/scripts/gdas' | ||
| edit JTYP 'gdas' | ||
| family marine | ||
| task jobsforge_gdas_marine_dump | ||
| trigger :TIME >= 1740 and :TIME <= 2340 | ||
| task jobsforge_gdas_marine_bufr_dump | ||
| trigger :TIME >= 1759 and :TIME <= 2340 | ||
| # trigger: /prod/primary/12/obsproc/v1.2/gdas/atmos/prep/jobsproc_gdas_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gdas | ||
| endfamily # obsforge | ||
| endfamily # 12 | ||
| family 18 | ||
| edit CYC '18' | ||
| family obsforge | ||
| family gfs | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/scripts/gfs' | ||
| edit JTYP 'gfs' | ||
| family marine | ||
| task jobsforge_gfs_marine_dump | ||
| trigger :TIME >= 2037 and :TIME <= 0237 | ||
| task jobsforge_gfs_marine_bufr_dump | ||
| trigger :TIME >= 2056 and :TIME <= 0237 | ||
| # trigger: /prod/primary/18/obsproc/v1.2/gfs/atmos/prep/jobsproc_gfs_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gfs | ||
| family gdas | ||
| edit ECF_FILES '%PACKAGEHOME%/ecf/scripts/gdas' | ||
| edit JTYP 'gdas' | ||
| family marine | ||
| task jobsforge_gdas_marine_dump | ||
| trigger :TIME >= 2340 and :TIME <= 0540 | ||
| task jobsforge_gdas_marine_bufr_dump | ||
| trigger :TIME >= 2359 and :TIME <= 0540 | ||
| # trigger: /prod/primary/18/obsproc/v1.2/gdas/atmos/prep/jobsproc_gdas_atmos_dump == complete | ||
| endfamily # marine | ||
| endfamily # gdas | ||
| endfamily # obsforge | ||
| endfamily # 18 | ||
| endfamily # primary | ||
| endsuite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # envir-p1.h | ||
| export job=${job:-$PBS_JOBNAME} | ||
| export jobid=${jobid:-$job.$PBS_JOBID} | ||
|
|
||
| if [[ "$envir" == prod && "$SENDDBN" == YES ]]; then | ||
| export eval=%EVAL:NO% | ||
| if [ $eval == YES ]; then export SIPHONROOT=${UTILROOT}/para_dbn | ||
| else export SIPHONROOT=/lfs/h1/ops/prod/dbnet_siphon | ||
| fi | ||
| if [ "$PARATEST" == YES ]; then export SIPHONROOT=${UTILROOT}/fakedbn; export NODBNFCHK=YES; fi | ||
| else | ||
| export SIPHONROOT=${UTILROOT}/fakedbn | ||
| fi | ||
|
|
||
| export DBNROOT=$SIPHONROOT | ||
|
|
||
| if [[ ! " prod para test " =~ " ${envir} " && " ops.prod ops.para " =~ " $(whoami) " ]]; then err_exit "ENVIR must be prod, para, or test [envir-p1.h]"; fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| date | ||
| hostname | ||
| set -xe # print commands as they are executed and enable signal trapping | ||
|
|
||
| export PS4='+ $SECONDS + ' | ||
|
|
||
| # Variables needed for communication with ecFlow | ||
| export ECF_NAME=%ECF_NAME% | ||
| export ECF_HOST=%ECF_LOGHOST% | ||
| export ECF_PORT=%ECF_PORT% | ||
| export ECF_PASS=%ECF_PASS% | ||
| export ECF_TRYNO=%ECF_TRYNO% | ||
| export ECF_RID=${ECF_RID:-${PBS_JOBID:-$(hostname -s).$$}} | ||
| export ECF_JOB=%ECF_JOB% | ||
| export ECF_JOBOUT=%ECF_JOBOUT% | ||
| export ecflow_ver=%ecflow_ver% | ||
|
|
||
| if [ -d /apps/ops/prod ]; then # On WCOSS2 | ||
| set +x | ||
| echo "Running 'module reset'" | ||
| module reset | ||
| set -x | ||
| fi | ||
|
|
||
| modelhome=%PACKAGEHOME:% | ||
| eval "export HOME${model:?'model undefined'}=$modelhome" | ||
| eval "versionfile=\$HOME${model}/versions/run.ver" | ||
| if [ -f "$versionfile" ]; then . $versionfile ; fi | ||
| modelver=$(echo ${modelhome} | perl -pe "s:.*?/${model}\.(v[\d\.a-z]+).*:\1:") | ||
| eval "export ${model}_ver=$modelver" | ||
|
|
||
| export envir=%ENVIR% | ||
| export MACHINE_SITE=%MACHINE_SITE% | ||
| export RUN_ENVIR=${RUN_ENVIR:-nco} | ||
| export SENDECF=${SENDECF:-YES} | ||
| export SENDCOM=${SENDCOM:-YES} | ||
| if [ -n "%PDY:%" ]; then export PDY=${PDY:-%PDY:%}; fi | ||
| if [ -n "%PARATEST:%" ]; then export PARATEST=${PARATEST:-%PARATEST:%}; fi | ||
| if [ -n "%COMPATH:%" ]; then export COMPATH=${COMPATH:-%COMPATH:%}; fi | ||
| if [ -n "%MAILTO:%" ]; then export MAILTO=${MAILTO:-%MAILTO:%}; fi | ||
| if [ -n "%DBNLOGDIR:%" ]; then export DBNLOG=YES; fi | ||
| export KEEPDATA=${KEEPDATA:-%KEEPDATA:NO%} | ||
| export SENDDBN=${SENDDBN:-%SENDDBN:YES%} | ||
| export SENDDBN_NTC=${SENDDBN_NTC:-%SENDDBN_NTC:YES%} | ||
|
|
||
| if [ -d /apps/ops/prod ]; then # On WCOSS2 | ||
| set +x | ||
| if [ $(whoami) == ops.para ]; then | ||
| module use -a /apps/ops/para/nco/modulefiles/core | ||
| fi | ||
| echo "Running module load ecflow/$ecflow_ver" | ||
| module load ecflow/$ecflow_ver | ||
| echo "ecflow module location: $(module display ecflow |& head -2 | tail -1 | sed 's/:$//')" | ||
| set -x | ||
| . ${ECF_ROOT}/versions/run.ver | ||
| set +x | ||
| module load prod_util/${prod_util_ver} | ||
| module load prod_envir/${prod_envir_ver} | ||
| echo "Listing modules from head.h:" | ||
| module list | ||
| set -x | ||
| if [[ ! " ops.prod ops.para " =~ " $(whoami) " ]]; then | ||
| echo "Allow over-riding defaults for developers" | ||
| if [ -n "%COMROOT:%" ]; then export COMROOT="%COMROOT:%"; fi | ||
| if [ -n "%DATAROOT:%" ]; then export DATAROOT="%DATAROOT:%"; fi | ||
| if [ -n "%DCOMROOT:%" ]; then export DCOMROOT="%DCOMROOT:%"; fi | ||
| fi | ||
| fi | ||
|
|
||
| timeout 300 ecflow_client --init=${ECF_RID} | ||
|
|
||
| if [[ " ops.prod ops.para " =~ " $(whoami) " ]]; then | ||
| POST_OUT=${POST_OUT:-/lfs/h1/ops/%ENVIR%/tmp/posts/ecflow_post_in.${ECF_RID}} | ||
| echo 'export ECF_NAME=${ECF_NAME}' > $POST_OUT | ||
| echo 'export ECF_HOST=${ECF_HOST}' >> $POST_OUT | ||
| echo 'export ECF_PORT=${ECF_PORT}' >> $POST_OUT | ||
| echo 'export ECF_PASS=${ECF_PASS}' >> $POST_OUT | ||
| echo 'export ECF_TRYNO=${ECF_TRYNO}' >> $POST_OUT | ||
| echo 'export ECF_RID=${ECF_RID}' >> $POST_OUT | ||
| fi | ||
|
|
||
| # Define error handler | ||
| ERROR() { | ||
| set +ex | ||
| if [ "$1" -eq 0 ]; then | ||
| msg="Killed by signal (likely via qdel)" | ||
| else | ||
| msg="Killed by signal $1" | ||
| fi | ||
| ecflow_client --abort="$msg" | ||
| echo $msg | ||
| if [[ " ops.prod ops.para " =~ " $(whoami) " ]]; then | ||
| echo "# Trap Caught" >>$POST_OUT | ||
| fi | ||
| trap $1; exit $1 | ||
| } | ||
| # Trap all error and exit signals | ||
| trap 'ERROR $?' ERR EXIT | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| timeout 300 ecflow_client --complete # Notify ecFlow of a normal end | ||
| trap 0 # Remove all traps | ||
| exit 0 # End the shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #PBS -S /bin/bash | ||
| #PBS -N jobsforge_gfs_marine_bufr_dump_%CYC% | ||
| #PBS -j oe | ||
| #PBS -q %QUEUE% | ||
| #PBS -A GFS-DEV | ||
| #PBS -l walltime=00:10:00 | ||
| #PBS -l select=1:mpiprocs=1:ompthreads=1:ncpus=1 | ||
| #PBS -l place=vscatter:exclhost | ||
| #PBS -l debug=true | ||
|
|
||
| model=obsforge | ||
| %include <head.h> | ||
| %include <envir-p1.h> | ||
|
|
||
| set -x | ||
|
|
||
| export RUN=%JTYP% | ||
|
|
||
| ############################################################ | ||
| # Load modules | ||
| ############################################################ | ||
| module load prod_util/${prod_util_ver} | ||
| module load intel/${intel_ver} | ||
| module load craype/${craype_ver} | ||
| module load cray-mpich/${cray_mpich_ver} | ||
| module load cray-pals/${cray_pals_ver} | ||
|
|
||
| module load hdf5-D/${hdf5D_ver} | ||
| module load pnetcdf/${pnetcdfD_ver} | ||
| module load netcdf-D/${netcdfD_ver} | ||
| module load boost/${boost_ver} | ||
| module load eigen/${eigen_ver} | ||
| module load eckit/${eckit_ver} | ||
| module load fckit/${fckit_ver} | ||
| module load udunits/${udunits_ver} | ||
| module load python/${python_ver} | ||
| module load ve/gcafs/${ve_obsforge_ver} # TODO: change later | ||
|
|
||
| module list | ||
|
|
||
| ############################################################# | ||
| # environment settings | ||
| ############################################################# | ||
| export cyc=%CYC% | ||
| export cycle=t%CYC%z | ||
|
|
||
| ############################################################ | ||
| # CALL executable job script here | ||
| ############################################################ | ||
| ${HOMEobsforge}/jobs/JOBSFORGE_GDAS_MARINE_BUFR_DUMP | ||
|
|
||
| if [ $? -ne 0 ]; then | ||
| ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT ***" | ||
| ecflow_client --abort | ||
| exit | ||
| fi | ||
|
|
||
| %include <tail.h> | ||
| %manual | ||
|
|
||
| %end | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current obsForge implementation does not distinguish between GDAS and GFS jobs and scripts. Both use the same job/scripts because their processing logic is identical. Do we still need to make them separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Short answer, yes. Just documenting it here that we will want separate jobs for production but can have one job for development mode/in the GitHub main branch.