Revision 23f9ab76 hail.hs
b/hail.hs | ||
---|---|---|
50 | 50 |
processResults :: (Monad m) => Cluster.AllocSolution -> m (String, [Node.Node]) |
51 | 51 |
processResults (fstats, successes, sols) = |
52 | 52 |
case sols of |
53 |
Nothing -> fail "No valid allocation solutions"
|
|
54 |
Just (best, (_, _, w)) ->
|
|
53 |
[] -> fail "No valid allocation solutions"
|
|
54 |
(best, (_, _, w)):[] ->
|
|
55 | 55 |
let tfails = length fstats |
56 | 56 |
info = printf "successes %d, failures %d,\ |
57 | 57 |
\ best score: %.8f for node(s) %s" |
58 | 58 |
successes tfails |
59 | 59 |
best (intercalate "/" . map Node.name $ w)::String |
60 | 60 |
in return (info, w) |
61 |
_ -> fail "Internal error: multiple allocation solutions" |
|
61 | 62 |
|
62 | 63 |
-- | Process a request and return new node lists |
63 | 64 |
processRequest :: Request |
Also available in: Unified diff