From a5395eca622202d8f7a531e7a95a0bfa1922c0ee Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 22 Jul 2015 00:53:17 +0200 Subject: [PATCH] massive rename of simcalls: execution is related to a process, not to an host --- include/simgrid/simix.h | 20 +++--- src/msg/msg_gos.c | 6 +- src/msg/msg_task.c | 12 ++-- src/simix/libsmx.c | 58 ++++++++-------- src/simix/popping_accessors.h | 122 +++++++++++++++++----------------- src/simix/popping_bodies.c | 60 ++++++++--------- src/simix/popping_enum.h | 20 +++--- src/simix/popping_generated.c | 60 ++++++++--------- src/simix/simcalls.in | 20 +++--- src/simix/smx_host.c | 24 +++---- src/simix/smx_host_private.h | 18 ++--- src/simix/smx_process.c | 6 +- src/smpi/smpi_bench.c | 4 +- 13 files changed, 215 insertions(+), 215 deletions(-) diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index e80e3b669f..2d414f813b 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -321,24 +321,24 @@ XBT_PUBLIC(double) simcall_host_get_consumed_energy(sg_host_t host); 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_host_execute(const char *name, sg_host_t host, +XBT_PUBLIC(smx_synchro_t) simcall_process_execute(const char *name, sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask); -XBT_PUBLIC(smx_synchro_t) simcall_host_parallel_execute(const char *name, +XBT_PUBLIC(smx_synchro_t) simcall_process_parallel_execute(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_host_execution_destroy(smx_synchro_t execution); -XBT_PUBLIC(void) simcall_host_execution_cancel(smx_synchro_t execution); -XBT_PUBLIC(double) simcall_host_execution_get_remains(smx_synchro_t execution); -XBT_PUBLIC(e_smx_state_t) simcall_host_execution_get_state(smx_synchro_t execution); -XBT_PUBLIC(void) simcall_host_execution_set_priority(smx_synchro_t execution, double priority); -XBT_PUBLIC(void) simcall_host_execution_set_bound(smx_synchro_t execution, double bound); -XBT_PUBLIC(void) simcall_host_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask); -XBT_PUBLIC(e_smx_state_t) simcall_host_execution_wait(smx_synchro_t execution); +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(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); diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index 11218c98b1..9cb139c20d 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -73,7 +73,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) simdata->isused = (void*)1; if (simdata->host_nb > 0) { - simdata->compute = simcall_host_parallel_execute(task->name, + simdata->compute = simcall_process_parallel_execute(task->name, simdata->host_nb, simdata->host_list, simdata->flops_parallel_amount, @@ -84,7 +84,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) unsigned long affinity_mask = (unsigned long) 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_host_execute(task->name, + simdata->compute = simcall_process_execute(task->name, p_simdata->m_host, simdata->flops_amount, simdata->priority, @@ -95,7 +95,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) } simcall_set_category(simdata->compute, task->category); p_simdata->waiting_action = simdata->compute; - comp_state = simcall_host_execution_wait(simdata->compute); + comp_state = simcall_process_execution_wait(simdata->compute); p_simdata->waiting_action = NULL; diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index 16a7fe59a1..56b3d09783 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -273,7 +273,7 @@ msg_error_t MSG_task_destroy(msg_task_t task) action = task->simdata->compute; if (action) - simcall_host_execution_destroy(action); + simcall_process_execution_destroy(action); /* parallel tasks only */ xbt_free(task->simdata->host_list); @@ -298,7 +298,7 @@ msg_error_t MSG_task_cancel(msg_task_t task) xbt_assert((task != NULL), "Cannot cancel a NULL task"); if (task->simdata->compute) { - simcall_host_execution_cancel(task->simdata->compute); + simcall_process_execution_cancel(task->simdata->compute); } else if (task->simdata->comm) { simdata_task_t simdata = task->simdata; @@ -319,7 +319,7 @@ msg_error_t MSG_task_cancel(msg_task_t task) double MSG_task_get_flops_amount(msg_task_t task) { if (task->simdata->compute) { - return simcall_host_execution_get_remains(task->simdata->compute); + return simcall_process_execution_get_remains(task->simdata->compute); } else { return task->simdata->flops_amount; } @@ -410,7 +410,7 @@ void MSG_task_set_priority(msg_task_t task, double priority) task->simdata->priority = 1 / priority; if (task->simdata->compute) - simcall_host_execution_set_priority(task->simdata->compute, + simcall_process_execution_set_priority(task->simdata->compute, task->simdata->priority); } @@ -431,7 +431,7 @@ void MSG_task_set_bound(msg_task_t task, double bound) task->simdata->bound = bound; if (task->simdata->compute) - simcall_host_execution_set_bound(task->simdata->compute, + simcall_process_execution_set_bound(task->simdata->compute, task->simdata->bound); } @@ -517,6 +517,6 @@ void MSG_task_set_affinity(msg_task_t task, msg_host_t host, unsigned long mask) } XBT_INFO("set affinity(0x%04lx@%s) for %s", mask, MSG_host_get_name(host), MSG_task_get_name(task)); - simcall_host_execution_set_affinity(task->simdata->compute, host, mask); + simcall_process_execution_set_affinity(task->simdata->compute, host, mask); } } diff --git a/src/simix/libsmx.c b/src/simix/libsmx.c index fb8cc80719..e39e2d57e9 100644 --- a/src/simix/libsmx.c +++ b/src/simix/libsmx.c @@ -228,7 +228,7 @@ double simcall_host_get_wattmax_at(msg_host_t host, int pstate){ /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Creates a synchro that executes some computation of an host. * * This function creates a SURF action and allocates the data necessary @@ -242,7 +242,7 @@ double simcall_host_get_wattmax_at(msg_host_t host, int pstate){ * \param affinity_mask * \return A new SIMIX execution synchronization */ -smx_synchro_t simcall_host_execute(const char *name, sg_host_t host, +smx_synchro_t simcall_process_execute(const char *name, sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask) { @@ -250,11 +250,11 @@ smx_synchro_t simcall_host_execute(const char *name, sg_host_t host, xbt_assert(isfinite(flops_amount), "flops_amount is not finite!"); xbt_assert(isfinite(priority), "priority is not finite!"); - return simcall_BODY_host_execute(name, host, flops_amount, priority, bound, affinity_mask); + return simcall_BODY_process_execute(name, host, flops_amount, priority, bound, affinity_mask); } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Creates a synchro that may involve parallel computation on * several hosts and communication between them. * @@ -268,7 +268,7 @@ smx_synchro_t simcall_host_execute(const char *name, sg_host_t host, * \param rate the SURF action rate * \return A new SIMIX execution synchronization */ -smx_synchro_t simcall_host_parallel_execute(const char *name, +smx_synchro_t simcall_process_parallel_execute(const char *name, int host_nb, sg_host_t *host_list, double *flops_amount, @@ -289,7 +289,7 @@ smx_synchro_t simcall_host_parallel_execute(const char *name, xbt_assert(isfinite(amount), "amount is not finite!"); xbt_assert(isfinite(rate), "rate is not finite!"); - return simcall_BODY_host_parallel_execute(name, host_nb, host_list, + return simcall_BODY_process_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate); @@ -297,84 +297,84 @@ smx_synchro_t simcall_host_parallel_execute(const char *name, } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Destroys an execution synchro. * * 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_host_execution_destroy(smx_synchro_t execution) +void simcall_process_execution_destroy(smx_synchro_t execution) { - simcall_BODY_host_execution_destroy(execution); + simcall_BODY_process_execution_destroy(execution); } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Cancels an execution synchro. * * This functions stops the execution. It calls a surf function. * \param execution The execution synchro to cancel */ -void simcall_host_execution_cancel(smx_synchro_t execution) +void simcall_process_execution_cancel(smx_synchro_t execution) { - simcall_BODY_host_execution_cancel(execution); + simcall_BODY_process_execution_cancel(execution); } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Returns how much of an execution synchro remains to be done. * * \param execution The execution synchro * \return The remaining amount */ -double simcall_host_execution_get_remains(smx_synchro_t execution) +double simcall_process_execution_get_remains(smx_synchro_t execution) { - return simcall_BODY_host_execution_get_remains(execution); + return simcall_BODY_process_execution_get_remains(execution); } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Returns the state of an execution synchro. * * \param execution The execution synchro * \return The state */ -e_smx_state_t simcall_host_execution_get_state(smx_synchro_t execution) +e_smx_state_t simcall_process_execution_get_state(smx_synchro_t execution) { - return simcall_BODY_host_execution_get_state(execution); + return simcall_BODY_process_execution_get_state(execution); } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Changes the priority of an execution synchro. * * This functions changes the priority only. It calls a surf function. * \param execution The execution synchro * \param priority The new priority */ -void simcall_host_execution_set_priority(smx_synchro_t execution, double priority) +void simcall_process_execution_set_priority(smx_synchro_t execution, double priority) { /* checking for infinite values */ xbt_assert(isfinite(priority), "priority is not finite!"); - simcall_BODY_host_execution_set_priority(execution, priority); + simcall_BODY_process_execution_set_priority(execution, priority); } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Changes the capping (the maximum CPU utilization) of an execution synchro. * * This functions changes the capping only. It calls a surf function. * \param execution The execution synchro * \param bound The new bound */ -void simcall_host_execution_set_bound(smx_synchro_t execution, double bound) +void simcall_process_execution_set_bound(smx_synchro_t execution, double bound) { - simcall_BODY_host_execution_set_bound(execution, bound); + simcall_BODY_process_execution_set_bound(execution, bound); } /** - * \ingroup simix_host_management + * \ingroup simix_process_management * \brief Changes the CPU affinity of an execution synchro. * * This functions changes the CPU affinity of an execution synchro. See taskset(1) on Linux. @@ -382,9 +382,9 @@ void simcall_host_execution_set_bound(smx_synchro_t execution, double bound) * \param host Host * \param mask Affinity mask */ -void simcall_host_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask) +void simcall_process_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask) { - simcall_BODY_host_execution_set_affinity(execution, host, mask); + simcall_BODY_process_execution_set_affinity(execution, host, mask); } /** @@ -393,9 +393,9 @@ void simcall_host_execution_set_affinity(smx_synchro_t execution, sg_host_t host * * \param execution The execution synchro */ -e_smx_state_t simcall_host_execution_wait(smx_synchro_t execution) +e_smx_state_t simcall_process_execution_wait(smx_synchro_t execution) { - return simcall_BODY_host_execution_wait(execution); + return simcall_BODY_process_execution_wait(execution); } diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index c08b8355a3..0437433e59 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -241,193 +241,193 @@ static inline void simcall_host_get_consumed_energy__set__result(smx_simcall_t s simcall->result.d = result; } -static inline const char* simcall_host_execute__get__name(smx_simcall_t simcall) { +static inline const char* simcall_process_execute__get__name(smx_simcall_t simcall) { return simcall->args[0].cc; } -static inline void simcall_host_execute__set__name(smx_simcall_t simcall, const char* arg) { +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_host_execute__get__host(smx_simcall_t simcall) { +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_host_execute__set__host(smx_simcall_t simcall, void* arg) { +static inline void simcall_process_execute__set__host(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; } -static inline double simcall_host_execute__get__flops_amount(smx_simcall_t simcall) { +static inline double simcall_process_execute__get__flops_amount(smx_simcall_t simcall) { return simcall->args[2].d; } -static inline void simcall_host_execute__set__flops_amount(smx_simcall_t simcall, double arg) { +static inline void simcall_process_execute__set__flops_amount(smx_simcall_t simcall, double arg) { simcall->args[2].d = arg; } -static inline double simcall_host_execute__get__priority(smx_simcall_t simcall) { +static inline double simcall_process_execute__get__priority(smx_simcall_t simcall) { return simcall->args[3].d; } -static inline void simcall_host_execute__set__priority(smx_simcall_t simcall, double arg) { +static inline void simcall_process_execute__set__priority(smx_simcall_t simcall, double arg) { simcall->args[3].d = arg; } -static inline double simcall_host_execute__get__bound(smx_simcall_t simcall) { +static inline double simcall_process_execute__get__bound(smx_simcall_t simcall) { return simcall->args[4].d; } -static inline void simcall_host_execute__set__bound(smx_simcall_t simcall, double arg) { +static inline void simcall_process_execute__set__bound(smx_simcall_t simcall, double arg) { simcall->args[4].d = arg; } -static inline unsigned long simcall_host_execute__get__affinity_mask(smx_simcall_t simcall) { +static inline unsigned long simcall_process_execute__get__affinity_mask(smx_simcall_t simcall) { return simcall->args[5].ul; } -static inline void simcall_host_execute__set__affinity_mask(smx_simcall_t simcall, unsigned long arg) { +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_host_execute__get__result(smx_simcall_t simcall){ +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_host_execute__set__result(smx_simcall_t simcall, void* result){ +static inline void simcall_process_execute__set__result(smx_simcall_t simcall, void* result){ simcall->result.dp = result; } -static inline const char* simcall_host_parallel_execute__get__name(smx_simcall_t simcall) { +static inline const char* simcall_process_parallel_execute__get__name(smx_simcall_t simcall) { return simcall->args[0].cc; } -static inline void simcall_host_parallel_execute__set__name(smx_simcall_t simcall, const char* arg) { +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_host_parallel_execute__get__host_nb(smx_simcall_t simcall) { +static inline int simcall_process_parallel_execute__get__host_nb(smx_simcall_t simcall) { return simcall->args[1].i; } -static inline void simcall_host_parallel_execute__set__host_nb(smx_simcall_t simcall, int arg) { +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_host_parallel_execute__get__host_list(smx_simcall_t simcall) { +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_host_parallel_execute__set__host_list(smx_simcall_t simcall, void* arg) { +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_host_parallel_execute__get__flops_amount(smx_simcall_t simcall) { +static inline double* simcall_process_parallel_execute__get__flops_amount(smx_simcall_t simcall) { return (double*) simcall->args[3].dp; } -static inline void simcall_host_parallel_execute__set__flops_amount(smx_simcall_t simcall, void* arg) { +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_host_parallel_execute__get__bytes_amount(smx_simcall_t simcall) { +static inline double* simcall_process_parallel_execute__get__bytes_amount(smx_simcall_t simcall) { return (double*) simcall->args[4].dp; } -static inline void simcall_host_parallel_execute__set__bytes_amount(smx_simcall_t simcall, void* arg) { +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_host_parallel_execute__get__amount(smx_simcall_t simcall) { +static inline double simcall_process_parallel_execute__get__amount(smx_simcall_t simcall) { return simcall->args[5].d; } -static inline void simcall_host_parallel_execute__set__amount(smx_simcall_t simcall, double arg) { +static inline void simcall_process_parallel_execute__set__amount(smx_simcall_t simcall, double arg) { simcall->args[5].d = arg; } -static inline double simcall_host_parallel_execute__get__rate(smx_simcall_t simcall) { +static inline double simcall_process_parallel_execute__get__rate(smx_simcall_t simcall) { return simcall->args[6].d; } -static inline void simcall_host_parallel_execute__set__rate(smx_simcall_t simcall, double arg) { +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_host_parallel_execute__get__result(smx_simcall_t simcall){ +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_host_parallel_execute__set__result(smx_simcall_t simcall, void* result){ +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_host_execution_destroy__get__execution(smx_simcall_t simcall) { +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_host_execution_destroy__set__execution(smx_simcall_t simcall, void* arg) { +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_host_execution_cancel__get__execution(smx_simcall_t simcall) { +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_host_execution_cancel__set__execution(smx_simcall_t simcall, void* arg) { +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_host_execution_get_remains__get__execution(smx_simcall_t simcall) { +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_host_execution_get_remains__set__execution(smx_simcall_t simcall, void* arg) { +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_host_execution_get_remains__get__result(smx_simcall_t simcall){ +static inline double simcall_process_execution_get_remains__get__result(smx_simcall_t simcall){ return simcall->result.d; } -static inline void simcall_host_execution_get_remains__set__result(smx_simcall_t simcall, double result){ +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_host_execution_get_state__get__execution(smx_simcall_t simcall) { +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_host_execution_get_state__set__execution(smx_simcall_t simcall, void* arg) { +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_host_execution_get_state__get__result(smx_simcall_t simcall){ +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_host_execution_get_state__set__result(smx_simcall_t simcall, int result){ +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_host_execution_set_priority__get__execution(smx_simcall_t simcall) { +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_host_execution_set_priority__set__execution(smx_simcall_t simcall, void* arg) { +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_host_execution_set_priority__get__priority(smx_simcall_t simcall) { +static inline double simcall_process_execution_set_priority__get__priority(smx_simcall_t simcall) { return simcall->args[1].d; } -static inline void simcall_host_execution_set_priority__set__priority(smx_simcall_t simcall, double arg) { +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_host_execution_set_bound__get__execution(smx_simcall_t simcall) { +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_host_execution_set_bound__set__execution(smx_simcall_t simcall, void* arg) { +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_host_execution_set_bound__get__bound(smx_simcall_t simcall) { +static inline double simcall_process_execution_set_bound__get__bound(smx_simcall_t simcall) { return simcall->args[1].d; } -static inline void simcall_host_execution_set_bound__set__bound(smx_simcall_t simcall, double arg) { +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_host_execution_set_affinity__get__execution(smx_simcall_t simcall) { +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_host_execution_set_affinity__set__execution(smx_simcall_t simcall, void* arg) { +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_host_execution_set_affinity__get__ws(smx_simcall_t simcall) { +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_host_execution_set_affinity__set__ws(smx_simcall_t simcall, void* arg) { +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_host_execution_set_affinity__get__mask(smx_simcall_t simcall) { +static inline unsigned long simcall_process_execution_set_affinity__get__mask(smx_simcall_t simcall) { return simcall->args[2].ul; } -static inline void simcall_host_execution_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg) { +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_host_execution_wait__get__execution(smx_simcall_t simcall) { +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_host_execution_wait__set__execution(smx_simcall_t simcall, void* arg) { +static inline void simcall_process_execution_wait__set__execution(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline int simcall_host_execution_wait__get__result(smx_simcall_t simcall){ +static inline int simcall_process_execution_wait__get__result(smx_simcall_t simcall){ return simcall->result.i; } -static inline void simcall_host_execution_wait__set__result(smx_simcall_t simcall, int result){ +static inline void simcall_process_execution_wait__set__result(smx_simcall_t simcall, int result){ simcall->result.i = result; } @@ -1937,7 +1937,7 @@ static inline void simcall_mc_compare_snapshots__set__result(smx_simcall_t simca /* 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_host_execution_wait(smx_simcall_t simcall, smx_synchro_t execution); +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); diff --git a/src/simix/popping_bodies.c b/src/simix/popping_bodies.c index e8e13bcecd..4efc5176a4 100644 --- a/src/simix/popping_bodies.c +++ b/src/simix/popping_bodies.c @@ -378,14 +378,14 @@ inline static double simcall_BODY_host_get_consumed_energy(sg_host_t host) { return self->simcall.result.d; } -inline static smx_synchro_t simcall_BODY_host_execute(const char* name, sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask) { +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_host_execute(name, host, flops_amount, priority, bound, affinity_mask); + 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_HOST_EXECUTE; + 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; @@ -404,14 +404,14 @@ inline static smx_synchro_t simcall_BODY_host_execute(const char* name, sg_host_ return self->simcall.result.dp; } -inline static smx_synchro_t simcall_BODY_host_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_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_host_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate); + 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_HOST_PARALLEL_EXECUTE; + 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; @@ -431,14 +431,14 @@ inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, return self->simcall.result.dp; } -inline static void simcall_BODY_host_execution_destroy(smx_synchro_t execution) { +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_host_execution_destroy(execution); + 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_HOST_EXECUTION_DESTROY; + 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; @@ -452,14 +452,14 @@ inline static void simcall_BODY_host_execution_destroy(smx_synchro_t execution) } -inline static void simcall_BODY_host_execution_cancel(smx_synchro_t execution) { +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_host_execution_cancel(execution); + 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_HOST_EXECUTION_CANCEL; + 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; @@ -473,14 +473,14 @@ inline static void simcall_BODY_host_execution_cancel(smx_synchro_t execution) { } -inline static double simcall_BODY_host_execution_get_remains(smx_synchro_t execution) { +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_host_execution_get_remains(execution); + 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_HOST_EXECUTION_GET_REMAINS; + 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; @@ -494,14 +494,14 @@ inline static double simcall_BODY_host_execution_get_remains(smx_synchro_t execu return self->simcall.result.d; } -inline static e_smx_state_t simcall_BODY_host_execution_get_state(smx_synchro_t execution) { +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_host_execution_get_state(execution); + 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_HOST_EXECUTION_GET_STATE; + 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; @@ -515,14 +515,14 @@ inline static e_smx_state_t simcall_BODY_host_execution_get_state(smx_synchro_t return self->simcall.result.i; } -inline static void simcall_BODY_host_execution_set_priority(smx_synchro_t execution, double priority) { +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_host_execution_set_priority(execution, priority); + 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_HOST_EXECUTION_SET_PRIORITY; + 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; @@ -537,14 +537,14 @@ inline static void simcall_BODY_host_execution_set_priority(smx_synchro_t execut } -inline static void simcall_BODY_host_execution_set_bound(smx_synchro_t execution, double bound) { +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_host_execution_set_bound(execution, bound); + 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_HOST_EXECUTION_SET_BOUND; + 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; @@ -559,14 +559,14 @@ inline static void simcall_BODY_host_execution_set_bound(smx_synchro_t execution } -inline static void simcall_BODY_host_execution_set_affinity(smx_synchro_t execution, sg_host_t ws, unsigned long mask) { +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_host_execution_set_affinity(execution, ws, mask); + 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_HOST_EXECUTION_SET_AFFINITY; + 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; @@ -582,14 +582,14 @@ inline static void simcall_BODY_host_execution_set_affinity(smx_synchro_t execut } -inline static int simcall_BODY_host_execution_wait(smx_synchro_t execution) { +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_host_execution_wait(&self->simcall, execution); + 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_HOST_EXECUTION_WAIT; + 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; diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index f543abda1f..e49f0a75be 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -35,16 +35,16 @@ typedef enum { SIMCALL_HOST_SET_PSTATE, SIMCALL_HOST_GET_PSTATE, SIMCALL_HOST_GET_CONSUMED_ENERGY, - SIMCALL_HOST_EXECUTE, - SIMCALL_HOST_PARALLEL_EXECUTE, - SIMCALL_HOST_EXECUTION_DESTROY, - SIMCALL_HOST_EXECUTION_CANCEL, - SIMCALL_HOST_EXECUTION_GET_REMAINS, - SIMCALL_HOST_EXECUTION_GET_STATE, - SIMCALL_HOST_EXECUTION_SET_PRIORITY, - SIMCALL_HOST_EXECUTION_SET_BOUND, - SIMCALL_HOST_EXECUTION_SET_AFFINITY, - SIMCALL_HOST_EXECUTION_WAIT, + 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, diff --git a/src/simix/popping_generated.c b/src/simix/popping_generated.c index 5b1b9ad5f2..df9d5421c5 100644 --- a/src/simix/popping_generated.c +++ b/src/simix/popping_generated.c @@ -39,16 +39,16 @@ const char* simcall_names[] = { [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_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE", - [SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE", - [SIMCALL_HOST_EXECUTION_DESTROY] = "SIMCALL_HOST_EXECUTION_DESTROY", - [SIMCALL_HOST_EXECUTION_CANCEL] = "SIMCALL_HOST_EXECUTION_CANCEL", - [SIMCALL_HOST_EXECUTION_GET_REMAINS] = "SIMCALL_HOST_EXECUTION_GET_REMAINS", - [SIMCALL_HOST_EXECUTION_GET_STATE] = "SIMCALL_HOST_EXECUTION_GET_STATE", - [SIMCALL_HOST_EXECUTION_SET_PRIORITY] = "SIMCALL_HOST_EXECUTION_SET_PRIORITY", - [SIMCALL_HOST_EXECUTION_SET_BOUND] = "SIMCALL_HOST_EXECUTION_SET_BOUND", - [SIMCALL_HOST_EXECUTION_SET_AFFINITY] = "SIMCALL_HOST_EXECUTION_SET_AFFINITY", - [SIMCALL_HOST_EXECUTION_WAIT] = "SIMCALL_HOST_EXECUTION_WAIT", + [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", @@ -252,53 +252,53 @@ case SIMCALL_HOST_GET_CONSUMED_ENERGY: SIMIX_simcall_answer(simcall); break; -case SIMCALL_HOST_EXECUTE: - simcall->result.dp = SIMIX_host_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); +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_HOST_PARALLEL_EXECUTE: - simcall->result.dp = SIMIX_host_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_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_HOST_EXECUTION_DESTROY: - SIMIX_host_execution_destroy((smx_synchro_t) simcall->args[0].dp); +case SIMCALL_PROCESS_EXECUTION_DESTROY: + SIMIX_process_execution_destroy((smx_synchro_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; -case SIMCALL_HOST_EXECUTION_CANCEL: - SIMIX_host_execution_cancel((smx_synchro_t) simcall->args[0].dp); +case SIMCALL_PROCESS_EXECUTION_CANCEL: + SIMIX_process_execution_cancel((smx_synchro_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; -case SIMCALL_HOST_EXECUTION_GET_REMAINS: - simcall->result.d = SIMIX_host_execution_get_remains((smx_synchro_t) simcall->args[0].dp); +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_HOST_EXECUTION_GET_STATE: - simcall->result.i = SIMIX_host_execution_get_state((smx_synchro_t) simcall->args[0].dp); +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_HOST_EXECUTION_SET_PRIORITY: - SIMIX_host_execution_set_priority((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d); +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_HOST_EXECUTION_SET_BOUND: - SIMIX_host_execution_set_bound((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d); +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_HOST_EXECUTION_SET_AFFINITY: - SIMIX_host_execution_set_affinity((smx_synchro_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp, simcall->args[2].ul); +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_HOST_EXECUTION_WAIT: - simcall_HANDLER_host_execution_wait(simcall , (smx_synchro_t) simcall->args[0].dp); +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: diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index e5fcd2d953..efeaf0fc7f 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -64,16 +64,16 @@ Proc - host_set_pstate (void) (host, void*, sg_host_t) (pstate_index, int) Func - host_get_pstate (int) (host, void*, sg_host_t) Func - host_get_consumed_energy (double) (host, void*, sg_host_t) -Func - host_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 - host_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 - host_execution_destroy (void) (execution, void*, smx_synchro_t) -Proc - host_execution_cancel (void) (execution, void*, smx_synchro_t) -Func - host_execution_get_remains (double) (execution, void*, smx_synchro_t) -Func - host_execution_get_state (int, e_smx_state_t) (execution, void*, smx_synchro_t) -Proc - host_execution_set_priority (void) (execution, void*, smx_synchro_t) (priority, double) -Proc - host_execution_set_bound (void) (execution, void*, smx_synchro_t) (bound, double) -Proc - host_execution_set_affinity (void) (execution, void*, smx_synchro_t) (ws, void*, sg_host_t) (mask, unsigned long) -Blck H host_execution_wait (int) (execution, void*, smx_synchro_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) diff --git a/src/simix/smx_host.c b/src/simix/smx_host.c index 73b150fa24..ebf80692d1 100644 --- a/src/simix/smx_host.c +++ b/src/simix/smx_host.c @@ -329,7 +329,7 @@ void SIMIX_host_autorestart(sg_host_t host) xbt_die("No function for simix_global->autorestart"); } -smx_synchro_t SIMIX_host_execute(const char *name, +smx_synchro_t SIMIX_process_execute(const char *name, sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask){ /* alloc structures and initialize */ @@ -367,7 +367,7 @@ smx_synchro_t SIMIX_host_execute(const char *name, return synchro; } -smx_synchro_t SIMIX_host_parallel_execute(const char *name, +smx_synchro_t SIMIX_process_parallel_execute(const char *name, int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, double rate){ @@ -414,7 +414,7 @@ smx_synchro_t SIMIX_host_parallel_execute(const char *name, return synchro; } -void SIMIX_host_execution_destroy(smx_synchro_t synchro){ +void SIMIX_process_execution_destroy(smx_synchro_t synchro){ XBT_DEBUG("Destroy synchro %p", synchro); if (synchro->execution.surf_exec) { @@ -425,14 +425,14 @@ void SIMIX_host_execution_destroy(smx_synchro_t synchro){ xbt_mallocator_release(simix_global->synchro_mallocator, synchro); } -void SIMIX_host_execution_cancel(smx_synchro_t synchro){ +void SIMIX_process_execution_cancel(smx_synchro_t synchro){ XBT_DEBUG("Cancel synchro %p", synchro); if (synchro->execution.surf_exec) surf_action_cancel(synchro->execution.surf_exec); } -double SIMIX_host_execution_get_remains(smx_synchro_t synchro){ +double SIMIX_process_execution_get_remains(smx_synchro_t synchro){ double result = 0.0; if (synchro->state == SIMIX_RUNNING) @@ -441,23 +441,23 @@ double SIMIX_host_execution_get_remains(smx_synchro_t synchro){ return result; } -e_smx_state_t SIMIX_host_execution_get_state(smx_synchro_t synchro){ +e_smx_state_t SIMIX_process_execution_get_state(smx_synchro_t synchro){ return synchro->state; } -void SIMIX_host_execution_set_priority(smx_synchro_t synchro, double priority){ +void SIMIX_process_execution_set_priority(smx_synchro_t synchro, double priority){ if(synchro->execution.surf_exec) surf_action_set_priority(synchro->execution.surf_exec, priority); } -void SIMIX_host_execution_set_bound(smx_synchro_t synchro, double bound){ +void SIMIX_process_execution_set_bound(smx_synchro_t synchro, double bound){ if(synchro->execution.surf_exec) surf_cpu_action_set_bound(synchro->execution.surf_exec, bound); } -void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask){ +void SIMIX_process_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) { @@ -467,7 +467,7 @@ void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, un } } -void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro){ +void simcall_HANDLER_process_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro){ XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state); @@ -534,12 +534,12 @@ void SIMIX_execution_finish(smx_synchro_t synchro) } simcall->issuer->waiting_synchro = NULL; - simcall_host_execution_wait__set__result(simcall, synchro->state); + simcall_process_execution_wait__set__result(simcall, synchro->state); SIMIX_simcall_answer(simcall); } /* We no longer need it */ - SIMIX_host_execution_destroy(synchro); + SIMIX_process_execution_destroy(synchro); } diff --git a/src/simix/smx_host_private.h b/src/simix/smx_host_private.h index e780746d33..d4e8a91503 100644 --- a/src/simix/smx_host_private.h +++ b/src/simix/smx_host_private.h @@ -51,19 +51,19 @@ double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate); 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_host_execute(const char *name, +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_host_parallel_execute(const char *name, +smx_synchro_t SIMIX_process_parallel_execute(const char *name, int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, double rate); -void SIMIX_host_execution_destroy(smx_synchro_t synchro); -void SIMIX_host_execution_cancel(smx_synchro_t synchro); -double SIMIX_host_execution_get_remains(smx_synchro_t synchro); -e_smx_state_t SIMIX_host_execution_get_state(smx_synchro_t synchro); -void SIMIX_host_execution_set_priority(smx_synchro_t synchro, double priority); -void SIMIX_host_execution_set_bound(smx_synchro_t synchro, double bound); -void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask); +void SIMIX_process_execution_destroy(smx_synchro_t synchro); +void SIMIX_process_execution_cancel(smx_synchro_t synchro); +double SIMIX_process_execution_get_remains(smx_synchro_t synchro); +e_smx_state_t SIMIX_process_execution_get_state(smx_synchro_t synchro); +void SIMIX_process_execution_set_priority(smx_synchro_t synchro, double priority); +void SIMIX_process_execution_set_bound(smx_synchro_t synchro, double bound); +void SIMIX_process_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask); xbt_dict_t SIMIX_host_get_mounted_storage_list(sg_host_t host); xbt_dynar_t SIMIX_host_get_attached_storage_list(sg_host_t host); diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index 51c2859f47..46370dbcef 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -348,7 +348,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) { case SIMIX_SYNC_EXECUTE: case SIMIX_SYNC_PARALLEL_EXECUTE: - SIMIX_host_execution_destroy(process->waiting_synchro); + SIMIX_process_execution_destroy(process->waiting_synchro); break; case SIMIX_SYNC_COMMUNICATE: @@ -405,7 +405,7 @@ void SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, int value, con case SIMIX_SYNC_EXECUTE: case SIMIX_SYNC_PARALLEL_EXECUTE: - SIMIX_host_execution_cancel(process->waiting_synchro); + SIMIX_process_execution_cancel(process->waiting_synchro); break; case SIMIX_SYNC_COMMUNICATE: @@ -538,7 +538,7 @@ smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer) } } else { /* FIXME: computation size is zero. Is it okay that bound is zero ? */ - return SIMIX_host_execute("suspend", process->host, 0.0, 1.0, 0.0, 0); + return SIMIX_process_execute("suspend", process->host, 0.0, 1.0, 0.0, 0); } } diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index 9dfcdb367e..fe88c48aa1 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -156,9 +156,9 @@ void smpi_execute_flops(double flops) { sg_host_t host; host = SIMIX_host_self(); XBT_DEBUG("Handle real computation time: %f flops", flops); - action = simcall_host_execute("computation", host, flops, 1, 0, 0); + action = simcall_process_execute("computation", host, flops, 1, 0, 0); simcall_set_category (action, TRACE_internal_smpi_get_category()); - simcall_host_execution_wait(action); + simcall_process_execution_wait(action); smpi_switch_data_segment(smpi_process_index()); } -- 2.20.1