SimGrid
3.21
Versatile Simulation of Distributed Systems
|
#include <simgrid/actor.h>
#include <simgrid/barrier.h>
#include <simgrid/engine.h>
#include <simgrid/forward.h>
#include <simgrid/host.h>
#include <simgrid/instr.h>
#include <simgrid/mailbox.h>
#include <simgrid/plugins/live_migration.h>
#include <simgrid/storage.h>
#include <simgrid/vm.h>
#include <simgrid/zone.h>
#include <xbt.h>
#include <map>
#include <simgrid/simix.h>
Classes | |
struct | msg_task |
Namespaces | |
simgrid | |
simgrid::msg | |
Macros | |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | msg_as_t msg_netzone_t /* portability macro */ |
#define | MSG_TASK_UNINITIALIZED NULL |
Default value for an uninitialized msg_task_t. More... | |
#define | MSG_init(argc, argv) |
Initialize the MSG internal data. More... | |
#define | MSG_task_recv(t, a) MSG_task_receive(t,a) |
#define | MSG_task_recv_bounded(t, a, r) MSG_task_receive_bounded(t,a,r) |
Typedefs | |
typedef simgrid::msg::Comm | sg_msg_Comm |
typedef sg_netzone_t | msg_netzone_t |
typedef sg_host_t | msg_host_t |
Host datatype. More... | |
typedef sg_vm_t | msg_vm_t |
typedef sg_storage_t | msg_storage_t |
typedef sg_actor_t | msg_process_t |
typedef sg_msg_Comm * | msg_comm_t |
Object representing an ongoing communication between processes. More... | |
typedef struct s_simdata_task_t * | simdata_task_t |
typedef struct msg_task | s_msg_task_t |
typedef struct msg_task * | msg_task_t |
Task datatype. More... | |
typedef struct s_smx_sem_t * | msg_sem_t |
Opaque type representing a semaphore. More... | |
typedef sg_bar_t | msg_bar_t |
Opaque type representing a barrier identifier. More... | |
Enumerations | |
enum | msg_error_t { MSG_OK = 0, MSG_TIMEOUT = 1, MSG_TRANSFER_FAILURE = 2, MSG_HOST_FAILURE = 4, MSG_TASK_CANCELED = 8 } |
Return code of most MSG functions. More... | |
Functions | |
msg_netzone_t | MSG_zone_get_root () |
const char * | MSG_zone_get_name (msg_netzone_t zone) |
msg_netzone_t | MSG_zone_get_by_name (const char *name) |
void | MSG_zone_get_sons (msg_netzone_t zone, xbt_dict_t whereto) |
const char * | MSG_zone_get_property_value (msg_netzone_t zone, const char *name) |
void | MSG_zone_set_property_value (msg_netzone_t zone, const char *name, char *value) |
void | MSG_zone_get_hosts (msg_netzone_t zone, xbt_dynar_t whereto) |
sg_host_t | MSG_get_host_by_name (const char *name) |
Finds a msg_host_t using its name. More... | |
sg_host_t | MSG_host_by_name (const char *name) |
Finds a msg_host_t using its name. More... | |
size_t | MSG_get_host_number () |
Returns the amount of host found in the platform. More... | |
xbt_dynar_t | MSG_hosts_as_dynar () |
Returns a dynar with all existing hosts. More... | |
const char * | MSG_host_get_name (sg_host_t host) |
Returns the name of this host. More... | |
void * | MSG_host_get_data (sg_host_t host) |
Returns the user data of this host. More... | |
void | MSG_host_set_data (sg_host_t host, void *data) |
Sets the user data of this host. More... | |
xbt_dict_t | MSG_host_get_mounted_storage_list (sg_host_t host) |
xbt_dynar_t | MSG_host_get_attached_storage_lists (sg_host_t host) |
double | MSG_host_get_speed (sg_host_t host) |
double | MSG_host_get_power_peak_at (sg_host_t host, int pstate_index) |
int | MSG_host_get_core_number (sg_host_t host) |
int | MSG_host_get_nb_pstates (sg_host_t host) |
int | MSG_host_get_pstate (sg_host_t host) |
void | MSG_host_set_pstate (sg_host_t host, int pstate) |
void | MSG_host_on (sg_host_t h) |
Start the host if it is off. More... | |
void | MSG_host_off (sg_host_t h) |
Stop the host if it is on. More... | |
int | MSG_host_is_on (sg_host_t h) |
int | MSG_host_is_off (sg_host_t h) |
xbt_dict_t | MSG_host_get_properties (sg_host_t host) |
const char * | MSG_host_get_property_value (sg_host_t host, const char *name) |
void | MSG_host_set_property_value (sg_host_t host, const char *name, const char *value) |
void | MSG_host_get_process_list (sg_host_t host, xbt_dynar_t whereto) |
sg_host_t | MSG_host_self () |
Return the location on which the current process is executed. More... | |
sg_vm_t | MSG_vm_create (sg_host_t ind_pm, const char *name, int coreAmount, int ramsize, int mig_netspeed, int dp_intensity) |
msg_vm_t | MSG_vm_create_core (msg_host_t pm, const char *name) |
msg_vm_t | MSG_vm_create_multicore (msg_host_t pm, const char *name, int coreAmount) |
int | MSG_vm_is_created (msg_vm_t vm) |
int | MSG_vm_is_running (msg_vm_t vm) |
int | MSG_vm_is_suspended (msg_vm_t vm) |
const char * | MSG_vm_get_name (msg_vm_t vm) |
void | MSG_vm_set_ramsize (msg_vm_t vm, size_t size) |
size_t | MSG_vm_get_ramsize (msg_vm_t vm) |
msg_host_t | MSG_vm_get_pm (msg_vm_t vm) |
void | MSG_vm_set_bound (msg_vm_t vm, double bound) |
void | MSG_vm_start (msg_vm_t vm) |
void | MSG_vm_suspend (msg_vm_t vm) |
void | MSG_vm_resume (msg_vm_t vm) |
void | MSG_vm_shutdown (msg_vm_t vm) |
void | MSG_vm_destroy (msg_vm_t vm) |
const char * | MSG_storage_get_name (msg_storage_t storage) |
msg_storage_t | MSG_storage_get_by_name (const char *name) |
xbt_dict_t | MSG_storage_get_properties (msg_storage_t storage) |
void | MSG_storage_set_property_value (msg_storage_t storage, const char *name, const char *value) |
const char * | MSG_storage_get_property_value (msg_storage_t storage, const char *name) |
xbt_dynar_t | MSG_storages_as_dynar () |
void | MSG_storage_set_data (msg_storage_t storage, void *data) |
void * | MSG_storage_get_data (msg_storage_t storage) |
const char * | MSG_storage_get_host (msg_storage_t storage) |
sg_size_t | MSG_storage_read (msg_storage_t storage, sg_size_t size) |
sg_size_t | MSG_storage_write (msg_storage_t storage, sg_size_t size) |
int | MSG_process_get_PID (msg_process_t process) |
int | MSG_process_get_PPID (msg_process_t process) |
sg_actor_t | MSG_process_from_PID (int pid) |
Return a msg_process_t from its PID. More... | |
const char * | MSG_process_get_name (msg_process_t process) |
sg_host_t | MSG_process_get_host (msg_process_t process) |
xbt_dict_t | MSG_process_get_properties (msg_process_t process) |
const char * | MSG_process_get_property_value (msg_process_t process, const char *name) |
void | MSG_process_suspend (msg_process_t process) |
void | MSG_process_resume (msg_process_t process) |
int | MSG_process_is_suspended (msg_process_t process) |
void | MSG_process_restart (msg_process_t process) |
void | MSG_process_auto_restart_set (msg_process_t process, int auto_restart) |
Sets the "auto-restart" flag of the process. More... | |
void | MSG_process_daemonize (msg_process_t process) |
Indicates that this process should not prevent the simulation from ending. More... | |
void | MSG_process_migrate (msg_process_t process, msg_host_t host) |
Imediately changes the host on which this process runs. More... | |
void | MSG_process_join (msg_process_t process, double timeout) |
Wait for the completion of a msg_process_t. More... | |
void | MSG_process_kill (msg_process_t process) |
Kills a process. More... | |
void | MSG_process_killall () |
Kill all running process. More... | |
void | MSG_process_set_kill_time (msg_process_t process, double kill_time) |
Specifies the time at which the process should be automatically killed More... | |
void | MSG_process_yield () |
Yield the current actor; let the other actors execute first. More... | |
void | MSG_config (const char *key, const char *value) |
set a configuration variable More... | |
void | MSG_init_nocheck (int *argc, char **argv) |
msg_error_t | MSG_main () |
Launch the MSG simulation. More... | |
void | MSG_function_register (const char *name, xbt_main_func_t code) |
Registers the main function of a process in a global table. More... | |
void | MSG_function_register_default (xbt_main_func_t code) |
Registers a code function as being the default value. More... | |
void | MSG_create_environment (const char *file) |
Creates a new platform, including hosts, links and the routing_table. More... | |
void | MSG_launch_application (const char *file) |
Creates the application described in the provided file. More... | |
void | MSG_set_function (const char *host_id, const char *function_name, xbt_dynar_t arguments) |
register functions bypassing the parser More... | |
double | MSG_get_clock () |
A clock (in second). More... | |
unsigned long int | MSG_get_sent_msg () |
Returns the amount of messages sent since the simulation start. More... | |
msg_process_t | MSG_process_create (const char *name, xbt_main_func_t code, void *data, msg_host_t host) |
msg_process_t | MSG_process_create_with_arguments (const char *name, xbt_main_func_t code, void *data, msg_host_t host, int argc, char **argv) |
msg_process_t | MSG_process_create_with_environment (const char *name, xbt_main_func_t code, void *data, msg_host_t host, int argc, char **argv, xbt_dict_t properties) |
msg_process_t | MSG_process_attach (const char *name, void *data, msg_host_t host, xbt_dict_t properties) |
void | MSG_process_detach () |
void | MSG_process_set_data_cleanup (void_f_pvoid_t data_cleanup) |
int | MSG_process_self_PID () |
int | MSG_process_self_PPID () |
const char * | MSG_process_self_name () |
msg_process_t | MSG_process_self () |
xbt_dynar_t | MSG_processes_as_dynar () |
int | MSG_process_get_number () |
void * | MSG_process_get_data (msg_process_t process) |
msg_error_t | MSG_process_set_data (msg_process_t process, void *data) |
void | MSG_process_on_exit (int_f_pvoid_pvoid_t fun, void *data) |
void | MSG_process_ref (msg_process_t process) |
void | MSG_process_unref (msg_process_t process) |
msg_task_t | MSG_task_create (const char *name, double flops_amount, double bytes_amount, void *data) |
msg_task_t | MSG_parallel_task_create (const char *name, int host_nb, const msg_host_t *host_list, double *flops_amount, double *bytes_amount, void *data) |
void * | MSG_task_get_data (msg_task_t task) |
void | MSG_task_set_data (msg_task_t task, void *data) |
void | MSG_task_set_copy_callback (void(*callback)(msg_task_t task, msg_process_t src, msg_process_t dst)) |
msg_process_t | MSG_task_get_sender (msg_task_t task) |
msg_host_t | MSG_task_get_source (msg_task_t task) |
const char * | MSG_task_get_name (msg_task_t task) |
void | MSG_task_set_name (msg_task_t task, const char *name) |
msg_error_t | MSG_task_cancel (msg_task_t task) |
msg_error_t | MSG_task_destroy (msg_task_t task) |
msg_error_t | MSG_task_execute (msg_task_t task) |
msg_error_t | MSG_parallel_task_execute (msg_task_t task) |
msg_error_t | MSG_parallel_task_execute_with_timeout (msg_task_t task, double timeout) |
void | MSG_task_set_priority (msg_task_t task, double priority) |
void | MSG_task_set_bound (msg_task_t task, double bound) |
msg_error_t | MSG_process_sleep (double nb_sec) |
void | MSG_task_set_flops_amount (msg_task_t task, double flops_amount) |
double | MSG_task_get_flops_amount (msg_task_t task) |
double | MSG_task_get_remaining_work_ratio (msg_task_t task) |
void | MSG_task_set_bytes_amount (msg_task_t task, double bytes_amount) |
double | MSG_task_get_remaining_communication (msg_task_t task) |
double | MSG_task_get_bytes_amount (msg_task_t task) |
msg_error_t | MSG_task_receive_ext (msg_task_t *task, const char *alias, double timeout, msg_host_t host) |
msg_error_t | MSG_task_receive_with_timeout (msg_task_t *task, const char *alias, double timeout) |
msg_error_t | MSG_task_receive (msg_task_t *task, const char *alias) |
msg_error_t | MSG_task_receive_ext_bounded (msg_task_t *task, const char *alias, double timeout, msg_host_t host, double rate) |
msg_error_t | MSG_task_receive_with_timeout_bounded (msg_task_t *task, const char *alias, double timeout, double rate) |
msg_error_t | MSG_task_receive_bounded (msg_task_t *task, const char *alias, double rate) |
msg_comm_t | MSG_task_isend (msg_task_t task, const char *alias) |
msg_comm_t | MSG_task_isend_bounded (msg_task_t task, const char *alias, double maxrate) |
void | MSG_task_dsend (msg_task_t task, const char *alias, void_f_pvoid_t cleanup) |
void | MSG_task_dsend_bounded (msg_task_t task, const char *alias, void_f_pvoid_t cleanup, double maxrate) |
msg_comm_t | MSG_task_irecv (msg_task_t *task, const char *alias) |
msg_comm_t | MSG_task_irecv_bounded (msg_task_t *task, const char *alias, double rate) |
int | MSG_comm_test (msg_comm_t comm) |
int | MSG_comm_testany (xbt_dynar_t comms) |
void | MSG_comm_destroy (msg_comm_t comm) |
msg_error_t | MSG_comm_wait (msg_comm_t comm, double timeout) |
void | MSG_comm_waitall (msg_comm_t *comm, int nb_elem, double timeout) |
int | MSG_comm_waitany (xbt_dynar_t comms) |
msg_task_t | MSG_comm_get_task (msg_comm_t comm) |
msg_error_t | MSG_comm_get_status (msg_comm_t comm) |
int | MSG_task_listen (const char *alias) |
Check if there is a communication going on in a mailbox. More... | |
msg_error_t | MSG_task_send_with_timeout (msg_task_t task, const char *alias, double timeout) |
msg_error_t | MSG_task_send_with_timeout_bounded (msg_task_t task, const char *alias, double timeout, double maxrate) |
msg_error_t | MSG_task_send (msg_task_t task, const char *alias) |
msg_error_t | MSG_task_send_bounded (msg_task_t task, const char *alias, double rate) |
int | MSG_task_listen_from (const char *alias) |
void | MSG_task_set_category (msg_task_t task, const char *category) |
const char * | MSG_task_get_category (msg_task_t task) |
void | MSG_mailbox_set_async (const char *alias) |
msg_sem_t | MSG_sem_init (int initial_value) |
void | MSG_sem_acquire (msg_sem_t sem) |
msg_error_t | MSG_sem_acquire_timeout (msg_sem_t sem, double timeout) |
void | MSG_sem_release (msg_sem_t sem) |
int | MSG_sem_get_capacity (msg_sem_t sem) |
void | MSG_sem_destroy (msg_sem_t sem) |
int | MSG_sem_would_block (msg_sem_t sem) |
msg_bar_t | MSG_barrier_init (unsigned int count) |
Initializes a barier, with count elements. More... | |
void | MSG_barrier_destroy (msg_bar_t bar) |
Destroys barrier. More... | |
int | MSG_barrier_wait (msg_bar_t bar) |
Performs a barrier already initialized. More... | |
smx_context_t | MSG_process_get_smx_ctx (msg_process_t process) |
msg_process_t | MSG_process_create_from_stdfunc (std::string name, std::function< void()> code, void *data, msg_host_t host, std::unordered_map< std::string, std::string > *properties) |
#define MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
#define MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
#define msg_as_t msg_netzone_t /* portability macro */ |
#define MSG_TASK_UNINITIALIZED NULL |
Default value for an uninitialized msg_task_t.
#define MSG_init | ( | argc, | |
argv | |||
) |
Initialize the MSG internal data.
It also check that the link-time and compile-time versions of SimGrid do match, so you should use this version instead of the MSG_init_nocheck function that does the same initializations, but without this check.
We allow to link against compiled versions that differ in the patch level.
#define MSG_task_recv | ( | t, | |
a | |||
) | MSG_task_receive(t,a) |
#define MSG_task_recv_bounded | ( | t, | |
a, | |||
r | |||
) | MSG_task_receive_bounded(t,a,r) |
typedef simgrid::msg::Comm sg_msg_Comm |
typedef sg_netzone_t msg_netzone_t |
typedef sg_host_t msg_host_t |
Host datatype.
A 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 sg_vm_t msg_vm_t |
typedef sg_storage_t msg_storage_t |
typedef sg_actor_t msg_process_t |
typedef sg_msg_Comm* msg_comm_t |
Object representing an ongoing communication between processes.
Such beast is usually obtained by using :cpp:func:MSG_task_isend
, :cpp:func:MSG_task_irecv
or friends.
typedef struct s_simdata_task_t* simdata_task_t |
typedef struct msg_task s_msg_task_t |
typedef struct msg_task* msg_task_t |
Task datatype.
Since most scheduling algorithms rely on a concept of task that can be either computed locally or transferred on another processor, it seems to be the right level of abstraction for our purposes. A task may then be defined by a computing amount, a message size and some private data.
typedef struct s_smx_sem_t* msg_sem_t |
Opaque type representing a semaphore.
typedef sg_bar_t msg_bar_t |
Opaque type representing a barrier identifier.
enum msg_error_t |
Return code of most MSG functions.
msg_netzone_t MSG_zone_get_root | ( | ) |
const char* MSG_zone_get_name | ( | msg_netzone_t | zone | ) |
msg_netzone_t MSG_zone_get_by_name | ( | const char * | name | ) |
void MSG_zone_get_sons | ( | msg_netzone_t | zone, |
xbt_dict_t | whereto | ||
) |
const char* MSG_zone_get_property_value | ( | msg_netzone_t | zone, |
const char * | name | ||
) |
void MSG_zone_set_property_value | ( | msg_netzone_t | zone, |
const char * | name, | ||
char * | value | ||
) |
void MSG_zone_get_hosts | ( | msg_netzone_t | zone, |
xbt_dynar_t | whereto | ||
) |
sg_host_t MSG_get_host_by_name | ( | const char * | name | ) |
Finds a msg_host_t using its name.
sg_host_t MSG_host_by_name | ( | const char * | name | ) |
Finds a msg_host_t using its name.
size_t MSG_get_host_number | ( | ) |
Returns the amount of host found in the platform.
xbt_dynar_t MSG_hosts_as_dynar | ( | ) |
Returns a dynar with all existing hosts.
The host order in the returned array is generally different from the host creation/declaration order in the XML platform (we use a hash table internally).
const char* MSG_host_get_name | ( | sg_host_t | host | ) |
Returns the name of this host.
void* MSG_host_get_data | ( | sg_host_t | host | ) |
Returns the user data of this host.
void MSG_host_set_data | ( | sg_host_t | host, |
void * | data | ||
) |
Sets the user data of this host.
xbt_dict_t MSG_host_get_mounted_storage_list | ( | sg_host_t | host | ) |
xbt_dynar_t MSG_host_get_attached_storage_lists | ( | sg_host_t | host | ) |
double MSG_host_get_speed | ( | sg_host_t | host | ) |
double MSG_host_get_power_peak_at | ( | sg_host_t | host, |
int | pstate_index | ||
) |
int MSG_host_get_core_number | ( | sg_host_t | host | ) |
int MSG_host_get_nb_pstates | ( | sg_host_t | host | ) |
int MSG_host_get_pstate | ( | sg_host_t | host | ) |
void MSG_host_set_pstate | ( | sg_host_t | host, |
int | pstate | ||
) |
void MSG_host_on | ( | sg_host_t | h | ) |
Start the host if it is off.
See also MSG_host_is_on() and MSG_host_is_off() to test the current state of the host and SURF_plugin_energy for more info on DVFS.
void MSG_host_off | ( | sg_host_t | h | ) |
Stop the host if it is on.
See also MSG_host_is_on() and MSG_host_is_off() to test the current state of the host and SURF_plugin_energy for more info on DVFS.
int MSG_host_is_on | ( | sg_host_t | h | ) |
int MSG_host_is_off | ( | sg_host_t | h | ) |
xbt_dict_t MSG_host_get_properties | ( | sg_host_t | host | ) |
const char* MSG_host_get_property_value | ( | sg_host_t | host, |
const char * | name | ||
) |
void MSG_host_set_property_value | ( | sg_host_t | host, |
const char * | name, | ||
const char * | value | ||
) |
void MSG_host_get_process_list | ( | sg_host_t | host, |
xbt_dynar_t | whereto | ||
) |
sg_host_t MSG_host_self | ( | ) |
Return the location on which the current process is executed.
sg_vm_t MSG_vm_create | ( | sg_host_t | ind_pm, |
const char * | name, | ||
int | coreAmount, | ||
int | ramsize, | ||
int | mig_netspeed, | ||
int | dp_intensity | ||
) |
msg_vm_t MSG_vm_create_core | ( | msg_host_t | pm, |
const char * | name | ||
) |
msg_vm_t MSG_vm_create_multicore | ( | msg_host_t | pm, |
const char * | name, | ||
int | coreAmount | ||
) |
int MSG_vm_is_created | ( | msg_vm_t | vm | ) |
int MSG_vm_is_running | ( | msg_vm_t | vm | ) |
int MSG_vm_is_suspended | ( | msg_vm_t | vm | ) |
const char* MSG_vm_get_name | ( | msg_vm_t | vm | ) |
void MSG_vm_set_ramsize | ( | msg_vm_t | vm, |
size_t | size | ||
) |
size_t MSG_vm_get_ramsize | ( | msg_vm_t | vm | ) |
msg_host_t MSG_vm_get_pm | ( | msg_vm_t | vm | ) |
void MSG_vm_set_bound | ( | msg_vm_t | vm, |
double | bound | ||
) |
void MSG_vm_start | ( | msg_vm_t | vm | ) |
void MSG_vm_suspend | ( | msg_vm_t | vm | ) |
void MSG_vm_resume | ( | msg_vm_t | vm | ) |
void MSG_vm_shutdown | ( | msg_vm_t | vm | ) |
void MSG_vm_destroy | ( | msg_vm_t | vm | ) |
const char* MSG_storage_get_name | ( | msg_storage_t | storage | ) |
msg_storage_t MSG_storage_get_by_name | ( | const char * | name | ) |
xbt_dict_t MSG_storage_get_properties | ( | msg_storage_t | storage | ) |
void MSG_storage_set_property_value | ( | msg_storage_t | storage, |
const char * | name, | ||
const char * | value | ||
) |
const char* MSG_storage_get_property_value | ( | msg_storage_t | storage, |
const char * | name | ||
) |
xbt_dynar_t MSG_storages_as_dynar | ( | ) |
void MSG_storage_set_data | ( | msg_storage_t | storage, |
void * | data | ||
) |
void* MSG_storage_get_data | ( | msg_storage_t | storage | ) |
const char* MSG_storage_get_host | ( | msg_storage_t | storage | ) |
sg_size_t MSG_storage_read | ( | msg_storage_t | storage, |
sg_size_t | size | ||
) |
sg_size_t MSG_storage_write | ( | msg_storage_t | storage, |
sg_size_t | size | ||
) |
int MSG_process_get_PID | ( | msg_process_t | process | ) |
int MSG_process_get_PPID | ( | msg_process_t | process | ) |
sg_actor_t MSG_process_from_PID | ( | int | pid | ) |
Return a msg_process_t from its PID.
Note that the PID are uniq in the whole simulation, not only on a given host.
const char* MSG_process_get_name | ( | msg_process_t | process | ) |
sg_host_t MSG_process_get_host | ( | msg_process_t | process | ) |
xbt_dict_t MSG_process_get_properties | ( | msg_process_t | process | ) |
const char* MSG_process_get_property_value | ( | msg_process_t | process, |
const char * | name | ||
) |
void MSG_process_suspend | ( | msg_process_t | process | ) |
void MSG_process_resume | ( | msg_process_t | process | ) |
int MSG_process_is_suspended | ( | msg_process_t | process | ) |
void MSG_process_restart | ( | msg_process_t | process | ) |
void MSG_process_auto_restart_set | ( | msg_process_t | process, |
int | auto_restart | ||
) |
Sets the "auto-restart" flag of the process.
If the flag is set, the process will be automatically restarted when its host comes back up.
void MSG_process_daemonize | ( | msg_process_t | process | ) |
Indicates that this process should not prevent the simulation from ending.
SimGrid simulations run until all non-daemon processes are stopped.
void MSG_process_migrate | ( | msg_process_t | process, |
msg_host_t | host | ||
) |
Imediately changes the host on which this process runs.
void MSG_process_join | ( | msg_process_t | process, |
double | timeout | ||
) |
Wait for the completion of a msg_process_t.
process | the process to wait for |
timeout | wait until the process is over, or the timeout occurs |
void MSG_process_kill | ( | msg_process_t | process | ) |
Kills a process.
void MSG_process_killall | ( | ) |
Kill all running process.
void MSG_process_set_kill_time | ( | msg_process_t | process, |
double | kill_time | ||
) |
Specifies the time at which the process should be automatically killed
void MSG_process_yield | ( | ) |
Yield the current actor; let the other actors execute first.
void MSG_config | ( | const char * | key, |
const char * | value | ||
) |
set a configuration variable
Do –help on any simgrid binary to see the list of currently existing configuration variables, and see Section options.
Example: MSG_config("host/model","ptask_L07");
void MSG_init_nocheck | ( | int * | argc, |
char ** | argv | ||
) |
msg_error_t MSG_main | ( | ) |
Launch the MSG simulation.
void MSG_function_register | ( | const char * | name, |
xbt_main_func_t | code | ||
) |
Registers the main function of a process in a global table.
This table is then used by MSG_launch_application.
name | the reference name of the function. |
code | the function (must have the same prototype than the main function of any C program: int ..(int argc, char *argv[])) |
void MSG_function_register_default | ( | xbt_main_func_t | code | ) |
Registers a code function as being the default value.
This function will get used by MSG_launch_application() when there is no registered function of the requested name in.
code | the function (must have the same prototype than the main function of any C program: int ..(int argc, char *argv[])) |
void MSG_create_environment | ( | const char * | file | ) |
Creates a new platform, including hosts, links and the routing_table.
void MSG_launch_application | ( | const char * | file | ) |
Creates the application described in the provided file.
void MSG_set_function | ( | const char * | host_id, |
const char * | function_name, | ||
xbt_dynar_t | arguments | ||
) |
register functions bypassing the parser
double MSG_get_clock | ( | ) |
A clock (in second).
unsigned long int MSG_get_sent_msg | ( | ) |
Returns the amount of messages sent since the simulation start.
msg_process_t MSG_process_create | ( | const char * | name, |
xbt_main_func_t | code, | ||
void * | data, | ||
msg_host_t | host | ||
) |
msg_process_t MSG_process_create_with_arguments | ( | const char * | name, |
xbt_main_func_t | code, | ||
void * | data, | ||
msg_host_t | host, | ||
int | argc, | ||
char ** | argv | ||
) |
msg_process_t MSG_process_create_with_environment | ( | const char * | name, |
xbt_main_func_t | code, | ||
void * | data, | ||
msg_host_t | host, | ||
int | argc, | ||
char ** | argv, | ||
xbt_dict_t | properties | ||
) |
msg_process_t MSG_process_attach | ( | const char * | name, |
void * | data, | ||
msg_host_t | host, | ||
xbt_dict_t | properties | ||
) |
void MSG_process_detach | ( | ) |
void MSG_process_set_data_cleanup | ( | void_f_pvoid_t | data_cleanup | ) |
int MSG_process_self_PID | ( | ) |
int MSG_process_self_PPID | ( | ) |
const char* MSG_process_self_name | ( | ) |
msg_process_t MSG_process_self | ( | ) |
xbt_dynar_t MSG_processes_as_dynar | ( | ) |
int MSG_process_get_number | ( | ) |
void* MSG_process_get_data | ( | msg_process_t | process | ) |
msg_error_t MSG_process_set_data | ( | msg_process_t | process, |
void * | data | ||
) |
void MSG_process_on_exit | ( | int_f_pvoid_pvoid_t | fun, |
void * | data | ||
) |
void MSG_process_ref | ( | msg_process_t | process | ) |
void MSG_process_unref | ( | msg_process_t | process | ) |
msg_task_t MSG_task_create | ( | const char * | name, |
double | flops_amount, | ||
double | bytes_amount, | ||
void * | data | ||
) |
msg_task_t MSG_parallel_task_create | ( | const char * | name, |
int | host_nb, | ||
const msg_host_t * | host_list, | ||
double * | flops_amount, | ||
double * | bytes_amount, | ||
void * | data | ||
) |
void* MSG_task_get_data | ( | msg_task_t | task | ) |
void MSG_task_set_data | ( | msg_task_t | task, |
void * | data | ||
) |
void MSG_task_set_copy_callback | ( | void(*)(msg_task_t task, msg_process_t src, msg_process_t dst) | callback | ) |
msg_process_t MSG_task_get_sender | ( | msg_task_t | task | ) |
msg_host_t MSG_task_get_source | ( | msg_task_t | task | ) |
const char* MSG_task_get_name | ( | msg_task_t | task | ) |
void MSG_task_set_name | ( | msg_task_t | task, |
const char * | name | ||
) |
msg_error_t MSG_task_cancel | ( | msg_task_t | task | ) |
msg_error_t MSG_task_destroy | ( | msg_task_t | task | ) |
msg_error_t MSG_task_execute | ( | msg_task_t | task | ) |
msg_error_t MSG_parallel_task_execute | ( | msg_task_t | task | ) |
msg_error_t MSG_parallel_task_execute_with_timeout | ( | msg_task_t | task, |
double | timeout | ||
) |
void MSG_task_set_priority | ( | msg_task_t | task, |
double | priority | ||
) |
void MSG_task_set_bound | ( | msg_task_t | task, |
double | bound | ||
) |
msg_error_t MSG_process_sleep | ( | double | nb_sec | ) |
void MSG_task_set_flops_amount | ( | msg_task_t | task, |
double | flops_amount | ||
) |
double MSG_task_get_flops_amount | ( | msg_task_t | task | ) |
double MSG_task_get_remaining_work_ratio | ( | msg_task_t | task | ) |
void MSG_task_set_bytes_amount | ( | msg_task_t | task, |
double | bytes_amount | ||
) |
double MSG_task_get_remaining_communication | ( | msg_task_t | task | ) |
double MSG_task_get_bytes_amount | ( | msg_task_t | task | ) |
msg_error_t MSG_task_receive_ext | ( | msg_task_t * | task, |
const char * | alias, | ||
double | timeout, | ||
msg_host_t | host | ||
) |
msg_error_t MSG_task_receive_with_timeout | ( | msg_task_t * | task, |
const char * | alias, | ||
double | timeout | ||
) |
msg_error_t MSG_task_receive | ( | msg_task_t * | task, |
const char * | alias | ||
) |
msg_error_t MSG_task_receive_ext_bounded | ( | msg_task_t * | task, |
const char * | alias, | ||
double | timeout, | ||
msg_host_t | host, | ||
double | rate | ||
) |
msg_error_t MSG_task_receive_with_timeout_bounded | ( | msg_task_t * | task, |
const char * | alias, | ||
double | timeout, | ||
double | rate | ||
) |
msg_error_t MSG_task_receive_bounded | ( | msg_task_t * | task, |
const char * | alias, | ||
double | rate | ||
) |
msg_comm_t MSG_task_isend | ( | msg_task_t | task, |
const char * | alias | ||
) |
msg_comm_t MSG_task_isend_bounded | ( | msg_task_t | task, |
const char * | alias, | ||
double | maxrate | ||
) |
void MSG_task_dsend | ( | msg_task_t | task, |
const char * | alias, | ||
void_f_pvoid_t | cleanup | ||
) |
void MSG_task_dsend_bounded | ( | msg_task_t | task, |
const char * | alias, | ||
void_f_pvoid_t | cleanup, | ||
double | maxrate | ||
) |
msg_comm_t MSG_task_irecv | ( | msg_task_t * | task, |
const char * | alias | ||
) |
msg_comm_t MSG_task_irecv_bounded | ( | msg_task_t * | task, |
const char * | alias, | ||
double | rate | ||
) |
int MSG_comm_test | ( | msg_comm_t | comm | ) |
int MSG_comm_testany | ( | xbt_dynar_t | comms | ) |
void MSG_comm_destroy | ( | msg_comm_t | comm | ) |
msg_error_t MSG_comm_wait | ( | msg_comm_t | comm, |
double | timeout | ||
) |
void MSG_comm_waitall | ( | msg_comm_t * | comm, |
int | nb_elem, | ||
double | timeout | ||
) |
int MSG_comm_waitany | ( | xbt_dynar_t | comms | ) |
msg_task_t MSG_comm_get_task | ( | msg_comm_t | comm | ) |
msg_error_t MSG_comm_get_status | ( | msg_comm_t | comm | ) |
int MSG_task_listen | ( | const char * | alias | ) |
Check if there is a communication going on in a mailbox.
alias | the name of the mailbox to be considered |
msg_error_t MSG_task_send_with_timeout | ( | msg_task_t | task, |
const char * | alias, | ||
double | timeout | ||
) |
msg_error_t MSG_task_send_with_timeout_bounded | ( | msg_task_t | task, |
const char * | alias, | ||
double | timeout, | ||
double | maxrate | ||
) |
msg_error_t MSG_task_send | ( | msg_task_t | task, |
const char * | alias | ||
) |
msg_error_t MSG_task_send_bounded | ( | msg_task_t | task, |
const char * | alias, | ||
double | rate | ||
) |
int MSG_task_listen_from | ( | const char * | alias | ) |
void MSG_task_set_category | ( | msg_task_t | task, |
const char * | category | ||
) |
const char* MSG_task_get_category | ( | msg_task_t | task | ) |
void MSG_mailbox_set_async | ( | const char * | alias | ) |
msg_sem_t MSG_sem_init | ( | int | initial_value | ) |
void MSG_sem_acquire | ( | msg_sem_t | sem | ) |
msg_error_t MSG_sem_acquire_timeout | ( | msg_sem_t | sem, |
double | timeout | ||
) |
void MSG_sem_release | ( | msg_sem_t | sem | ) |
int MSG_sem_get_capacity | ( | msg_sem_t | sem | ) |
void MSG_sem_destroy | ( | msg_sem_t | sem | ) |
int MSG_sem_would_block | ( | msg_sem_t | sem | ) |
msg_bar_t MSG_barrier_init | ( | unsigned int | count | ) |
Initializes a barier, with count elements.
void MSG_barrier_destroy | ( | msg_bar_t | bar | ) |
Destroys barrier.
int MSG_barrier_wait | ( | msg_bar_t | bar | ) |
Performs a barrier already initialized.
smx_context_t MSG_process_get_smx_ctx | ( | msg_process_t | process | ) |
msg_process_t MSG_process_create_from_stdfunc | ( | std::string | name, |
std::function< void()> | code, | ||
void * | data, | ||
msg_host_t | host, | ||
std::unordered_map< std::string, std::string > * | properties | ||
) |