XBT_PUBLIC(double) simcall_host_get_wattmin_at(sg_host_t host, int pstate);
XBT_PUBLIC(double) simcall_host_get_wattmax_at(sg_host_t host, int pstate);
-XBT_PUBLIC(smx_synchro_t) simcall_process_execute(const char *name, sg_host_t host,
+XBT_PUBLIC(smx_synchro_t) simcall_process_execute(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_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,
- p_simdata->m_host,
simdata->flops_amount,
simdata->priority,
simdata->bound,
* \param affinity_mask
* \return A new SIMIX execution synchronization
*/
-smx_synchro_t simcall_process_execute(const char *name, sg_host_t host,
+smx_synchro_t simcall_process_execute(const char *name,
double flops_amount,
double priority, double bound, unsigned long affinity_mask)
{
xbt_assert(isfinite(flops_amount), "flops_amount is not finite!");
xbt_assert(isfinite(priority), "priority is not finite!");
- return simcall_BODY_process_execute(name, host, flops_amount, priority, bound, affinity_mask);
+ return simcall_BODY_process_execute(name, flops_amount, priority, bound, affinity_mask);
}
/**
simcall->result.d = result;
}
-static inline const char* simcall_process_execute__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) {
- simcall->args[0].cc = arg;
-}
-static inline sg_host_t simcall_process_execute__get__host(smx_simcall_t simcall) {
- return (sg_host_t) simcall->args[1].dp;
-}
-static inline void simcall_process_execute__set__host(smx_simcall_t simcall, void* arg) {
- simcall->args[1].dp = arg;
-}
-static inline double simcall_process_execute__get__flops_amount(smx_simcall_t simcall) {
- return simcall->args[2].d;
-}
-static inline void simcall_process_execute__set__flops_amount(smx_simcall_t simcall, double arg) {
- simcall->args[2].d = arg;
-}
-static inline double simcall_process_execute__get__priority(smx_simcall_t simcall) {
- return simcall->args[3].d;
-}
-static inline void simcall_process_execute__set__priority(smx_simcall_t simcall, double arg) {
- simcall->args[3].d = arg;
-}
-static inline double simcall_process_execute__get__bound(smx_simcall_t simcall) {
- return simcall->args[4].d;
-}
-static inline void simcall_process_execute__set__bound(smx_simcall_t simcall, double arg) {
- simcall->args[4].d = arg;
-}
-static inline unsigned long simcall_process_execute__get__affinity_mask(smx_simcall_t simcall) {
- return simcall->args[5].ul;
-}
-static inline void simcall_process_execute__set__affinity_mask(smx_simcall_t simcall, unsigned long arg) {
- simcall->args[5].ul = arg;
-}
-static inline smx_synchro_t simcall_process_execute__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){
- simcall->result.dp = result;
-}
-
-static inline const char* simcall_process_parallel_execute__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) {
- simcall->args[0].cc = arg;
-}
-static inline int simcall_process_parallel_execute__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) {
- simcall->args[1].i = arg;
-}
-static inline sg_host_t* simcall_process_parallel_execute__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) {
- simcall->args[2].dp = arg;
-}
-static inline double* simcall_process_parallel_execute__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) {
- simcall->args[3].dp = arg;
-}
-static inline double* simcall_process_parallel_execute__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) {
- simcall->args[4].dp = arg;
-}
-static inline double simcall_process_parallel_execute__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) {
- simcall->args[5].d = arg;
-}
-static inline double simcall_process_parallel_execute__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) {
- simcall->args[6].d = arg;
-}
-static inline smx_synchro_t simcall_process_parallel_execute__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){
- simcall->result.dp = result;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-static inline double simcall_process_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){
- simcall->result.d = result;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-static inline e_smx_state_t simcall_process_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){
- simcall->result.i = result;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-static inline double simcall_process_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) {
- simcall->args[1].d = arg;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-static inline double simcall_process_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) {
- simcall->args[1].d = arg;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-static inline sg_host_t simcall_process_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) {
- simcall->args[1].dp = arg;
-}
-static inline unsigned long simcall_process_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) {
- simcall->args[2].ul = arg;
-}
-
-static inline smx_synchro_t simcall_process_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) {
- simcall->args[0].dp = arg;
-}
-static inline int simcall_process_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){
- simcall->result.i = result;
-}
-
static inline sg_host_t simcall_host_get_mounted_storage_list__get__host(smx_simcall_t simcall) {
return (sg_host_t) simcall->args[0].dp;
}
simcall->result.i = result;
}
+static inline const char* simcall_process_execute__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) {
+ simcall->args[0].cc = arg;
+}
+static inline double simcall_process_execute__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) {
+ simcall->args[1].d = arg;
+}
+static inline double simcall_process_execute__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) {
+ simcall->args[2].d = arg;
+}
+static inline double simcall_process_execute__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) {
+ simcall->args[3].d = arg;
+}
+static inline unsigned long simcall_process_execute__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) {
+ simcall->args[4].ul = arg;
+}
+static inline smx_synchro_t simcall_process_execute__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){
+ simcall->result.dp = result;
+}
+
+static inline const char* simcall_process_parallel_execute__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) {
+ simcall->args[0].cc = arg;
+}
+static inline int simcall_process_parallel_execute__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) {
+ simcall->args[1].i = arg;
+}
+static inline sg_host_t* simcall_process_parallel_execute__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) {
+ simcall->args[2].dp = arg;
+}
+static inline double* simcall_process_parallel_execute__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) {
+ simcall->args[3].dp = arg;
+}
+static inline double* simcall_process_parallel_execute__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) {
+ simcall->args[4].dp = arg;
+}
+static inline double simcall_process_parallel_execute__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) {
+ simcall->args[5].d = arg;
+}
+static inline double simcall_process_parallel_execute__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) {
+ simcall->args[6].d = arg;
+}
+static inline smx_synchro_t simcall_process_parallel_execute__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){
+ simcall->result.dp = result;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+static inline double simcall_process_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){
+ simcall->result.d = result;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+static inline e_smx_state_t simcall_process_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){
+ simcall->result.i = result;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+static inline double simcall_process_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) {
+ simcall->args[1].d = arg;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+static inline double simcall_process_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) {
+ simcall->args[1].d = arg;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+static inline sg_host_t simcall_process_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) {
+ simcall->args[1].dp = arg;
+}
+static inline unsigned long simcall_process_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) {
+ simcall->args[2].ul = arg;
+}
+
+static inline smx_synchro_t simcall_process_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) {
+ simcall->args[0].dp = arg;
+}
+static inline int simcall_process_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){
+ simcall->result.i = result;
+}
+
static inline smx_process_t simcall_process_on_exit__get__process(smx_simcall_t simcall) {
return (smx_process_t) simcall->args[0].dp;
}
/* The prototype of all simcall handlers, automatically generated for you */
void simcall_HANDLER_host_off(smx_simcall_t simcall, sg_host_t host);
-void simcall_HANDLER_process_execution_wait(smx_simcall_t simcall, smx_synchro_t execution);
void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, sg_host_t ind_vm);
void simcall_HANDLER_vm_resume(smx_simcall_t simcall, sg_host_t ind_vm);
void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, sg_host_t ind_vm);
void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process);
void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout);
void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
+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);
+void simcall_HANDLER_process_execution_wait(smx_simcall_t simcall, smx_synchro_t execution);
smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process);
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);
void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, 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 self->simcall.result.d;
}
-inline static smx_synchro_t simcall_BODY_process_execute(const char* name, sg_host_t host, 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) SIMIX_process_execute(name, host, 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;
- 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;
- self->simcall.args[1].dp = (void*) host;
- self->simcall.args[2].d = (double) flops_amount;
- self->simcall.args[3].d = (double) priority;
- self->simcall.args[4].d = (double) bound;
- self->simcall.args[5].ul = (unsigned long) affinity_mask;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return 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) {
- 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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
- 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;
- self->simcall.args[1].i = (int) host_nb;
- self->simcall.args[2].dp = (void*) host_list;
- self->simcall.args[3].dp = (void*) flops_amount;
- self->simcall.args[4].dp = (void*) bytes_amount;
- self->simcall.args[5].d = (double) amount;
- self->simcall.args[6].d = (double) rate;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return self->simcall.result.dp;
- }
-
-inline static void simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
-
- }
-
-inline static void simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
-
- }
-
-inline static double simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return self->simcall.result.d;
- }
-
-inline static e_smx_state_t simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return self->simcall.result.i;
- }
-
-inline static void simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- self->simcall.args[1].d = (double) priority;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
-
- }
-
-inline static void simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- self->simcall.args[1].d = (double) bound;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
-
- }
-
-inline static void simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- self->simcall.args[1].dp = (void*) ws;
- self->simcall.args[2].ul = (unsigned long) mask;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
-
- }
-
-inline static int simcall_BODY_process_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);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_PROCESS_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;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return self->simcall.result.i;
- }
-
inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(sg_host_t host) {
smx_process_t self = SIMIX_process_self();
return 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) {
+ 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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_EXECUTE;
+ 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;
+ self->simcall.args[1].d = (double) flops_amount;
+ self->simcall.args[2].d = (double) priority;
+ self->simcall.args[3].d = (double) bound;
+ self->simcall.args[4].ul = (unsigned long) affinity_mask;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+ return 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) {
+ 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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_PARALLEL_EXECUTE;
+ 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;
+ self->simcall.args[1].i = (int) host_nb;
+ self->simcall.args[2].dp = (void*) host_list;
+ self->simcall.args[3].dp = (void*) flops_amount;
+ self->simcall.args[4].dp = (void*) bytes_amount;
+ self->simcall.args[5].d = (double) amount;
+ self->simcall.args[6].d = (double) rate;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+ return self->simcall.result.dp;
+ }
+
+inline static void simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+
+ }
+
+inline static void simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+
+ }
+
+inline static double simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+ return self->simcall.result.d;
+ }
+
+inline static e_smx_state_t simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+ return self->simcall.result.i;
+ }
+
+inline static void simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ self->simcall.args[1].d = (double) priority;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+
+ }
+
+inline static void simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ self->simcall.args[1].d = (double) bound;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+
+ }
+
+inline static void simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ self->simcall.args[1].dp = (void*) ws;
+ self->simcall.args[2].ul = (unsigned long) mask;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+
+ }
+
+inline static int simcall_BODY_process_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);
+ /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+
+ self->simcall.call = SIMCALL_PROCESS_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;
+ if (self != simix_global->maestro_process) {
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
+ SIMIX_process_yield(self);
+ } else {
+ SIMIX_simcall_handle(&self->simcall, 0);
+ }
+ return self->simcall.result.i;
+ }
+
inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
smx_process_t self = SIMIX_process_self();
SIMCALL_HOST_SET_PSTATE,
SIMCALL_HOST_GET_PSTATE,
SIMCALL_HOST_GET_CONSUMED_ENERGY,
- 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_HOST_GET_MOUNTED_STORAGE_LIST,
SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST,
SIMCALL_HOST_GET_PARAMS,
SIMCALL_PROCESS_GET_PROPERTIES,
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_PROCESS_ON_EXIT,
SIMCALL_PROCESS_AUTO_RESTART_SET,
SIMCALL_PROCESS_RESTART,
[SIMCALL_HOST_SET_PSTATE] = "SIMCALL_HOST_SET_PSTATE",
[SIMCALL_HOST_GET_PSTATE] = "SIMCALL_HOST_GET_PSTATE",
[SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
- [SIMCALL_PROCESS_EXECUTE] = "SIMCALL_PROCESS_EXECUTE",
- [SIMCALL_PROCESS_PARALLEL_EXECUTE] = "SIMCALL_PROCESS_PARALLEL_EXECUTE",
- [SIMCALL_PROCESS_EXECUTION_DESTROY] = "SIMCALL_PROCESS_EXECUTION_DESTROY",
- [SIMCALL_PROCESS_EXECUTION_CANCEL] = "SIMCALL_PROCESS_EXECUTION_CANCEL",
- [SIMCALL_PROCESS_EXECUTION_GET_REMAINS] = "SIMCALL_PROCESS_EXECUTION_GET_REMAINS",
- [SIMCALL_PROCESS_EXECUTION_GET_STATE] = "SIMCALL_PROCESS_EXECUTION_GET_STATE",
- [SIMCALL_PROCESS_EXECUTION_SET_PRIORITY] = "SIMCALL_PROCESS_EXECUTION_SET_PRIORITY",
- [SIMCALL_PROCESS_EXECUTION_SET_BOUND] = "SIMCALL_PROCESS_EXECUTION_SET_BOUND",
- [SIMCALL_PROCESS_EXECUTION_SET_AFFINITY] = "SIMCALL_PROCESS_EXECUTION_SET_AFFINITY",
- [SIMCALL_PROCESS_EXECUTION_WAIT] = "SIMCALL_PROCESS_EXECUTION_WAIT",
[SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST] = "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST",
[SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST] = "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST",
[SIMCALL_HOST_GET_PARAMS] = "SIMCALL_HOST_GET_PARAMS",
[SIMCALL_PROCESS_GET_PROPERTIES] = "SIMCALL_PROCESS_GET_PROPERTIES",
[SIMCALL_PROCESS_JOIN] = "SIMCALL_PROCESS_JOIN",
[SIMCALL_PROCESS_SLEEP] = "SIMCALL_PROCESS_SLEEP",
+ [SIMCALL_PROCESS_EXECUTE] = "SIMCALL_PROCESS_EXECUTE",
+ [SIMCALL_PROCESS_PARALLEL_EXECUTE] = "SIMCALL_PROCESS_PARALLEL_EXECUTE",
+ [SIMCALL_PROCESS_EXECUTION_DESTROY] = "SIMCALL_PROCESS_EXECUTION_DESTROY",
+ [SIMCALL_PROCESS_EXECUTION_CANCEL] = "SIMCALL_PROCESS_EXECUTION_CANCEL",
+ [SIMCALL_PROCESS_EXECUTION_GET_REMAINS] = "SIMCALL_PROCESS_EXECUTION_GET_REMAINS",
+ [SIMCALL_PROCESS_EXECUTION_GET_STATE] = "SIMCALL_PROCESS_EXECUTION_GET_STATE",
+ [SIMCALL_PROCESS_EXECUTION_SET_PRIORITY] = "SIMCALL_PROCESS_EXECUTION_SET_PRIORITY",
+ [SIMCALL_PROCESS_EXECUTION_SET_BOUND] = "SIMCALL_PROCESS_EXECUTION_SET_BOUND",
+ [SIMCALL_PROCESS_EXECUTION_SET_AFFINITY] = "SIMCALL_PROCESS_EXECUTION_SET_AFFINITY",
+ [SIMCALL_PROCESS_EXECUTION_WAIT] = "SIMCALL_PROCESS_EXECUTION_WAIT",
[SIMCALL_PROCESS_ON_EXIT] = "SIMCALL_PROCESS_ON_EXIT",
[SIMCALL_PROCESS_AUTO_RESTART_SET] = "SIMCALL_PROCESS_AUTO_RESTART_SET",
[SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_EXECUTE:
- simcall->result.dp = SIMIX_process_execute( simcall->args[0].cc,(sg_host_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].d, simcall->args[5].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);
- SIMIX_simcall_answer(simcall);
- break;
-
-case SIMCALL_PROCESS_EXECUTION_DESTROY:
- SIMIX_process_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);
- 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);
- 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);
- 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);
- 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);
- 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);
- SIMIX_simcall_answer(simcall);
- break;
-
-case SIMCALL_PROCESS_EXECUTION_WAIT:
- simcall_HANDLER_process_execution_wait(simcall , (smx_synchro_t) simcall->args[0].dp);
- break;
-
case SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST:
simcall->result.dp = SIMIX_host_get_mounted_storage_list((sg_host_t) simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
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);
+ 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);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+case SIMCALL_PROCESS_EXECUTION_DESTROY:
+ SIMIX_process_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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+case SIMCALL_PROCESS_EXECUTION_WAIT:
+ simcall_HANDLER_process_execution_wait(simcall , (smx_synchro_t) simcall->args[0].dp);
+ break;
+
case SIMCALL_PROCESS_ON_EXIT:
SIMIX_process_on_exit((smx_process_t) simcall->args[0].dp,(int_f_pvoid_pvoid_t) simcall->args[1].fp, simcall->args[2].dp);
SIMIX_simcall_answer(simcall);
Func - host_get_pstate (int) (host, void*, sg_host_t)
Func - host_get_consumed_energy (double) (host, void*, sg_host_t)
-Func - process_execute (void*, smx_synchro_t) (name, const char*) (host, void*, sg_host_t) (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 - host_get_mounted_storage_list (void*, xbt_dict_t) (host, void*, sg_host_t)
Func - host_get_attached_storage_list (void*, xbt_dynar_t) (host, void*, sg_host_t)
Proc - host_get_params (void) (ind_vm, void*, sg_host_t) (params, void*, vm_params_t)
Func - process_get_properties (void*, xbt_dict_t) (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)
+
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)
Func H process_restart (void*, smx_process_t) (process, void*, smx_process_t)
else
xbt_die("No function for simix_global->autorestart");
}
-
-smx_synchro_t SIMIX_process_execute(const char *name,
- sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask){
+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) {
+ return SIMIX_process_execute(simcall->issuer, name,flops_amount,priority,bound,affinity_mask);
+}
+smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
+ double flops_amount, double priority, double bound, unsigned long affinity_mask){
/* alloc structures and initialize */
smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_EXECUTE;
synchro->name = xbt_strdup(name);
synchro->state = SIMIX_RUNNING;
- synchro->execution.host = host;
+ synchro->execution.host = issuer->host;
synchro->category = NULL;
/* set surf's action */
if (!MC_is_active() && !MC_record_replay_is_active()) {
- synchro->execution.surf_exec = surf_host_execute(host, flops_amount);
+ synchro->execution.surf_exec = surf_host_execute(issuer->host, flops_amount);
surf_action_set_data(synchro->execution.surf_exec, synchro);
surf_action_set_priority(synchro->execution.surf_exec, priority);
* surf layer should not be zero (i.e., unlimited). It should be the
* capacity of a CPU core. */
if (bound == 0)
- surf_cpu_action_set_bound(synchro->execution.surf_exec, SIMIX_host_get_speed(host));
+ surf_cpu_action_set_bound(synchro->execution.surf_exec, SIMIX_host_get_speed(issuer->host));
else
surf_cpu_action_set_bound(synchro->execution.surf_exec, 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 == host);
- surf_cpu_action_set_affinity(synchro->execution.surf_exec, host, affinity_mask);
+ xbt_assert(synchro->execution.host == issuer->host);
+ surf_cpu_action_set_affinity(synchro->execution.surf_exec, issuer->host, affinity_mask);
}
}
double SIMIX_host_get_wattmax_at(sg_host_t host,int pstate);
void SIMIX_host_set_pstate(sg_host_t host, int pstate_index);
int SIMIX_host_get_pstate(sg_host_t host);
-smx_synchro_t SIMIX_process_execute(const char *name,
- sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask);
+smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
+ double flops_amount, double priority, double bound, unsigned long affinity_mask);
smx_synchro_t SIMIX_process_parallel_execute(const char *name,
int host_nb, sg_host_t *host_list,
double *flops_amount, double *bytes_amount,
}
} else {
/* FIXME: computation size is zero. Is it okay that bound is zero ? */
- return SIMIX_process_execute("suspend", process->host, 0.0, 1.0, 0.0, 0);
+ return SIMIX_process_execute(process, "suspend", 0.0, 1.0, 0.0, 0);
}
}
void smpi_execute_flops(double flops) {
smx_synchro_t action;
- sg_host_t host;
- host = SIMIX_host_self();
XBT_DEBUG("Handle real computation time: %f flops", flops);
- action = simcall_process_execute("computation", host, flops, 1, 0, 0);
+ action = simcall_process_execute("computation", flops, 1, 0, 0);
simcall_set_category (action, TRACE_internal_smpi_get_category());
simcall_process_execution_wait(action);
smpi_switch_data_segment(smpi_process_index());