SimGrid  3.13
Versatile Simulation of Distributed Systems
sg_platf.cpp File Reference
#include "xbt/misc.h"
#include "xbt/log.h"
#include "xbt/str.h"
#include "xbt/dict.h"
#include "xbt/RngStream.h"
#include <xbt/signal.hpp>
#include "src/surf/HostImpl.hpp"
#include "surf/surf.h"
#include "src/simix/smx_private.h"
#include "src/include/simgrid/sg_config.h"
#include "src/surf/xml/platf_private.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
#include "surf/surf_routing.h"
#include "src/surf/AsImpl.hpp"
#include "src/surf/AsCluster.hpp"
#include "src/surf/AsClusterTorus.hpp"
#include "src/surf/AsClusterFatTree.hpp"
#include "src/surf/AsDijkstra.hpp"
#include "src/surf/AsFloyd.hpp"
#include "src/surf/AsFull.hpp"
#include "src/surf/AsNone.hpp"
#include "src/surf/AsVivaldi.hpp"

Namespaces

 simgrid
 
 simgrid::surf
 

Functions

 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY (surf_parse)
 
static std::vector< int > * explodesRadical (const char *radicals)
 
static simgrid::surf::AsImplrouting_get_current ()
 
void sg_platf_init (void)
 Module management function: creates all internal data structures. More...
 
void sg_platf_exit (void)
 Module management function: frees all internal data structures. More...
 
void sg_platf_new_host (sg_platf_host_cbarg_t host)
 Add an "host" to the current AS. More...
 
void sg_platf_new_router (sg_platf_router_cbarg_t router)
 Add a "router" to the network element list. More...
 
void sg_platf_new_link (sg_platf_link_cbarg_t link)
 
void sg_platf_new_cluster (sg_platf_cluster_cbarg_t cluster)
 
void routing_cluster_add_backbone (simgrid::surf::Link *bb)
 
void sg_platf_new_cabinet (sg_platf_cabinet_cbarg_t cabinet)
 
void sg_platf_new_storage (sg_platf_storage_cbarg_t storage)
 
void sg_platf_new_storage_type (sg_platf_storage_type_cbarg_t storage_type)
 
static void mount_free (void *p)
 
void sg_platf_new_mount (sg_platf_mount_cbarg_t mount)
 
void sg_platf_new_route (sg_platf_route_cbarg_t route)
 
void sg_platf_new_bypassRoute (sg_platf_route_cbarg_t bypassRoute)
 
void sg_platf_new_process (sg_platf_process_cbarg_t process)
 
void sg_platf_new_peer (sg_platf_peer_cbarg_t peer)
 
void sg_platf_begin ()
 
void sg_platf_end ()
 
static void surf_config_models_setup ()
 
simgrid::s4u::As * sg_platf_new_AS_begin (sg_platf_AS_cbarg_t AS)
 Make a new routing component to the platform. More...
 
void sg_platf_new_AS_seal ()
 Specify that the description of the current AS is finished. More...
 
void sg_platf_new_hostlink (sg_platf_host_link_cbarg_t hostlink)
 Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) More...
 

Variables

XBT_PRIVATE xbt_dynar_t mount_list = NULL
 
simgrid::xbt::signal< void(sg_platf_link_cbarg_t)> simgrid::surf::on_link
 
simgrid::xbt::signal< void(sg_platf_cluster_cbarg_t)> simgrid::surf::on_cluster
 
simgrid::xbt::signal< void(void)> simgrid::surf::on_postparse
 
static int surf_parse_models_setup_already_called = 0
 
static simgrid::surf::AsImplcurrent_routing = NULL
 The current AS in the parsing. More...
 

Function Documentation

XBT_LOG_EXTERNAL_DEFAULT_CATEGORY ( surf_parse  )
static std::vector<int>* explodesRadical ( const char *  radicals)
static
static simgrid::surf::AsImpl* routing_get_current ( )
static
void sg_platf_init ( void  )

Module management function: creates all internal data structures.

void sg_platf_exit ( void  )

Module management function: frees all internal data structures.

void sg_platf_new_host ( sg_platf_host_cbarg_t  host)

Add an "host" to the current AS.

void sg_platf_new_router ( sg_platf_router_cbarg_t  router)

Add a "router" to the network element list.

void sg_platf_new_link ( sg_platf_link_cbarg_t  link)
void sg_platf_new_cluster ( sg_platf_cluster_cbarg_t  cluster)
void routing_cluster_add_backbone ( simgrid::surf::Link bb)
void sg_platf_new_cabinet ( sg_platf_cabinet_cbarg_t  cabinet)
void sg_platf_new_storage ( sg_platf_storage_cbarg_t  storage)
void sg_platf_new_storage_type ( sg_platf_storage_type_cbarg_t  storage_type)
static void mount_free ( void p)
static
void sg_platf_new_mount ( sg_platf_mount_cbarg_t  mount)
void sg_platf_new_route ( sg_platf_route_cbarg_t  route)
void sg_platf_new_bypassRoute ( sg_platf_route_cbarg_t  bypassRoute)
void sg_platf_new_process ( sg_platf_process_cbarg_t  process)
void sg_platf_new_peer ( sg_platf_peer_cbarg_t  peer)
void sg_platf_begin ( )
void sg_platf_end ( )
static void surf_config_models_setup ( )
static
simgrid::s4u::As* sg_platf_new_AS_begin ( sg_platf_AS_cbarg_t  AS)

Make a new routing component to the platform.

Add a new autonomous system to the platform. Any elements (such as host, router or sub-AS) added after this call and before the corresponding call to sg_platf_new_AS_seal() will be added to this AS.

Once this function was called, the configuration concerning the used models cannot be changed anymore.

Parameters
AS_idname of this autonomous system. Must be unique in the platform
wanted_routing_typeone of Full, Floyd, Dijkstra or similar. Full list in the variable routing_models, in src/surf/surf_routing.c
void sg_platf_new_AS_seal ( )

Specify that the description of the current AS is finished.

Once you've declared all the content of your AS, you have to seal it with this call. Your AS is not usable until you call this function.

void sg_platf_new_hostlink ( sg_platf_host_link_cbarg_t  hostlink)

Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi)

Variable Documentation

XBT_PRIVATE xbt_dynar_t mount_list = NULL
int surf_parse_models_setup_already_called = 0
static
simgrid::surf::AsImpl* current_routing = NULL
static

The current AS in the parsing.