SimGrid
3.18
Versatile Simulation of Distributed Systems
|
Functions | |
smx_actor_t | simcall_process_create (const char *name, xbt_main_func_t code, void *data, sg_host_t host, int argc, char **argv, std::map< std::string, std::string > *properties) |
Restart a process, starting it again from the beginning. More... | |
smx_activity_t | simcall_execution_start (const char *name, double flops_amount, double priority, double bound, simgrid::s4u::Host *host) |
Creates a synchro that executes some computation of an host. More... | |
smx_activity_t | simcall_execution_parallel_start (const char *name, int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double rate, double timeout) |
Creates a synchro that may involve parallel computation on several hosts and communication between them. More... | |
void | simcall_execution_cancel (smx_activity_t execution) |
Cancels an execution synchro. More... | |
void | simcall_execution_set_priority (smx_activity_t execution, double priority) |
Changes the priority of an execution synchro. More... | |
void | simcall_execution_set_bound (smx_activity_t execution, double bound) |
Changes the capping (the maximum CPU utilization) of an execution synchro. More... | |
void | simcall_process_killall (int reset_pid) |
Kills all SIMIX processes. More... | |
void | simcall_process_cleanup (smx_actor_t process) |
Cleans up a SIMIX process. More... | |
void | simcall_process_suspend (smx_actor_t process) |
Suspends a process. More... | |
int | simcall_process_count () |
Returns the amount of SIMIX processes in the system. More... | |
void | simcall_process_set_data (smx_actor_t process, void *data) |
Set the user data of a smx_actor_t. More... | |
void | simcall_process_set_kill_time (smx_actor_t process, double kill_time) |
Set the kill time of a process. More... | |
void | simcall_process_on_exit (smx_actor_t process, int_f_pvoid_pvoid_t fun, void *data) |
Add an on_exit function Add an on_exit function which will be executed when the process exits/is killed. More... | |
e_smx_state_t | simcall_process_sleep (double duration) |
Creates a new sleep SIMIX synchro. More... | |
smx_actor_t simcall_process_create | ( | const char * | name, |
xbt_main_func_t | code, | ||
void * | data, | ||
sg_host_t | host, | ||
int | argc, | ||
char ** | argv, | ||
std::map< std::string, std::string > * | properties | ||
) |
Restart a process, starting it again from the beginning.
Creates and runs a new SIMIX process.
The structure and the corresponding thread are created and put in the list of ready processes.
name | a name for the process. It is for user-level information and can be nullptr. |
code | the main function of the process |
data | a pointer to any data one may want to attach to the new object. It is for user-level information and can be nullptr. It can be retrieved with the function simcall_process_get_data. |
host | where the new agent is executed. |
kill_time | time when the process is killed |
argc | first argument passed to code |
argv | second argument passed to code |
properties | the properties of the process |
auto_restart | either it is autorestarting or not. |
smx_activity_t simcall_execution_start | ( | const char * | name, |
double | flops_amount, | ||
double | priority, | ||
double | bound, | ||
simgrid::s4u::Host * | host | ||
) |
Creates a synchro that executes some computation of an host.
This function creates a SURF action and allocates the data necessary to create the SIMIX synchro. It can raise a host_error exception if the host crashed.
name | Name of the execution synchro to create |
flops_amount | amount Computation amount (in flops) |
priority | computation priority |
bound |
smx_activity_t simcall_execution_parallel_start | ( | const char * | name, |
int | host_nb, | ||
sg_host_t * | host_list, | ||
double * | flops_amount, | ||
double * | bytes_amount, | ||
double | rate, | ||
double | timeout | ||
) |
Creates a synchro that may involve parallel computation on several hosts and communication between them.
name | Name of the execution synchro to create |
host_nb | Number of hosts where the synchro will be executed |
host_list | Array (of size host_nb) of hosts where the synchro will be executed |
flops_amount | Array (of size host_nb) of computation amount of hosts (in bytes) |
bytes_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 |
timeout | timeout |
void simcall_execution_cancel | ( | smx_activity_t | execution | ) |
Cancels an execution synchro.
This functions stops the execution. It calls a surf function.
execution | The execution synchro to cancel |
void simcall_execution_set_priority | ( | smx_activity_t | execution, |
double | priority | ||
) |
Changes the priority of an execution synchro.
This functions changes the priority only. It calls a surf function.
execution | The execution synchro |
priority | The new priority |
void simcall_execution_set_bound | ( | smx_activity_t | execution, |
double | bound | ||
) |
Changes the capping (the maximum CPU utilization) of an execution synchro.
This functions changes the capping only. It calls a surf function.
execution | The execution synchro |
bound | The new bound |
void simcall_process_killall | ( | int | reset_pid | ) |
Kills all SIMIX processes.
void simcall_process_cleanup | ( | smx_actor_t | process | ) |
Cleans up a SIMIX process.
process | poor victim (must have already been killed) |
void simcall_process_suspend | ( | smx_actor_t | process | ) |
Suspends a process.
This function suspends the process by suspending the synchro it was waiting for completion.
process | a SIMIX process |
int simcall_process_count | ( | ) |
Returns the amount of SIMIX processes in the system.
Maestro internal process is not counted, only user code processes are
void simcall_process_set_data | ( | smx_actor_t | process, |
void * | data | ||
) |
Set the user data of a smx_actor_t.
This functions sets the user data associated to process.
process | SIMIX process |
data | User data |
void simcall_process_set_kill_time | ( | smx_actor_t | process, |
double | kill_time | ||
) |
Set the kill time of a process.
void simcall_process_on_exit | ( | smx_actor_t | process, |
int_f_pvoid_pvoid_t | fun, | ||
void * | data | ||
) |
Add an on_exit function Add an on_exit function which will be executed when the process exits/is killed.
e_smx_state_t simcall_process_sleep | ( | double | duration | ) |
Creates a new sleep SIMIX synchro.
This function creates a SURF action and allocates the data necessary to create the SIMIX synchro. It can raise a host_error exception if the host crashed. The default SIMIX name of the synchro is "sleep".
duration | Time duration of the sleep. |