File tree Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ finished=false
87
87
${runcmd}
88
88
echo " Running builds on compute nodes"
89
89
while [[ " ${finished} " == " false" ]]; do
90
- sleep 3m
90
+ sleep 10s
91
91
${runcmd}
92
92
state=" $( " ${HOMEgfs} /ci/scripts/utils/rocotostat.py" -w " ${build_xml} " -d " ${build_db} " ) "
93
93
if [[ " ${verbose_opt} " == " true" ]]; then
@@ -100,13 +100,29 @@ while [[ "${finished}" == "false" ]]; do
100
100
finished=true
101
101
elif [[ " ${state} " == " RUNNING" ]]; then
102
102
finished=false
103
- elif [[ " ${state} " == " DEAD" ]]; then
104
- echo " FATAL ERROR: ${BASH_SOURCE[0]} one or more builds failed!"
105
- # TODO add capability to determine which build(s) failed
106
- exit 2
107
103
else
108
104
echo " FATAL ERROR: ${BASH_SOURCE[0]} rocoto failed with state '${state} '"
109
- exit 3
105
+ # Determine which builds failed
106
+ echo " $( rocotostat -w " ${build_xml} " -d " ${build_db} " ) " > rocotostat.out
107
+ line_number=0
108
+ rm -f logs/error.logs
109
+ set -x
110
+ while read -r line; do
111
+ (( line_number += 1 ))
112
+ # Skip the first two lines (header)
113
+ if [[ ${line_number} -lt 3 ]]; then
114
+ continue
115
+ fi
116
+
117
+ if [[ " ${line} " =~ " DEAD" || " ${line} " =~ " UNKNOWN" ||
118
+ " ${line} " =~ " UNAVAILABLE" || " ${line} " =~ " FAIL" ]]; then
119
+ job=$( echo " ${line} " | awk ' { print $2 }' )
120
+ log_file=" logs/build_${job} "
121
+ echo " ${log_file} " >> logs/error.logs
122
+ echo " Rocoto reported that the build failed for ${job} "
123
+ fi
124
+ done < rocotostat.out
125
+ exit 2
110
126
fi
111
127
done
112
128
Original file line number Diff line number Diff line change 90
90
gdas :
91
91
command : " ./build_gdas.sh -j 24"
92
92
log : " build_gdas.log"
93
- cores : 24
94
- walltime : " 01:30:00 "
93
+ cores : 1
94
+ walltime : " 00:00:10 "
You can’t perform that action at this time.
0 commit comments