Commit 1f5635a9 authored by Iustin Pop's avatar Iustin Pop
Browse files

Show explicit message when hspace fails to alloc



Currently, in the human-readable mode, hspace doesn't show any
messages when no instances can be allocated in tiered-alloc mode. This
is confusing, so let's add an explicit message.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent aa5b2f07
......@@ -4,7 +4,7 @@
{-
Copyright (C) 2009, 2010, 2011 Google Inc.
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -319,9 +319,11 @@ printTiered True spec_map m_cpu nl trl_nl _ = do
printTiered False spec_map _ ini_nl fin_nl sreason = do
_ <- printf "Tiered allocation results:\n"
mapM_ (\(ispec, cnt) ->
printf " - %3d instances of spec %s\n" cnt
(formatResources ispec specData)) spec_map
if null spec_map
then putStrLn " - no instances allocated"
else mapM_ (\(ispec, cnt) ->
printf " - %3d instances of spec %s\n" cnt
(formatResources ispec specData)) spec_map
printFRScores ini_nl fin_nl sreason
-- | Displays the initial/final cluster scores.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment