Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_platf_router_cb
[simgrid.git] / src / surf / host_ptask_L07.cpp
index f1ca84d..80427e6 100644 (file)
@@ -265,19 +265,12 @@ Action *HostL07Model::executeParallelTask(int host_nb,
 
 Host *HostL07Model::createHost(const char *name,RoutingEdge *netElm, Cpu *cpu)
 {
-  HostL07 *wk = NULL;
-  sg_host_t sg_host = sg_host_by_name(name);
-
-  xbt_assert(!surf_host_resource_priv(sg_host),
-              "Host '%s' declared several times in the platform file.",
-              name);
+  HostL07 *host = new HostL07(this, name, NULL, netElm, cpu);
 
-  wk = new HostL07(this, name, NULL, netElm, cpu);
+  surf_callback_emit(hostCreatedCallbacks, host);
+  xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, host);
 
-  surf_callback_emit(hostCreatedCallbacks, wk);
-  xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, wk);
-
-  return wk;
+  return host;
 }
 
 Action *NetworkL07Model::communicate(RoutingEdge *src, RoutingEdge *dst,
@@ -316,10 +309,6 @@ Cpu *CpuL07Model::createCpu(const char *name,  xbt_dynar_t powerPeak,
   double power_initial = xbt_dynar_get_as(powerPeak, pstate, double);
   sg_host_t sg_host = sg_host_by_name(name);
 
-  xbt_assert(!surf_host_resource_priv(sg_host),
-              "Host '%s' declared several times in the platform file.",
-              name);
-
   CpuL07 *cpu = new CpuL07(this, name, cpu_properties,
                                     power_initial, power_scale, power_trace,
                          core, state_initial, state_trace);
@@ -576,12 +565,6 @@ void LinkL07::updateLatency(double value, double date)
   }
 }
 
-
-bool LinkL07::isShared()
-{
-  return lmm_constraint_is_shared(getConstraint());
-}
-
 /**********
  * Action *
  **********/