Minor fixes. Updated the README.

This commit is contained in:
Renan DelValle 2017-01-03 18:10:05 -05:00
parent 312728a2f6
commit 3f04e4cc4c
2 changed files with 23 additions and 9 deletions

View file

@ -13,8 +13,9 @@ To Do:
Possible to setup the constants at runtime based on the environment?
**Requires Performance-Copilot tool pmdumptext to be installed on the
machine on which electron is launched for logging to work**
**Requires [Performance Co-Pilot](http://pcp.io/) tool pmdumptext to be installed on the
machine on which electron is launched for logging to work and PCP collector agents installed
on the Mesos Agents**
How to run (Use the --help option to get information about other command-line options):
@ -37,7 +38,13 @@ Workload schema:
"watts": 50,
"image": "gouravr/minife:v5",
"cmd": "cd src && mpirun -np 1 miniFE.x -nx 100 -ny 100 -nz 100",
"inst": 9
"inst": 9,
"class_to_watts" : {
"A": 30.2475289996,
"B": 35.6491229228,
"C": 24.0476734352
}
},
{
"name": "dgemm",
@ -46,7 +53,12 @@ Workload schema:
"watts": 50,
"image": "gouravr/dgemm:v2",
"cmd": "/./mt-dgemm 1024",
"inst": 9
"inst": 9,
"class_to_watts" : {
"A": 35.2475289996,
"B": 25.6491229228,
"C": 29.0476734352
}
}
]
```

View file

@ -144,7 +144,7 @@ func (s *BPSWClassMapWatts) ResourceOffers(driver sched.SchedulerDriver, offers
tasks := []*mesos.TaskInfo{}
offer_cpu, offer_ram, offer_watts := OfferAgg(offer)
offerCPU, offerRAM, offerWatts := OfferAgg(offer)
taken := false
totalWatts := 0.0
@ -168,9 +168,11 @@ func (s *BPSWClassMapWatts) ResourceOffers(driver sched.SchedulerDriver, offers
}
}
// Does the task fit
if (s.ignoreWatts || offer_watts >= (totalWatts+task.ClassToWatts[nodeClass])) &&
(offer_cpu >= (totalCPU + task.CPU)) &&
(offer_ram >= (totalRAM + task.RAM)) {
// OR lazy evaluation. If ignore watts is set to true, second statement won't
// be evaluated.
if (s.ignoreWatts || (offerWatts >= (totalWatts+task.ClassToWatts[nodeClass]))) &&
(offerCPU >= (totalCPU + task.CPU)) &&
(offerRAM >= (totalRAM + task.RAM)) {
fmt.Println("Watts being used: ", task.ClassToWatts[nodeClass])
taken = true
@ -194,7 +196,7 @@ func (s *BPSWClassMapWatts) ResourceOffers(driver sched.SchedulerDriver, offers
}
}
} else {
break // Continue on to next offer
break // Continue on to next task
}
}
}