X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0e543d081879517e1b52c18b6cb38f43ad229bdd..290e19f26b10dc49485d7d7b06859edff32fd1e1:/src/include/surf/surf.h diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index fc0214886f..0ddc49158b 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -171,16 +171,12 @@ typedef enum { /* FIXME: Where should the VM state be defined? */ typedef enum { SURF_VM_STATE_CREATED, /**< created, but not yet started */ - SURF_VM_STATE_RUNNING, - SURF_VM_STATE_MIGRATING, - SURF_VM_STATE_SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */ SURF_VM_STATE_SAVING, /**< Save/restore involves disk I/O, so there should be transition states. */ SURF_VM_STATE_SAVED, SURF_VM_STATE_RESTORING, - } e_surf_vm_state_t; /***************************/ @@ -196,6 +192,9 @@ static inline void *surf_cpu_resource_priv(const void *host) { static inline void *surf_workstation_resource_priv(const void *host){ return (void*)xbt_lib_get_level((xbt_dictelm_t)host, SURF_WKS_LEVEL); } +static inline void *surf_routing_resource_priv(const void *host){ + return (void*)xbt_lib_get_level((xbt_dictelm_t)host, ROUTING_HOST_LEVEL); +} static inline void *surf_storage_resource_priv(const void *storage){ return (void*)xbt_lib_get_level((xbt_dictelm_t)storage, SURF_STORAGE_LEVEL); } @@ -272,16 +271,16 @@ XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model); * @param model The model which handle the parallelisation * @param workstation_nb The number of workstations * @param workstation_list The list of workstations on which the task is executed - * @param computation_amount The processing amount (in flop) needed to process - * @param communication_amount The amount of data (in bytes) needed to transfer + * @param flops_amount The processing amount (in flop) needed to process + * @param bytes_amount The amount of data (in bytes) needed to transfer * @param rate [description] * @return The action corresponding to the parallele execution task */ XBT_PUBLIC(surf_action_t) surf_workstation_model_execute_parallel_task(surf_workstation_model_t model, int workstation_nb, void **workstation_list, - double *computation_amount, - double *communication_amount, + double *flops_amount, + double *bytes_amount, double rate); /** @@ -621,14 +620,8 @@ XBT_PUBLIC(double) surf_workstation_get_power_peak_at(surf_resource_t host, int */ XBT_PUBLIC(int) surf_workstation_get_nb_pstates(surf_resource_t host); -/** - * @brief [brief description] - * @details [long description] - * - * @param host [description] - * @param pstate_index [description] - */ -XBT_PUBLIC(void) surf_workstation_set_power_peak_at(surf_resource_t host, int pstate_index); +XBT_PUBLIC(void) surf_workstation_set_pstate(surf_resource_t host, int pstate_index); +XBT_PUBLIC(int) surf_workstation_get_pstate(surf_resource_t host); /** * @brief Get the consumed energy (in joules) of a workstation @@ -1009,6 +1002,16 @@ XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model; */ XBT_PUBLIC(void) surf_network_model_init_SMPI(void); +/** \ingroup SURF_models + * \brief Same as network model 'LagrangeVelho', only with different correction factors. + * + * This model impelments a variant of the contention model on Infinband networks based on + * the works of Jérôme Vienne : http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf + * + * \see surf_workstation_model_init_IB() + */ +XBT_PUBLIC(void) surf_network_model_init_IB(void); + /** \ingroup SURF_models * \brief Initializes the platform with the network model 'LegrandVelho' *