XBT_PUBLIC(double) simcall_host_get_current_power_peak(sg_host_t host);
XBT_PUBLIC(double) simcall_host_get_power_peak_at(sg_host_t host, int pstate_index);
-XBT_PUBLIC(smx_synchro_t) simcall_process_execute(const char *name,
+XBT_PUBLIC(smx_synchro_t) simcall_execution_start(const char *name,
double flops_amount,
double priority, double bound, unsigned long affinity_mask);
-XBT_PUBLIC(smx_synchro_t) simcall_process_parallel_execute(const char *name,
+XBT_PUBLIC(smx_synchro_t) simcall_execution_parallel_start(const char *name,
int host_nb,
sg_host_t *host_list,
double *flops_amount,
double *bytes_amount,
double amount,
double rate);
-XBT_PUBLIC(void) simcall_process_execution_destroy(smx_synchro_t execution);
-XBT_PUBLIC(void) simcall_process_execution_cancel(smx_synchro_t execution);
-XBT_PUBLIC(double) simcall_process_execution_get_remains(smx_synchro_t execution);
-XBT_PUBLIC(e_smx_state_t) simcall_process_execution_get_state(smx_synchro_t execution);
-XBT_PUBLIC(void) simcall_process_execution_set_priority(smx_synchro_t execution, double priority);
-XBT_PUBLIC(void) simcall_process_execution_set_bound(smx_synchro_t execution, double bound);
-XBT_PUBLIC(void) simcall_process_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask);
-XBT_PUBLIC(e_smx_state_t) simcall_process_execution_wait(smx_synchro_t execution);
+XBT_PUBLIC(void) simcall_execution_destroy(smx_synchro_t execution);
+XBT_PUBLIC(void) simcall_execution_cancel(smx_synchro_t execution);
+XBT_PUBLIC(double) simcall_execution_get_remains(smx_synchro_t execution);
+XBT_PUBLIC(e_smx_state_t) simcall_execution_get_state(smx_synchro_t execution);
+XBT_PUBLIC(void) simcall_execution_set_priority(smx_synchro_t execution, double priority);
+XBT_PUBLIC(void) simcall_execution_set_bound(smx_synchro_t execution, double bound);
+XBT_PUBLIC(void) simcall_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask);
+XBT_PUBLIC(e_smx_state_t) simcall_execution_wait(smx_synchro_t execution);
+
XBT_PUBLIC(xbt_dict_t) simcall_host_get_mounted_storage_list(sg_host_t host);
XBT_PUBLIC(xbt_dynar_t) simcall_host_get_attached_storage_list(sg_host_t host);
XBT_PUBLIC(void) simcall_host_get_params(sg_host_t vm, vm_params_t param);
simdata->isused = (void*)1;
if (simdata->host_nb > 0) {
- simdata->compute = simcall_process_parallel_execute(task->name,
+ simdata->compute = simcall_execution_parallel_start(task->name,
simdata->host_nb,
simdata->host_list,
simdata->flops_parallel_amount,
unsigned long affinity_mask = (unsigned long)(uintptr_t) xbt_dict_get_or_null_ext(simdata->affinity_mask_db, (char *) p_simdata->m_host, sizeof(msg_host_t));
XBT_DEBUG("execute %s@%s with affinity(0x%04lx)", MSG_task_get_name(task), MSG_host_get_name(p_simdata->m_host), affinity_mask);
- simdata->compute = simcall_process_execute(task->name,
+ simdata->compute = simcall_execution_start(task->name,
simdata->flops_amount,
simdata->priority,
simdata->bound,
}
simcall_set_category(simdata->compute, task->category);
p_simdata->waiting_action = simdata->compute;
- comp_state = simcall_process_execution_wait(simdata->compute);
+ comp_state = simcall_execution_wait(simdata->compute);
p_simdata->waiting_action = NULL;
action = task->simdata->compute;
if (action)
- simcall_process_execution_destroy(action);
+ simcall_execution_destroy(action);
/* parallel tasks only */
xbt_free(task->simdata->host_list);
xbt_assert((task != NULL), "Cannot cancel a NULL task");
if (task->simdata->compute) {
- simcall_process_execution_cancel(task->simdata->compute);
+ simcall_execution_cancel(task->simdata->compute);
}
else if (task->simdata->comm) {
simdata_task_t simdata = task->simdata;
double MSG_task_get_flops_amount(msg_task_t task) {
if (task->simdata->compute) {
- return simcall_process_execution_get_remains(task->simdata->compute);
+ return simcall_execution_get_remains(task->simdata->compute);
} else {
return task->simdata->flops_amount;
}
task->simdata->priority = 1 / priority;
if (task->simdata->compute)
- simcall_process_execution_set_priority(task->simdata->compute,
- task->simdata->priority);
+ simcall_execution_set_priority(task->simdata->compute,
+ task->simdata->priority);
}
task->simdata->bound = bound;
if (task->simdata->compute)
- simcall_process_execution_set_bound(task->simdata->compute,
+ simcall_execution_set_bound(task->simdata->compute,
task->simdata->bound);
}
}
XBT_INFO("set affinity(0x%04lx@%s) for %s", mask, MSG_host_get_name(host), MSG_task_get_name(task));
- simcall_process_execution_set_affinity(task->simdata->compute, host, mask);
+ simcall_execution_set_affinity(task->simdata->compute, host, mask);
}
}
}
e_smx_state_t s4u::Actor::execute(double flops) {
- smx_synchro_t s = simcall_process_execute(NULL,flops,1.0/*priority*/,0./*bound*/, 0L/*affinity*/);
- return simcall_process_execution_wait(s);
+ smx_synchro_t s = simcall_execution_start(NULL,flops,1.0/*priority*/,0./*bound*/, 0L/*affinity*/);
+ return simcall_execution_wait(s);
}
void *s4u::Actor::recv(Mailbox &chan) {
* \param affinity_mask
* \return A new SIMIX execution synchronization
*/
-smx_synchro_t simcall_process_execute(const char *name,
+smx_synchro_t simcall_execution_start(const char *name,
double flops_amount,
double priority, double bound, unsigned long affinity_mask)
{
xbt_assert(std::isfinite(flops_amount), "flops_amount is not finite!");
xbt_assert(std::isfinite(priority), "priority is not finite!");
- return simcall_BODY_process_execute(name, flops_amount, priority, bound, affinity_mask);
+ return simcall_BODY_execution_start(name, flops_amount, priority, bound, affinity_mask);
}
/**
* \param rate the SURF action rate
* \return A new SIMIX execution synchronization
*/
-smx_synchro_t simcall_process_parallel_execute(const char *name,
+smx_synchro_t simcall_execution_parallel_start(const char *name,
int host_nb,
sg_host_t *host_list,
double *flops_amount,
xbt_assert(std::isfinite(amount), "amount is not finite!");
xbt_assert(std::isfinite(rate), "rate is not finite!");
- return simcall_BODY_process_parallel_execute(name, host_nb, host_list,
+ return simcall_BODY_execution_parallel_start(name, host_nb, host_list,
flops_amount,
bytes_amount,
amount, rate);
* Destroys a synchro, freeing its memory. This function cannot be called if there are a conditional waiting for it.
* \param execution The execution synchro to destroy
*/
-void simcall_process_execution_destroy(smx_synchro_t execution)
+void simcall_execution_destroy(smx_synchro_t execution)
{
- simcall_BODY_process_execution_destroy(execution);
+ simcall_BODY_execution_destroy(execution);
}
/**
* This functions stops the execution. It calls a surf function.
* \param execution The execution synchro to cancel
*/
-void simcall_process_execution_cancel(smx_synchro_t execution)
+void simcall_execution_cancel(smx_synchro_t execution)
{
- simcall_BODY_process_execution_cancel(execution);
+ simcall_BODY_execution_cancel(execution);
}
/**
* \param execution The execution synchro
* \return The remaining amount
*/
-double simcall_process_execution_get_remains(smx_synchro_t execution)
+double simcall_execution_get_remains(smx_synchro_t execution)
{
- return simcall_BODY_process_execution_get_remains(execution);
+ return simcall_BODY_execution_get_remains(execution);
}
/**
* \param execution The execution synchro
* \return The state
*/
-e_smx_state_t simcall_process_execution_get_state(smx_synchro_t execution)
+e_smx_state_t simcall_execution_get_state(smx_synchro_t execution)
{
- return simcall_BODY_process_execution_get_state(execution);
+ return simcall_BODY_execution_get_state(execution);
}
/**
* \param execution The execution synchro
* \param priority The new priority
*/
-void simcall_process_execution_set_priority(smx_synchro_t execution, double priority)
+void simcall_execution_set_priority(smx_synchro_t execution, double priority)
{
/* checking for infinite values */
xbt_assert(std::isfinite(priority), "priority is not finite!");
- simcall_BODY_process_execution_set_priority(execution, priority);
+ simcall_BODY_execution_set_priority(execution, priority);
}
/**
* \param execution The execution synchro
* \param bound The new bound
*/
-void simcall_process_execution_set_bound(smx_synchro_t execution, double bound)
+void simcall_execution_set_bound(smx_synchro_t execution, double bound)
{
- simcall_BODY_process_execution_set_bound(execution, bound);
+ simcall_BODY_execution_set_bound(execution, bound);
}
/**
* \param host Host
* \param mask Affinity mask
*/
-void simcall_process_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask)
+void simcall_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask)
{
- simcall_BODY_process_execution_set_affinity(execution, host, mask);
+ simcall_BODY_execution_set_affinity(execution, host, mask);
}
/**
*
* \param execution The execution synchro
*/
-e_smx_state_t simcall_process_execution_wait(smx_synchro_t execution)
+e_smx_state_t simcall_execution_wait(smx_synchro_t execution)
{
- return (e_smx_state_t) simcall_BODY_process_execution_wait(execution);
+ return (e_smx_state_t) simcall_BODY_execution_wait(execution);
}
simcall->result.i = result;
}
-static inline const char* simcall_process_execute__get__name(smx_simcall_t simcall) {
+static inline const char* simcall_execution_start__get__name(smx_simcall_t simcall) {
return simcall->args[0].cc;
}
-static inline void simcall_process_execute__set__name(smx_simcall_t simcall, const char* arg) {
+static inline void simcall_execution_start__set__name(smx_simcall_t simcall, const char* arg) {
simcall->args[0].cc = arg;
}
-static inline double simcall_process_execute__get__flops_amount(smx_simcall_t simcall) {
+static inline double simcall_execution_start__get__flops_amount(smx_simcall_t simcall) {
return simcall->args[1].d;
}
-static inline void simcall_process_execute__set__flops_amount(smx_simcall_t simcall, double arg) {
+static inline void simcall_execution_start__set__flops_amount(smx_simcall_t simcall, double arg) {
simcall->args[1].d = arg;
}
-static inline double simcall_process_execute__get__priority(smx_simcall_t simcall) {
+static inline double simcall_execution_start__get__priority(smx_simcall_t simcall) {
return simcall->args[2].d;
}
-static inline void simcall_process_execute__set__priority(smx_simcall_t simcall, double arg) {
+static inline void simcall_execution_start__set__priority(smx_simcall_t simcall, double arg) {
simcall->args[2].d = arg;
}
-static inline double simcall_process_execute__get__bound(smx_simcall_t simcall) {
+static inline double simcall_execution_start__get__bound(smx_simcall_t simcall) {
return simcall->args[3].d;
}
-static inline void simcall_process_execute__set__bound(smx_simcall_t simcall, double arg) {
+static inline void simcall_execution_start__set__bound(smx_simcall_t simcall, double arg) {
simcall->args[3].d = arg;
}
-static inline unsigned long simcall_process_execute__get__affinity_mask(smx_simcall_t simcall) {
+static inline unsigned long simcall_execution_start__get__affinity_mask(smx_simcall_t simcall) {
return simcall->args[4].ul;
}
-static inline void simcall_process_execute__set__affinity_mask(smx_simcall_t simcall, unsigned long arg) {
+static inline void simcall_execution_start__set__affinity_mask(smx_simcall_t simcall, unsigned long arg) {
simcall->args[4].ul = arg;
}
-static inline smx_synchro_t simcall_process_execute__get__result(smx_simcall_t simcall){
+static inline smx_synchro_t simcall_execution_start__get__result(smx_simcall_t simcall){
return (smx_synchro_t) simcall->result.dp;
}
-static inline void simcall_process_execute__set__result(smx_simcall_t simcall, void* result){
+static inline void simcall_execution_start__set__result(smx_simcall_t simcall, void* result){
simcall->result.dp = result;
}
-static inline const char* simcall_process_parallel_execute__get__name(smx_simcall_t simcall) {
+static inline const char* simcall_execution_parallel_start__get__name(smx_simcall_t simcall) {
return simcall->args[0].cc;
}
-static inline void simcall_process_parallel_execute__set__name(smx_simcall_t simcall, const char* arg) {
+static inline void simcall_execution_parallel_start__set__name(smx_simcall_t simcall, const char* arg) {
simcall->args[0].cc = arg;
}
-static inline int simcall_process_parallel_execute__get__host_nb(smx_simcall_t simcall) {
+static inline int simcall_execution_parallel_start__get__host_nb(smx_simcall_t simcall) {
return simcall->args[1].i;
}
-static inline void simcall_process_parallel_execute__set__host_nb(smx_simcall_t simcall, int arg) {
+static inline void simcall_execution_parallel_start__set__host_nb(smx_simcall_t simcall, int arg) {
simcall->args[1].i = arg;
}
-static inline sg_host_t* simcall_process_parallel_execute__get__host_list(smx_simcall_t simcall) {
+static inline sg_host_t* simcall_execution_parallel_start__get__host_list(smx_simcall_t simcall) {
return (sg_host_t*) simcall->args[2].dp;
}
-static inline void simcall_process_parallel_execute__set__host_list(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_parallel_start__set__host_list(smx_simcall_t simcall, void* arg) {
simcall->args[2].dp = arg;
}
-static inline double* simcall_process_parallel_execute__get__flops_amount(smx_simcall_t simcall) {
+static inline double* simcall_execution_parallel_start__get__flops_amount(smx_simcall_t simcall) {
return (double*) simcall->args[3].dp;
}
-static inline void simcall_process_parallel_execute__set__flops_amount(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_parallel_start__set__flops_amount(smx_simcall_t simcall, void* arg) {
simcall->args[3].dp = arg;
}
-static inline double* simcall_process_parallel_execute__get__bytes_amount(smx_simcall_t simcall) {
+static inline double* simcall_execution_parallel_start__get__bytes_amount(smx_simcall_t simcall) {
return (double*) simcall->args[4].dp;
}
-static inline void simcall_process_parallel_execute__set__bytes_amount(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_parallel_start__set__bytes_amount(smx_simcall_t simcall, void* arg) {
simcall->args[4].dp = arg;
}
-static inline double simcall_process_parallel_execute__get__amount(smx_simcall_t simcall) {
+static inline double simcall_execution_parallel_start__get__amount(smx_simcall_t simcall) {
return simcall->args[5].d;
}
-static inline void simcall_process_parallel_execute__set__amount(smx_simcall_t simcall, double arg) {
+static inline void simcall_execution_parallel_start__set__amount(smx_simcall_t simcall, double arg) {
simcall->args[5].d = arg;
}
-static inline double simcall_process_parallel_execute__get__rate(smx_simcall_t simcall) {
+static inline double simcall_execution_parallel_start__get__rate(smx_simcall_t simcall) {
return simcall->args[6].d;
}
-static inline void simcall_process_parallel_execute__set__rate(smx_simcall_t simcall, double arg) {
+static inline void simcall_execution_parallel_start__set__rate(smx_simcall_t simcall, double arg) {
simcall->args[6].d = arg;
}
-static inline smx_synchro_t simcall_process_parallel_execute__get__result(smx_simcall_t simcall){
+static inline smx_synchro_t simcall_execution_parallel_start__get__result(smx_simcall_t simcall){
return (smx_synchro_t) simcall->result.dp;
}
-static inline void simcall_process_parallel_execute__set__result(smx_simcall_t simcall, void* result){
+static inline void simcall_execution_parallel_start__set__result(smx_simcall_t simcall, void* result){
simcall->result.dp = result;
}
-static inline smx_synchro_t simcall_process_execution_destroy__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_destroy__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_destroy__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_destroy__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline smx_synchro_t simcall_process_execution_cancel__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_cancel__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_cancel__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_cancel__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline smx_synchro_t simcall_process_execution_get_remains__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_get_remains__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_get_remains__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_get_remains__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline double simcall_process_execution_get_remains__get__result(smx_simcall_t simcall){
+static inline double simcall_execution_get_remains__get__result(smx_simcall_t simcall){
return simcall->result.d;
}
-static inline void simcall_process_execution_get_remains__set__result(smx_simcall_t simcall, double result){
+static inline void simcall_execution_get_remains__set__result(smx_simcall_t simcall, double result){
simcall->result.d = result;
}
-static inline smx_synchro_t simcall_process_execution_get_state__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_get_state__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_get_state__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_get_state__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline e_smx_state_t simcall_process_execution_get_state__get__result(smx_simcall_t simcall){
+static inline e_smx_state_t simcall_execution_get_state__get__result(smx_simcall_t simcall){
return (e_smx_state_t) simcall->result.i;
}
-static inline void simcall_process_execution_get_state__set__result(smx_simcall_t simcall, int result){
+static inline void simcall_execution_get_state__set__result(smx_simcall_t simcall, int result){
simcall->result.i = result;
}
-static inline smx_synchro_t simcall_process_execution_set_priority__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_set_priority__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_set_priority__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_set_priority__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline double simcall_process_execution_set_priority__get__priority(smx_simcall_t simcall) {
+static inline double simcall_execution_set_priority__get__priority(smx_simcall_t simcall) {
return simcall->args[1].d;
}
-static inline void simcall_process_execution_set_priority__set__priority(smx_simcall_t simcall, double arg) {
+static inline void simcall_execution_set_priority__set__priority(smx_simcall_t simcall, double arg) {
simcall->args[1].d = arg;
}
-static inline smx_synchro_t simcall_process_execution_set_bound__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_set_bound__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_set_bound__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_set_bound__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline double simcall_process_execution_set_bound__get__bound(smx_simcall_t simcall) {
+static inline double simcall_execution_set_bound__get__bound(smx_simcall_t simcall) {
return simcall->args[1].d;
}
-static inline void simcall_process_execution_set_bound__set__bound(smx_simcall_t simcall, double arg) {
+static inline void simcall_execution_set_bound__set__bound(smx_simcall_t simcall, double arg) {
simcall->args[1].d = arg;
}
-static inline smx_synchro_t simcall_process_execution_set_affinity__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_set_affinity__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_set_affinity__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_set_affinity__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline sg_host_t simcall_process_execution_set_affinity__get__ws(smx_simcall_t simcall) {
+static inline sg_host_t simcall_execution_set_affinity__get__ws(smx_simcall_t simcall) {
return (sg_host_t) simcall->args[1].dp;
}
-static inline void simcall_process_execution_set_affinity__set__ws(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_set_affinity__set__ws(smx_simcall_t simcall, void* arg) {
simcall->args[1].dp = arg;
}
-static inline unsigned long simcall_process_execution_set_affinity__get__mask(smx_simcall_t simcall) {
+static inline unsigned long simcall_execution_set_affinity__get__mask(smx_simcall_t simcall) {
return simcall->args[2].ul;
}
-static inline void simcall_process_execution_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg) {
+static inline void simcall_execution_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg) {
simcall->args[2].ul = arg;
}
-static inline smx_synchro_t simcall_process_execution_wait__get__execution(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_execution_wait__get__execution(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
-static inline void simcall_process_execution_wait__set__execution(smx_simcall_t simcall, void* arg) {
+static inline void simcall_execution_wait__set__execution(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-static inline int simcall_process_execution_wait__get__result(smx_simcall_t simcall){
+static inline int simcall_execution_wait__get__result(smx_simcall_t simcall){
return simcall->result.i;
}
-static inline void simcall_process_execution_wait__set__result(smx_simcall_t simcall, int result){
+static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, int result){
simcall->result.i = result;
}
XBT_PRIVATE void simcall_HANDLER_process_set_host(smx_simcall_t simcall, smx_process_t process, sg_host_t dest);
XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout);
XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
-XBT_PRIVATE smx_synchro_t simcall_HANDLER_process_execute(smx_simcall_t simcall, const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask);
-XBT_PRIVATE void simcall_HANDLER_process_execution_wait(smx_simcall_t simcall, smx_synchro_t execution);
+XBT_PRIVATE smx_synchro_t simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask);
+XBT_PRIVATE void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_synchro_t execution);
XBT_PRIVATE smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process);
XBT_PRIVATE smx_synchro_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data);
XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
return (int) self->simcall.result.i;
}
-inline static smx_synchro_t simcall_BODY_process_execute(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
+inline static smx_synchro_t simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_process_execute(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
+ if (0) simcall_HANDLER_execution_start(&self->simcall, name, flops_amount, priority, bound, affinity_mask);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTE;
+ self->simcall.call = SIMCALL_EXECUTION_START;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].cc = (const char*) name;
return (smx_synchro_t) self->simcall.result.dp;
}
-inline static smx_synchro_t simcall_BODY_process_parallel_execute(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
+inline static smx_synchro_t simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
+ if (0) SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
+ self->simcall.call = SIMCALL_EXECUTION_PARALLEL_START;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].cc = (const char*) name;
return (smx_synchro_t) self->simcall.result.dp;
}
-inline static void simcall_BODY_process_execution_destroy(smx_synchro_t execution) {
+inline static void simcall_BODY_execution_destroy(smx_synchro_t execution) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_execution_destroy(execution);
+ if (0) SIMIX_execution_destroy(execution);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_DESTROY;
+ self->simcall.call = SIMCALL_EXECUTION_DESTROY;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
}
-inline static void simcall_BODY_process_execution_cancel(smx_synchro_t execution) {
+inline static void simcall_BODY_execution_cancel(smx_synchro_t execution) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_execution_cancel(execution);
+ if (0) SIMIX_execution_cancel(execution);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_CANCEL;
+ self->simcall.call = SIMCALL_EXECUTION_CANCEL;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
}
-inline static double simcall_BODY_process_execution_get_remains(smx_synchro_t execution) {
+inline static double simcall_BODY_execution_get_remains(smx_synchro_t execution) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_execution_get_remains(execution);
+ if (0) SIMIX_execution_get_remains(execution);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_REMAINS;
+ self->simcall.call = SIMCALL_EXECUTION_GET_REMAINS;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
return (double) self->simcall.result.d;
}
-inline static e_smx_state_t simcall_BODY_process_execution_get_state(smx_synchro_t execution) {
+inline static e_smx_state_t simcall_BODY_execution_get_state(smx_synchro_t execution) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_execution_get_state(execution);
+ if (0) SIMIX_execution_get_state(execution);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_GET_STATE;
+ self->simcall.call = SIMCALL_EXECUTION_GET_STATE;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
return (e_smx_state_t) self->simcall.result.i;
}
-inline static void simcall_BODY_process_execution_set_priority(smx_synchro_t execution, double priority) {
+inline static void simcall_BODY_execution_set_priority(smx_synchro_t execution, double priority) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_execution_set_priority(execution, priority);
+ if (0) SIMIX_execution_set_priority(execution, priority);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_PRIORITY;
+ self->simcall.call = SIMCALL_EXECUTION_SET_PRIORITY;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
}
-inline static void simcall_BODY_process_execution_set_bound(smx_synchro_t execution, double bound) {
+inline static void simcall_BODY_execution_set_bound(smx_synchro_t execution, double bound) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_execution_set_bound(execution, bound);
+ if (0) SIMIX_execution_set_bound(execution, bound);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_BOUND;
+ self->simcall.call = SIMCALL_EXECUTION_SET_BOUND;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
}
-inline static void simcall_BODY_process_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
+inline static void simcall_BODY_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_execution_set_affinity(execution, ws, mask);
+ if (0) SIMIX_execution_set_affinity(execution, ws, mask);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_SET_AFFINITY;
+ self->simcall.call = SIMCALL_EXECUTION_SET_AFFINITY;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
}
-inline static int simcall_BODY_process_execution_wait(smx_synchro_t execution) {
+inline static int simcall_BODY_execution_wait(smx_synchro_t execution) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_process_execution_wait(&self->simcall, execution);
+ if (0) simcall_HANDLER_execution_wait(&self->simcall, execution);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
- self->simcall.call = SIMCALL_PROCESS_EXECUTION_WAIT;
+ self->simcall.call = SIMCALL_EXECUTION_WAIT;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
SIMCALL_PROCESS_IS_SUSPENDED,
SIMCALL_PROCESS_JOIN,
SIMCALL_PROCESS_SLEEP,
- SIMCALL_PROCESS_EXECUTE,
- SIMCALL_PROCESS_PARALLEL_EXECUTE,
- SIMCALL_PROCESS_EXECUTION_DESTROY,
- SIMCALL_PROCESS_EXECUTION_CANCEL,
- SIMCALL_PROCESS_EXECUTION_GET_REMAINS,
- SIMCALL_PROCESS_EXECUTION_GET_STATE,
- SIMCALL_PROCESS_EXECUTION_SET_PRIORITY,
- SIMCALL_PROCESS_EXECUTION_SET_BOUND,
- SIMCALL_PROCESS_EXECUTION_SET_AFFINITY,
- SIMCALL_PROCESS_EXECUTION_WAIT,
+ SIMCALL_EXECUTION_START,
+ SIMCALL_EXECUTION_PARALLEL_START,
+ SIMCALL_EXECUTION_DESTROY,
+ SIMCALL_EXECUTION_CANCEL,
+ SIMCALL_EXECUTION_GET_REMAINS,
+ SIMCALL_EXECUTION_GET_STATE,
+ SIMCALL_EXECUTION_SET_PRIORITY,
+ SIMCALL_EXECUTION_SET_BOUND,
+ SIMCALL_EXECUTION_SET_AFFINITY,
+ SIMCALL_EXECUTION_WAIT,
SIMCALL_PROCESS_ON_EXIT,
SIMCALL_PROCESS_AUTO_RESTART_SET,
SIMCALL_PROCESS_RESTART,
"SIMCALL_PROCESS_IS_SUSPENDED",
"SIMCALL_PROCESS_JOIN",
"SIMCALL_PROCESS_SLEEP",
- "SIMCALL_PROCESS_EXECUTE",
- "SIMCALL_PROCESS_PARALLEL_EXECUTE",
- "SIMCALL_PROCESS_EXECUTION_DESTROY",
- "SIMCALL_PROCESS_EXECUTION_CANCEL",
- "SIMCALL_PROCESS_EXECUTION_GET_REMAINS",
- "SIMCALL_PROCESS_EXECUTION_GET_STATE",
- "SIMCALL_PROCESS_EXECUTION_SET_PRIORITY",
- "SIMCALL_PROCESS_EXECUTION_SET_BOUND",
- "SIMCALL_PROCESS_EXECUTION_SET_AFFINITY",
- "SIMCALL_PROCESS_EXECUTION_WAIT",
+ "SIMCALL_EXECUTION_START",
+ "SIMCALL_EXECUTION_PARALLEL_START",
+ "SIMCALL_EXECUTION_DESTROY",
+ "SIMCALL_EXECUTION_CANCEL",
+ "SIMCALL_EXECUTION_GET_REMAINS",
+ "SIMCALL_EXECUTION_GET_STATE",
+ "SIMCALL_EXECUTION_SET_PRIORITY",
+ "SIMCALL_EXECUTION_SET_BOUND",
+ "SIMCALL_EXECUTION_SET_AFFINITY",
+ "SIMCALL_EXECUTION_WAIT",
"SIMCALL_PROCESS_ON_EXIT",
"SIMCALL_PROCESS_AUTO_RESTART_SET",
"SIMCALL_PROCESS_RESTART",
simcall_HANDLER_process_sleep(simcall , simcall->args[0].d);
break;
-case SIMCALL_PROCESS_EXECUTE:
- simcall->result.dp = simcall_HANDLER_process_execute(simcall , simcall->args[0].cc, simcall->args[1].d, simcall->args[2].d, simcall->args[3].d, simcall->args[4].ul);
+case SIMCALL_EXECUTION_START:
+ simcall->result.dp = simcall_HANDLER_execution_start(simcall , simcall->args[0].cc, simcall->args[1].d, simcall->args[2].d, simcall->args[3].d, simcall->args[4].ul);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_PARALLEL_EXECUTE:
- simcall->result.dp = SIMIX_process_parallel_execute( simcall->args[0].cc, simcall->args[1].i,(sg_host_t*) simcall->args[2].dp,(double*) simcall->args[3].dp,(double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d);
+case SIMCALL_EXECUTION_PARALLEL_START:
+ simcall->result.dp = SIMIX_execution_parallel_start( simcall->args[0].cc, simcall->args[1].i,(sg_host_t*) simcall->args[2].dp,(double*) simcall->args[3].dp,(double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_DESTROY:
- SIMIX_process_execution_destroy((smx_synchro_t) simcall->args[0].dp);
+case SIMCALL_EXECUTION_DESTROY:
+ SIMIX_execution_destroy((smx_synchro_t) simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_CANCEL:
- SIMIX_process_execution_cancel((smx_synchro_t) simcall->args[0].dp);
+case SIMCALL_EXECUTION_CANCEL:
+ SIMIX_execution_cancel((smx_synchro_t) simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_GET_REMAINS:
- simcall->result.d = SIMIX_process_execution_get_remains((smx_synchro_t) simcall->args[0].dp);
+case SIMCALL_EXECUTION_GET_REMAINS:
+ simcall->result.d = SIMIX_execution_get_remains((smx_synchro_t) simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_GET_STATE:
- simcall->result.i = SIMIX_process_execution_get_state((smx_synchro_t) simcall->args[0].dp);
+case SIMCALL_EXECUTION_GET_STATE:
+ simcall->result.i = SIMIX_execution_get_state((smx_synchro_t) simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_SET_PRIORITY:
- SIMIX_process_execution_set_priority((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
+case SIMCALL_EXECUTION_SET_PRIORITY:
+ SIMIX_execution_set_priority((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_SET_BOUND:
- SIMIX_process_execution_set_bound((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
+case SIMCALL_EXECUTION_SET_BOUND:
+ SIMIX_execution_set_bound((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_SET_AFFINITY:
- SIMIX_process_execution_set_affinity((smx_synchro_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp, simcall->args[2].ul);
+case SIMCALL_EXECUTION_SET_AFFINITY:
+ SIMIX_execution_set_affinity((smx_synchro_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp, simcall->args[2].ul);
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTION_WAIT:
- simcall_HANDLER_process_execution_wait(simcall , (smx_synchro_t) simcall->args[0].dp);
+case SIMCALL_EXECUTION_WAIT:
+ simcall_HANDLER_execution_wait(simcall , (smx_synchro_t) simcall->args[0].dp);
break;
case SIMCALL_PROCESS_ON_EXIT:
Func - process_is_suspended (int) (process, void*, smx_process_t)
Blck H process_join (int) (process, void*, smx_process_t) (timeout, double)
Blck H process_sleep (int) (duration, double)
-Func H process_execute (void*, smx_synchro_t) (name, const char*) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
-
-Func - process_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, sg_host_t*) (flops_amount, void*, double*) (bytes_amount, void*, double*) (amount, double) (rate, double)
-Proc - process_execution_destroy (void) (execution, void*, smx_synchro_t)
-Proc - process_execution_cancel (void) (execution, void*, smx_synchro_t)
-Func - process_execution_get_remains (double) (execution, void*, smx_synchro_t)
-Func - process_execution_get_state (int, e_smx_state_t) (execution, void*, smx_synchro_t)
-Proc - process_execution_set_priority (void) (execution, void*, smx_synchro_t) (priority, double)
-Proc - process_execution_set_bound (void) (execution, void*, smx_synchro_t) (bound, double)
-Proc - process_execution_set_affinity (void) (execution, void*, smx_synchro_t) (ws, void*, sg_host_t) (mask, unsigned long)
-Blck H process_execution_wait (int) (execution, void*, smx_synchro_t)
+
+Func H execution_start (void*, smx_synchro_t) (name, const char*) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
+Func - execution_parallel_start (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, sg_host_t*) (flops_amount, void*, double*) (bytes_amount, void*, double*) (amount, double) (rate, double)
+Proc - execution_destroy (void) (execution, void*, smx_synchro_t)
+Proc - execution_cancel (void) (execution, void*, smx_synchro_t)
+Func - execution_get_remains (double) (execution, void*, smx_synchro_t)
+Func - execution_get_state (int, e_smx_state_t) (execution, void*, smx_synchro_t)
+Proc - execution_set_priority (void) (execution, void*, smx_synchro_t) (priority, double)
+Proc - execution_set_bound (void) (execution, void*, smx_synchro_t) (bound, double)
+Proc - execution_set_affinity (void) (execution, void*, smx_synchro_t) (ws, void*, sg_host_t) (mask, unsigned long)
+Blck H execution_wait (int) (execution, void*, smx_synchro_t)
Proc - process_on_exit (void) (process, void*, smx_process_t) (fun, FPtr, int_f_pvoid_pvoid_t) (data, void*)
Proc - process_auto_restart_set (void) (process, void*, smx_process_t) (auto_restart, int)
xbt_dynar_reset(process_list);
}
-smx_synchro_t simcall_HANDLER_process_execute(smx_simcall_t simcall,
+smx_synchro_t simcall_HANDLER_execution_start(smx_simcall_t simcall,
const char* name, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
- return SIMIX_process_execute(simcall->issuer, name,flops_amount,priority,bound,affinity_mask);
+ return SIMIX_execution_start(simcall->issuer, name,flops_amount,priority,bound,affinity_mask);
}
-smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
+smx_synchro_t SIMIX_execution_start(smx_process_t issuer, const char *name,
double flops_amount, double priority, double bound, unsigned long affinity_mask){
/* alloc structures and initialize */
/* set surf's action */
if (!MC_is_active() && !MC_record_replay_is_active()) {
- synchro->execution.surf_exec = issuer->host->pimpl_cpu->execute(flops_amount);
+ synchro->execution.surf_exec = issuer->host->pimpl_cpu->execution_start(flops_amount);
synchro->execution.surf_exec->setData(synchro);
synchro->execution.surf_exec->setPriority(priority);
return synchro;
}
-smx_synchro_t SIMIX_process_parallel_execute(const char *name,
+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){
return synchro;
}
-void SIMIX_process_execution_destroy(smx_synchro_t synchro){
+void SIMIX_execution_destroy(smx_synchro_t synchro)
+{
XBT_DEBUG("Destroy synchro %p", synchro);
if (synchro->execution.surf_exec) {
xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
}
-void SIMIX_process_execution_cancel(smx_synchro_t synchro){
+void SIMIX_execution_cancel(smx_synchro_t synchro)
+{
XBT_DEBUG("Cancel synchro %p", synchro);
if (synchro->execution.surf_exec)
synchro->execution.surf_exec->cancel();
}
-double SIMIX_process_execution_get_remains(smx_synchro_t synchro){
+double SIMIX_execution_get_remains(smx_synchro_t synchro)
+{
double result = 0.0;
if (synchro->state == SIMIX_RUNNING)
return result;
}
-e_smx_state_t SIMIX_process_execution_get_state(smx_synchro_t synchro){
+e_smx_state_t SIMIX_execution_get_state(smx_synchro_t synchro)
+{
return synchro->state;
}
-void SIMIX_process_execution_set_priority(smx_synchro_t synchro, double priority){
-
+void SIMIX_execution_set_priority(smx_synchro_t synchro, double priority)
+{
if(synchro->execution.surf_exec)
- synchro->execution.surf_exec->setPriority(priority);
+ synchro->execution.surf_exec->setPriority(priority);
}
-void SIMIX_process_execution_set_bound(smx_synchro_t synchro, double bound){
-
+void SIMIX_execution_set_bound(smx_synchro_t synchro, double bound)
+{
if(synchro->execution.surf_exec)
- static_cast<simgrid::surf::CpuAction*>(synchro->execution.surf_exec)
- ->setBound(bound);
+ static_cast<simgrid::surf::CpuAction*>(synchro->execution.surf_exec)->setBound(bound);
}
-void SIMIX_process_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask){
+void SIMIX_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask)
+{
xbt_assert(synchro->type == SIMIX_SYNC_EXECUTE);
if (synchro->execution.surf_exec) {
}
}
-void simcall_HANDLER_process_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro){
+void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro)
+{
XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state);
SIMIX_execution_finish(synchro);
}
-void SIMIX_host_execution_suspend(smx_synchro_t synchro)
+void SIMIX_execution_suspend(smx_synchro_t synchro)
{
if(synchro->execution.surf_exec)
synchro->execution.surf_exec->suspend();
}
-void SIMIX_host_execution_resume(smx_synchro_t synchro)
+void SIMIX_execution_resume(smx_synchro_t synchro)
{
if(synchro->execution.surf_exec)
synchro->execution.surf_exec->resume();
}
simcall->issuer->waiting_synchro = NULL;
- simcall_process_execution_wait__set__result(simcall, synchro->state);
+ simcall_execution_wait__set__result(simcall, synchro->state);
SIMIX_simcall_answer(simcall);
}
/* We no longer need it */
- SIMIX_process_execution_destroy(synchro);
+ SIMIX_execution_destroy(synchro);
}
XBT_PRIVATE void SIMIX_host_restart_processes(sg_host_t host);
XBT_PRIVATE void SIMIX_host_autorestart(sg_host_t host);
-XBT_PRIVATE smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
+XBT_PRIVATE smx_synchro_t SIMIX_execution_start(smx_process_t issuer, const char *name,
double flops_amount, double priority, double bound, unsigned long affinity_mask);
-XBT_PRIVATE smx_synchro_t SIMIX_process_parallel_execute(const char *name,
+XBT_PRIVATE 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);
-XBT_PRIVATE void SIMIX_process_execution_destroy(smx_synchro_t synchro);
-XBT_PRIVATE void SIMIX_process_execution_cancel(smx_synchro_t synchro);
-XBT_PRIVATE double SIMIX_process_execution_get_remains(smx_synchro_t synchro);
-XBT_PRIVATE e_smx_state_t SIMIX_process_execution_get_state(smx_synchro_t synchro);
-XBT_PRIVATE void SIMIX_process_execution_set_priority(smx_synchro_t synchro, double priority);
-XBT_PRIVATE void SIMIX_process_execution_set_bound(smx_synchro_t synchro, double bound);
-XBT_PRIVATE void SIMIX_process_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask);
-
-XBT_PRIVATE void SIMIX_host_execution_suspend(smx_synchro_t synchro);
-XBT_PRIVATE void SIMIX_host_execution_resume(smx_synchro_t synchro);
+XBT_PRIVATE void SIMIX_execution_destroy(smx_synchro_t synchro);
+XBT_PRIVATE void SIMIX_execution_cancel(smx_synchro_t synchro);
+XBT_PRIVATE double SIMIX_execution_get_remains(smx_synchro_t synchro);
+XBT_PRIVATE e_smx_state_t SIMIX_execution_get_state(smx_synchro_t synchro);
+XBT_PRIVATE void SIMIX_execution_set_priority(smx_synchro_t synchro, double priority);
+XBT_PRIVATE void SIMIX_execution_set_bound(smx_synchro_t synchro, double bound);
+XBT_PRIVATE void SIMIX_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask);
+
+XBT_PRIVATE void SIMIX_execution_suspend(smx_synchro_t synchro);
+XBT_PRIVATE void SIMIX_execution_resume(smx_synchro_t synchro);
XBT_PRIVATE void SIMIX_post_host_execute(smx_synchro_t synchro);
XBT_PRIVATE void SIMIX_set_category(smx_synchro_t synchro, const char *category);
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_process_execution_destroy(process->waiting_synchro);
+ SIMIX_execution_destroy(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_process_execution_cancel(process->waiting_synchro);
+ SIMIX_execution_cancel(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
} else {
xbt_fifo_push(sync_suspend->simcalls, simcall);
process->waiting_synchro = sync_suspend;
- SIMIX_host_execution_suspend(process->waiting_synchro);
+ SIMIX_execution_suspend(process->waiting_synchro);
}
/* If we are suspending ourselves, then just do not finish the simcall now */
}
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_host_execution_suspend(process->waiting_synchro);
+ SIMIX_execution_suspend(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
}
} else {
/* FIXME: computation size is zero. Is it okay that bound is zero ? */
- return SIMIX_process_execute(process, "suspend", 0.0, 1.0, 0.0, 0);
+ return SIMIX_execution_start(process, "suspend", 0.0, 1.0, 0.0, 0);
}
}
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_host_execution_resume(process->waiting_synchro);
+ SIMIX_execution_resume(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
void smpi_execute_flops(double flops) {
smx_synchro_t action;
XBT_DEBUG("Handle real computation time: %f flops", flops);
- action = simcall_process_execute("computation", flops, 1, 0, 0);
+ action = simcall_execution_start("computation", flops, 1, 0, 0);
simcall_set_category (action, TRACE_internal_smpi_get_category());
- simcall_process_execution_wait(action);
+ simcall_execution_wait(action);
smpi_switch_data_segment(smpi_process_index());
}
return;
}
-CpuAction *CpuCas01::execute(double size)
+CpuAction *CpuCas01::execution_start(double size)
{
XBT_IN("(%s,%g)", getName(), size);
int initiallyOn, tmgr_trace_t stateTrace) ;
~CpuCas01();
void updateState(tmgr_trace_iterator_t event_type, double value, double date) override;
- CpuAction *execute(double size) override;
+ CpuAction *execution_start(double size) override;
CpuAction *sleep(double duration) override;
bool isUsed() override;
* Action *
**********/
class CpuCas01Action: public CpuAction {
- friend CpuAction *CpuCas01::execute(double size);
+ friend CpuAction *CpuCas01::execution_start(double size);
friend CpuAction *CpuCas01::sleep(double duration);
public:
CpuCas01Action(Model *model, double cost, bool failed, double speed,
* @param size The value of the processing amount (in flop) needed to process
* @return The CpuAction corresponding to the processing
*/
- virtual simgrid::surf::Action *execute(double size)=0;
+ virtual simgrid::surf::Action *execution_start(double size)=0;
/**
* @brief Make a process sleep for duration (in seconds)
m_lastUpdate = now;
}
-CpuAction *CpuTi::execute(double size)
+CpuAction *CpuTi::execution_start(double size)
{
XBT_IN("(%s,%g)", getName(), size);
CpuTiAction *action = new CpuTiAction(static_cast<CpuTiModel*>(getModel()), size, isOff(), this);
void updateState(tmgr_trace_iterator_t event_type, double value, double date) override;
void updateActionsFinishTime(double now);
bool isUsed() override;
- CpuAction *execute(double size) override;
+ CpuAction *execution_start(double size) override;
CpuAction *sleep(double duration) override;
double getAvailableSpeed() override;
Action *action =NULL;
if ((host_nb == 1)
&& (cost_or_zero(bytes_amount, 0) == 0.0)){
- action = host_list[0]->pimpl_cpu->execute(flops_amount[0]);
+ action = host_list[0]->pimpl_cpu->execution_start(flops_amount[0]);
} else if ((host_nb == 1)
&& (cost_or_zero(flops_amount, 0) == 0.0)) {
action = surf_network_model->communicate(host_list[0]->pimpl_netcard,
lmm_constraint_shared(getConstraint());
}
-Action *CpuL07::execute(double size)
+Action *CpuL07::execution_start(double size)
{
sg_host_t*host_list = xbt_new0(sg_host_t, 1);
double *flops_amount = xbt_new0(double, 1);
host_list[0] = getHost();
flops_amount[0] = size;
- return static_cast<CpuL07Model*>(getModel())
- ->p_hostModel
+ return static_cast<CpuL07Model*>(getModel())->p_hostModel
->executeParallelTask( 1, host_list, flops_amount, bytes_amount, -1);
}
Action *CpuL07::sleep(double duration)
{
- L07Action *action = NULL;
-
- XBT_IN("(%s,%g)", getName(), duration);
-
- action = static_cast<L07Action*>(execute(1.0));
+ L07Action *action = static_cast<L07Action*>(execution_start(1.0));
action->m_maxDuration = duration;
action->m_suspended = 2;
lmm_update_variable_weight(getModel()->getMaxminSystem(), action->getVariable(), 0.0);
- XBT_OUT();
return action;
}
~CpuL07();
bool isUsed() override;
void updateState(tmgr_trace_iterator_t event_type, double value, double date) override;
- Action *execute(double size) override;
+ Action *execution_start(double size) override;
Action *sleep(double duration) override;
protected:
void onSpeedChange() override;
* Action *
**********/
class L07Action : public CpuAction {
- friend Action *CpuL07::execute(double size);
+ friend Action *CpuL07::execution_start(double size);
friend Action *CpuL07::sleep(double duration);
friend Action *HostL07Model::executeParallelTask(int host_nb,
sg_host_t*host_list,
double *flops_amount,
- double *bytes_amount,
+ double *bytes_amount,
double rate);
public:
L07Action(Model *model, int host_nb,
/* We create cpu_action corresponding to a VM process on the host operating system. */
/* FIXME: TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */
- p_action = sub_cpu->execute(0);
+ p_action = sub_cpu->execution_start(0);
XBT_INFO("Create VM(%s)@PM(%s) with %ld mounted disks",
name, p_hostPM->name().c_str(), xbt_dynar_length(p_storage));
/* Update vcpu's action for the new pm */
{
/* create a cpu action bound to the pm model at the destination. */
- CpuAction *new_cpu_action = static_cast<CpuAction*>(host_dest->pimpl_cpu->execute(0));
+ CpuAction *new_cpu_action = static_cast<CpuAction*>(host_dest->pimpl_cpu->execution_start(0));
e_surf_action_state_t state = p_action->getState();
if (state != SURF_ACTION_DONE)
XBT_DEBUG("%s : %p", surf_cpu_name(hostB->pimpl_cpu), hostB);
/* Let's do something on it */
- actionA = hostA->pimpl_cpu->execute(1000.0);
- actionB = hostB->pimpl_cpu->execute(1000.0);
+ actionA = hostA->pimpl_cpu->execution_start(1000.0);
+ actionB = hostB->pimpl_cpu->execution_start(1000.0);
actionC = surf_host_sleep(hostB, 7.32);
/* Use whatever calling style you want... */
XBT_DEBUG("%s : %p", sg_host_get_name(hostB), hostB);
/* Let's do something on it */
- hostA->pimpl_cpu->execute(1000.0);
- hostB->pimpl_cpu->execute(1000.0);
+ hostA->pimpl_cpu->execution_start(1000.0);
+ hostB->pimpl_cpu->execution_start(1000.0);
surf_host_sleep(hostB, 7.32);
surf_network_model_communicate(surf_network_model, hostA, hostB, 150.0, -1.0);