XBT_PUBLIC(void) SIMIX_req_host_set_data(smx_host_t host, void *data);
XBT_PUBLIC(smx_action_t) SIMIX_req_host_execute(const char *name, smx_host_t host,
- double computation_amount);
+ double computation_amount,
+ double priority);
XBT_PUBLIC(smx_action_t) SIMIX_req_host_parallel_execute(const char *name,
int host_nb,
smx_host_t *host_list,
smx_action_t execution;
if (flops > 0){
- execution = SIMIX_req_host_execute("task", SIMIX_host_self(), flops);
+ execution = SIMIX_req_host_execute("task", SIMIX_host_self(), flops, 1);
SIMIX_req_host_execution_wait(execution);
}
}
simdata->isused=1;
simdata->compute =
SIMIX_req_host_execute(task->name, SIMIX_host_self(),
- simdata->computation_amount);
- SIMIX_req_host_execution_set_priority(simdata->compute, simdata->priority);
+ simdata->computation_amount,
+ simdata->priority);
#ifdef HAVE_TRACING
SIMIX_req_set_category(simdata->compute, task->category);
#endif
double SIMIX_host_get_available_speed(smx_host_t host);
int SIMIX_host_get_state(smx_host_t host);
smx_action_t SIMIX_host_execute(const char *name,
- smx_host_t host, double computation_amount);
+ smx_host_t host, double computation_amount, double priority);
smx_action_t SIMIX_host_parallel_execute(const char *name,
int host_nb, smx_host_t *host_list,
double *computation_amount, double *communication_amount,
const char* name;
smx_host_t host;
double computation_amount;
+ double priority;
smx_action_t result;
} host_execute;
}
smx_action_t SIMIX_host_execute(const char *name, smx_host_t host,
- double computation_amount)
+ double computation_amount,
+ double priority)
{
/* alloc structures and initialize */
smx_action_t action = xbt_new0(s_smx_action_t, 1);
surf_workstation_model->extension.workstation.execute(host->host,
computation_amount);
surf_workstation_model->action_data_set(action->execution.surf_exec, action);
+ surf_workstation_model->set_priority(action->execution.surf_exec, priority);
}
#ifdef HAVE_TRACING
req->host_execute.result = SIMIX_host_execute(
req->host_execute.name,
req->host_execute.host,
- req->host_execute.computation_amount);
+ req->host_execute.computation_amount,
+ req->host_execute.priority);
SIMIX_request_answer(req);
break;
* \return A new SIMIX execution action
*/
smx_action_t SIMIX_req_host_execute(const char *name, smx_host_t host,
- double computation_amount)
+ double computation_amount,
+ double priority)
{
smx_req_t req = SIMIX_req_mine();
req->host_execute.name = name;
req->host_execute.host = host;
req->host_execute.computation_amount = computation_amount;
+ req->host_execute.priority = priority;
SIMIX_request_push();
return req->host_execute.result;
}
host = SIMIX_host_self();
DEBUG1("Handle real computation time: %f flops", flops);
- action = SIMIX_req_host_execute("computation", host, flops);
+ action = SIMIX_req_host_execute("computation", host, flops, 1);
#ifdef HAVE_TRACING
SIMIX_req_set_category (action, TRACE_internal_smpi_get_category());
#endif