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

Namespaces

 simgrid
 Host datatype from SIMIX POV.
 
 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)")
 
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_NS3 ()
 Initializes the platform with the network model NS3. More...
 
double surf_get_clock ()
 Return the current time. More...
 
FILE * surf_fopen (const char *name, const char *mode)
 
const char * __surf_get_initial_path ()
 
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 ()
 Exit SURF. More...
 
void surf_action_lmm_update_index_heap (void *action, int i)
 

Variables

std::vector< surf_model_t > * all_existing_models = nullptr
 List of initialized models. More...
 
xbt_dynar_t model_list_invoke = nullptr
 
simgrid::trace_mgr::future_evt_set * future_evt_set = nullptr
 
xbt_dynar_t surf_path = nullptr
 
std::vector< simgrid::s4u::Host * > 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...
 
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_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

◆ FILE_DELIM

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

Function Documentation

◆ XBT_LOG_NEW_CATEGORY()

XBT_LOG_NEW_CATEGORY ( surf  ,
"All SURF categories"   
)

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( surf_kernel  ,
surf  ,
"Logging specific to SURF (kernel)"   
)

◆ surf_fopen()

FILE* surf_fopen ( const char *  name,
const char *  mode 
)

◆ __surf_get_initial_path()

const char* __surf_get_initial_path ( )

◆ __surf_is_absolute_file_path()

int __surf_is_absolute_file_path ( const char *  file_path)

◆ model_help()

void model_help ( const char *  category,
s_surf_model_description_t table 
)

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

◆ find_model_description()

int find_model_description ( s_surf_model_description_t table,
const char *  name 
)

◆ surf_storage_free()

static void surf_storage_free ( void r)
inlinestatic

◆ sg_version_check()

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.

◆ sg_version()

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.

◆ surf_action_lmm_update_index_heap()

void surf_action_lmm_update_index_heap ( void action,
int  i 
)

Variable Documentation

◆ model_list_invoke

xbt_dynar_t model_list_invoke = nullptr

◆ future_evt_set

simgrid::trace_mgr::future_evt_set* future_evt_set = nullptr

◆ surf_path

xbt_dynar_t surf_path = nullptr

◆ surf_plugin_description

s_surf_model_description_t surf_plugin_description[]
Initial value:
= {
{"Energy", "Cpu energy consumption.", &sg_energy_plugin_init},
{nullptr, nullptr, nullptr}
}
void sg_energy_plugin_init()
Enable energy plugin.
Definition: energy.cpp:284

The list of all available surf plugins.

◆ NOW

double NOW = 0

◆ surf_action_state_names

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"
}