commit 1888d80c399d367b531006fe9c4bd4987038a32f
Author: Nicolas Joly <njoly@pasteur.fr>
Date: Fri Mar 22 16:32:09 2013 +0100
Fix load computation for 0 slots cluster queue
diff --git a/source/clients/common/sge_cqueue_qstat.c b/source/clients/common/sge_cqueue_qstat.c
index 84c2e80..0fc15eb 100644
a
|
b
|
bool cqueue_calculate_summary(const lListElem *cqueue, |
122 | 122 | qinstance, exechost_list, centry_list, |
123 | 123 | &has_value_from_object)) { |
124 | 124 | if (has_value_from_object) { |
125 | | *is_load_available = true; |
126 | 125 | load_slots += slots; |
127 | 126 | *load += host_load_avg * slots; |
128 | 127 | } |
… |
… |
bool cqueue_calculate_summary(const lListElem *cqueue, |
183 | 182 | *error += slots; |
184 | 183 | } |
185 | 184 | } |
186 | | *load /= load_slots; |
| 185 | if (load_slots > 0) { |
| 186 | *is_load_available = true; |
| 187 | *load /= load_slots; |
| 188 | } |
187 | 189 | *available -= used_available; |
188 | 190 | } |
189 | 191 | DEXIT; |