From: Gabriel Corona Date: Thu, 17 Dec 2015 15:10:26 +0000 (+0100) Subject: Fix CPU registration with Java models X-Git-Tag: v3_13~1434^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b50fb226666093cd35d9f0143e4ac504d3d9ad4c Fix CPU registration with Java models Fix 'Move sg_host_surfcpu_register() out of createCpu()' --- 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) {