SimGrid
3.21
Versatile Simulation of Distributed Systems
|
#include <simgrid/forward.h>
#include <simgrid/host.h>
#include <xbt/ex.h>
#include <xbt/parmap.h>
#include <functional>
#include <string>
#include <unordered_map>
#include <vector>
Typedefs | |
typedef struct s_smx_sem_t * | smx_sem_t |
typedef void(* | void_pfn_smxprocess_t) (smx_actor_t) |
typedef struct s_smx_timer_t * | smx_timer_t |
Enumerations | |
enum | smx_process_exit_status_t { SMX_EXIT_SUCCESS = 0, SMX_EXIT_FAILURE = 1 } |
enum | e_smx_state_t { SIMIX_WAITING, SIMIX_READY, SIMIX_RUNNING, SIMIX_DONE, SIMIX_CANCELED, SIMIX_FAILED, SIMIX_SRC_HOST_FAILURE, SIMIX_DST_HOST_FAILURE, SIMIX_TIMEOUT, SIMIX_SRC_TIMEOUT, SIMIX_DST_TIMEOUT, SIMIX_LINK_FAILURE } |
Host datatypeA location (or host) is any possible place where a process may run. More... | |
Functions | |
smx_actor_t | SIMIX_process_from_PID (aid_t PID) |
int | SIMIX_context_is_parallel () |
int | SIMIX_context_get_nthreads () |
void | SIMIX_context_set_nthreads (int nb_threads) |
int | SIMIX_context_get_parallel_threshold () |
void | SIMIX_context_set_parallel_threshold (int threshold) |
e_xbt_parmap_mode_t | SIMIX_context_get_parallel_mode () |
void | SIMIX_context_set_parallel_mode (e_xbt_parmap_mode_t mode) |
int | SIMIX_is_maestro () |
void | SIMIX_global_init (int *argc, char **argv) |
void | SIMIX_set_maestro (void(*code)(void *), void *data) |
void | SIMIX_function_register_process_cleanup (void_pfn_smxprocess_t function) |
void | SIMIX_function_register_process_kill (void_pfn_smxprocess_t function) |
void | SIMIX_run () |
double | SIMIX_get_clock () |
smx_timer_t | SIMIX_timer_set (double date, void(*function)(void *), void *arg) |
void | SIMIX_timer_remove (smx_timer_t timer) |
double | SIMIX_timer_next () |
double | SIMIX_timer_get_date (smx_timer_t timer) |
void | SIMIX_display_process_status () |
void | SIMIX_create_environment (const char *file) |
void | SIMIX_create_environment (std::string file) |
void | SIMIX_function_register (const char *name, xbt_main_func_t code) |
void | SIMIX_launch_application (const char *file) |
void | SIMIX_function_register_default (xbt_main_func_t code) |
void | SIMIX_init_application () |
void | SIMIX_process_set_function (const char *process_host, const char *process_function, xbt_dynar_t arguments, double process_start_time, double process_kill_time) |
void | SIMIX_function_register (std::string name, void(*code)(std::vector< std::string >)) |
void | SIMIX_function_register (std::string name, xbt_main_func_t code) |
void | SIMIX_launch_application (std::string file) |
void | SIMIX_maestro_create (void(*code)(void *), void *data) |
smx_actor_t | SIMIX_process_attach (const char *name, void *data, const char *hostname, std::unordered_map< std::string, std::string > *properties, smx_actor_t parent_process) |
void | SIMIX_process_detach () |
int | SIMIX_process_count () |
smx_actor_t | SIMIX_process_self () |
const char * | SIMIX_process_self_get_name () |
void | SIMIX_process_self_set_data (void *data) |
void * | SIMIX_process_self_get_data () |
int | SIMIX_process_has_pending_comms (smx_actor_t process) |
void | SIMIX_process_on_exit_runall (smx_actor_t process) |
void | SIMIX_process_on_exit (smx_actor_t process, int_f_pvoid_pvoid_t fun, void *data) |
void | SIMIX_process_on_exit (smx_actor_t process, std::function< void(int, void *)> fun, void *data) |
void | SIMIX_comm_set_copy_data_callback (void(*callback)(smx_activity_t, void *, size_t)) |
void | SIMIX_comm_copy_pointer_callback (smx_activity_t comm, void *buff, size_t buff_size) |
void | SIMIX_comm_copy_buffer_callback (smx_activity_t comm, void *buff, size_t buff_size) |
void | SIMIX_comm_finish (smx_activity_t synchro) |
smx_activity_t | simcall_execution_start (std::string name, std::string category, double flops_amount, double priority, double bound, sg_host_t host) |
smx_activity_t | simcall_execution_parallel_start (std::string name, int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double rate, double timeout) |
void | simcall_execution_cancel (smx_activity_t execution) |
void | simcall_execution_set_priority (smx_activity_t execution, double priority) |
void | simcall_execution_set_bound (smx_activity_t execution, double bound) |
e_smx_state_t | simcall_execution_wait (smx_activity_t execution) |
e_smx_state_t | simcall_execution_test (smx_activity_t execution) |
smx_actor_t | simcall_process_create (std::string name, xbt_main_func_t code, void *data, sg_host_t host, int argc, char **argv, std::unordered_map< std::string, std::string > *properties) |
void | SIMIX_process_throw (smx_actor_t process, xbt_errcat_t cat, int value, const char *mesg) |
void | simcall_process_suspend (smx_actor_t process) |
void | simcall_process_set_data (smx_actor_t process, void *data) |
void | simcall_process_set_kill_time (smx_actor_t process, double kill_time) |
void | simcall_process_join (smx_actor_t process, double timeout) |
e_smx_state_t | simcall_process_sleep (double duration) |
void | simcall_comm_send (smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void *src_buff, size_t src_buff_size, int(*match_fun)(void *, void *, simgrid::kernel::activity::CommImpl *), void(*copy_data_fun)(smx_activity_t, void *, size_t), void *data, double timeout) |
smx_activity_t | simcall_comm_isend (smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void *src_buff, size_t src_buff_size, int(*match_fun)(void *, void *, simgrid::kernel::activity::CommImpl *), void(*clean_fun)(void *), void(*copy_data_fun)(smx_activity_t, void *, size_t), void *data, int detached) |
void | simcall_comm_recv (smx_actor_t receiver, smx_mailbox_t mbox, void *dst_buff, size_t *dst_buff_size, int(*match_fun)(void *, void *, simgrid::kernel::activity::CommImpl *), void(*copy_data_fun)(smx_activity_t, void *, size_t), void *data, double timeout, double rate) |
smx_activity_t | simcall_comm_irecv (smx_actor_t receiver, smx_mailbox_t mbox, void *dst_buff, size_t *dst_buff_size, int(*match_fun)(void *, void *, simgrid::kernel::activity::CommImpl *), void(*copy_data_fun)(smx_activity_t, void *, size_t), void *data, double rate) |
smx_activity_t | simcall_comm_iprobe (smx_mailbox_t mbox, int type, int(*match_fun)(void *, void *, simgrid::kernel::activity::CommImpl *), void *data) |
void | simcall_comm_cancel (smx_activity_t comm) |
unsigned int | simcall_comm_waitany (xbt_dynar_t comms, double timeout) |
void | simcall_comm_wait (smx_activity_t comm, double timeout) |
int | simcall_comm_test (smx_activity_t comm) |
int | simcall_comm_testany (smx_activity_t *comms, size_t count) |
void | simcall_set_category (smx_activity_t synchro, std::string category) |
smx_mutex_t | simcall_mutex_init () |
smx_mutex_t | SIMIX_mutex_ref (smx_mutex_t mutex) |
void | SIMIX_mutex_unref (smx_mutex_t mutex) |
void | simcall_mutex_lock (smx_mutex_t mutex) |
int | simcall_mutex_trylock (smx_mutex_t mutex) |
void | simcall_mutex_unlock (smx_mutex_t mutex) |
smx_cond_t | simcall_cond_init () |
void | simcall_cond_wait (smx_cond_t cond, smx_mutex_t mutex) |
int | simcall_cond_wait_timeout (smx_cond_t cond, smx_mutex_t mutex, double max_duration) |
void | SIMIX_sem_destroy (smx_sem_t sem) |
void | simcall_sem_acquire (smx_sem_t sem) |
int | simcall_sem_acquire_timeout (smx_sem_t sem, double max_duration) |
e_smx_state_t | simcall_io_wait (smx_activity_t io) |
int | simcall_mc_random (int min, int max) |
Variables | |
unsigned | smx_context_stack_size |
int | smx_context_stack_size_was_set |
unsigned | smx_context_guard_size |
int | smx_context_guard_size_was_set |
typedef struct s_smx_sem_t* smx_sem_t |
typedef void(* void_pfn_smxprocess_t) (smx_actor_t) |
typedef struct s_smx_timer_t* smx_timer_t |
enum e_smx_state_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_actor_t SIMIX_process_from_PID | ( | aid_t | PID | ) |
int SIMIX_context_is_parallel | ( | ) |
int SIMIX_context_get_nthreads | ( | ) |
void SIMIX_context_set_nthreads | ( | int | nb_threads | ) |
int SIMIX_context_get_parallel_threshold | ( | ) |
void SIMIX_context_set_parallel_threshold | ( | int | threshold | ) |
e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode | ( | ) |
void SIMIX_context_set_parallel_mode | ( | e_xbt_parmap_mode_t | mode | ) |
int SIMIX_is_maestro | ( | ) |
void SIMIX_global_init | ( | int * | argc, |
char ** | argv | ||
) |
void SIMIX_set_maestro | ( | void(*)(void *) | code, |
void * | data | ||
) |
void SIMIX_function_register_process_cleanup | ( | void_pfn_smxprocess_t | function | ) |
void SIMIX_function_register_process_kill | ( | void_pfn_smxprocess_t | function | ) |
void SIMIX_run | ( | ) |
double SIMIX_get_clock | ( | ) |
smx_timer_t SIMIX_timer_set | ( | double | date, |
void(*)(void *) | function, | ||
void * | arg | ||
) |
void SIMIX_timer_remove | ( | smx_timer_t | timer | ) |
double SIMIX_timer_next | ( | ) |
double SIMIX_timer_get_date | ( | smx_timer_t | timer | ) |
void SIMIX_display_process_status | ( | ) |
void SIMIX_create_environment | ( | const char * | file | ) |
void SIMIX_create_environment | ( | std::string | file | ) |
void SIMIX_function_register | ( | const char * | name, |
xbt_main_func_t | code | ||
) |
void SIMIX_launch_application | ( | const char * | file | ) |
void SIMIX_function_register_default | ( | xbt_main_func_t | code | ) |
void SIMIX_init_application | ( | ) |
void SIMIX_process_set_function | ( | const char * | process_host, |
const char * | process_function, | ||
xbt_dynar_t | arguments, | ||
double | process_start_time, | ||
double | process_kill_time | ||
) |
void SIMIX_function_register | ( | std::string | name, |
void(*)(std::vector< std::string >) | code | ||
) |
void SIMIX_function_register | ( | std::string | name, |
xbt_main_func_t | code | ||
) |
void SIMIX_launch_application | ( | std::string | file | ) |
void SIMIX_maestro_create | ( | void(*)(void *) | code, |
void * | data | ||
) |
smx_actor_t SIMIX_process_attach | ( | const char * | name, |
void * | data, | ||
const char * | hostname, | ||
std::unordered_map< std::string, std::string > * | properties, | ||
smx_actor_t | parent_process | ||
) |
void SIMIX_process_detach | ( | ) |
int SIMIX_process_count | ( | ) |
smx_actor_t SIMIX_process_self | ( | ) |
const char* SIMIX_process_self_get_name | ( | ) |
void SIMIX_process_self_set_data | ( | void * | data | ) |
void* SIMIX_process_self_get_data | ( | ) |
int SIMIX_process_has_pending_comms | ( | smx_actor_t | process | ) |
void SIMIX_process_on_exit_runall | ( | smx_actor_t | process | ) |
void SIMIX_process_on_exit | ( | smx_actor_t | process, |
int_f_pvoid_pvoid_t | fun, | ||
void * | data | ||
) |
void SIMIX_process_on_exit | ( | smx_actor_t | process, |
std::function< void(int, void *)> | fun, | ||
void * | data | ||
) |
void SIMIX_comm_set_copy_data_callback | ( | void(*)(smx_activity_t, void *, size_t) | callback | ) |
void SIMIX_comm_copy_pointer_callback | ( | smx_activity_t | comm, |
void * | buff, | ||
size_t | buff_size | ||
) |
void SIMIX_comm_copy_buffer_callback | ( | smx_activity_t | comm, |
void * | buff, | ||
size_t | buff_size | ||
) |
void SIMIX_comm_finish | ( | smx_activity_t | synchro | ) |
smx_activity_t simcall_execution_start | ( | std::string | name, |
std::string | category, | ||
double | flops_amount, | ||
double | priority, | ||
double | bound, | ||
sg_host_t | host | ||
) |
smx_activity_t simcall_execution_parallel_start | ( | std::string | name, |
int | host_nb, | ||
sg_host_t * | host_list, | ||
double * | flops_amount, | ||
double * | bytes_amount, | ||
double | rate, | ||
double | timeout | ||
) |
void simcall_execution_cancel | ( | smx_activity_t | execution | ) |
void simcall_execution_set_priority | ( | smx_activity_t | execution, |
double | priority | ||
) |
void simcall_execution_set_bound | ( | smx_activity_t | execution, |
double | bound | ||
) |
e_smx_state_t simcall_execution_wait | ( | smx_activity_t | execution | ) |
e_smx_state_t simcall_execution_test | ( | smx_activity_t | execution | ) |
smx_actor_t simcall_process_create | ( | std::string | name, |
xbt_main_func_t | code, | ||
void * | data, | ||
sg_host_t | host, | ||
int | argc, | ||
char ** | argv, | ||
std::unordered_map< std::string, std::string > * | properties | ||
) |
void SIMIX_process_throw | ( | smx_actor_t | process, |
xbt_errcat_t | cat, | ||
int | value, | ||
const char * | mesg | ||
) |
void simcall_process_suspend | ( | smx_actor_t | process | ) |
void simcall_process_set_data | ( | smx_actor_t | process, |
void * | data | ||
) |
void simcall_process_set_kill_time | ( | smx_actor_t | process, |
double | kill_time | ||
) |
void simcall_process_join | ( | smx_actor_t | process, |
double | timeout | ||
) |
e_smx_state_t simcall_process_sleep | ( | double | duration | ) |
void simcall_comm_send | ( | smx_actor_t | sender, |
smx_mailbox_t | mbox, | ||
double | task_size, | ||
double | rate, | ||
void * | src_buff, | ||
size_t | src_buff_size, | ||
int(*)(void *, void *, simgrid::kernel::activity::CommImpl *) | match_fun, | ||
void(*)(smx_activity_t, void *, size_t) | copy_data_fun, | ||
void * | data, | ||
double | timeout | ||
) |
smx_activity_t simcall_comm_isend | ( | smx_actor_t | sender, |
smx_mailbox_t | mbox, | ||
double | task_size, | ||
double | rate, | ||
void * | src_buff, | ||
size_t | src_buff_size, | ||
int(*)(void *, void *, simgrid::kernel::activity::CommImpl *) | match_fun, | ||
void(*)(void *) | clean_fun, | ||
void(*)(smx_activity_t, void *, size_t) | copy_data_fun, | ||
void * | data, | ||
int | detached | ||
) |
void simcall_comm_recv | ( | smx_actor_t | receiver, |
smx_mailbox_t | mbox, | ||
void * | dst_buff, | ||
size_t * | dst_buff_size, | ||
int(*)(void *, void *, simgrid::kernel::activity::CommImpl *) | match_fun, | ||
void(*)(smx_activity_t, void *, size_t) | copy_data_fun, | ||
void * | data, | ||
double | timeout, | ||
double | rate | ||
) |
smx_activity_t simcall_comm_irecv | ( | smx_actor_t | receiver, |
smx_mailbox_t | mbox, | ||
void * | dst_buff, | ||
size_t * | dst_buff_size, | ||
int(*)(void *, void *, simgrid::kernel::activity::CommImpl *) | match_fun, | ||
void(*)(smx_activity_t, void *, size_t) | copy_data_fun, | ||
void * | data, | ||
double | rate | ||
) |
smx_activity_t simcall_comm_iprobe | ( | smx_mailbox_t | mbox, |
int | type, | ||
int(*)(void *, void *, simgrid::kernel::activity::CommImpl *) | match_fun, | ||
void * | data | ||
) |
void simcall_comm_cancel | ( | smx_activity_t | comm | ) |
unsigned int simcall_comm_waitany | ( | xbt_dynar_t | comms, |
double | timeout | ||
) |
void simcall_comm_wait | ( | smx_activity_t | comm, |
double | timeout | ||
) |
int simcall_comm_test | ( | smx_activity_t | comm | ) |
int simcall_comm_testany | ( | smx_activity_t * | comms, |
size_t | count | ||
) |
void simcall_set_category | ( | smx_activity_t | synchro, |
std::string | category | ||
) |
smx_mutex_t simcall_mutex_init | ( | ) |
smx_mutex_t SIMIX_mutex_ref | ( | smx_mutex_t | mutex | ) |
void SIMIX_mutex_unref | ( | smx_mutex_t | mutex | ) |
void simcall_mutex_lock | ( | smx_mutex_t | mutex | ) |
int simcall_mutex_trylock | ( | smx_mutex_t | mutex | ) |
void simcall_mutex_unlock | ( | smx_mutex_t | mutex | ) |
smx_cond_t simcall_cond_init | ( | ) |
void simcall_cond_wait | ( | smx_cond_t | cond, |
smx_mutex_t | mutex | ||
) |
int simcall_cond_wait_timeout | ( | smx_cond_t | cond, |
smx_mutex_t | mutex, | ||
double | max_duration | ||
) |
void SIMIX_sem_destroy | ( | smx_sem_t | sem | ) |
void simcall_sem_acquire | ( | smx_sem_t | sem | ) |
int simcall_sem_acquire_timeout | ( | smx_sem_t | sem, |
double | max_duration | ||
) |
e_smx_state_t simcall_io_wait | ( | smx_activity_t | io | ) |
int simcall_mc_random | ( | int | min, |
int | max | ||
) |
unsigned smx_context_stack_size |
int smx_context_stack_size_was_set |
unsigned smx_context_guard_size |
int smx_context_guard_size_was_set |