SimGrid  3.7
Scalable simulation of distributed systems
Functions
MSG Deprecated
MSG

This section describes the deprecated functions. PLEASE STOP USING THEM. More...

Functions

MSG_error_t MSG_get_errno (void)
 Return the last value returned by a MSG function (except MSG_get_errno...).
MSG_error_t MSG_task_put (m_task_t task, m_host_t dest, m_channel_t channel)
 Put a task on a channel of an host and waits for the end of the transmission.
MSG_error_t MSG_task_put_bounded (m_task_t task, m_host_t dest, m_channel_t channel, double maxrate)
 Does exactly the same as MSG_task_put but with a bounded transmition rate.
MSG_error_t MSG_task_put_with_timeout (m_task_t task, m_host_t dest, m_channel_t channel, double timeout)
 Put a task on a channel of an host (with a timeout on the waiting of the destination host) and waits for the end of the transmission.
int MSG_task_probe_from (m_channel_t channel)
 Test whether there is a pending communication on a channel, and who sent it.
int MSG_task_Iprobe (m_channel_t channel)
 Test whether there is a pending communication on a channel.
int MSG_task_probe_from_host (int channel, m_host_t host)
 Return the number of tasks waiting to be received on a channel and sent by host.
MSG_error_t MSG_task_get_from_host (m_task_t *task, m_channel_t channel, m_host_t host)
 Listen on channel and waits for receiving a task from host.
MSG_error_t MSG_task_get (m_task_t *task, m_channel_t channel)
 Listen on a channel and wait for receiving a task.
MSG_error_t MSG_task_get_with_timeout (m_task_t *task, m_channel_t channel, double max_duration)
 Listen on a channel and wait for receiving a task with a timeout.

Detailed Description

This section describes the deprecated functions. PLEASE STOP USING THEM.

We don't remove them because the ability to run old scientific code is something important to us. But these functionalities are not actively supported anymore.

To access these functions, you should define the relevant option at configuration time in ccmake.


Function Documentation

MSG_error_t MSG_task_put ( m_task_t  task,
m_host_t  dest,
m_channel_t  channel 
)

Put a task on a channel of an host and waits for the end of the transmission.

This function is used for describing the behavior of a process. It takes three parameter.

Parameters:
taska m_task_t to send on another location. This task will not be usable anymore when the function will return. There is no automatic task duplication and you have to save your parameters before calling this function. Tasks are unique and once it has been sent to another location, you should not access it anymore. You do not need to call MSG_task_destroy() but to avoid using, as an effect of inattention, this task anymore, you definitely should renitialize it with MSG_TASK_UNINITIALIZED. Note that this task can be transfered iff it has been correctly created with MSG_task_create().
destthe destination of the message
channelthe channel on which the process should put this task. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
Returns:
MSG_HOST_FAILURE if the host on which this function was called was shut down, MSG_TRANSFER_FAILURE if the transfer could not be properly done (network failure, dest failure) or MSG_OK if it succeeded.
MSG_error_t MSG_task_put_bounded ( m_task_t  task,
m_host_t  dest,
m_channel_t  channel,
double  maxrate 
)

Does exactly the same as MSG_task_put but with a bounded transmition rate.

See also:
MSG_task_put
MSG_error_t MSG_task_put_with_timeout ( m_task_t  task,
m_host_t  dest,
m_channel_t  channel,
double  timeout 
)

Put a task on a channel of an host (with a timeout on the waiting of the destination host) and waits for the end of the transmission.

This function is used for describing the behavior of a process. It takes four parameter.

Parameters:
taska m_task_t to send on another location. This task will not be usable anymore when the function will return. There is no automatic task duplication and you have to save your parameters before calling this function. Tasks are unique and once it has been sent to another location, you should not access it anymore. You do not need to call MSG_task_destroy() but to avoid using, as an effect of inattention, this task anymore, you definitely should renitialize it with MSG_TASK_UNINITIALIZED. Note that this task can be transfered iff it has been correctly created with MSG_task_create().
destthe destination of the message
channelthe channel on which the process should put this task. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
timeoutthe maximum time to wait for a task before giving up. In such a case, MSG_TRANSFER_FAILURE will be returned, task will not be modified
Returns:
MSG_HOST_FAILURE if the host on which this function was called was shut down, MSG_TRANSFER_FAILURE if the transfer could not be properly done (network failure, dest failure, timeout...) or MSG_OK if the communication succeeded.
int MSG_task_probe_from ( m_channel_t  channel)

Test whether there is a pending communication on a channel, and who sent it.

It takes one parameter.

Parameters:
channelthe channel on which the process should be listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
Returns:
-1 if there is no pending communication and the PID of the process who sent it otherwise
int MSG_task_Iprobe ( m_channel_t  channel)

Test whether there is a pending communication on a channel.

It takes one parameter.

Parameters:
channelthe channel on which the process should be listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
Returns:
1 if there is a pending communication and 0 otherwise
int MSG_task_probe_from_host ( int  channel,
m_host_t  host 
)

Return the number of tasks waiting to be received on a channel and sent by host.

It takes two parameters.

Parameters:
channelthe channel on which the process should be listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
hostthe host that is to be watched.
Returns:
the number of tasks waiting to be received on channel and sent by host.
MSG_error_t MSG_task_get_from_host ( m_task_t task,
m_channel_t  channel,
m_host_t  host 
)

Listen on channel and waits for receiving a task from host.

It takes three parameters.

Parameters:
taska memory location for storing a m_task_t. It will hold a task when this function will return. Thus task should not be equal to NULL and *task should be equal to NULL. If one of those two condition does not hold, there will be a warning message.
channelthe channel on which the process should be listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
hostthe host that is to be watched.
Returns:
a MSG_error_t indicating whether the operation was successful (MSG_OK), or why it failed otherwise.
MSG_error_t MSG_task_get ( m_task_t task,
m_channel_t  channel 
)

Listen on a channel and wait for receiving a task.

It takes two parameters.

Parameters:
taska memory location for storing a m_task_t. It will hold a task when this function will return. Thus task should not be equal to NULL and *task should be equal to NULL. If one of those two condition does not hold, there will be a warning message.
channelthe channel on which the process should be listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
Returns:
a MSG_error_t indicating whether the operation was successful (MSG_OK), or why it failed otherwise.
MSG_error_t MSG_task_get_with_timeout ( m_task_t task,
m_channel_t  channel,
double  max_duration 
)

Listen on a channel and wait for receiving a task with a timeout.

It takes three parameters.

Parameters:
taska memory location for storing a m_task_t. It will hold a task when this function will return. Thus task should not be equal to NULL and *task should be equal to NULL. If one of those two condition does not hold, there will be a warning message.
channelthe channel on which the process should be listening. This value has to be >=0 and < than the maximal number of channels fixed with MSG_set_channel_number().
max_durationthe maximum time to wait for a task before giving up. In such a case, MSG_TRANSFER_FAILURE will be returned, task will not be modified and will still be equal to NULL when returning.
Returns:
a MSG_error_t indicating whether the operation was successful (MSG_OK), or why it failed otherwise.


Back to the main Simgrid Documentation page The version of SimGrid documented here is v3.7.
Documentation of other versions can be found in their respective archive files (directory doc/html).
Generated by doxygen