diff --git a/jobs/JGLOBAL_STAGE_IC b/jobs/JGLOBAL_STAGE_IC index b8126f8efe..c25f0b66d9 100755 --- a/jobs/JGLOBAL_STAGE_IC +++ b/jobs/JGLOBAL_STAGE_IC @@ -1,7 +1,15 @@ #! /usr/bin/env bash +set -x +echo "Beginning of JGLOBAL_STAGE_IC" +env source "${HOMEgfs}/ush/preamble.sh" +echo "After preamble" +set -x +env source "${HOMEgfs}/ush/jjob_header.sh" -e "stage_ic" -c "base stage_ic" +echo "After jjob_header" +env # Execute staging "${SCRgfs}/exglobal_stage_ic.py" diff --git a/jobs/rocoto/stage_ic.sh b/jobs/rocoto/stage_ic.sh index 5e7b3395d2..9c8dd2dd57 100755 --- a/jobs/rocoto/stage_ic.sh +++ b/jobs/rocoto/stage_ic.sh @@ -1,7 +1,9 @@ #! /usr/bin/env bash +set -x +echo "Starting env" +env source "${HOMEgfs}/ush/preamble.sh" - # Source FV3GFS workflow modules . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" status=$? @@ -10,6 +12,7 @@ status=$? export job="stage_ic" export jobid="${job}.$$" +env # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_STAGE_IC" status=$? diff --git a/ush/detect_machine.sh b/ush/detect_machine.sh index 8ad217140a..2d5e2c45c1 100755 --- a/ush/detect_machine.sh +++ b/ush/detect_machine.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -x # The authoritative copy of this script lives in the ufs-weather-model at: # https://github.com/ufs-community/ufs-weather-model/blob/develop/tests/detect_machine.sh diff --git a/ush/jjob_header.sh b/ush/jjob_header.sh index dc75437f1a..7ac647c7d7 100755 --- a/ush/jjob_header.sh +++ b/ush/jjob_header.sh @@ -39,6 +39,7 @@ # [default: "YES"] # - $pid : Override the default process id # [default: $$] +set -x OPTIND=1 while getopts "c:e:" option; do diff --git a/ush/load_fv3gfs_modules.sh b/ush/load_fv3gfs_modules.sh index ff6f64cece..253619f1a3 100755 --- a/ush/load_fv3gfs_modules.sh +++ b/ush/load_fv3gfs_modules.sh @@ -1,17 +1,21 @@ #! /usr/bin/env bash ############################################################### -if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then +if [[ "YES" == "NO" ]]; then echo "Loading modules quietly..." set +x fi +# Just to be sure +set -x # Setup runtime environment by loading modules ulimit_s=$( ulimit -S -s ) # Find module command and purge: source "${HOMEgfs}/ush/detect_machine.sh" +set -x source "${HOMEgfs}/ush/module-setup.sh" +set -x # Source versions file for runtime source "${HOMEgfs}/versions/run.ver" diff --git a/ush/module-setup.sh b/ush/module-setup.sh index 2429963d70..5c6e4bd78d 100755 --- a/ush/module-setup.sh +++ b/ush/module-setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -u +set -ux source "${HOMEgfs}/ush/detect_machine.sh"