SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simdag.h File Reference
#include "simgrid/host.h"
#include "simgrid/link.h"
#include "xbt/log.h"
#include "xbt/sysdep.h"

Macros

#define SD_SCHED_NO_COST   NULL
 A constant to use in SD_task_schedule to mean that there is no cost. More...
 
#define SD_workstation_t   sg_host_t
 
#define SD_link_get_name   sg_link_name
 
#define SD_link_get_current_latency   sg_link_latency
 
#define SD_link_get_current_bandwidth   sg_link_bandwidth
 
#define SD_route_get_current_latency   SD_route_get_latency
 
#define SD_route_get_current_bandwidth   SD_route_get_bandwidth
 
#define SD_workstation_get_list   sg_host_list
 
#define SD_workstation_get_number   sg_host_count
 
#define SD_workstation_get_name   sg_host_get_name
 
#define SD_workstation_get_by_name   sg_host_by_name
 
#define SD_workstation_dump   sg_host_dump
 
#define SD_workstation_get_data   sg_host_user
 
#define SD_workstation_set_data   sg_host_user_set
 
#define SD_workstation_get_properties   sg_host_get_properties
 
#define SD_workstation_get_property_value   sg_host_get_property_value
 
#define SD_workstation_get_power   sg_host_speed
 
#define SD_workstation_get_available_power   sg_host_get_available_speed
 
#define SD_workstation_get_mounted_storage_list   sg_host_get_mounted_storage_list
 

Typedefs

typedef LinkSD_link_t
 Link opaque datatypeA link is a network node represented as a name, a bandwidth and a latency. More...
 
typedef struct SD_taskSD_task_t
 Task opaque datatypeA task is some computing amount that can be executed in parallel on several hosts. More...
 

Enumerations

enum  e_SD_task_state_t {
  SD_NOT_SCHEDULED = 0x0001, SD_SCHEDULABLE = 0x0002, SD_SCHEDULED = 0x0004, SD_RUNNABLE = 0x0008,
  SD_RUNNING = 0x0010, SD_DONE = 0x0020, SD_FAILED = 0x0040
}
 Task states. More...
 
enum  e_SD_task_kind_t {
  SD_TASK_NOT_TYPED = 0, SD_TASK_COMM_E2E = 1, SD_TASK_COMP_SEQ = 2, SD_TASK_COMP_PAR_AMDAHL = 3,
  SD_TASK_COMM_PAR_MXN_1D_BLOCK = 4
}
 Task kinds. More...
 

Functions

SD_link_tSD_route_get_list (sg_host_t src, sg_host_t dst)
 Returns the route between two workstations. More...
 
int SD_route_get_size (sg_host_t src, sg_host_t dst)
 Returns the number of links on the route between two workstations. More...
 
double SD_route_get_latency (sg_host_t src, sg_host_t dst)
 Returns the latency of the route between two workstations. More...
 
double SD_route_get_bandwidth (sg_host_t src, sg_host_t dst)
 Returns the bandwidth of the route between two workstations, i.e. More...
 
SD_task_t SD_task_create (const char *name, void *data, double amount)
 Creates a new task. More...
 
voidSD_task_get_data (SD_task_t task)
 Returns the user data of a task. More...
 
void SD_task_set_data (SD_task_t task, void *data)
 Sets the user data of a task. More...
 
e_SD_task_state_t SD_task_get_state (SD_task_t task)
 Returns the state of a task. More...
 
const char * SD_task_get_name (SD_task_t task)
 Returns the name of a task. More...
 
void SD_task_set_name (SD_task_t task, const char *name)
 Allows to change the name of a task. More...
 
void SD_task_set_rate (SD_task_t task, double rate)
 Sets the rate of a task. More...
 
void SD_task_watch (SD_task_t task, e_SD_task_state_t state)
 Adds a watch point to a task. More...
 
void SD_task_unwatch (SD_task_t task, e_SD_task_state_t state)
 Removes a watch point from a task. More...
 
double SD_task_get_amount (SD_task_t task)
 Returns the total amount of work contained in a task. More...
 
void SD_task_set_amount (SD_task_t task, double amount)
 Sets the total amount of work of a task For sequential typed tasks (COMP_SEQ and COMM_E2E), it also sets the appropriate values in the flops_amount and bytes_amount arrays respectively. More...
 
double SD_task_get_alpha (SD_task_t task)
 Returns the alpha parameter of a SD_TASK_COMP_PAR_AMDAHL task. More...
 
double SD_task_get_remaining_amount (SD_task_t task)
 Returns the remaining amount work to do till the completion of a task. More...
 
double SD_task_get_execution_time (SD_task_t task, int host_count, const sg_host_t *host_list, const double *flops_amount, const double *bytes_amount)
 Returns an approximative estimation of the execution time of a task. More...
 
e_SD_task_kind_t SD_task_get_kind (SD_task_t task)
 
void SD_task_schedule (SD_task_t task, int host_count, const sg_host_t *host_list, const double *flops_amount, const double *bytes_amount, double rate)
 Schedules a task. More...
 
void SD_task_unschedule (SD_task_t task)
 Unschedules a task. More...
 
double SD_task_get_start_time (SD_task_t task)
 Returns the start time of a task. More...
 
double SD_task_get_finish_time (SD_task_t task)
 Returns the finish time of a task. More...
 
xbt_dynar_t SD_task_get_parents (SD_task_t task)
 Returns the dynar of the parents of a task. More...
 
xbt_dynar_t SD_task_get_children (SD_task_t task)
 Returns the dynar of the parents of a task. More...
 
int SD_task_get_workstation_count (SD_task_t task)
 Returns the number of workstations involved in a task. More...
 
sg_host_tSD_task_get_workstation_list (SD_task_t task)
 Returns the list of workstations involved in a task. More...
 
void SD_task_destroy (SD_task_t task)
 Destroys a task. More...
 
void SD_task_dump (SD_task_t task)
 Displays debugging information about a task. More...
 
void SD_task_dotty (SD_task_t task, void *out_FILE)
 Dumps the task in dotty formalism into the FILE* passed as second argument. More...
 
SD_task_t SD_task_create_comp_seq (const char *name, void *data, double amount)
 create a sequential computation task that can then be auto-scheduled More...
 
SD_task_t SD_task_create_comp_par_amdahl (const char *name, void *data, double amount, double alpha)
 create a parallel computation task that can then be auto-scheduled More...
 
SD_task_t SD_task_create_comm_e2e (const char *name, void *data, double amount)
 create a end-to-end communication task that can then be auto-scheduled More...
 
SD_task_t SD_task_create_comm_par_mxn_1d_block (const char *name, void *data, double amount)
 create a complex data redistribution task that can then be auto-scheduled More...
 
void SD_task_distribute_comp_amdahl (SD_task_t task, int ws_count)
 
void SD_task_build_MxN_1D_block_matrix (SD_task_t task, int src_nb, int dst_nb)
 
void SD_task_schedulev (SD_task_t task, int count, const sg_host_t *list)
 Auto-schedules a task. More...
 
void SD_task_schedulel (SD_task_t task, int count,...)
 autoschedule a task on a list of hosts More...
 
void SD_task_dependency_add (const char *name, void *data, SD_task_t src, SD_task_t dst)
 Adds a dependency between two tasks. More...
 
void SD_task_dependency_remove (SD_task_t src, SD_task_t dst)
 Remove a dependency between two tasks. More...
 
int SD_task_dependency_exists (SD_task_t src, SD_task_t dst)
 Indicates whether there is a dependency between two tasks. More...
 
void SD_init (int *argc, char **argv)
 Initializes SD internal data. More...
 
void SD_config (const char *key, const char *value)
 set a configuration variable More...
 
void SD_create_environment (const char *platform_file)
 Creates the environment. More...
 
xbt_dynar_t SD_simulate (double how_long)
 Launches the simulation. More...
 
double SD_get_clock ()
 Returns the current clock, in seconds. More...
 
void SD_exit ()
 Destroys all SD internal data This function should be called when the simulation is over. More...
 
xbt_dynar_t SD_daxload (const char *filename)
 loads a DAX file describing a DAG More...
 
xbt_dynar_t SD_dotload (const char *filename)
 
xbt_dynar_t SD_dotload_with_sched (const char *filename)
 
xbt_dynar_t SD_PTG_dotload (const char *filename)
 

Macro Definition Documentation

◆ SD_workstation_t

#define SD_workstation_t   sg_host_t

◆ SD_link_get_name

#define SD_link_get_name   sg_link_name

◆ SD_link_get_current_latency

#define SD_link_get_current_latency   sg_link_latency

◆ SD_link_get_current_bandwidth

#define SD_link_get_current_bandwidth   sg_link_bandwidth

◆ SD_route_get_current_latency

#define SD_route_get_current_latency   SD_route_get_latency

◆ SD_route_get_current_bandwidth

#define SD_route_get_current_bandwidth   SD_route_get_bandwidth

◆ SD_workstation_get_list

#define SD_workstation_get_list   sg_host_list

◆ SD_workstation_get_number

#define SD_workstation_get_number   sg_host_count

◆ SD_workstation_get_name

#define SD_workstation_get_name   sg_host_get_name

◆ SD_workstation_get_by_name

#define SD_workstation_get_by_name   sg_host_by_name

◆ SD_workstation_dump

#define SD_workstation_dump   sg_host_dump

◆ SD_workstation_get_data

#define SD_workstation_get_data   sg_host_user

◆ SD_workstation_set_data

#define SD_workstation_set_data   sg_host_user_set

◆ SD_workstation_get_properties

#define SD_workstation_get_properties   sg_host_get_properties

◆ SD_workstation_get_property_value

#define SD_workstation_get_property_value   sg_host_get_property_value

◆ SD_workstation_get_power

#define SD_workstation_get_power   sg_host_speed

◆ SD_workstation_get_available_power

#define SD_workstation_get_available_power   sg_host_get_available_speed

◆ SD_workstation_get_mounted_storage_list

#define SD_workstation_get_mounted_storage_list   sg_host_get_mounted_storage_list