From b50fb226666093cd35d9f0143e4ac504d3d9ad4c Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 17 Dec 2015 16:10:26 +0100 Subject: [PATCH] Fix CPU registration with Java models Fix 'Move sg_host_surfcpu_register() out of createCpu()' --- examples/java/surfCpuModel/CpuConstantModel.java | 1 - src/bindings/java/surf_swig.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/java/surfCpuModel/CpuConstantModel.java b/examples/java/surfCpuModel/CpuConstantModel.java index 7a9e5de952..60d35dd26e 100644 --- a/examples/java/surfCpuModel/CpuConstantModel.java +++ b/examples/java/surfCpuModel/CpuConstantModel.java @@ -18,7 +18,6 @@ public class CpuConstantModel extends CpuModel { CpuConstant res = new CpuConstant(this, name, cpu_properties, core, power_peak[pstate], power_scale); cpus.add(res); - Surf.setCpu(name, res); return res; } diff --git a/src/bindings/java/surf_swig.cpp b/src/bindings/java/surf_swig.cpp index a3ccced254..972ef476e7 100644 --- a/src/bindings/java/surf_swig.cpp +++ b/src/bindings/java/surf_swig.cpp @@ -47,7 +47,7 @@ void setCpuModel(simgrid::surf::CpuModel *cpuModel){ } void setCpu(char *name, simgrid::surf::Cpu *cpu) { - sg_host_surfcpu_set(sg_host_by_name(name), cpu); + // No-op here for compatibility with previous versions } LinkDynar getRoute(char *srcName, char *dstName) { -- 2.20.1