Commit f5a1123a authored by Jens Korinth's avatar Jens Korinth
Browse files

Bugfix ResourceMonitor canStart with SLURM

* SLURM should ignore resource constraints
* tasks now start correctly in SLURM mode
parent 22cbefbd
package de.tu_darmstadt.cs.esa.tapasco.task
import de.tu_darmstadt.cs.esa.tapasco.slurm._
import de.tu_darmstadt.cs.esa.tapasco.util.{MemInfo, FlexLicenceManagerStatus}
......@@ -39,7 +40,7 @@ private class DefaultResourceMonitor extends ResourceMonitor {
def doStart(t: ResourceConsumer): Unit = if (canStart(t)) _cons += t
def didFinish(t: ResourceConsumer): Unit = _cons -= t
def canStart(t: ResourceConsumer): Boolean = t.canStart && check(_cons + t)
def canStart(t: ResourceConsumer): Boolean = Slurm.enabled || (t.canStart && check(_cons + t))
def status: String = "%d active consumers, %d/%d CPUs, %1.1f/%1.1f GiB RAM, %d total licences in use".format(
_cons.size, current.cpus, _cpus,
current.memory / 1024.0 / 1024.0,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment