{
Cpu *cpu = NULL;
sg_host_t host = sg_host_by_name(name);
- xbt_assert(!sg_host_surfcpu(host),
- "Host '%s' declared several times in the platform file",
- name);
xbt_assert(xbt_dynar_getfirst_as(power_peak, double) > 0.0,
"Power has to be >0.0. Did you forget to specify the mandatory power attribute?");
xbt_assert(core > 0, "Invalid number of cores %d. Must be larger than 0", core);
{
xbt_assert(core==1,"Multi-core not handled with this model yet");
sg_host_t host = sg_host_by_name(name);
- xbt_assert(!sg_host_surfcpu(host),
- "Host '%s' declared several times in the platform file",
- name);
xbt_assert(xbt_dynar_getfirst_as(powerPeak, double) > 0.0,
"Power has to be >0.0. Did you forget to specify the mandatory power attribute?");
CpuTi *cpu = new CpuTi(this, name, powerPeak, pstate, powerScale, powerTrace,
Host *HostL07Model::createHost(const char *name,RoutingEdge *netElm, Cpu *cpu)
{
- HostL07 *host = 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);
-
- host = new HostL07(this, name, NULL, netElm, cpu);
+ HostL07 *host = new HostL07(this, name, NULL, netElm, cpu);
surf_callback_emit(hostCreatedCallbacks, host);
xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, host);
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);
void sg_platf_new_host(sg_platf_host_cbarg_t host)
{
+
+ xbt_assert(! sg_host_by_name(host->id),
+ "Refusing to create a second host named '%s'.", host->id);
+
RoutingEdge *net = NULL;
As* current_routing = routing_get_current();
if (current_routing)