2 * jed_simgrid_platform.h
4 * Created on: Nov 30, 2010
8 #ifndef JED_SIMGRID_PLATFORM_H_
9 #define JED_SIMGRID_PLATFORM_H_
11 #include "xbt/dynar.h"
14 typedef struct jed_simgrid_container s_jed_simgrid_container_t,
15 *jed_simgrid_container_t;
18 struct jed_simgrid_container {
20 xbt_dynar_t container_children;
21 jed_simgrid_container_t parent;
22 xbt_dynar_t resource_list;
30 * selection of a subset of resources from the original set
33 struct jed_res_subset {
34 jed_simgrid_container_t parent;
35 int start_idx; // start idx in resource_list of container
36 int nres; // number of resources spanning starting at start_idx
39 typedef struct jed_res_subset s_jed_res_subset_t, *jed_res_subset_t;
41 struct jedule_struct {
42 jed_simgrid_container_t root_container;
43 xbt_dict_t jedule_meta_info;
46 typedef struct jedule_struct s_jedule_t, *jedule_t;
49 /*********************************************************/
51 void jed_create_jedule(jedule_t *jedule);
53 void jed_free_jedule(jedule_t jedule);
55 void jedule_add_meta_info(jedule_t jedule, char *key, char *value);
57 void jed_simgrid_create_container(jed_simgrid_container_t *container, char *name);
59 void jed_simgrid_add_container(jed_simgrid_container_t parent,
60 jed_simgrid_container_t child);
62 void jed_simgrid_add_resources(jed_simgrid_container_t parent,
63 xbt_dynar_t host_names);
67 * it is assumed that the host_names in the entire system are unique
68 * that means that we don't need parent references
70 * subset_list must be allocated
71 * host_names is the list of host_names associated with an event
73 void jed_simgrid_get_resource_selection_by_hosts(xbt_dynar_t subset_list,
74 xbt_dynar_t host_names);
78 hash host_id -> container
81 hash host_id -> jed_host_id
83 list <- [ jed_host_ids ]
85 list_chunks <- chunk( list ) -> [ 1, 3-5, 7-9 ]
90 #endif /* JED_SIMGRID_PLATFORM_H_ */