SimGrid  3.15
Versatile Simulation of Distributed Systems
host.cpp File Reference
#include <vector>
#include "xbt/dict.h"
#include "simgrid/host.h"
#include <xbt/Extendable.hpp>
#include <simgrid/s4u/host.hpp>
#include "src/kernel/routing/NetPoint.hpp"
#include "src/simix/smx_host_private.h"
#include "src/surf/HostImpl.hpp"
#include "src/surf/cpu_interface.hpp"

Namespaces

 simgrid
 Alltoall Bruck.
 
 simgrid::s4u
 

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (sg_host, sd, "Logging specific to sg_hosts")
 
void sg_host_exit ()
 
size_t sg_host_count ()
 
sg_host_tsg_host_list ()
 Returns the host list. More...
 
const char * sg_host_get_name (sg_host_t host)
 
voidsg_host_extension_get (sg_host_t host, size_t ext)
 
size_t sg_host_extension_create (void(*deleter)(void *))
 
sg_host_t sg_host_by_name (const char *name)
 
static int hostcmp_voidp (const void *pa, const void *pb)
 
xbt_dynar_t sg_hosts_as_dynar ()
 
voidsg_host_user (sg_host_t host)
 
void sg_host_user_set (sg_host_t host, void *userdata)
 
void sg_host_user_destroy (sg_host_t host)
 
xbt_dict_t sg_host_get_mounted_storage_list (sg_host_t host)
 
xbt_dynar_t sg_host_get_attached_storage_list (sg_host_t host)
 
double sg_host_speed (sg_host_t host)
 Returns the total speed of a host. More...
 
double sg_host_get_available_speed (sg_host_t host)
 
int sg_host_get_nb_pstates (sg_host_t host)
 Returns the number of power states for a host. More...
 
int sg_host_get_pstate (sg_host_t host)
 Gets the pstate at which that host currently runs. More...
 
void sg_host_set_pstate (sg_host_t host, int pstate)
 Sets the pstate at which that host should run. More...
 
xbt_dict_t sg_host_get_properties (sg_host_t host)
 Get the properties of an host. More...
 
const char * sg_host_get_property_value (sg_host_t host, const char *name)
 Returns the value of a given host property. More...
 
void sg_host_route (sg_host_t from, sg_host_t to, xbt_dynar_t links)
 Find a route between two hosts. More...
 
double sg_host_route_latency (sg_host_t from, sg_host_t to)
 Find the latency of the route between two hosts. More...
 
double sg_host_route_bandwidth (sg_host_t from, sg_host_t to)
 Find the bandwitdh of the route between two hosts. More...
 
void sg_host_dump (sg_host_t host)
 Displays debugging information about a host. More...
 

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( sg_host  ,
sd  ,
"Logging specific to sg_hosts"   
)

◆ sg_host_exit()

void sg_host_exit ( )

◆ sg_host_count()

size_t sg_host_count ( )

◆ sg_host_list()

sg_host_t* sg_host_list ( )

Returns the host list.

Uses sg_host_count() to know the array size.

Returns
an array of sg_host_t containing all the hosts in the platform.
Remarks
The host order in this array is generally different from the creation/declaration order in the XML platform (we use a hash table internally).
See also
sg_host_count()

◆ sg_host_get_name()

const char* sg_host_get_name ( sg_host_t  host)

◆ sg_host_extension_get()

void* sg_host_extension_get ( sg_host_t  host,
size_t  ext 
)

◆ sg_host_extension_create()

size_t sg_host_extension_create ( void(*)(void *)  deleter)

◆ sg_host_by_name()

sg_host_t sg_host_by_name ( const char *  name)

◆ hostcmp_voidp()

static int hostcmp_voidp ( const void pa,
const void pb 
)
static

◆ sg_hosts_as_dynar()

xbt_dynar_t sg_hosts_as_dynar ( )

◆ sg_host_user()

void* sg_host_user ( sg_host_t  host)

◆ sg_host_user_set()

void sg_host_user_set ( sg_host_t  host,
void userdata 
)

◆ sg_host_user_destroy()

void sg_host_user_destroy ( sg_host_t  host)

◆ sg_host_get_mounted_storage_list()

xbt_dict_t sg_host_get_mounted_storage_list ( sg_host_t  host)

◆ sg_host_get_attached_storage_list()

xbt_dynar_t sg_host_get_attached_storage_list ( sg_host_t  host)

◆ sg_host_speed()

double sg_host_speed ( sg_host_t  host)

Returns the total speed of a host.

◆ sg_host_get_available_speed()

double sg_host_get_available_speed ( sg_host_t  host)

◆ sg_host_get_nb_pstates()

int sg_host_get_nb_pstates ( sg_host_t  host)

Returns the number of power states for a host.

See also SURF Energy Plugin.

◆ sg_host_get_pstate()

int sg_host_get_pstate ( sg_host_t  host)

Gets the pstate at which that host currently runs.

See also SURF Energy Plugin.

◆ sg_host_set_pstate()

void sg_host_set_pstate ( sg_host_t  host,
int  pstate 
)

Sets the pstate at which that host should run.

See also SURF Energy Plugin.

◆ sg_host_get_properties()

xbt_dict_t sg_host_get_properties ( sg_host_t  host)

Get the properties of an host.

◆ sg_host_route()

void sg_host_route ( sg_host_t  from,
sg_host_t  to,
xbt_dynar_t  links 
)

Find a route between two hosts.

Parameters
fromwhere from
towhere to
links[OUT] where to store the list of links (must exist, cannot be nullptr).

◆ sg_host_route_latency()

double sg_host_route_latency ( sg_host_t  from,
sg_host_t  to 
)

Find the latency of the route between two hosts.

Parameters
fromwhere from
towhere to

◆ sg_host_route_bandwidth()

double sg_host_route_bandwidth ( sg_host_t  from,
sg_host_t  to 
)

Find the bandwitdh of the route between two hosts.

Parameters
fromwhere from
towhere to

◆ sg_host_dump()

void sg_host_dump ( sg_host_t  host)

Displays debugging information about a host.