SimGrid
3.9
Versatile Simulation of Distributed Systems
|
Functions | |
smx_host_t | simcall_host_get_by_name (const char *name) |
Returns a host given its name. | |
const char * | simcall_host_get_name (smx_host_t host) |
Returns the name of a host. | |
xbt_dict_t | simcall_host_get_properties (smx_host_t host) |
Returns a dict of the properties assigned to a host. | |
xbt_dict_t | simcall_asr_get_properties (const char *name) |
Returns a dict of the properties assigned to a router or AS. | |
double | simcall_host_get_speed (smx_host_t host) |
Returns the speed of the processor. | |
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. | |
void * | simcall_host_get_data (smx_host_t host) |
Returns the user data associated to a host. | |
void | simcall_host_set_data (smx_host_t host, void *data) |
Sets the user data associated to a host. | |
smx_action_t | simcall_host_execute (const char *name, smx_host_t host, double computation_amount, double priority) |
Creates an action that executes some computation of an host. | |
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. | |
void | simcall_host_execution_destroy (smx_action_t execution) |
Destroys an execution action. | |
void | simcall_host_execution_cancel (smx_action_t execution) |
Cancels an execution action. | |
double | simcall_host_execution_get_remains (smx_action_t execution) |
Returns how much of an execution action remains to be done. | |
e_smx_state_t | simcall_host_execution_get_state (smx_action_t execution) |
Returns the state of an execution action. | |
void | simcall_host_execution_set_priority (smx_action_t execution, double priority) |
Changes the priority of an execution action. | |
e_smx_state_t | simcall_host_execution_wait (smx_action_t execution) |
Waits for the completion of an execution action and destroy it. | |
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. |
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 |
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 |
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 |
void* simcall_host_get_data | ( | smx_host_t | host | ) |
Returns the user data associated to a host.
host | SIMIX host |
void simcall_host_set_data | ( | smx_host_t | host, |
void * | data | ||
) |
Sets the user data associated to a host.
The host must not have previous user data associated to it.
host | A SIMIX host |
data | The user data to set |
smx_action_t simcall_host_execute | ( | const char * | name, |
smx_host_t | host, | ||
double | computation_amount, | ||
double | priority | ||
) |
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 |
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 |
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 |