Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix CPU registration with Java models
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 17 Dec 2015 15:10:26 +0000 (16:10 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 17 Dec 2015 15:10:30 +0000 (16:10 +0100)
Fix 'Move sg_host_surfcpu_register() out of createCpu()'

examples/java/surfCpuModel/CpuConstantModel.java
src/bindings/java/surf_swig.cpp

index 7a9e5de..60d35dd 100644 (file)
@@ -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);
 
     CpuConstant res = new CpuConstant(this, name, cpu_properties, core, power_peak[pstate], power_scale);
     cpus.add(res);
-    Surf.setCpu(name, res);
     return res;
   }
 
     return res;
   }
 
index a3ccced..972ef47 100644 (file)
@@ -47,7 +47,7 @@ void setCpuModel(simgrid::surf::CpuModel *cpuModel){
 }
 
 void setCpu(char *name, simgrid::surf::Cpu *cpu) {
 }
 
 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) {
 }
 
 LinkDynar getRoute(char *srcName, char *dstName) {