SimGrid  3.14.159
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_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 surf_Modelsurf_model_t
 Model datatype. More...
 
typedef surf_CpuModelsurf_cpu_model_t
 
typedef surf_HostModelsurf_host_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 struct surf_filesurf_file_t
 
typedef struct surf_model_description s_surf_model_description_t
 
typedef struct surf_model_descriptionsurf_model_description_t
 

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 ()
 Initializes the CPU model with the model Cas01. More...
 
void surf_cpu_model_init_ti ()
 Initializes the CPU model with trace integration [Deprecated]. More...
 
void surf_network_model_init_SMPI ()
 Same as network model 'LagrangeVelho', only with different correction factors. More...
 
void surf_network_model_init_IB ()
 Same as network model 'LagrangeVelho', only with different correction factors. More...
 
void surf_network_model_init_LegrandVelho ()
 Initializes the platform with the network model 'LegrandVelho'. More...
 
void surf_network_model_init_Constant ()
 Initializes the platform with the network model 'Constant'. More...
 
void surf_network_model_init_CM02 ()
 Initializes the platform with the network model CM02. More...
 
void surf_network_model_init_NS3 ()
 Initializes the platform with the network model NS3. More...
 
void surf_network_model_init_Reno ()
 Initializes the platform with the network model Reno. More...
 
void surf_network_model_init_Reno2 ()
 Initializes the platform with the network model Reno2. More...
 
void surf_network_model_init_Vegas ()
 Initializes the platform with the network model Vegas. More...
 
void surf_storage_model_init_default ()
 The storage model. More...
 
void surf_host_model_init_compound ()
 Initializes the platform with a compound host model. More...
 
void surf_host_model_init_current_default ()
 Initializes the platform with the current best network and cpu models at hand. More...
 
void surf_host_model_init_ptask_L07 ()
 Initializes the platform with the model L07. More...
 
void surf_vm_model_init_HL13 ()
 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 ()
 Finish simulation initialization. More...
 
double surf_solve (double max_date)
 Performs a part of the simulation. More...
 
double surf_get_clock ()
 Return the current time. More...
 
void surf_exit ()
 Exit SURF. More...
 
void parse_platform_file (const char *file)
 
const char * __surf_get_initial_path ()
 
void TRACE_surf_action (surf_action_t surf_action, const char *category)
 
void TRACE_surf_alloc ()
 
void TRACE_surf_release ()
 
void instr_routing_define_callbacks ()
 
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 ()
 
xbt_graph_t instr_routing_platform_graph ()
 
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...
 
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 information 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...
 
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

double sg_tcp_gamma
 
double sg_sender_gap
 
double sg_latency_factor
 
double sg_bandwidth_factor
 
double sg_weight_S_parameter
 
int sg_network_crosstraffic
 
xbt_dynar_t surf_path
 
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...
 
s_surf_model_description_t surf_host_model_description []
 The list of all available host model models. 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

§ surf_Model

typedef struct surf_Model surf_Model

§ surf_CpuModel

typedef struct surf_CpuModel surf_CpuModel

§ surf_HostModel

§ surf_NetworkModel

§ surf_StorageModel

§ surf_Resource

typedef struct surf_Resource surf_Resource

§ surf_ResourceLmm

§ surf_HostCLM03

§ surf_Host

typedef struct surf_Host surf_Host

§ surf_NetworkCm02Link

§ surf_Action

typedef struct surf_Action surf_Action

§ surf_ActionLmm

§ surf_StorageActionLmm

§ surf_cpu_model_t

§ surf_host_model_t

§ surf_network_model_t

§ surf_storage_model_t

§ surf_resource_t

§ surf_cpp_resource_t

§ surf_host_t

§ surf_cpu_t

typedef surf_Cpu* surf_cpu_t

§ surf_file_t

typedef struct surf_file* surf_file_t

§ s_surf_model_description_t

§ surf_model_description_t

Function Documentation

§ find_model_description()

int find_model_description ( s_surf_model_description_t table,
const char *  name 
)

§ model_help()

void model_help ( const char *  category,
s_surf_model_description_t table 
)

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

§ surf_storage_resource_priv()

static void* surf_storage_resource_priv ( const void storage)
inlinestatic

§ surf_storage_resource_by_name()

static void* surf_storage_resource_by_name ( const char *  name)
inlinestatic

§ parse_platform_file()

void parse_platform_file ( const char *  file)

§ __surf_get_initial_path()

const char* __surf_get_initial_path ( )

§ TRACE_surf_action()

void TRACE_surf_action ( surf_action_t  surf_action,
const char *  category 
)

§ TRACE_surf_alloc()

void TRACE_surf_alloc ( )

§ TRACE_surf_release()

void TRACE_surf_release ( )

§ instr_routing_define_callbacks()

void instr_routing_define_callbacks ( )

§ instr_new_variable_type()

void instr_new_variable_type ( const char *  new_typename,
const char *  color 
)

§ instr_new_user_variable_type()

void instr_new_user_variable_type ( const char *  father_type,
const char *  new_typename,
const char *  color 
)

§ instr_new_user_state_type()

void instr_new_user_state_type ( const char *  father_type,
const char *  new_typename 
)

§ instr_new_value_for_user_state_type()

void instr_new_value_for_user_state_type ( const char *  _typename,
const char *  value,
const char *  color 
)

§ instr_platform_traced()

int instr_platform_traced ( )

§ instr_routing_platform_graph()

xbt_graph_t instr_routing_platform_graph ( )

§ instr_routing_platform_graph_export_graphviz()

void instr_routing_platform_graph_export_graphviz ( xbt_graph_t  g,
const char *  filename 
)

Variable Documentation

§ sg_tcp_gamma

double sg_tcp_gamma

§ sg_sender_gap

double sg_sender_gap

§ sg_latency_factor

double sg_latency_factor

§ sg_bandwidth_factor

double sg_bandwidth_factor

§ sg_weight_S_parameter

double sg_weight_S_parameter

§ sg_network_crosstraffic

int sg_network_crosstraffic

§ surf_path

xbt_dynar_t surf_path

§ surf_plugin_description

s_surf_model_description_t surf_plugin_description[]

The list of all available surf plugins.

§ surf_storage_model

surf_storage_model_t surf_storage_model

§ current_property_set

xbt_dict_t current_property_set

§ current_model_property_set

xbt_dict_t current_model_property_set

§ traces_set_list

xbt_dict_t traces_set_list