/* If both the sender and the receiver are already there, start the communication */
if (synchro->state == SIMIX_READY) {
- sg_host_t sender = comm->src_proc->host;
- sg_host_t receiver = comm->dst_proc->host;
+ simgrid::s4u::Host* sender = comm->src_proc->host;
+ simgrid::s4u::Host* receiver = comm->dst_proc->host;
XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro, sg_host_get_name(sender), sg_host_get_name(receiver));
}
}
-Action *HostModel::executeParallelTask(int host_nb,
- sg_host_t *host_list,
- double *flops_amount,
- double *bytes_amount,
- double rate)
+Action* HostModel::executeParallelTask(int host_nb, simgrid::s4u::Host** host_list, double* flops_amount,
+ double* bytes_amount, double rate)
{
#define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
Action *action =nullptr;
XBT_DEBUG("CPU model: %p", surf_cpu_model_pm);
XBT_DEBUG("Network model: %p", surf_network_model);
- sg_host_t hostA = sg_host_by_name("Cpu A");
- sg_host_t hostB = sg_host_by_name("Cpu B");
-
- /* Let's check that those two processors exist */
- XBT_DEBUG("%s : %p", sg_host_get_name(hostA), hostA);
- XBT_DEBUG("%s : %p", sg_host_get_name(hostB), hostB);
+ simgrid::s4u::Host* hostA = sg_host_by_name("Cpu A");
+ simgrid::s4u::Host* hostB = sg_host_by_name("Cpu B");
/* Let's do something on it */
simgrid::surf::Action *actionA = hostA->pimpl_cpu->execution_start(1000.0);
parse_platform_file(argv[1]);
/*********************** HOST ***********************************/
- sg_host_t hostA = sg_host_by_name("Cpu A");
- sg_host_t hostB = sg_host_by_name("Cpu B");
-
- /* Let's check that those two processors exist */
- XBT_DEBUG("%s : %p", sg_host_get_name(hostA), hostA);
- XBT_DEBUG("%s : %p", sg_host_get_name(hostB), hostB);
+ simgrid::s4u::Host* hostA = sg_host_by_name("Cpu A");
+ simgrid::s4u::Host* hostB = sg_host_by_name("Cpu B");
/* Let's do something on it */
hostA->pimpl_cpu->execution_start(1000.0);