fix random choose error when row-cost equals col-cost
when row-partition cost equals col-partition cost, we consider the node
later and let the other nodes choose partition first.