SimGrid
3.11
Versatile Simulation of Distributed Systems
|
Functions | |
smx_host_t | simcall_host_get_by_name (const char *name) |
Returns a host given its name. More... | |
const char * | simcall_host_get_name (smx_host_t host) |
Returns the name of a host. More... | |
void | simcall_host_on (smx_host_t host) |
Start the host if it is off. More... | |
void | simcall_host_off (smx_host_t host) |
Stop the host if it is on. More... | |
xbt_dict_t | simcall_host_get_properties (smx_host_t host) |
Returns a dict of the properties assigned to a host. More... | |
xbt_dict_t | simcall_asr_get_properties (const char *name) |
Returns a dict of the properties assigned to a router or AS. More... | |
double | simcall_host_get_speed (smx_host_t host) |
Returns the speed of the processor. More... | |
int | simcall_host_get_core (smx_host_t host) |
Returns the number of core of the processor. More... | |
xbt_swag_t | simcall_host_get_process_list (smx_host_t host) |
Returns the list of processes attached to the host. More... | |
double | simcall_host_get_available_speed (smx_host_t host) |
Returns the available speed of the processor. More... | |
int | simcall_host_get_state (smx_host_t host) |
Returns the state of a host. More... | |
double | simcall_host_get_current_power_peak (smx_host_t host) |
Returns the power peak of a host. More... | |
double | simcall_host_get_power_peak_at (smx_host_t host, int pstate_index) |
Returns one power peak (in flops/s) of a host at a given pstate. More... | |
int | simcall_host_get_nb_pstates (smx_host_t host) |
Returns the number of power states for a host. More... | |
void | simcall_host_set_power_peak_at (smx_host_t host, int pstate_index) |
Sets a new power peak for a host. More... | |
double | simcall_host_get_consumed_energy (smx_host_t host) |
Returns the total energy consumed by the host (in Joules) More... | |
smx_action_t | simcall_host_execute (const char *name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) |
Creates an action that executes some computation of an host. More... | |
smx_action_t | simcall_host_parallel_execute (const char *name, int host_nb, smx_host_t *host_list, double *computation_amount, double *communication_amount, double amount, double rate) |
Creates an action that may involve parallel computation on several hosts and communication between them. More... | |
void | simcall_host_execution_destroy (smx_action_t execution) |
Destroys an execution action. More... | |
void | simcall_host_execution_cancel (smx_action_t execution) |
Cancels an execution action. More... | |
double | simcall_host_execution_get_remains (smx_action_t execution) |
Returns how much of an execution action remains to be done. More... | |
e_smx_state_t | simcall_host_execution_get_state (smx_action_t execution) |
Returns the state of an execution action. More... | |
void | simcall_host_execution_set_priority (smx_action_t execution, double priority) |
Changes the priority of an execution action. More... | |
void | simcall_host_execution_set_bound (smx_action_t execution, double bound) |
Changes the capping (the maximum CPU utilization) of an execution action. More... | |
void | simcall_host_execution_set_affinity (smx_action_t execution, smx_host_t host, unsigned long mask) |
Changes the CPU affinity of an execution action. More... | |
e_smx_state_t | simcall_host_execution_wait (smx_action_t execution) |
Waits for the completion of an execution action and destroy it. More... | |
typedef xbt_dictelm_t | smx_host_t |
Host datatypeA location (or host) is any possible place where a process may run. Thus it is represented as a physical resource with computing capabilities, some mailboxes to enable running process to communicate with remote ones, and some private data that can be only accessed by local process. More... | |
typedef xbt_dictelm_t smx_host_t |
Host datatypeA location (or host) is any possible place where a process may run. Thus it is represented as a physical resource with computing capabilities, some mailboxes to enable running process to communicate with remote ones, and some private data that can be only accessed by local process.
smx_host_t simcall_host_get_by_name | ( | const char * | name | ) |
Returns a host given its name.
name | The name of the host to get |
const char* simcall_host_get_name | ( | smx_host_t | host | ) |
Returns the name of a host.
host | A SIMIX host |
void simcall_host_on | ( | smx_host_t | host | ) |
Start the host if it is off.
host | A SIMIX host |
void simcall_host_off | ( | smx_host_t | host | ) |
Stop the host if it is on.
host | A SIMIX host |
xbt_dict_t simcall_host_get_properties | ( | smx_host_t | host | ) |
Returns a dict of the properties assigned to a host.
host | A host |
xbt_dict_t simcall_asr_get_properties | ( | const char * | name | ) |
Returns a dict of the properties assigned to a router or AS.
name | The name of the router or AS |
double simcall_host_get_speed | ( | smx_host_t | host | ) |
Returns the speed of the processor.
The speed returned does not take into account the current load on the machine.
host | A SIMIX host |
int simcall_host_get_core | ( | smx_host_t | host | ) |
Returns the number of core of the processor.
host | A SIMIX host |
xbt_swag_t simcall_host_get_process_list | ( | smx_host_t | host | ) |
Returns the list of processes attached to the host.
host | A SIMIX host |
double simcall_host_get_available_speed | ( | smx_host_t | host | ) |
Returns the available speed of the processor.
int simcall_host_get_state | ( | smx_host_t | host | ) |
Returns the state of a host.
Two states are possible: 1 if the host is active or 0 if it has crashed.
host | A SIMIX host |
double simcall_host_get_current_power_peak | ( | smx_host_t | host | ) |
Returns the power peak of a host.
host | A SIMIX host |
double simcall_host_get_power_peak_at | ( | smx_host_t | host, |
int | pstate_index | ||
) |
Returns one power peak (in flops/s) of a host at a given pstate.
host | A SIMIX host |
pstate_index | pstate to test |
int simcall_host_get_nb_pstates | ( | smx_host_t | host | ) |
Returns the number of power states for a host.
host | A SIMIX host |
void simcall_host_set_power_peak_at | ( | smx_host_t | host, |
int | pstate_index | ||
) |
Sets a new power peak for a host.
host | A SIMIX host |
pstate_index | The pstate to which the CPU power will be set |
double simcall_host_get_consumed_energy | ( | smx_host_t | host | ) |
Returns the total energy consumed by the host (in Joules)
host | A SIMIX host |
smx_action_t simcall_host_execute | ( | const char * | name, |
smx_host_t | host, | ||
double | computation_amount, | ||
double | priority, | ||
double | bound, | ||
unsigned long | affinity_mask | ||
) |
Creates an action that executes some computation of an host.
This function creates a SURF action and allocates the data necessary to create the SIMIX action. It can raise a host_error exception if the host crashed.
name | Name of the execution action to create |
host | SIMIX host where the action will be executed |
computation_amount | amount Computation amount (in bytes) |
priority | computation priority |
bound | |
affinity_mask |
smx_action_t simcall_host_parallel_execute | ( | const char * | name, |
int | host_nb, | ||
smx_host_t * | host_list, | ||
double * | computation_amount, | ||
double * | communication_amount, | ||
double | amount, | ||
double | rate | ||
) |
Creates an action that may involve parallel computation on several hosts and communication between them.
name | Name of the execution action to create |
host_nb | Number of hosts where the action will be executed |
host_list | Array (of size host_nb) of hosts where the action will be executed |
computation_amount | Array (of size host_nb) of computation amount of hosts (in bytes) |
communication_amount | Array (of size host_nb * host_nb) representing the communication amount between each pair of hosts |
amount | the SURF action amount |
rate | the SURF action rate |
void simcall_host_execution_destroy | ( | smx_action_t | execution | ) |
Destroys an execution action.
Destroys an action, freing its memory. This function cannot be called if there are a conditional waiting for it.
execution | The execution action to destroy |
void simcall_host_execution_cancel | ( | smx_action_t | execution | ) |
Cancels an execution action.
This functions stops the execution. It calls a surf function.
execution | The execution action to cancel |
double simcall_host_execution_get_remains | ( | smx_action_t | execution | ) |
Returns how much of an execution action remains to be done.
execution | The execution action |
e_smx_state_t simcall_host_execution_get_state | ( | smx_action_t | execution | ) |
Returns the state of an execution action.
execution | The execution action |
void simcall_host_execution_set_priority | ( | smx_action_t | execution, |
double | priority | ||
) |
Changes the priority of an execution action.
This functions changes the priority only. It calls a surf function.
execution | The execution action |
priority | The new priority |
void simcall_host_execution_set_bound | ( | smx_action_t | execution, |
double | bound | ||
) |
Changes the capping (the maximum CPU utilization) of an execution action.
This functions changes the capping only. It calls a surf function.
execution | The execution action |
bound | The new bound |
void simcall_host_execution_set_affinity | ( | smx_action_t | execution, |
smx_host_t | host, | ||
unsigned long | mask | ||
) |
Changes the CPU affinity of an execution action.
This functions changes the CPU affinity of an execution action. See taskset(1) on Linux.
execution | The execution action |
host | Host |
mask | Affinity mask |
e_smx_state_t simcall_host_execution_wait | ( | smx_action_t | execution | ) |
Waits for the completion of an execution action and destroy it.
execution | The execution action |