From 2dc44c7283200f4689cc1be15115a8b1cd37d456 Mon Sep 17 00:00:00 2001 From: Dante Niewenhuis Date: Mon, 29 Apr 2024 12:48:20 +0200 Subject: Fixed several cpu related bugs, changed input topology (#226) --- .../src/main/kotlin/org/opendc/compute/simulator/SimHost.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-compute/opendc-compute-simulator/src/main') diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt index bfd21a3c..84799123 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt @@ -146,7 +146,7 @@ public class SimHost( override fun canFit(server: Server): Boolean { val sufficientMemory = model.memoryCapacity >= server.flavor.memorySize - val enoughCpus = model.cpuCount >= server.flavor.coreCount + val enoughCpus = model.coreCount >= server.flavor.coreCount val canFit = hypervisor.canFit(server.flavor.toMachineModel()) return sufficientMemory && enoughCpus && canFit -- cgit v1.2.3