mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
update
This commit is contained in:
@@ -66,11 +66,6 @@ func (eva *Evaluator) add(node NodeStatus, task Task) {
|
|||||||
eva.totalWorker++
|
eva.totalWorker++
|
||||||
}
|
}
|
||||||
|
|
||||||
if task.IsPS {
|
|
||||||
//eva.costLoad += 1
|
|
||||||
} else {
|
|
||||||
//eva.costLoad += 0.5
|
|
||||||
}
|
|
||||||
numberGPU := 1
|
numberGPU := 1
|
||||||
for _, gpu := range node.Status {
|
for _, gpu := range node.Status {
|
||||||
if gpu.MemoryAllocated != 0 {
|
if gpu.MemoryAllocated != 0 {
|
||||||
@@ -104,11 +99,6 @@ func (eva *Evaluator) remove(node NodeStatus, task Task) {
|
|||||||
eva.totalWorker--
|
eva.totalWorker--
|
||||||
}
|
}
|
||||||
|
|
||||||
if task.IsPS {
|
|
||||||
//eva.costLoad -= 1
|
|
||||||
} else {
|
|
||||||
//eva.costLoad -= 0.5
|
|
||||||
}
|
|
||||||
numberGPU := 1
|
numberGPU := 1
|
||||||
for _, gpu := range node.Status {
|
for _, gpu := range node.Status {
|
||||||
if gpu.MemoryAllocated != 0 {
|
if gpu.MemoryAllocated != 0 {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ func (jm *JobManager) start() {
|
|||||||
v.Set("mem_limit", strconv.Itoa(jm.job.Tasks[index].Memory)+"m")
|
v.Set("mem_limit", strconv.Itoa(jm.job.Tasks[index].Memory)+"m")
|
||||||
v.Set("cpu_limit", strconv.Itoa(jm.job.Tasks[index].NumberCPU))
|
v.Set("cpu_limit", strconv.Itoa(jm.job.Tasks[index].NumberCPU))
|
||||||
v.Set("network", jm.network)
|
v.Set("network", jm.network)
|
||||||
v.Set("should_wait", "1")
|
v.Set("should_wait", "0")
|
||||||
v.Set("output_dir", "/tmp/")
|
v.Set("output_dir", "/tmp/")
|
||||||
v.Set("hdfs_address", "http://192.168.100.104:50070/")
|
v.Set("hdfs_address", "http://192.168.100.104:50070/")
|
||||||
v.Set("hdfs_dir", "/user/yao/output/"+jm.job.Name)
|
v.Set("hdfs_dir", "/user/yao/output/"+jm.job.Name)
|
||||||
|
|||||||
@@ -896,7 +896,12 @@ func (pool *ResourcePool) releaseResource(job Job, agent NodeStatus) {
|
|||||||
seg.Lock.Lock()
|
seg.Lock.Lock()
|
||||||
defer seg.Lock.Unlock()
|
defer seg.Lock.Unlock()
|
||||||
|
|
||||||
node := seg.Nodes[agent.ClientID]
|
node, ok := seg.Nodes[agent.ClientID]
|
||||||
|
if !ok {
|
||||||
|
/* in case node is offline */
|
||||||
|
/* TODO, update usingTotalGPU correctly */
|
||||||
|
return
|
||||||
|
}
|
||||||
for _, gpu := range agent.Status {
|
for _, gpu := range agent.Status {
|
||||||
for j := range node.Status {
|
for j := range node.Status {
|
||||||
if gpu.UUID == node.Status[j].UUID {
|
if gpu.UUID == node.Status[j].UUID {
|
||||||
|
|||||||
Reference in New Issue
Block a user