X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3080c6b0d097d6b3b7d5b3dda0592154ce438f64..a6dbc279b78e4a84b3921b509f3138ed01399bca:/include/msg/msg.h diff --git a/include/msg/msg.h b/include/msg/msg.h index 0d07825c76..77881dc69b 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -131,15 +131,16 @@ XBT_PUBLIC(int) MSG_get_host_msgload(msg_host_t host); XBT_PUBLIC(double) MSG_get_host_speed(msg_host_t h); XBT_PUBLIC(int) MSG_host_get_core_number(msg_host_t h); XBT_PUBLIC(xbt_swag_t) MSG_host_get_process_list(msg_host_t h); -XBT_PUBLIC(int) MSG_host_is_avail(msg_host_t h); +XBT_PUBLIC(int) MSG_host_is_on(msg_host_t h); +XBT_PUBLIC(int) MSG_host_is_off(msg_host_t h); XBT_PUBLIC(void) __MSG_host_priv_free(msg_host_priv_t priv); XBT_PUBLIC(void) __MSG_host_destroy(msg_host_t host); -XBT_PUBLIC(double) MSG_get_host_power_peak_at(msg_host_t h, int pstate_index); -XBT_PUBLIC(double) MSG_get_host_current_power_peak(msg_host_t h); -XBT_PUBLIC(int) MSG_get_host_nb_pstates(msg_host_t h); -XBT_PUBLIC(void) MSG_set_host_power_peak_at(msg_host_t h, int pstate); -XBT_PUBLIC(double) MSG_get_host_consumed_energy(msg_host_t h); +XBT_PUBLIC(double) MSG_host_get_power_peak_at(msg_host_t h, int pstate); +XBT_PUBLIC(double) MSG_host_get_current_power_peak(msg_host_t h); +XBT_PUBLIC(int) MSG_host_get_pstate_number(msg_host_t h); +XBT_PUBLIC(void) MSG_host_set_pstate(msg_host_t h, int pstate); +XBT_PUBLIC(double) MSG_host_get_consumed_energy(msg_host_t h); /*property handlers*/ XBT_PUBLIC(xbt_dict_t) MSG_host_get_properties(msg_host_t host); @@ -217,17 +218,17 @@ XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process); /************************** Task handling ************************************/ XBT_PUBLIC(msg_task_t) MSG_task_create(const char *name, - double compute_duration, - double message_size, void *data); + double flops_amount, + double bytes_amount, void *data); XBT_PUBLIC(msg_gpu_task_t) MSG_gpu_task_create(const char *name, - double compute_duration, + double flops_amount, double dispatch_latency, double collect_latency); XBT_PUBLIC(msg_task_t) MSG_parallel_task_create(const char *name, int host_nb, const msg_host_t * host_list, - double *computation_amount, - double *communication_amount, + double *flops_amount, + double *bytes_amount, void *data); XBT_PUBLIC(void *) MSG_task_get_data(msg_task_t task); XBT_PUBLIC(void) MSG_task_set_data(msg_task_t task, void *data); @@ -255,15 +256,15 @@ XBT_PUBLIC(msg_error_t) MSG_process_join(msg_process_t process, double timeout); XBT_PUBLIC(msg_error_t) MSG_process_sleep(double nb_sec); XBT_PUBLIC(double) MSG_task_get_compute_duration(msg_task_t task); -XBT_PUBLIC(void) MSG_task_set_compute_duration(msg_task_t task, - double compute_duration); -XBT_PUBLIC(void) MSG_task_set_data_size(msg_task_t task, - double data_size); +XBT_PUBLIC(void) MSG_task_set_flops_amount(msg_task_t task, + double flops_amount); +XBT_PUBLIC(void) MSG_task_set_bytes_amount(msg_task_t task, + double bytes_amount); XBT_PUBLIC(double) MSG_task_get_remaining_computation(msg_task_t task); XBT_PUBLIC(double) MSG_task_get_remaining_communication(msg_task_t task); XBT_PUBLIC(int) MSG_task_is_latency_bounded(msg_task_t task); -XBT_PUBLIC(double) MSG_task_get_data_size(msg_task_t task); +XBT_PUBLIC(double) MSG_task_get_bytes_amount(msg_task_t task); XBT_PUBLIC(msg_error_t) @@ -296,7 +297,7 @@ XBT_PUBLIC(msg_comm_t) MSG_task_isend(msg_task_t task, const char *alias); XBT_PUBLIC(msg_comm_t) MSG_task_isend_bounded(msg_task_t task, const char *alias, double maxrate); XBT_PUBLIC(msg_comm_t) MSG_task_isend_with_matching(msg_task_t task, const char *alias, - int (*match_fun)(void*,void*, smx_action_t), + int (*match_fun)(void*,void*, smx_synchro_t), void *match_data); XBT_PUBLIC(void) MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup); @@ -368,6 +369,8 @@ typedef msg_error_t MSG_error_t; /* these are the functions which are deprecated. Do not use them, they may get removed in future releases */ XBT_PUBLIC(msg_host_t *) MSG_get_host_table(void); +#define MSG_host_is_avail(h) MSG_host_is_on(h) + #define MSG_TIMEOUT_FAILURE MSG_TIMEOUT #define MSG_TASK_CANCELLED MSG_TASK_CANCELED #define MSG_mailbox_put_with_time_out(mailbox, task, timeout) \ @@ -498,7 +501,7 @@ xbt_dynar_t MSG_vm_get_list_from_host(msg_host_t) xbt_dynar_t MSG_vm_get_list_from_hosts(msg_dynar_t) + des fonctions de filtrage sur les dynar */ -#include "instr/instr.h" +#include "simgrid/instr.h" @@ -506,11 +509,5 @@ xbt_dynar_t MSG_vm_get_list_from_hosts(msg_dynar_t) /* Used only by the bindings -- unclean pimple, please ignore if you're not writing a binding */ XBT_PUBLIC(smx_context_t) MSG_process_get_smx_ctx(msg_process_t process); -/* ****************************************************************************************** */ -/* TUTORIAL: New API */ -/* Declare all functions for the API */ -/* ****************************************************************************************** */ -XBT_PUBLIC(int) MSG_new_API_fct(const char* param1, double param2); - SG_END_DECL() #endif