- if (!MC_is_active() && !MC_record_replay_is_active()) {
-
- synchro->execution.surf_exec = issuer->host->pimpl_cpu->execution_start(flops_amount);
- synchro->execution.surf_exec->setData(synchro);
- synchro->execution.surf_exec->setPriority(priority);
-
- if (bound != 0)
- static_cast<simgrid::surf::CpuAction*>(synchro->execution.surf_exec)
- ->setBound(bound);
-
- if (affinity_mask != 0) {
- /* just a double check to confirm that this host is the host where this task is running. */
- xbt_assert(synchro->execution.host == issuer->host);
- static_cast<simgrid::surf::CpuAction*>(synchro->execution.surf_exec)
- ->setAffinity(issuer->host->pimpl_cpu, affinity_mask);
- }
- }
-
- XBT_DEBUG("Create execute synchro %p: %s", synchro, synchro->name);
-
- return synchro;
-}
-
-smx_synchro_t SIMIX_execution_parallel_start(const char *name,
- int host_nb, sg_host_t *host_list,
- double *flops_amount, double *bytes_amount,
- double amount, double rate){
-
- sg_host_t*host_list_cpy = NULL;
- int i;
-
- /* alloc structures and initialize */
- smx_synchro_t synchro = (smx_synchro_t) xbt_mallocator_get(simix_global->synchro_mallocator);
- synchro->type = SIMIX_SYNC_PARALLEL_EXECUTE;
- synchro->name = xbt_strdup(name);
- synchro->state = SIMIX_RUNNING;
- synchro->execution.host = NULL; /* FIXME: do we need the list of hosts? */
- synchro->category = NULL;
-
- /* set surf's synchro */
- host_list_cpy = xbt_new0(sg_host_t, host_nb);
- for (i = 0; i < host_nb; i++)
- host_list_cpy[i] = host_list[i];
-
-
- /* FIXME: what happens if host_list contains VMs and PMs. If
- * execute_parallel_task() does not change the state of the model, we can mix
- * them. */
- surf_host_model_t ws_model =
- host_list[0]->extension<simgrid::surf::Host>()->getModel();
- for (i = 1; i < host_nb; i++) {
- surf_host_model_t ws_model_tmp =
- host_list[i]->extension<simgrid::surf::Host>()->getModel();
- if (ws_model_tmp != ws_model) {
- XBT_CRITICAL("mixing VMs and PMs is not supported");
- DIE_IMPOSSIBLE;
- }