mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-12 23:36:44 +00:00
update
This commit is contained in:
@@ -350,16 +350,18 @@ func (scheduler *SchedulerFair) AcquireResource(job Job, task Task, nodes []Node
|
||||
for i := range res.Status {
|
||||
for j := range node.Status {
|
||||
if res.Status[i].UUID == node.Status[j].UUID {
|
||||
if node.Status[j].MemoryAllocated == 0 {
|
||||
scheduler.UsingGPUMu.Lock()
|
||||
scheduler.UsingGPU ++
|
||||
scheduler.UsingGPUMu.Unlock()
|
||||
}
|
||||
node.Status[j].MemoryAllocated += task.MemoryGPU
|
||||
res.Status[i].MemoryTotal = task.MemoryGPU
|
||||
}
|
||||
}
|
||||
}
|
||||
if allocationType == 2 {
|
||||
scheduler.UsingGPUMu.Lock()
|
||||
scheduler.UsingGPU += task.NumberGPU
|
||||
scheduler.UsingGPUMu.Unlock()
|
||||
log.Info(res.Status, " is using")
|
||||
for _, t := range res.Status {
|
||||
scheduler.Attach(t.UUID, job.Name)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user