SimGrid  3.16
Versatile Simulation of Distributed Systems
msg.h File Reference
#include "simgrid/forward.h"
#include "simgrid/simix.h"
#include "simgrid/instr.h"

Classes

struct  msg_task
 

Macros

#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_get_host_by_name(n)   MSG_host_by_name(n) /* Rewrite the old name into the new one transparently */
 
#define MSG_host_get_name(host)   sg_host_get_name(host)
 Return the name of the msg_host_t. More...
 
#define MSG_host_get_current_power_peak(h)   MSG_host_get_speed(h) /* deprecated */
 
#define MSG_host_get_pstate(h)   sg_host_get_pstate(h) /* deprecated */
 
#define MSG_host_set_pstate(h, pstate)   sg_host_set_pstate(h, pstate) /* deprecated */
 
#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)
 
#define MSG_BARRIER_SERIAL_PROCESS   -1
 Opaque type representing a barrier identifier. More...
 
#define MSG_vm_get_name(vm)   MSG_host_get_name(vm)
 
#define MSG_mailbox_get_head(m)   MSG_mailbox_front(m)
 

Typedefs

typedef struct msg_Comm sg_msg_Comm
 
typedef s4u_NetZonemsg_netzone_t
 
typedef sg_host_t msg_host_t
 Host datatype. More...
 
typedef struct simdata_tasksimdata_task_t
 
typedef struct msg_task s_msg_task_t
 
typedef struct msg_taskmsg_task_t
 Task datatype. More...
 
typedef msg_host_t msg_vm_t
 
typedef sg_file_t msg_file_t
 
typedef sg_storage_t msg_storage_t
 Storage datatype. More...
 
typedef sg_msg_Commmsg_comm_t
 Communication action. More...
 
typedef s4u_Actormsg_process_t
 Process datatype. More...
 
typedef struct s_smx_semmsg_sem_t
 Opaque type representing a semaphore. More...
 
typedef struct s_msg_barmsg_bar_t
 

Enumerations

enum  msg_error_t {
  MSG_OK = 0, MSG_TIMEOUT = 1, MSG_TRANSFER_FAILURE = 2, MSG_HOST_FAILURE = 4,
  MSG_TASK_CANCELED = 8, 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

void MSG_config (const char *key, const char *value)
 set a configuration variable More...
 
void MSG_init_nocheck (int *argc, char **argv)
 Initialize MSG with less verifications You should use the MSG_init() function instead. More...
 
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 function as the default main function of processes. More...
 
void MSG_launch_application (const char *file)
 An application deployer. 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 ()
 
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 as, const char *name)
 
void MSG_zone_set_property_value (msg_netzone_t netzone, const char *name, char *value)
 
void MSG_zone_get_hosts (msg_netzone_t zone, xbt_dynar_t whereto)
 
static XBT_ATTRIB_DEPRECATED ("Please use MSG_zone_get_root since v3.16") msg_netzone_t MSG_environment_get_routing_root()
 
static XBT_ATTRIB_DEPRECATED ("Please use MSG_zone_get_name since v3.16") const char *MSG_environment_as_get_name(msg_netzone_t zone)
 
static XBT_ATTRIB_DEPRECATED ("Please use MSG_zone_get_by_name since v3.16") msg_netzone_t MSG_environment_as_get_by_name(const char *name)
 
static XBT_ATTRIB_DEPRECATED ("Please use MSG_zone_get_sons since v3.16") xbt_dict_t MSG_environment_as_get_routing_sons(msg_netzone_t zone)
 
static XBT_ATTRIB_DEPRECATED ("Please use MSG_zone_get_property_value since v3.16") const char *MSG_environment_as_get_property_value(msg_netzone_t zone
 
static XBT_ATTRIB_DEPRECATED ("Please use MSG_zone_set_property_value since v3.16") void MSG_environment_as_set_property_value(msg_netzone_t zone
 
static XBT_ATTRIB_DEPRECATED ("Please use MSG_zone_get_hosts since v3.16") xbt_dynar_t MSG_environment_as_get_hosts(msg_netzone_t zone)
 
sg_size_t MSG_file_read (msg_file_t fd, sg_size_t size)
 Read a file (local or remote) More...
 
sg_size_t MSG_file_write (msg_file_t fd, sg_size_t size)
 Write into a file (local or remote) More...
 
msg_file_t MSG_file_open (const char *fullpath, void *data)
 Opens the file whose name is the string pointed to by path. More...
 
voidMSG_file_get_data (msg_file_t fd)
 Return the user data of a msg_file_t. More...
 
msg_error_t MSG_file_set_data (msg_file_t fd, void *data)
 Set the user data of a msg_file_t. More...
 
int MSG_file_close (msg_file_t fd)
 Close the file. More...
 
sg_size_t MSG_file_get_size (msg_file_t fd)
 Return the size of a file. More...
 
void MSG_file_dump (msg_file_t fd)
 Display information related to a file descriptor. More...
 
msg_error_t MSG_file_unlink (msg_file_t fd)
 Unlink the file pointed by fd. More...
 
msg_error_t MSG_file_seek (msg_file_t fd, sg_offset_t offset, int origin)
 Set the file position indicator in the msg_file_t by adding offset bytes to the position specified by origin (either SEEK_SET, SEEK_CUR, or SEEK_END). More...
 
sg_size_t MSG_file_tell (msg_file_t fd)
 Returns the current value of the position indicator of the file. More...
 
const char * MSG_file_get_name (msg_file_t file)
 
msg_error_t MSG_file_move (msg_file_t fd, const char *fullpath)
 Move a file to another location on the same mount point. More...
 
msg_error_t MSG_file_rcopy (msg_file_t fd, msg_host_t host, const char *fullpath)
 Copy a file to another location on a remote host. More...
 
msg_error_t MSG_file_rmove (msg_file_t fd, msg_host_t host, const char *fullpath)
 Move a file to another location on a remote host. More...
 
const char * MSG_storage_get_name (msg_storage_t storage)
 Returns the name of the msg_storage_t. More...
 
sg_size_t MSG_storage_get_free_size (msg_storage_t storage)
 Returns the free space size of a storage element. More...
 
sg_size_t MSG_storage_get_used_size (msg_storage_t storage)
 Returns the used space size of a storage element. More...
 
msg_storage_t MSG_storage_get_by_name (const char *name)
 Finds a msg_storage_t using its name. More...
 
xbt_dict_t MSG_storage_get_properties (msg_storage_t storage)
 Returns a xbt_dict_t consisting of the list of properties assigned to this storage. More...
 
void MSG_storage_set_property_value (msg_storage_t storage, const char *name, char *value)
 Change the value of a given storage property. More...
 
const char * MSG_storage_get_property_value (msg_storage_t storage, const char *name)
 Returns the value of a given storage property. More...
 
xbt_dynar_t MSG_storages_as_dynar ()
 Returns a dynar containing all the storage elements declared at a given point of time. More...
 
msg_error_t MSG_storage_set_data (msg_storage_t host, void *data)
 Set the user data of a msg_storage_t. More...
 
voidMSG_storage_get_data (msg_storage_t storage)
 Returns the user data of a msg_storage_t. More...
 
xbt_dict_t MSG_storage_get_content (msg_storage_t storage)
 Returns the content (file list) of a msg_storage_t. More...
 
sg_size_t MSG_storage_get_size (msg_storage_t storage)
 Returns the size of a msg_storage_t. More...
 
const char * MSG_storage_get_host (msg_storage_t storage)
 Returns the host name the storage is attached to. More...
 
msg_host_t MSG_host_by_name (const char *name)
 Finds a msg_host_t using its name. More...
 
msg_error_t MSG_host_set_data (msg_host_t host, void *data)
 Set the user data of a msg_host_t. More...
 
voidMSG_host_get_data (msg_host_t host)
 Return the user data of a msg_host_t. More...
 
void MSG_host_on (msg_host_t host)
 Start the host if it is off. More...
 
void MSG_host_off (msg_host_t host)
 Stop the host if it is on. More...
 
msg_host_t MSG_host_self ()
 Return the location on which the current process is executed. More...
 
double MSG_host_get_speed (msg_host_t h)
 Return the speed of the processor (in flop/s), regardless of the current load on the machine. More...
 
int MSG_host_get_core_number (msg_host_t h)
 Return the number of cores. More...
 
void MSG_host_get_process_list (msg_host_t h, xbt_dynar_t whereto)
 Return the list of processes attached to an host. More...
 
int MSG_host_is_on (msg_host_t h)
 Determine if a host is up and running. More...
 
int MSG_host_is_off (msg_host_t h)
 Determine if a host is currently off. More...
 
double MSG_get_host_speed (msg_host_t h)
 Return the speed of the processor (in flop/s), regardless of the current load on the machine. More...
 
double MSG_host_get_power_peak_at (msg_host_t h, int pstate)
 Return the speed of the processor (in flop/s) at a given pstate. More...
 
int MSG_host_get_nb_pstates (msg_host_t h)
 Return the total count of pstates defined for a host. More...
 
xbt_dynar_t MSG_hosts_as_dynar ()
 Return a dynar containing all the hosts declared at a given point of time (including VMs) More...
 
int MSG_get_host_number ()
 Return the current number MSG hosts. More...
 
xbt_dict_t MSG_host_get_mounted_storage_list (msg_host_t host)
 Return the list of mount point names on an host. More...
 
xbt_dynar_t MSG_host_get_attached_storage_list (msg_host_t host)
 Return the list of storages attached to an host. More...
 
xbt_dict_t MSG_host_get_storage_content (msg_host_t host)
 Return the content of mounted storages on an host. More...
 
xbt_dict_t MSG_host_get_properties (msg_host_t host)
 Returns a xbt_dict_t consisting of the list of properties assigned to this host. More...
 
const char * MSG_host_get_property_value (msg_host_t host, const char *name)
 Returns the value of a given host property. More...
 
void MSG_host_set_property_value (msg_host_t host, const char *name, char *value)
 Change the value of a given host property. More...
 
void MSG_create_environment (const char *file)
 A platform constructor. More...
 
msg_process_t MSG_process_create (const char *name, xbt_main_func_t code, void *data, msg_host_t host)
 Creates and runs a new msg_process_t. More...
 
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)
 Creates and runs a new msg_process_t. More...
 
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)
 Creates and runs a new msg_process_t. More...
 
msg_process_t MSG_process_attach (const char *name, void *data, msg_host_t host, xbt_dict_t properties)
 
void MSG_process_detach ()
 Detach a process attached with MSG_process_attach() More...
 
void MSG_process_kill (msg_process_t process)
 
int MSG_process_killall (int reset_PIDs)
 Kill all running process. More...
 
msg_error_t MSG_process_migrate (msg_process_t process, msg_host_t host)
 Migrates a process to another location. More...
 
void MSG_process_yield ()
 Yield the current actor; let the other actors execute first. More...
 
voidMSG_process_get_data (msg_process_t process)
 Returns the user data of a process. More...
 
msg_error_t MSG_process_set_data (msg_process_t process, void *data)
 Sets the user data of a process. More...
 
void MSG_process_set_data_cleanup (void_f_pvoid_t data_cleanup)
 Sets a cleanup function to be called to free the userdata of a process when a process is destroyed. More...
 
msg_host_t MSG_process_get_host (msg_process_t process)
 Return the location on which a process is running. More...
 
msg_process_t MSG_process_from_PID (int PID)
 Return a msg_process_t given its PID. More...
 
int MSG_process_get_PID (msg_process_t process)
 Returns the process ID of process. More...
 
int MSG_process_get_PPID (msg_process_t process)
 Returns the process ID of the parent of process. More...
 
const char * MSG_process_get_name (msg_process_t process)
 Return the name of a process. More...
 
int MSG_process_self_PID ()
 Return the PID of the current process. More...
 
int MSG_process_self_PPID ()
 Return the PPID of the current process. More...
 
msg_process_t MSG_process_self ()
 Return the current process. More...
 
xbt_dynar_t MSG_processes_as_dynar ()
 returns a list of all currently existing processes More...
 
int MSG_process_get_number ()
 Return the current number MSG processes. More...
 
msg_error_t MSG_process_set_kill_time (msg_process_t process, double kill_time)
 Set the kill time of a process. More...
 
xbt_dict_t MSG_process_get_properties (msg_process_t process)
 Return the list of properties. More...
 
const char * MSG_process_get_property_value (msg_process_t process, const char *name)
 Returns the value of a given process property. More...
 
msg_error_t MSG_process_suspend (msg_process_t process)
 Suspend the process. More...
 
msg_error_t MSG_process_resume (msg_process_t process)
 Resume a suspended process. More...
 
int MSG_process_is_suspended (msg_process_t process)
 Returns true if the process is suspended . More...
 
void MSG_process_on_exit (int_f_pvoid_pvoid_t fun, void *data)
 Add a function to the list of "on_exit" functions for the current process. More...
 
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)
 This process will be terminated automatically when the last non-daemon process finishes. More...
 
msg_process_t MSG_process_restart (msg_process_t process)
 Restarts a process from the beginning. More...
 
void MSG_process_ref (msg_process_t process)
 Take an extra reference on that process to prevent it to be garbage-collected. More...
 
void MSG_process_unref (msg_process_t process)
 Release a reference on that process so that it can get be garbage-collected. More...
 
msg_task_t MSG_task_create (const char *name, double flops_amount, double bytes_amount, void *data)
 Creates a new msg_task_t. More...
 
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)
 Creates a new msg_task_t (a parallel one....). More...
 
voidMSG_task_get_data (msg_task_t task)
 Return the user data of a msg_task_t. More...
 
void MSG_task_set_data (msg_task_t task, void *data)
 Sets the user data of a msg_task_t. More...
 
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)
 Return the sender of a msg_task_t. More...
 
msg_host_t MSG_task_get_source (msg_task_t task)
 Return the source of a msg_task_t. More...
 
const char * MSG_task_get_name (msg_task_t task)
 Return the name of a msg_task_t. More...
 
void MSG_task_set_name (msg_task_t task, const char *name)
 Sets the name of a msg_task_t. More...
 
msg_error_t MSG_task_cancel (msg_task_t task)
 Cancel a msg_task_t. More...
 
msg_error_t MSG_task_destroy (msg_task_t task)
 Destroy a msg_task_t. More...
 
msg_error_t MSG_task_execute (msg_task_t task)
 Executes a task and waits for its termination. More...
 
msg_error_t MSG_parallel_task_execute (msg_task_t task)
 Executes a parallel task and waits for its termination. More...
 
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)
 Changes the priority of a computation task. More...
 
void MSG_task_set_bound (msg_task_t task, double bound)
 Changes the maximum CPU utilization of a computation task. More...
 
msg_error_t MSG_process_join (msg_process_t process, double timeout)
 Wait for the completion of a msg_process_t. More...
 
msg_error_t MSG_process_sleep (double nb_sec)
 Sleep for the specified number of seconds. More...
 
void MSG_task_set_flops_amount (msg_task_t task, double flops_amount)
 set the computation amount needed to process a task msg_task_t. More...
 
double MSG_task_get_flops_amount (msg_task_t task)
 Returns the remaining amount of flops needed to execute a task msg_task_t. More...
 
void MSG_task_set_bytes_amount (msg_task_t task, double bytes_amount)
 set the amount data attached with a task msg_task_t. More...
 
double MSG_task_get_remaining_communication (msg_task_t task)
 Returns the total amount received by a task msg_task_t. More...
 
int MSG_task_is_latency_bounded (msg_task_t task)
 
double MSG_task_get_bytes_amount (msg_task_t task)
 Returns the size of the data attached to a task msg_task_t. More...
 
msg_error_t MSG_task_receive_ext (msg_task_t *task, const char *alias, double timeout, msg_host_t host)
 Receives a task from a mailbox from a specific host with a given timeout. More...
 
msg_error_t MSG_task_receive_with_timeout (msg_task_t *task, const char *alias, double timeout)
 Receives a task from a mailbox with a given timeout. More...
 
msg_error_t MSG_task_receive (msg_task_t *task, const char *alias)
 Receives a task from a mailbox. More...
 
msg_error_t MSG_task_receive_ext_bounded (msg_task_t *task, const char *alias, double timeout, msg_host_t host, double rate)
 Receives a task from a mailbox from a specific host with a given timeout and at a given rate. More...
 
msg_error_t MSG_task_receive_with_timeout_bounded (msg_task_t *task, const char *alias, double timeout, double rate)
 Receives a task from a mailbox with a given timeout and at a given rate. More...
 
msg_error_t MSG_task_receive_bounded (msg_task_t *task, const char *alias, double rate)
 Receives a task from a mailbox at a given rate. More...
 
msg_comm_t MSG_task_isend (msg_task_t task, const char *alias)
 Sends a task on a mailbox. More...
 
msg_comm_t MSG_task_isend_bounded (msg_task_t task, const char *alias, double maxrate)
 Sends a task on a mailbox with a maximum rate. More...
 
msg_comm_t MSG_task_isend_with_matching (msg_task_t task, const char *alias, int(*match_fun)(void *, void *, smx_activity_t), void *match_data)
 Sends a task on a mailbox, with support for matching requests. More...
 
void MSG_task_dsend (msg_task_t task, const char *alias, void_f_pvoid_t cleanup)
 Sends a task on a mailbox. More...
 
void MSG_task_dsend_bounded (msg_task_t task, const char *alias, void_f_pvoid_t cleanup, double maxrate)
 Sends a task on a mailbox with a maximal rate. More...
 
msg_comm_t MSG_task_irecv (msg_task_t *task, const char *alias)
 Starts listening for receiving a task from an asynchronous communication. More...
 
msg_comm_t MSG_task_irecv_bounded (msg_task_t *task, const char *alias, double rate)
 Starts listening for receiving a task from an asynchronous communication at a given rate. More...
 
int MSG_comm_test (msg_comm_t comm)
 Checks whether a communication is done, and if yes, finalizes it. More...
 
int MSG_comm_testany (xbt_dynar_t comms)
 This function checks if a communication is finished. More...
 
void MSG_comm_destroy (msg_comm_t comm)
 Destroys a communication. More...
 
msg_error_t MSG_comm_wait (msg_comm_t comm, double timeout)
 Wait for the completion of a communication. More...
 
void MSG_comm_waitall (msg_comm_t *comm, int nb_elem, double timeout)
 This function is called by a sender and permit to wait for each communication. More...
 
int MSG_comm_waitany (xbt_dynar_t comms)
 This function waits for the first communication finished in a list. More...
 
msg_task_t MSG_comm_get_task (msg_comm_t comm)
 Get a task (msg_task_t) from a communication. More...
 
msg_error_t MSG_comm_get_status (msg_comm_t comm)
 Returns the error (if any) that occurred during a finished communication. More...
 
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)
 Sends a task to a mailbox with a timeout. More...
 
msg_error_t MSG_task_send_with_timeout_bounded (msg_task_t task, const char *alias, double timeout, double maxrate)
 Sends a task to a mailbox with a timeout and with a maximum rate. More...
 
msg_error_t MSG_task_send (msg_task_t task, const char *alias)
 Sends a task to a mailbox. More...
 
msg_error_t MSG_task_send_bounded (msg_task_t task, const char *alias, double rate)
 Sends a task to a mailbox with a maximum rate. More...
 
int MSG_task_listen_from (const char *alias)
 Look if there is a communication on a mailbox and return the PID of the sender process. More...
 
void MSG_task_set_category (msg_task_t task, const char *category)
 Sets the tracing category of a task. More...
 
const char * MSG_task_get_category (msg_task_t task)
 Gets the current tracing category of a task. More...
 
void MSG_mailbox_set_async (const char *alias)
 Set the mailbox to receive in asynchronous mode. More...
 
msg_error_t MSG_action_trace_run (char *path)
 A trace loader. More...
 
void MSG_action_init ()
 
void MSG_action_exit ()
 
msg_sem_t MSG_sem_init (int initial_value)
 creates a semaphore object of the given initial capacity More...
 
void MSG_sem_acquire (msg_sem_t sem)
 locks on a semaphore object More...
 
msg_error_t MSG_sem_acquire_timeout (msg_sem_t sem, double timeout)
 locks on a semaphore object up until the provided timeout expires More...
 
void MSG_sem_release (msg_sem_t sem)
 releases the semaphore object More...
 
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)
 returns a boolean indicating if this semaphore would block at this very specific time More...
 
msg_bar_t MSG_barrier_init (unsigned int count)
 Initializes a barrier, with count elements. More...
 
void MSG_barrier_destroy (msg_bar_t bar)
 Initializes a barrier, with count elements. More...
 
int MSG_barrier_wait (msg_bar_t bar)
 Performs a barrier already initialized. More...
 
int MSG_vm_is_created (msg_vm_t vm)
 Opaque type describing a Virtual Machine. More...
 
int MSG_vm_is_running (msg_vm_t vm)
 Returns whether the given VM is currently running. More...
 
int MSG_vm_is_migrating (msg_vm_t vm)
 Returns whether the given VM is currently migrating. More...
 
int MSG_vm_is_suspended (msg_vm_t vm)
 Returns whether the given VM is currently suspended, not running. More...
 
void MSG_vm_get_params (msg_vm_t vm, vm_params_t params)
 Get the parameters of a given host. More...
 
void MSG_vm_set_params (msg_vm_t vm, vm_params_t params)
 Set the parameters of a given host. More...
 
msg_vm_t MSG_vm_create_core (msg_host_t location, const char *name)
 Create a new VM object with the default parameters

  • A VM is treated as a host.
More...
 
msg_vm_t MSG_vm_create_multicore (msg_host_t pm, const char *name, int coreAmount)
 Create a new VM object with the default parameters, but with a specified amount of cores

  • A VM is treated as a host.
More...
 
msg_vm_t MSG_vm_create (msg_host_t ind_pm, const char *name, int coreAmount, int ramsize, int mig_netspeed, int dp_intensity)
 Create a new VM with specified parameters. More...
 
void MSG_vm_destroy (msg_vm_t vm)
 Destroy a VM. More...
 
void MSG_vm_start (msg_vm_t vm)
 Start a vm (i.e., boot the guest operating system)If the VM cannot be started (because of memory over-provisioning), an exception is generated. More...
 
void MSG_vm_shutdown (msg_vm_t vm)
 Immediately kills all processes within the given VM. More...
 
void MSG_vm_migrate (msg_vm_t vm, msg_host_t destination)
 Migrate the VM to the given host. More...
 
void MSG_vm_suspend (msg_vm_t vm)
 Immediately suspend the execution of all processes within the given VM. More...
 
void MSG_vm_resume (msg_vm_t vm)
 Resume the execution of the VM. More...
 
msg_host_t MSG_vm_get_pm (msg_vm_t vm)
 Get the physical host of a given VM. More...
 
void MSG_vm_set_bound (msg_vm_t vm, double bound)
 Set a CPU bound for a given VM. More...
 
smx_context_t MSG_process_get_smx_ctx (msg_process_t process)
 

Variables

int sg_storage_max_file_descriptors
 
static const char * name
 
static const char char * value
 

Macro Definition Documentation

◆ msg_as_t

#define msg_as_t   msg_netzone_t /* portability macro */

◆ MSG_get_host_by_name

#define MSG_get_host_by_name (   n)    MSG_host_by_name(n) /* Rewrite the old name into the new one transparently */

◆ MSG_host_get_current_power_peak

#define MSG_host_get_current_power_peak (   h)    MSG_host_get_speed(h) /* deprecated */

◆ MSG_host_get_pstate

#define MSG_host_get_pstate (   h)    sg_host_get_pstate(h) /* deprecated */

◆ MSG_host_set_pstate

#define MSG_host_set_pstate (   h,
  pstate 
)    sg_host_set_pstate(h, pstate) /* deprecated */

◆ MSG_task_recv

#define MSG_task_recv (   t,
 
)    MSG_task_receive(t,a)

◆ MSG_task_recv_bounded

#define MSG_task_recv_bounded (   t,
  a,
 
)    MSG_task_receive_bounded(t,a,r)

◆ MSG_vm_get_name

#define MSG_vm_get_name (   vm)    MSG_host_get_name(vm)

◆ MSG_mailbox_get_head

#define MSG_mailbox_get_head (   m)    MSG_mailbox_front(m)

Typedef Documentation

◆ sg_msg_Comm

typedef struct msg_Comm sg_msg_Comm

◆ msg_netzone_t

◆ simdata_task_t

typedef struct simdata_task* simdata_task_t

◆ s_msg_task_t

typedef struct msg_task s_msg_task_t

◆ msg_vm_t

◆ msg_file_t

◆ msg_bar_t

typedef struct s_msg_bar* msg_bar_t

Function Documentation

◆ MSG_set_function()

void MSG_set_function ( const char *  host_id,
const char *  function_name,
xbt_dynar_t  arguments 
)

register functions bypassing the parser

◆ MSG_get_sent_msg()

unsigned long int MSG_get_sent_msg ( )

◆ MSG_zone_get_root()

◆ MSG_zone_get_name()

const char* MSG_zone_get_name ( msg_netzone_t  zone)

◆ MSG_zone_get_by_name()

msg_netzone_t MSG_zone_get_by_name ( const char *  name)

◆ MSG_zone_get_sons()

void MSG_zone_get_sons ( msg_netzone_t  zone,
xbt_dict_t  whereto 
)

◆ MSG_zone_get_property_value()

const char* MSG_zone_get_property_value ( msg_netzone_t  as,
const char *  name 
)

◆ MSG_zone_set_property_value()

void MSG_zone_set_property_value ( msg_netzone_t  netzone,
const char *  name,
char *  value 
)

◆ MSG_zone_get_hosts()

void MSG_zone_get_hosts ( msg_netzone_t  zone,
xbt_dynar_t  whereto 
)

◆ XBT_ATTRIB_DEPRECATED() [1/7]

static XBT_ATTRIB_DEPRECATED ( "Please use MSG_zone_get_root since v3.16"  )
inlinestatic

◆ XBT_ATTRIB_DEPRECATED() [2/7]

static XBT_ATTRIB_DEPRECATED ( "Please use MSG_zone_get_name since v3.16"  ) const
inlinestatic

◆ XBT_ATTRIB_DEPRECATED() [3/7]

static XBT_ATTRIB_DEPRECATED ( "Please use MSG_zone_get_by_name since v3.16"  ) const
inlinestatic

◆ XBT_ATTRIB_DEPRECATED() [4/7]

static XBT_ATTRIB_DEPRECATED ( "Please use MSG_zone_get_sons since v3.16"  )
inlinestatic

◆ XBT_ATTRIB_DEPRECATED() [5/7]

static XBT_ATTRIB_DEPRECATED ( "Please use MSG_zone_get_property_value since v3.16"  ) const
inlinestatic

◆ XBT_ATTRIB_DEPRECATED() [6/7]

static XBT_ATTRIB_DEPRECATED ( "Please use MSG_zone_set_property_value since v3.16"  )
inlinestatic

◆ XBT_ATTRIB_DEPRECATED() [7/7]

static XBT_ATTRIB_DEPRECATED ( "Please use MSG_zone_get_hosts since v3.16"  )
inlinestatic

◆ MSG_file_get_name()

const char* MSG_file_get_name ( msg_file_t  file)

◆ MSG_storage_get_property_value()

const char* MSG_storage_get_property_value ( msg_storage_t  storage,
const char *  name 
)

Returns the value of a given storage property.

Parameters
storagea storage
namea property name
Returns
value of a property (or nullptr if property not set)

◆ MSG_process_attach()

msg_process_t MSG_process_attach ( const char *  name,
void data,
msg_host_t  host,
xbt_dict_t  properties 
)

◆ MSG_process_detach()

void MSG_process_detach ( )

Detach a process attached with MSG_process_attach()

This is called when the current process has finished its job. Used in the main thread, it waits for the simulation to finish before returning. When it returns, the other simulated processes and the maestro are destroyed.

◆ MSG_process_yield()

void MSG_process_yield ( )

Yield the current actor; let the other actors execute first.

◆ MSG_processes_as_dynar()

xbt_dynar_t MSG_processes_as_dynar ( )

returns a list of all currently existing processes

◆ MSG_process_get_number()

int MSG_process_get_number ( )

Return the current number MSG processes.

◆ MSG_task_set_copy_callback()

void MSG_task_set_copy_callback ( void(*)(msg_task_t task, msg_process_t src, msg_process_t dst callback)

◆ MSG_task_cancel()

msg_error_t MSG_task_cancel ( msg_task_t  task)

Cancel a msg_task_t.

Parameters
taskthe task to cancel. If it was executed or transfered, it stops the process that were working on it.

◆ MSG_parallel_task_execute_with_timeout()

msg_error_t MSG_parallel_task_execute_with_timeout ( msg_task_t  task,
double  timeout 
)

◆ MSG_process_join()

msg_error_t MSG_process_join ( msg_process_t  process,
double  timeout 
)

Wait for the completion of a msg_process_t.

Parameters
processthe process to wait for
timeoutwait until the process is over, or the timeout occurs

◆ MSG_task_is_latency_bounded()

int MSG_task_is_latency_bounded ( msg_task_t  task)

◆ MSG_action_init()

◆ MSG_action_exit()

◆ MSG_vm_get_params()

void MSG_vm_get_params ( msg_vm_t  vm,
vm_params_t  params 
)

Get the parameters of a given host.

Parameters
vmthe vm you are interested into
paramsa prameter object

◆ MSG_vm_set_params()

void MSG_vm_set_params ( msg_vm_t  vm,
vm_params_t  params 
)

Set the parameters of a given host.

Parameters
vma vm
paramsa parameter object

◆ MSG_process_get_smx_ctx()

smx_context_t MSG_process_get_smx_ctx ( msg_process_t  process)

Variable Documentation

◆ sg_storage_max_file_descriptors

int sg_storage_max_file_descriptors

◆ name

int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char int resultlen void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win void void MPI_Datatype int MPI_Aint MPI_Op MPI_Win win MPI_Group MPI_Group MPI_Group newgroup MPI_Group group MPI_Group MPI_Group MPI_Group newgroup MPI_Group int int MPI_Group newgroup MPI_Group int size MPI_Group MPI_Group MPI_Group newgroup MPI_Info char key MPI_Info info MPI_Info int nkeys MPI_Info char int int flag int flag int char int int provided void int MPI_Datatype int int MPI_Comm MPI_Request request void int MPI_Datatype int int MPI_Comm MPI_Request request MPI_Copy_function MPI_Delete_function int void extra_state MPI_User_function int MPI_Op op MPI_Op int commute void int MPI_Datatype void int int MPI_Comm comm void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win MPI_Request request void int MPI_Datatype int int MPI_Comm MPI_Status status void void int MPI_Datatype MPI_Op MPI_Comm comm void void int MPI_Datatype MPI_Op int MPI_Comm comm void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win MPI_Request request void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win MPI_Request request void int MPI_Datatype void int MPI_Datatype int MPI_Comm comm void int MPI_Datatype int int MPI_Comm MPI_Request request void int MPI_Datatype int int void int MPI_Datatype int int MPI_Comm MPI_Status status void int MPI_Datatype int int MPI_Comm MPI_Request request int MPI_Request requests int MPI_Request int MPI_Status statuses MPI_Request int MPI_Status status MPI_Datatype datatype int int MPI_Aint MPI_Datatype MPI_Datatype newtype int int MPI_Aint MPI_Datatype MPI_Datatype new_type int int int MPI_Datatype MPI_Datatype newtype MPI_Datatype MPI_Aint MPI_Aint MPI_Datatype newtype MPI_Datatype int type_keyval MPI_Datatype MPI_Aint extent MPI_Datatype datatype MPI_Datatype MPI_Aint MPI_Aint extent MPI_Datatype MPI_Aint MPI_Aint extent int int MPI_Aint MPI_Datatype MPI_Datatype newtype MPI_Datatype MPI_Aint disp MPI_Datatype char name MPI_Datatype MPI_Count size MPI_Datatype MPI_Aint disp void int int void int MPI_Datatype MPI_Comm comm int MPI_Request int MPI_Status status int MPI_Request int int MPI_Status status void MPI_Aint int MPI_Info MPI_Comm MPI_Win win MPI_Win void MPI_Aint size MPI_Info MPI_Comm MPI_Win win MPI_Win win MPI_Win char int len MPI_Group int MPI_Win win MPI_Win MPI_Info info MPI_Win win int MPI_Win win MPI_Win win int MPI_Win win MPI_Win win MPI_Win int void att MPI_Win_copy_attr_function MPI_Win_delete_attr_function int void extra_state MPI_Fint comm MPI_Comm comm MPI_Info info MPI_Request request MPI_Win win MPI_Fint info MPI_Fint request int errorclass int char string void int MPI_Datatype int int MPI_Comm MPI_Request request void int size MPI_Request request char port_name MPI_Comm int errorcode MPI_Comm_errhandler_fn MPI_Errhandler errhandler MPI_Comm MPI_Errhandler errhandler MPI_Comm parent MPI_Comm MPI_Group group MPI_Comm MPI_Errhandler errhandler MPI_Comm char * name
Initial value:
{
static const char * name
Definition: msg.h:186
const char * MSG_zone_get_property_value(msg_netzone_t as, const char *name)
Definition: msg_environment.cpp:61
Examples:
examples/msg/actions-comm/actions-comm.c, examples/msg/actions-storage/actions-storage.c, examples/s4u/actions-comm/s4u_actions-comm.cpp, and examples/s4u/actions-storage/s4u_actions-storage.cpp.

◆ value

const char char* value
Initial value:
{
void MSG_zone_set_property_value(msg_netzone_t netzone, const char *name, char *value)
Definition: msg_environment.cpp:66
static const char * name
Definition: msg.h:186
static const char char * value
Definition: msg.h:190
Examples:
examples/msg/actions-comm/actions-comm.c, and examples/msg/platform-properties/platform-properties.c.