mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-12 23:36:44 +00:00
bugfix
This commit is contained in:
@@ -206,6 +206,10 @@ func (scheduler *SchedulerFair) ReleaseResource(job Job, agent NodeStatus) {
|
||||
for j := range nodes.Status {
|
||||
if gpu.UUID == nodes.Status[j].UUID {
|
||||
nodes.Status[j].MemoryAllocated -= gpu.MemoryTotal
|
||||
if nodes.Status[j].MemoryAllocated < 0 {
|
||||
// in case error
|
||||
nodes.Status[j].MemoryAllocated = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,4 +380,4 @@ func (scheduler *SchedulerFair) Attach(GPU string, job string) {
|
||||
|
||||
func (scheduler *SchedulerFair) Detach(GPU string, job string) {
|
||||
pool.detach(GPU, job)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user