SimGrid  3.13
Versatile Simulation of Distributed Systems
surf.h File Reference
#include "xbt/swag.h"
#include "xbt/dynar.h"
#include "xbt/dict.h"
#include "xbt/graph.h"
#include "xbt/misc.h"
#include "xbt/config.h"
#include "src/internal_config.h"
#include "surf/surf_routing.h"
#include "surf/datatypes.h"
#include "xbt/lib.h"
#include "simgrid/datatypes.h"
#include "simgrid/forward.h"

Classes

struct  surf_model_description
 Resource model description. More...
 

Typedefs

typedef struct surf_Model surf_Model
 
typedef struct surf_CpuModel surf_CpuModel
 
typedef struct surf_HostModel surf_HostModel
 
typedef struct surf_VMModel surf_VMModel
 
typedef struct surf_NetworkModel surf_NetworkModel
 
typedef struct surf_StorageModel surf_StorageModel
 
typedef struct surf_Resource surf_Resource
 
typedef struct surf_ResourceLmm surf_ResourceLmm
 
typedef struct surf_HostCLM03 surf_HostCLM03
 
typedef struct surf_Host surf_Host
 
typedef struct surf_NetworkCm02Link surf_NetworkCm02Link
 
typedef struct surf_Action surf_Action
 
typedef struct surf_ActionLmm surf_ActionLmm
 
typedef struct surf_StorageActionLmm surf_StorageActionLmm
 
typedef struct surf_RoutingPlatf surf_RoutingPlatf
 
typedef surf_Modelsurf_model_t
 Model datatype. More...
 
typedef surf_CpuModelsurf_cpu_model_t
 
typedef surf_HostModelsurf_host_model_t
 
typedef surf_VMModelsurf_vm_model_t
 
typedef surf_NetworkModelsurf_network_model_t
 
typedef surf_StorageModelsurf_storage_model_t
 
typedef xbt_dictelm_t surf_resource_t
 
typedef surf_Resourcesurf_cpp_resource_t
 
typedef surf_Hostsurf_host_t
 
typedef surf_Cpusurf_cpu_t
 
typedef surf_Actionsurf_action_t
 Action structure. More...
 
typedef surf_RoutingPlatfrouting_platf_t
 
typedef struct surf_filesurf_file_t
 
typedef struct surf_model_description s_surf_model_description_t
 Resource model description. More...
 
typedef struct surf_model_descriptionsurf_model_description_t
 

Enumerations

enum  e_surf_vm_state_t {
  SURF_VM_STATE_CREATED, SURF_VM_STATE_RUNNING, SURF_VM_STATE_SUSPENDED, SURF_VM_STATE_SAVING,
  SURF_VM_STATE_SAVED, SURF_VM_STATE_RESTORING
}
 

Functions

int find_model_description (s_surf_model_description_t *table, const char *name)
 
void model_help (const char *category, s_surf_model_description_t *table)
 Displays the long description of all registered models, and quit. More...
 
static voidsurf_storage_resource_priv (const void *storage)
 
static voidsurf_storage_resource_by_name (const char *name)
 
void surf_cpu_model_init_Cas01 (void)
 Initializes the CPU model with the model Cas01. More...
 
void surf_cpu_model_init_ti (void)
 Initializes the CPU model with trace integration [Deprecated]. More...
 
void surf_network_model_init_SMPI (void)
 Same as network model 'LagrangeVelho', only with different correction factors. More...
 
void surf_network_model_init_IB (void)
 Same as network model 'LagrangeVelho', only with different correction factors. More...
 
void surf_network_model_init_LegrandVelho (void)
 Initializes the platform with the network model 'LegrandVelho'. More...
 
void surf_network_model_init_Constant (void)
 Initializes the platform with the network model 'Constant'. More...
 
void surf_network_model_init_CM02 (void)
 Initializes the platform with the network model CM02. More...
 
void surf_network_model_init_Reno (void)
 Initializes the platform with the network model Reno. More...
 
void surf_network_model_init_Reno2 (void)
 Initializes the platform with the network model Reno2. More...
 
void surf_network_model_init_Vegas (void)
 Initializes the platform with the network model Vegas. More...
 
void surf_storage_model_init_default (void)
 The storage model. More...
 
void surf_host_model_init_compound (void)
 Initializes the platform with a compound host model. More...
 
void surf_host_model_init_current_default (void)
 Initializes the platform with the current best network and cpu models at hand. More...
 
void surf_host_model_init_ptask_L07 (void)
 Initializes the platform with the model L07. More...
 
void surf_vm_model_init_HL13 (void)
 Initializes the platform with the current best network and cpu models at hand. More...
 
void surf_init (int *argc, char **argv)
 Initialize SURF. More...
 
void surf_presolve (void)
 Finish simulation initialization. More...
 
double surf_solve (double max_date)
 Performs a part of the simulation. More...
 
double surf_get_clock (void)
 Return the current time. More...
 
void surf_exit (void)
 Exit SURF. More...
 
void parse_platform_file (const char *file)
 
xbt_dict_t get_as_router_properties (const char *name)
 
const char * __surf_get_initial_path (void)
 
void TRACE_surf_action (surf_action_t surf_action, const char *category)
 
void TRACE_surf_alloc (void)
 
void TRACE_surf_release (void)
 
void instr_routing_define_callbacks (void)
 
void instr_new_variable_type (const char *new_typename, const char *color)
 
void instr_new_user_variable_type (const char *father_type, const char *new_typename, const char *color)
 
void instr_new_user_state_type (const char *father_type, const char *new_typename)
 
void instr_new_value_for_user_state_type (const char *_typename, const char *value, const char *color)
 
int instr_platform_traced (void)
 
xbt_graph_t instr_routing_platform_graph (void)
 
void instr_routing_platform_graph_export_graphviz (xbt_graph_t g, const char *filename)
 
surf_action_t surf_model_extract_done_action_set (surf_model_t model)
 Pop an action from the done actions set. More...
 
surf_action_t surf_model_extract_failed_action_set (surf_model_t model)
 Pop an action from the failed actions set. More...
 
int surf_model_running_action_set_size (surf_model_t model)
 Get the size of the running action set of a model. More...
 
void surf_vm_model_create (const char *name, sg_host_t host_PM)
 Create a new VM on the specified host. More...
 
surf_action_t surf_network_model_communicate (surf_network_model_t model, sg_host_t src, sg_host_t dst, double size, double rate)
 Create a communication between two hosts. More...
 
surf_action_t surf_host_sleep (sg_host_t host, double duration)
 Create a sleep action on the given host. More...
 
surf_action_t surf_host_open (sg_host_t host, const char *fullpath)
 Create a file opening action on the given host. More...
 
surf_action_t surf_host_close (sg_host_t host, surf_file_t fd)
 Create a file closing action on the given host. More...
 
surf_action_t surf_host_read (sg_host_t host, surf_file_t fd, sg_size_t size)
 Create a file reading action on the given host. More...
 
surf_action_t surf_host_write (sg_host_t host, surf_file_t fd, sg_size_t size)
 Create a file writing action on the given host. More...
 
xbt_dynar_t surf_host_get_info (sg_host_t host, surf_file_t fd)
 Get the informations of a file descriptor. More...
 
sg_size_t surf_host_get_free_size (sg_host_t resource, const char *name)
 Get the available space of the storage at the mount point. More...
 
sg_size_t surf_host_get_used_size (sg_host_t resource, const char *name)
 Get the used space of the storage at the mount point. More...
 
void surf_vm_destroy (sg_host_t resource)
 Destroy a VM. More...
 
void surf_vm_suspend (sg_host_t resource)
 Suspend a VM. More...
 
void surf_vm_resume (sg_host_t resource)
 Resume a VM. More...
 
void surf_vm_save (sg_host_t resource)
 Save the VM (Not yet implemented) More...
 
void surf_vm_restore (sg_host_t resource)
 Restore the VM (Not yet implemented) More...
 
void surf_vm_migrate (sg_host_t resource, sg_host_t ind_vm_ws_dest)
 Migrate the VM to the destination host. More...
 
sg_host_t surf_vm_get_pm (sg_host_t resource)
 Get the physical machine hosting the VM. More...
 
void surf_vm_set_bound (sg_host_t resource, double bound)
 [brief description] More...
 
void surf_vm_set_affinity (sg_host_t resource, sg_host_t cpu, unsigned long mask)
 [brief description] More...
 
int surf_host_unlink (sg_host_t host, surf_file_t fd)
 Unlink a file descriptor. More...
 
size_t surf_host_get_size (sg_host_t host, surf_file_t fd)
 Get the size of a file on a host. More...
 
size_t surf_host_file_tell (sg_host_t host, surf_file_t fd)
 Get the current position of the file descriptor. More...
 
int surf_host_file_move (sg_host_t host, surf_file_t fd, const char *fullpath)
 Move a file to another location on the same mount point. More...
 
int surf_host_file_seek (sg_host_t host, surf_file_t fd, sg_offset_t offset, int origin)
 Set the position indictator assiociated with the file descriptor to a new position. More...
 
xbt_dict_t surf_storage_get_content (surf_resource_t resource)
 Get the content of a storage. More...
 
sg_size_t surf_storage_get_size (surf_resource_t resource)
 Get the size in bytes of a storage. More...
 
sg_size_t surf_storage_get_free_size (surf_resource_t resource)
 Get the available size in bytes of a storage. More...
 
sg_size_t surf_storage_get_used_size (surf_resource_t resource)
 Get the size in bytes of a storage. More...
 
xbt_dict_t surf_storage_get_properties (surf_resource_t resource)
 return the properties set associated to that storage More...
 
void surf_cpu_action_set_bound (surf_action_t action, double bound)
 [brief description] More...
 
double surf_network_action_get_latency_limited (surf_action_t action)
 [brief description] More...
 
surf_file_t surf_storage_action_get_file (surf_action_t action)
 Get the file associated to a storage action. More...
 
xbt_dict_t surf_storage_action_get_ls_dict (surf_action_t action)
 Get the result dictionary of an ls action. More...
 
const char * surf_storage_get_host (surf_resource_t resource)
 Get the host the storage is attached to. More...
 

Variables

XBT_PRIVATE double sg_tcp_gamma
 
XBT_PRIVATE double sg_sender_gap
 
XBT_PRIVATE double sg_latency_factor
 
XBT_PRIVATE double sg_bandwidth_factor
 
XBT_PRIVATE double sg_weight_S_parameter
 
XBT_PRIVATE int sg_network_crosstraffic
 
XBT_PRIVATE xbt_dynar_t surf_path
 
routing_platf_t routing_platf
 
void_f_void_t surf_cpu_model_init_preparse
 
surf_cpu_model_t surf_cpu_model_pm
 The CPU model object for the physical machine layer. More...
 
surf_cpu_model_t surf_cpu_model_vm
 The CPU model object for the virtual machine layer. More...
 
s_surf_model_description_t surf_optimization_mode_description []
 The list of all available optimization modes (both for cpu and networks). More...
 
s_surf_model_description_t surf_plugin_description []
 The list of all available surf plugins. More...
 
s_surf_model_description_t surf_cpu_model_description []
 The list of all available cpu model models. More...
 
surf_network_model_t surf_network_model
 The network model. More...
 
s_surf_model_description_t surf_network_model_description []
 The list of all available network model models. More...
 
s_surf_model_description_t surf_storage_model_description []
 The list of all available storage modes. More...
 
surf_storage_model_t surf_storage_model
 
surf_host_model_t surf_host_model
 The host model. More...
 
surf_vm_model_t surf_vm_model
 The vm model. More...
 
s_surf_model_description_t surf_host_model_description []
 The list of all available host model models. More...
 
s_surf_model_description_t surf_vm_model_description []
 The list of all available vm model models. More...
 
xbt_dynar_t all_existing_models
 List of initialized models. More...
 
xbt_dynar_t host_that_restart
 List of hosts that have just restarted and whose autorestart process should be restarted. More...
 
xbt_dict_t watched_hosts_lib
 List of hosts for which one want to be notified if they ever restart. More...
 
xbt_dict_t current_property_set
 
xbt_dict_t current_model_property_set
 
xbt_dict_t traces_set_list
 

Typedef Documentation

typedef struct surf_Model surf_Model
typedef struct surf_CpuModel surf_CpuModel
typedef struct surf_VMModel surf_VMModel
typedef struct surf_Resource surf_Resource
typedef struct surf_Host surf_Host
typedef struct surf_Action surf_Action
typedef surf_Cpu* surf_cpu_t
typedef struct surf_file* surf_file_t

Resource model description.

Function Documentation

int find_model_description ( s_surf_model_description_t table,
const char *  name 
)
void model_help ( const char *  category,
s_surf_model_description_t table 
)

Displays the long description of all registered models, and quit.

static void* surf_storage_resource_priv ( const void storage)
inlinestatic
static void* surf_storage_resource_by_name ( const char *  name)
inlinestatic
void parse_platform_file ( const char *  file)
xbt_dict_t get_as_router_properties ( const char *  name)
const char* __surf_get_initial_path ( void  )
void TRACE_surf_action ( surf_action_t  surf_action,
const char *  category 
)
void TRACE_surf_alloc ( void  )
void TRACE_surf_release ( void  )
void instr_routing_define_callbacks ( void  )
void instr_new_variable_type ( const char *  new_typename,
const char *  color 
)
void instr_new_user_variable_type ( const char *  father_type,
const char *  new_typename,
const char *  color 
)
void instr_new_user_state_type ( const char *  father_type,
const char *  new_typename 
)
void instr_new_value_for_user_state_type ( const char *  _typename,
const char *  value,
const char *  color 
)
int instr_platform_traced ( void  )
xbt_graph_t instr_routing_platform_graph ( void  )
void instr_routing_platform_graph_export_graphviz ( xbt_graph_t  g,
const char *  filename 
)

Variable Documentation

XBT_PRIVATE double sg_tcp_gamma
XBT_PRIVATE double sg_sender_gap
XBT_PRIVATE double sg_latency_factor
XBT_PRIVATE double sg_bandwidth_factor
XBT_PRIVATE double sg_weight_S_parameter
XBT_PRIVATE int sg_network_crosstraffic
routing_platf_t routing_platf
void_f_void_t surf_cpu_model_init_preparse
s_surf_model_description_t surf_plugin_description[]

The list of all available surf plugins.

surf_storage_model_t surf_storage_model
xbt_dict_t current_property_set
xbt_dict_t current_model_property_set
xbt_dict_t traces_set_list