SimGrid  3.13
Versatile Simulation of Distributed Systems
surf_interface.cpp File Reference
#include "src/internal_config.h"
#include "surf_private.h"
#include "surf_interface.hpp"
#include "network_interface.hpp"
#include "cpu_interface.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/simix/smx_host_private.h"
#include "surf_routing.hpp"
#include "simgrid/sg_config.h"
#include "mc/mc.h"
#include "virtual_machine.hpp"
#include "src/instr/instr_private.h"
#include "simgrid/s4u/engine.hpp"
#include <simgrid/plugins/energy.h>

Namespaces

 simgrid
 
 simgrid::surf
 

Macros

#define FILE_DELIM   "/" /* FIXME: move to better location */
 

Functions

 XBT_LOG_NEW_CATEGORY (surf,"All SURF categories")
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (surf_kernel, surf,"Logging specific to SURF (kernel)")
 
double surf_get_clock (void)
 Return the current time. More...
 
FILE * surf_fopen (const char *name, const char *mode)
 
const char * __surf_get_initial_path (void)
 
int __surf_is_absolute_file_path (const char *file_path)
 
void model_help (const char *category, s_surf_model_description_t *table)
 Displays the long description of all registered models, and quit. More...
 
int find_model_description (s_surf_model_description_t *table, const char *name)
 
static void surf_storage_free (void *r)
 
void sg_version_check (int lib_version_major, int lib_version_minor, int lib_version_patch)
 Helps ensuring that header version (SIMGRID_VERSION_MAJOR and friends) and dynamic library version do match. More...
 
void sg_version (int *ver_major, int *ver_minor, int *ver_patch)
 Retrieves the version numbers of the used dynamic library (so, DLL or dynlib) , while SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files. More...
 
void surf_init (int *argc, char **argv)
 Initialize SURF. More...
 
void surf_exit (void)
 Exit SURF. More...
 
void surf_action_lmm_update_index_heap (void *action, int i)
 

Variables

xbt_dynar_t all_existing_models = NULL
 List of initialized models. More...
 
xbt_dynar_t model_list_invoke = NULL
 
simgrid::trace_mgr::future_evt_set * future_evt_set = nullptr
 Routing logic. More...
 
xbt_dynar_t surf_path = NULL
 
xbt_dynar_t host_that_restart = xbt_dynar_new(sizeof(char*), NULL)
 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...
 
simgrid::xbt::signal< void(void)> simgrid::surf::surfExitCallbacks
 
s_surf_model_description_t surf_plugin_description []
 The list of all available surf plugins. 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_cpu_model_description []
 The list of all available cpu model models. 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...
 
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_storage_model_description []
 The list of all available storage modes. More...
 
double NOW = 0
 
const char * surf_action_state_names [6]
 

Macro Definition Documentation

#define FILE_DELIM   "/" /* FIXME: move to better location */

Function Documentation

XBT_LOG_NEW_CATEGORY ( surf  ,
"All SURF categories"   
)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( surf_kernel  ,
surf  ,
"Logging specific to SURF (kernel)"   
)
FILE* surf_fopen ( const char *  name,
const char *  mode 
)
const char* __surf_get_initial_path ( void  )
int __surf_is_absolute_file_path ( const char *  file_path)
void model_help ( const char *  category,
s_surf_model_description_t table 
)

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

int find_model_description ( s_surf_model_description_t table,
const char *  name 
)
static void surf_storage_free ( void r)
inlinestatic
void sg_version_check ( int  lib_version_major,
int  lib_version_minor,
int  lib_version_patch 
)

Helps ensuring that header version (SIMGRID_VERSION_MAJOR and friends) and dynamic library version do match.

void sg_version ( int *  ver_major,
int *  ver_minor,
int *  ver_patch 
)

Retrieves the version numbers of the used dynamic library (so, DLL or dynlib) , while SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files.

void surf_action_lmm_update_index_heap ( void action,
int  i 
)

Variable Documentation

xbt_dynar_t model_list_invoke = NULL
simgrid::trace_mgr::future_evt_set* future_evt_set = nullptr

Routing logic.

xbt_dynar_t surf_path = NULL
s_surf_model_description_t surf_plugin_description[]
Initial value:
= {
{"Energy", "Cpu energy consumption.", sg_energy_plugin_init},
{NULL, NULL, NULL}
}
void sg_energy_plugin_init(void)
Enable energy plugin.
Definition: energy.cpp:257

The list of all available surf plugins.

double NOW = 0
const char* surf_action_state_names[6]
Initial value:
= {
"SURF_ACTION_READY",
"SURF_ACTION_RUNNING",
"SURF_ACTION_FAILED",
"SURF_ACTION_DONE",
"SURF_ACTION_TO_FREE",
"SURF_ACTION_NOT_IN_THE_SYSTEM"
}