+ (Container.size nlf)
+ (Container.size ilf)
+
+ (gname, (nl, il)) <- case optGroup opts of
+ Nothing -> do
+ let (gidx, cdata) = head ngroups
+ grp = Container.find gidx gl
+ return (Group.name grp, cdata)
+ Just g -> case Container.findByName gl g of
+ Nothing -> do
+ hPutStrLn stderr $ "Node group " ++ g ++
+ " not found. Node group list is:"
+ mapM_ (hPutStrLn stderr . (" " ++) . Group.name ) (Container.elems gl)
+ hPutStrLn stderr "Aborting."
+ exitWith $ ExitFailure 1
+ Just grp ->
+ case lookup (Group.idx grp) ngroups of
+ Nothing -> do
+ -- TODO: while this is unlikely to happen, log here the
+ -- actual group data to help debugging
+ hPutStrLn stderr $ "Internal failure, missing group idx"
+ exitWith $ ExitFailure 1
+ Just cdata -> return (Group.name grp, cdata)
+
+ unless oneline $ printf "Group size %d nodes, %d instances\n"