mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-13 07:46:43 +00:00
update
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user