1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 14:21:55 +00:00
This commit is contained in:
Newnius 2020-06-10 23:55:50 +08:00
parent 3c7d28165f
commit 733d28f577
3 changed files with 6 additions and 5 deletions

View File

@ -45,7 +45,7 @@ func (jm *JobManager) start() {
} }
jm.resources = jm.scheduler.AcquireResource(jm.job) jm.resources = jm.scheduler.AcquireResource(jm.job)
if len(jm.resources) > 0 { if len(jm.resources) > 0 {
log.Info("Receive resource", jm.resources) log.Info(jm.job.Name, " receive resource", jm.resources)
break break
} }
/* sleep random Millisecond to avoid deadlock */ /* sleep random Millisecond to avoid deadlock */

View File

@ -160,6 +160,7 @@ func (pool *ResourcePool) init(conf Configuration) {
} }
pool.batchAllocations[task.Job] = append(pool.batchAllocations[task.Job], nodes[i]) pool.batchAllocations[task.Job] = append(pool.batchAllocations[task.Job], nodes[i])
} }
//bug
} }
pool.batchJobs = left pool.batchJobs = left
pool.batchMu.Unlock() pool.batchMu.Unlock()

View File

@ -264,10 +264,10 @@ func (scheduler *SchedulerFair) Start() {
log.Debug("schedulingJobs are ", scheduler.schedulingJobs) log.Debug("schedulingJobs are ", scheduler.schedulingJobs)
log.Debug("Before ") log.Debug("Before ")
for queue, quota := range scheduler.queuesQuota { for queue, quota := range scheduler.queuesQuota {
log.Info("Queue<->", queue) log.Debug("Queue<->", queue)
log.Info("GPU:", quota.NumberGPU) log.Debug("GPU:", quota.NumberGPU)
log.Info("CPU:", quota.CPU) log.Debug("CPU:", quota.CPU)
log.Info("Memory:", quota.Memory) log.Debug("Memory:", quota.Memory)
} }
pool := InstanceOfResourcePool() pool := InstanceOfResourcePool()
/* Make sure resource it enough */ /* Make sure resource it enough */