XBT_PUBLIC(smx_action_t) simcall_host_execute(const char *name, smx_host_t host,
double computation_amount,
- double priority, double bound);
+ double priority, double bound, unsigned long affinity_mask);
XBT_PUBLIC(smx_action_t) simcall_host_parallel_execute(const char *name,
int host_nb,
smx_host_t *host_list,
}
smx_action_t SIMIX_pre_host_execute(smx_simcall_t simcall,const char *name,
- smx_host_t host, double computation_amount, double priority, double bound){
- return SIMIX_host_execute(name, host, computation_amount, priority, bound);
+ smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
+ return SIMIX_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
}
smx_action_t SIMIX_host_execute(const char *name,
- smx_host_t host, double computation_amount, double priority, double bound){
+ smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
/* alloc structures and initialize */
smx_action_t action = xbt_mallocator_get(simix_global->action_mallocator);
ws_model->set_bound(action->execution.surf_exec, SIMIX_host_get_speed(host));
else
ws_model->set_bound(action->execution.surf_exec, bound);
+
+ if (affinity_mask != 0)
+ ws_model->set_affinity(action->execution.surf_exec, host, affinity_mask);
}
XBT_DEBUG("Create execute action %p", action);
void SIMIX_host_on(smx_host_t host);
void SIMIX_host_off(smx_host_t host, smx_process_t issuer);
smx_action_t SIMIX_host_execute(const char *name,
- smx_host_t host, double computation_amount, double priority, double bound);
+ smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask);
smx_action_t SIMIX_host_parallel_execute(const char *name,
int host_nb, smx_host_t *host_list,
double *computation_amount, double *communication_amount,
void* SIMIX_pre_host_self_get_data(smx_simcall_t);
void* SIMIX_pre_host_get_data(smx_simcall_t, smx_host_t);
void SIMIX_pre_host_set_data(smx_simcall_t, smx_host_t, void*);
-smx_action_t SIMIX_pre_host_execute(smx_simcall_t, const char*, smx_host_t, double, double, double);
+smx_action_t SIMIX_pre_host_execute(smx_simcall_t, const char*, smx_host_t, double, double, double, unsigned long);
smx_action_t SIMIX_pre_host_parallel_execute(smx_simcall_t, const char*, int, smx_host_t*,
double*, double*, double, double);
void SIMIX_pre_host_execution_destroy(smx_simcall_t, smx_action_t);
}
} else {
/* FIXME: computation size is zero. Is it okay that bound is zero ? */
- return SIMIX_host_execute("suspend", process->smx_host, 0.0, 1.0, 0.0);
+ return SIMIX_host_execute("suspend", process->smx_host, 0.0, 1.0, 0.0, 0);
}
}
ACTION(SIMCALL_HOST_GET_STATE, host_get_state, WITH_ANSWER, TINT(result), TSPEC(host, smx_host_t)) sep \
ACTION(SIMCALL_HOST_GET_DATA, host_get_data, WITH_ANSWER, TPTR(result), TSPEC(host, smx_host_t)) sep \
ACTION(SIMCALL_HOST_SET_DATA, host_set_data, WITH_ANSWER, TVOID(result), TSPEC(host, smx_host_t), TPTR(data)) sep \
-ACTION(SIMCALL_HOST_EXECUTE, host_execute, WITH_ANSWER, TSPEC(result, smx_action_t), TSTRING(name), TSPEC(host, smx_host_t), TDOUBLE(computation_amount), TDOUBLE(priority), TDOUBLE(bound)) sep \
+ACTION(SIMCALL_HOST_EXECUTE, host_execute, WITH_ANSWER, TSPEC(result, smx_action_t), TSTRING(name), TSPEC(host, smx_host_t), TDOUBLE(computation_amount), TDOUBLE(priority), TDOUBLE(bound), TULONG(affinity_mask)) sep \
ACTION(SIMCALL_HOST_PARALLEL_EXECUTE, host_parallel_execute, WITH_ANSWER, TSPEC(result, smx_action_t), TSTRING(name), TINT(host_nb), TSPEC(host_list, smx_host_t*), TSPEC(computation_amount, double*), TSPEC(communication_amount, double*), TDOUBLE(amount), TDOUBLE(rate)) sep \
ACTION(SIMCALL_HOST_EXECUTION_DESTROY, host_execution_destroy, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t)) sep \
ACTION(SIMCALL_HOST_EXECUTION_CANCEL, host_execution_cancel, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t)) sep \
smx_action_t simcall_host_execute(const char *name, smx_host_t host,
double computation_amount,
- double priority, double bound)
+ double priority, double bound, unsigned long affinity_mask)
{
/* checking for infinite values */
xbt_assert(isfinite(computation_amount), "computation_amount is not finite!");
xbt_assert(isfinite(priority), "priority is not finite!");
- return simcall_BODY_host_execute(name, host, computation_amount, priority, bound);
+ return simcall_BODY_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
}
/**