|
SimGrid
3.13
Versatile Simulation of Distributed Systems
|
Functions | |
| smx_synchro_t | simcall_execution_start (const char *name, double flops_amount, double priority, double bound, unsigned long affinity_mask) |
| Creates a synchro that executes some computation of an host. More... | |
| smx_synchro_t | simcall_execution_parallel_start (const char *name, int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, double rate) |
| Creates a synchro that may involve parallel computation on several hosts and communication between them. More... | |
| void | simcall_execution_destroy (smx_synchro_t execution) |
| Destroys an execution synchro. More... | |
| void | simcall_execution_cancel (smx_synchro_t execution) |
| Cancels an execution synchro. More... | |
| double | simcall_execution_get_remains (smx_synchro_t execution) |
| Returns how much of an execution synchro remains to be done. More... | |
| e_smx_state_t | simcall_execution_get_state (smx_synchro_t execution) |
| Returns the state of an execution synchro. More... | |
| void | simcall_execution_set_priority (smx_synchro_t execution, double priority) |
| Changes the priority of an execution synchro. More... | |
| void | simcall_execution_set_bound (smx_synchro_t execution, double bound) |
| Changes the capping (the maximum CPU utilization) of an execution synchro. More... | |
| void | simcall_execution_set_affinity (smx_synchro_t execution, sg_host_t host, unsigned long mask) |
| Changes the CPU affinity of an execution synchro. More... | |
| smx_process_t | simcall_process_create (const char *name, xbt_main_func_t code, void *data, const char *hostname, double kill_time, int argc, char **argv, xbt_dict_t properties, int auto_restart) |
| Creates and runs a new SIMIX process. More... | |
| void | simcall_process_kill (smx_process_t process) |
| Kills a SIMIX process. More... | |
| void | simcall_process_killall (int reset_pid) |
| Kills all SIMIX processes. More... | |
| void | simcall_process_cleanup (smx_process_t process) |
| Cleans up a SIMIX process. More... | |
| void | simcall_process_set_host (smx_process_t process, sg_host_t dest) |
| Migrates an agent to another location. More... | |
| void | simcall_process_suspend (smx_process_t process) |
| Suspends a process. More... | |
| void | simcall_process_resume (smx_process_t process) |
| Resumes a suspended process. More... | |
| int | simcall_process_count (void) |
| Returns the amount of SIMIX processes in the system. More... | |
| int | simcall_process_get_PID (smx_process_t process) |
| Return the PID of a smx_process_t. More... | |
| int | simcall_process_get_PPID (smx_process_t process) |
| Return the parent PID of a smx_process_t. More... | |
| void * | simcall_process_get_data (smx_process_t process) |
| Return the user data of a smx_process_t. More... | |
| void | simcall_process_set_data (smx_process_t process, void *data) |
| Set the user data of a smx_process_t. More... | |
| void | simcall_process_set_kill_time (smx_process_t process, double kill_time) |
| Set the kill time of a process. More... | |
| double | simcall_process_get_kill_time (smx_process_t process) |
| Get the kill time of a process (or 0 if unset). More... | |
| sg_host_t | simcall_process_get_host (smx_process_t process) |
| Return the location on which an agent is running. More... | |
| const char * | simcall_process_get_name (smx_process_t process) |
| Return the name of an agent. More... | |
| int | simcall_process_is_suspended (smx_process_t process) |
| Returns true if the process is suspended . More... | |
| xbt_dict_t | simcall_process_get_properties (smx_process_t process) |
| Return the properties. More... | |
| void | simcall_process_on_exit (smx_process_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... | |
| void | simcall_process_auto_restart_set (smx_process_t process, int auto_restart) |
| Sets the process to be auto-restarted or not by SIMIX when its host comes back up. More... | |
| smx_process_t | simcall_process_restart (smx_process_t process) |
| Restarts the process, killing it and starting it again from scratch. More... | |
| e_smx_state_t | simcall_process_sleep (double duration) |
| Creates a new sleep SIMIX synchro. More... | |
| typedef struct s_smx_process * | smx_process_t |
| Process datatypeA process may be defined as a code, with some private data, executing in a location. More... | |
| typedef struct s_smx_process* smx_process_t |
Process datatypeA process may be defined as a code, with some private data, executing in a location.
| smx_synchro_t simcall_execution_start | ( | const char * | name, |
| double | flops_amount, | ||
| double | priority, | ||
| double | bound, | ||
| unsigned long | affinity_mask | ||
| ) |
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 | |
| affinity_mask |
| smx_synchro_t simcall_execution_parallel_start | ( | const char * | name, |
| int | host_nb, | ||
| sg_host_t * | host_list, | ||
| double * | flops_amount, | ||
| double * | bytes_amount, | ||
| double | amount, | ||
| double | rate | ||
| ) |
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 |
| void simcall_execution_destroy | ( | smx_synchro_t | execution | ) |
Destroys an execution synchro.
Destroys a synchro, freeing its memory. This function cannot be called if there are a conditional waiting for it.
| execution | The execution synchro to destroy |
| void simcall_execution_cancel | ( | smx_synchro_t | execution | ) |
Cancels an execution synchro.
This functions stops the execution. It calls a surf function.
| execution | The execution synchro to cancel |
| double simcall_execution_get_remains | ( | smx_synchro_t | execution | ) |
Returns how much of an execution synchro remains to be done.
| execution | The execution synchro |
| e_smx_state_t simcall_execution_get_state | ( | smx_synchro_t | execution | ) |
Returns the state of an execution synchro.
| execution | The execution synchro |
| void simcall_execution_set_priority | ( | smx_synchro_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_synchro_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_execution_set_affinity | ( | smx_synchro_t | execution, |
| sg_host_t | host, | ||
| unsigned long | mask | ||
| ) |
Changes the CPU affinity of an execution synchro.
This functions changes the CPU affinity of an execution synchro. See taskset(1) on Linux.
| execution | The execution synchro |
| host | Host |
| mask | Affinity mask |
| smx_process_t simcall_process_create | ( | const char * | name, |
| xbt_main_func_t | code, | ||
| void * | data, | ||
| const char * | hostname, | ||
| double | kill_time, | ||
| int | argc, | ||
| char ** | argv, | ||
| xbt_dict_t | properties, | ||
| int | auto_restart | ||
| ) |
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 NULL. |
| 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 NULL. It can be retrieved with the function simcall_process_get_data. |
| hostname | name of the 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. |
| void simcall_process_kill | ( | smx_process_t | process | ) |
Kills a SIMIX process.
This function simply kills a process.
| process | poor victim |
| void simcall_process_killall | ( | int | reset_pid | ) |
Kills all SIMIX processes.
| void simcall_process_cleanup | ( | smx_process_t | process | ) |
Cleans up a SIMIX process.
| process | poor victim (must have already been killed) |
| void simcall_process_set_host | ( | smx_process_t | process, |
| sg_host_t | dest | ||
| ) |
Migrates an agent to another location.
This function changes the value of the host on which process is running.
| process | the process to migrate |
| dest | name of the new host |
| void simcall_process_suspend | ( | smx_process_t | process | ) |
Suspends a process.
This function suspends the process by suspending the synchro it was waiting for completion.
| process | a SIMIX process |
| void simcall_process_resume | ( | smx_process_t | process | ) |
Resumes a suspended process.
This function resumes a suspended process by resuming the synchro it was waiting for completion.
| process | a SIMIX process |
| int simcall_process_count | ( | void | ) |
Returns the amount of SIMIX processes in the system.
Maestro internal process is not counted, only user code processes are
| int simcall_process_get_PID | ( | smx_process_t | process | ) |
| int simcall_process_get_PPID | ( | smx_process_t | process | ) |
Return the parent PID of a smx_process_t.
| process | a SIMIX process |
| void* simcall_process_get_data | ( | smx_process_t | process | ) |
Return the user data of a smx_process_t.
| process | a SIMIX process |
| void simcall_process_set_data | ( | smx_process_t | process, |
| void * | data | ||
| ) |
Set the user data of a smx_process_t.
This functions sets the user data associated to process.
| process | SIMIX process |
| data | User data |
| void simcall_process_set_kill_time | ( | smx_process_t | process, |
| double | kill_time | ||
| ) |
Set the kill time of a process.
| double simcall_process_get_kill_time | ( | smx_process_t | process | ) |
Get the kill time of a process (or 0 if unset).
| sg_host_t simcall_process_get_host | ( | smx_process_t | process | ) |
Return the location on which an agent is running.
This functions returns the sg_host_t corresponding to the location on which process is running.
| process | SIMIX process |
| const char* simcall_process_get_name | ( | smx_process_t | process | ) |
Return the name of an agent.
This functions checks whether process is a valid pointer or not and return its name.
| process | SIMIX process |
| int simcall_process_is_suspended | ( | smx_process_t | process | ) |
Returns true if the process is suspended .
This checks whether a process is suspended or not by inspecting the task on which it was waiting for the completion.
| process | SIMIX process |
| xbt_dict_t simcall_process_get_properties | ( | smx_process_t | process | ) |
Return the properties.
This functions returns the properties associated with this process
| void simcall_process_on_exit | ( | smx_process_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.
| void simcall_process_auto_restart_set | ( | smx_process_t | process, |
| int | auto_restart | ||
| ) |
Sets the process to be auto-restarted or not by SIMIX when its host comes back up.
Will restart the process when the host comes back up if auto_restart is set to 1.
| smx_process_t simcall_process_restart | ( | smx_process_t | process | ) |
Restarts the process, killing it and starting it again from scratch.
| 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. |