diff --git a/src/allocator.go b/src/allocator.go index 35a1562..2474e05 100644 --- a/src/allocator.go +++ b/src/allocator.go @@ -241,6 +241,17 @@ func (allocator *Allocator) GA(nodes []NodeStatus, tasks []Task, useBestFit bool } //fmt.Println(evaluatue(allocation)) //fmt.Println(allocation) + + cnt := 0 + for _, tasks := range allocation.TasksOnNode { + for range tasks { + cnt++ + } + } + if cnt != len(allocation.Tasks) && allocation.Flags["valid"] { + log.Warn("1:", cnt, len(allocation.Tasks)) + } + return allocation } diff --git a/src/ga.go b/src/ga.go index 6126fc9..d9e1cbd 100644 --- a/src/ga.go +++ b/src/ga.go @@ -97,6 +97,9 @@ func (X Allocation) Mutate(rng *rand.Rand) { } } } + if cnt != 0 { + log.Warn("task ", task.Name, " still need ", cnt) + } //log.Info("After ", X.Nodes[nodeID].Status) } else {