1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-12 23:36:44 +00:00
This commit is contained in:
2020-04-30 19:22:23 +08:00
parent c6e82bc3e3
commit 420a1263bc

View File

@@ -350,6 +350,9 @@ func (scheduler *SchedulerFair) AcquireResource(job Job, task Task) NodeStatus {
}
}
}
if allocationType == 2 {
scheduler.UsingGPU += task.NumberGPU
}
}
for i := range locks {
@@ -392,6 +395,9 @@ func (scheduler *SchedulerFair) ReleaseResource(job Job, agent NodeStatus) {
log.Warn(node.ClientID, "More Memory Allocated")
node.Status[j].MemoryAllocated = 0
}
if node.Status[j].MemoryAllocated == 0 {
scheduler.UsingGPU--
}
log.Info(node.Status[j].MemoryAllocated)
}
}