File tree Expand file tree Collapse file tree 2 files changed +21
-17
lines changed Expand file tree Collapse file tree 2 files changed +21
-17
lines changed Original file line number Diff line number Diff line change @@ -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
+ rm -f logs/error.logs
106
+ # Determine which build(s) failed
107
+ stat_out=" $( rocotostat -w " ${build_xml} " -d " ${build_db} " ) "
108
+ echo " ${stat_out} " > rocotostat.out
109
+ line_number=0
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/${job} .log"
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 @@ -23,72 +23,60 @@ systems:
23
23
build :
24
24
gfs_model :
25
25
command : " ./build_ufs.sh -e gfs_model.x -j 12"
26
- log : " build_ufs_gfs.log"
27
26
cores : 12
28
27
walltime : " 00:30:00"
29
28
30
29
gfs_ww3prepost :
31
30
command : " ./build_ww3prepost.sh -j 4"
32
- log : " build_ww3prepost_gfs.log"
33
31
cores : 4
34
32
walltime : " 00:10:00"
35
33
36
34
gefs_model :
37
35
command : " ./build_ufs.sh -w -e gefs_model.x -j 12"
38
- log : " build_ufs_gefs.log"
39
36
cores : 12
40
37
walltime : " 00:30:00"
41
38
42
39
gefs_ww3_prepost :
43
40
command : " ./build_ww3prepost.sh -w -j 4"
44
- log : " build_ww3prepost_gefs.log"
45
41
cores : 4
46
42
walltime : " 00:10:00"
47
43
48
44
sfs_model :
49
45
command : " ./build_ufs.sh -y -e sfs_model.x -j 12"
50
- log : " build_ufs_sfs.log"
51
46
cores : 12
52
47
walltime : " 00:30:00"
53
48
54
49
upp :
55
50
command : " ./build_upp.sh -j 8"
56
- log : " build_upp.log"
57
51
cores : 8
58
52
walltime : " 00:10:00"
59
53
60
54
gsi_enkf :
61
55
command : " ./build_gsi_enkf.sh -j 8"
62
- log : " build_gsi_enkf.log"
63
56
cores : 8
64
57
walltime : " 00:15:00"
65
58
66
59
gsi_monitor :
67
60
command : " ./build_gsi_monitor.sh -j 4"
68
- log : " build_gsi_monitor.log"
69
61
cores : 4
70
62
walltime : " 00:10:00"
71
63
72
64
gsi_utils :
73
65
command : " ./build_gsi_utils.sh -j 6"
74
- log : " build_gsi_utils.log"
75
66
cores : 6
76
67
walltime : " 00:10:00"
77
68
78
69
ufs_utils :
79
70
command : " ./build_ufs_utils.sh -j 8"
80
- log : " build_ufs_utils.log"
81
71
cores : 8
82
72
walltime : " 00:10:00"
83
73
84
74
gfs_utils :
85
75
command : " ./build_gfs_utils.sh -j 6"
86
- log : " build_gfs_utils.log"
87
76
cores : 6
88
77
walltime : " 00:10:00"
89
78
90
79
gdas :
91
80
command : " ./build_gdas.sh -j 24"
92
- log : " build_gdas.log"
93
81
cores : 24
94
82
walltime : " 01:30:00"
You can’t perform that action at this time.
0 commit comments