Revision 15329af5 htools/hail.hs
b/htools/hail.hs | ||
---|---|---|
26 | 26 |
module Main (main) where |
27 | 27 |
|
28 | 28 |
import Control.Monad |
29 |
import Data.Maybe (isJust, fromJust) |
|
30 | 29 |
import System.IO |
31 | 30 |
import qualified System |
32 | 31 |
|
... | ... | |
69 | 68 |
when (verbose > 2) $ |
70 | 69 |
hPutStrLn stderr $ "Received cluster data: " ++ show cdata |
71 | 70 |
|
72 |
when (isJust shownodes) $ do |
|
73 |
hPutStrLn stderr "Initial cluster status:" |
|
74 |
hPutStrLn stderr $ Cluster.printNodes (cdNodes cdata) |
|
75 |
(fromJust shownodes) |
|
71 |
maybePrintNodes shownodes "Initial cluster" |
|
72 |
(Cluster.printNodes (cdNodes cdata)) |
|
76 | 73 |
|
77 | 74 |
maybeSaveData savecluster "pre-ialloc" "before iallocator run" cdata |
78 | 75 |
|
79 | 76 |
let (maybe_ni, resp) = runIAllocator request |
80 | 77 |
(fin_nl, fin_il) = maybe (cdNodes cdata, cdInstances cdata) id maybe_ni |
81 | 78 |
putStrLn resp |
82 |
when (isJust shownodes) $ do |
|
83 |
hPutStrLn stderr "Final cluster status:" |
|
84 |
hPutStrLn stderr $ Cluster.printNodes fin_nl (fromJust shownodes) |
|
79 |
|
|
80 |
maybePrintNodes shownodes "Final cluster" (Cluster.printNodes fin_nl) |
|
85 | 81 |
|
86 | 82 |
maybeSaveData savecluster "post-ialloc" "after iallocator run" |
87 | 83 |
(cdata { cdNodes = fin_nl, cdInstances = fin_il}) |
Also available in: Unified diff