Skip to content

Commit

Permalink
Remove setting ecflow labels from submit_and_wait. Let's not complica…
Browse files Browse the repository at this point in the history
…te things
  • Loading branch information
DusanJovic-NOAA committed Aug 6, 2024
1 parent 05164c5 commit 3ff2c92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
14 changes: 0 additions & 14 deletions tests/rt_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ submit_and_wait() {

local -r job_card=$1

ROCOTO=${ROCOTO:-false}
ECFLOW=${ECFLOW:-false}

case ${SCHEDULER} in
pbs)
qsubout=$( qsub "${job_card}" )
Expand All @@ -150,7 +147,6 @@ submit_and_wait() {
local count=0
local job_running=''
echo "rt_utils.sh: Job is waiting to enter the queue..."
[[ ${ECFLOW:-false} == true ]] && ecflow_client --label=job_status "Waiting to enter the queue"
until [[ ${job_running} == 'true' ]]
do
case ${SCHEDULER} in
Expand All @@ -177,10 +173,6 @@ submit_and_wait() {
if [[ ${count} -eq 13 ]]; then echo "No job in queue after one minute, exiting..."; exit 2; fi
done
echo "rt_utils.sh Job (${jobid}) is now in the queue."
if [[ ${ECFLOW:-false} == true ]]; then
ecflow_client --label=job_id "${jobid}"
ecflow_client --label=job_status "Submitted"
fi

# wait for the job to finish and compare results
local n=1
Expand Down Expand Up @@ -247,7 +239,6 @@ submit_and_wait() {
F|TO|CA|FAILED|TIMEOUT|CANCELLED)
echo "rt_utils.sh: !!!!!!!!!!JOB TERMINATED!!!!!!!!!! status=${status}"
job_running=false #Trip the loop to end with these status flags
[[ ${ECFLOW:-false} == true ]] && ecflow_client --label=job_status "Failed"
interrupt_job
exit 1
;;
Expand All @@ -265,7 +256,6 @@ submit_and_wait() {
esac

echo "${n} min. ${SCHEDULER^} Job ${jobid} Status: ${status_label} (${status})"
[[ ${ECFLOW:-false} == true ]] && ecflow_client --label=job_status "${status_label}"

(( n=n+1 ))
sleep 60 & wait $!
Expand Down Expand Up @@ -475,8 +465,6 @@ EOF
{
echo " task compile_${COMPILE_ID}"
echo " label build_options '${MAKE_OPT}'"
echo " label job_id ''"
echo " label job_status ''"
echo " inlimit max_builds"
} >> "${ECFLOW_RUN}/${ECFLOW_SUITE}.def"
}
Expand All @@ -494,8 +482,6 @@ ${PATHRT}/run_test.sh "${PATHRT}" "${RUNDIR_ROOT}" "${TEST_NAME}" "${TEST_ID}" "
EOF
{
echo " task ${TEST_ID}${RT_SUFFIX}"
echo " label job_id ''"
echo " label job_status ''"
echo " inlimit max_jobs"
} >> "${ECFLOW_RUN}/${ECFLOW_SUITE}.def"
if [[ ${DEP_RUN} != '' ]]; then
Expand Down
12 changes: 3 additions & 9 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -508,15 +508,9 @@ if [[ ${skip_check_results} == false ]]; then
echo
} >> "${RT_LOG}"

TRIES=''
if [[ ${ECFLOW} == true ]]; then
if [[ ${ECF_TRYNO} -gt 1 ]]; then
TRIES=" Tries: ${ECF_TRYNO}"
fi
fi
echo "Test ${TEST_ID} ${test_status}${TRIES}" >> "${RT_LOG}"
echo >> "${RT_LOG}"
echo "Test ${TEST_ID} ${test_status}${TRIES}"
echo "Test ${TEST_ID} ${test_status}" >> "${RT_LOG}"
echo >> "${RT_LOG}"
echo "Test ${TEST_ID} ${test_status}"
echo

if [[ ${test_status} = 'FAIL' ]]; then
Expand Down

0 comments on commit 3ff2c92

Please sign in to comment.