Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
78054615a2ec876b32caf7ff8eabcef904c3d438
[simgrid.git] / src / include / surf / surf.h
1 /*      $Id$     */
2
3 /* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef _SURF_SURF_H
9 #define _SURF_SURF_H
10
11 #include "portable.h"
12 #include "xbt/swag.h"
13 #include "xbt/dynar.h"
14 #include "xbt/dict.h"
15 #include "xbt/misc.h"
16
17 SG_BEGIN_DECL()
18
19
20
21 /* Actions and models are higly connected structures... */
22
23 /** \brief Action datatype
24  *  \ingroup SURF_actions
25  *  
26  * An action is some working amount on a model.
27  * It is represented as a cost, a priority, a duration and a state.
28  *
29  * \see e_surf_action_state_t
30  */
31 typedef struct surf_action *surf_action_t;
32
33 /** \brief Resource datatype
34  *  \ingroup SURF_models
35  *  
36  *  Generic data structure for a model. The workstations,
37  *  the CPUs and the network links are examples of models.
38  */
39 typedef struct surf_model *surf_model_t;
40
41 /** \brief Resource model description
42  */
43 typedef struct surf_model_description {
44   const char *name;
45   surf_model_t model;
46   void (* model_init) (const char *filename);
47   void (* create_ws) (void);
48 } s_surf_model_description_t, *surf_model_description_t;
49
50 XBT_PUBLIC(void) update_model_description(s_surf_model_description_t *table,
51                                              int table_size,
52                                              const char* name, 
53                                              surf_model_t model
54                                              );
55 XBT_PUBLIC(int) find_model_description(s_surf_model_description_t *table,
56                                           int table_size,
57                                           const char* name);
58
59 /** \brief Action structure
60  * \ingroup SURF_actions
61  *
62  *  Never create s_surf_action_t by yourself ! The actions are created
63  *  on the fly when you call execute or communicate on a model.
64  *  
65  *  \see e_surf_action_state_t
66  */
67 typedef struct surf_action {
68   s_xbt_swag_hookup_t state_hookup;
69   xbt_swag_t state_set;
70   double cost;                  /**< cost        */
71   double priority;              /**< priority (1.0 by default) */
72   double max_duration;          /**< max_duration (may fluctuate until
73                                    the task is completed) */
74   double remains;               /**< How much of that cost remains to
75                                  * be done in the currently running task */
76   double start;                 /**< start time  */
77   double finish;                /**< finish time : this is modified during the run
78                                  * and fluctuates until the task is completed */
79   void *data;                   /**< for your convenience */
80   int using;
81   surf_model_t model_type;
82 } s_surf_action_t;
83
84 /** \brief Action states
85  *  \ingroup SURF_actions
86  *
87  *  Action states.
88  *
89  *  \see surf_action_t, surf_action_state_t
90  */
91 typedef enum {
92   SURF_ACTION_READY = 0,        /**< Ready        */
93   SURF_ACTION_RUNNING,          /**< Running      */
94   SURF_ACTION_FAILED,           /**< Task Failure */
95   SURF_ACTION_DONE,             /**< Completed    */
96   SURF_ACTION_TO_FREE,          /**< Action to free in next cleanup */
97   SURF_ACTION_NOT_IN_THE_SYSTEM /**< Not in the system anymore. Why did you ask ? */
98 } e_surf_action_state_t;
99
100 /** \brief Action state sets
101  *  \ingroup SURF_actions
102  *
103  *  This structure contains some sets of actions.
104  *  It provides a fast access to the actions in each state.
105  *
106  *  \see surf_action_t, e_surf_action_state_t
107  */
108 typedef struct surf_action_state {
109   xbt_swag_t ready_action_set;   /**< Actions in state SURF_ACTION_READY */
110   xbt_swag_t running_action_set; /**< Actions in state SURF_ACTION_RUNNING */
111   xbt_swag_t failed_action_set;  /**< Actions in state SURF_ACTION_FAILED */
112   xbt_swag_t done_action_set;    /**< Actions in state SURF_ACTION_DONE */
113 } s_surf_action_state_t, *surf_action_state_t;
114
115 /***************************/
116 /* Generic model object */
117 /***************************/
118
119 /** \brief Public data available on all models
120  *  \ingroup SURF_models
121  *
122  *  These functions are implemented by all models.
123  */
124 typedef struct surf_model_public {
125   s_surf_action_state_t states; /**< Any living action on this model */
126   void *(*name_service) (const char *name); /**< Return a model given its name */
127   const char *(*get_resource_name) (void *resource_id); /**< Return the name of a resource */
128
129   e_surf_action_state_t(*action_get_state) (surf_action_t action); /**< Return the state of an action */
130   double (*action_get_start_time) (surf_action_t action); /**< Return the start time of an action */
131   double (*action_get_finish_time) (surf_action_t action); /**< Return the finish time of an action */
132   void (*action_use) (surf_action_t action); /**< Set an action used */
133   int  (*action_free) (surf_action_t action); /**< Free an action */
134   void (*action_cancel) (surf_action_t action); /**< Cancel a running action */
135   void (*action_recycle) (surf_action_t action); /**< Recycle an action */
136   void (*action_change_state) (surf_action_t action, /**< Change an action state*/
137                                e_surf_action_state_t state);
138   void (*action_set_data) (surf_action_t action, void *data); /**< Set the user data of an action */
139   void (*suspend) (surf_action_t action); /**< Suspend an action */
140   void (*resume) (surf_action_t action); /**< Resume a suspended action */
141   int (*is_suspended) (surf_action_t action); /**< Return whether an action is suspended */
142   void (*set_max_duration) (surf_action_t action, double duration); /**< Set the max duration of an action*/
143   void (*set_priority) (surf_action_t action, double priority); /**< Set the priority of an action */
144   const char *name; /**< Name of this model */
145
146   xbt_dict_t (*get_properties) (void* link); /**< Return the properties dictionary */
147
148 } s_surf_model_public_t, *surf_model_public_t;
149
150 /** \brief Private data available on all models
151  *  \ingroup SURF_models
152  */
153 typedef struct surf_model_private *surf_model_private_t;
154
155 /** \brief Resource datatype
156  *  \ingroup SURF_models
157  *  
158  *  Generic data structure for a model. The workstations,
159  *  the CPUs and the network links are examples of models.
160  */
161 typedef struct surf_model {
162   surf_model_private_t common_private;
163   surf_model_public_t common_public;
164 } s_surf_model_t;
165
166 /**************************************/
167 /* Implementations of model object */
168 /**************************************/
169
170 /** \brief Timer model extension public
171  * \ingroup SURF_model
172  *
173  * Additionnal functions specific to the timer model
174  */
175 typedef struct surf_timer_model_extension_public {
176   void (*set) (double date, void *function, void *arg);
177   int (*get)  (void **function, void **arg);
178 } s_surf_timer_model_extension_public_t,
179   *surf_timer_model_extension_public_t;
180
181 /** \brief Timer model
182  *  \ingroup SURF_models
183  */
184 typedef struct surf_timer_model {
185   surf_model_private_t common_private;
186   surf_model_public_t common_public;
187   surf_timer_model_extension_public_t extension_public;
188 } s_surf_timer_model_t, *surf_timer_model_t;
189
190 /** \brief The timer model
191  *  \ingroup SURF_models
192  */
193 XBT_PUBLIC_DATA(surf_timer_model_t) surf_timer_model;
194
195 /** \brief Initializes the timer model
196  *  \ingroup SURF_models
197  */
198 XBT_PUBLIC(void) surf_timer_model_init(const char *filename);
199
200 /* Cpu model */
201
202 /** \brief CPU state
203  *  \ingroup SURF_models
204  */
205 typedef enum {
206   SURF_CPU_ON = 1,              /**< Up & ready        */
207   SURF_CPU_OFF = 0              /**< Down & broken     */
208 } e_surf_cpu_state_t;
209
210 /** \brief CPU model extension public
211  *  \ingroup SURF_models
212  *  
213  *  Public functions specific to the CPU model.
214  */
215 typedef struct surf_cpu_model_extension_public {
216   surf_action_t(*execute) (void *cpu, double size);
217   surf_action_t(*sleep) (void *cpu, double duration);
218   e_surf_cpu_state_t(*get_state) (void *cpu);
219   double (*get_speed) (void *cpu, double load);
220   double (*get_available_speed) (void *cpu);
221 } s_surf_cpu_model_extension_public_t,
222     *surf_cpu_model_extension_public_t;
223
224 /** \brief CPU model datatype
225  *  \ingroup SURF_models
226  */
227 typedef struct surf_cpu_model {
228   surf_model_private_t common_private;
229   surf_model_public_t common_public;
230   surf_cpu_model_extension_public_t extension_public;
231 } s_surf_cpu_model_t, *surf_cpu_model_t;
232
233 /** \brief The CPU model
234  *  \ingroup SURF_models
235  */
236 XBT_PUBLIC_DATA(surf_cpu_model_t) surf_cpu_model;
237
238 /** \brief Initializes the CPU model with the model Cas01
239  *  \ingroup SURF_models
240  *
241  *  This function is called by surf_workstation_model_init_CLM03
242  *  so you shouldn't have to call it by yourself.
243  *
244  *  \see surf_workstation_model_init_CLM03()
245  */
246 XBT_PUBLIC(void) surf_cpu_model_init_Cas01(const char *filename);
247
248 #define surf_cpu_model_description_size 1
249 /** \brief The list of all available cpu model models
250  *  \ingroup SURF_models
251  */
252 XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[surf_cpu_model_description_size];
253
254 /* Network model */
255
256 /** \brief Network model extension public
257  *  \ingroup SURF_models
258  *
259  *  Public functions specific to the network model
260  */
261 typedef struct surf_network_model_extension_public {
262   surf_action_t(*communicate) (void *src, void *dst, double size,
263                                double max_rate);
264   const void** (*get_route) (void *src, void *dst);
265   int (*get_route_size) (void *src, void *dst);
266   const char* (*get_link_name) (const void *link);
267   double (*get_link_bandwidth) (const void *link);
268   double (*get_link_latency) (const void *link);
269 } s_surf_network_model_extension_public_t,
270     *surf_network_model_extension_public_t;
271
272 /** \brief Network model datatype
273  *  \ingroup SURF_models
274  */
275 typedef struct surf_network_model {
276   surf_model_private_t common_private;
277   surf_model_public_t common_public;
278   surf_network_model_extension_public_t extension_public;
279 } s_surf_network_model_t, *surf_network_model_t;
280
281 XBT_PUBLIC(void) create_workstations(void);
282
283 /** \brief The network model
284  *  \ingroup SURF_models
285  *
286  *  When creating a new API on top on SURF, you shouldn't use the
287  *  network model unless you know what you are doing. Only the workstation
288  *  model should be accessed because depending on the platform model,
289  *  the network model can be NULL.
290  */
291 XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model;
292
293
294 /** \brief Initializes the platform with the network model 'Constant'
295  *  \ingroup SURF_models
296  *  \param filename XML platform file name
297  *
298  *  In this model, the communication time between two network cards is
299  *  constant, hence no need for a routing table. This is particularly
300  *  usefull when simulating huge distributed algorithms where
301  *  scalability is really an issue. This function is called in
302  *  conjunction with surf_workstation_model_init_compound.
303  *
304  *  \see surf_workstation_model_init_compound()
305  */
306 XBT_PUBLIC(void) surf_network_model_init_Constant(const char *filename);
307
308 /** \brief Initializes the platform with the network model CM02
309  *  \ingroup SURF_models
310  *  \param filename XML platform file name
311  *
312  *  This function is called by surf_workstation_model_init_CLM03
313  *  or by yourself only if you plan using surf_workstation_model_init_compound
314  *
315  *  \see surf_workstation_model_init_CLM03()
316  */
317 XBT_PUBLIC(void) surf_network_model_init_CM02(const char *filename);
318
319 #ifdef HAVE_GTNETS
320 /** \brief Initializes the platform with the network model GTNETS
321  *  \ingroup SURF_models
322  *  \param filename XML platform file name
323  *
324  *  This function is called by surf_workstation_model_init_GTNETS
325  *  or by yourself only if you plan using surf_workstation_model_init_compound
326  *
327  *  \see surf_workstation_model_init_GTNETS()
328  */
329 XBT_PUBLIC(void) surf_network_model_init_GTNETS(const char *filename);
330 #endif
331
332 /** \brief Initializes the platform with the network model Reno
333  *  \ingroup SURF_models
334  *  \param filename XML platform file name
335  *
336  *  The problem is related to max( sum( arctan(C * Df * xi) ) ).
337  *
338  *  Reference:
339  *  [LOW03] S. H. Low. A duality model of TCP and queue management algorithms.
340  *  IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
341  *
342  *  Call this function only if you plan using surf_workstation_model_init_compound.
343  *
344  */
345 XBT_PUBLIC(void) surf_network_model_init_Reno(const char *filename);
346
347 /** \brief Initializes the platform with the network model Reno2
348  *  \ingroup SURF_models
349  *  \param filename XML platform file name
350  *
351  *  The problem is related to max( sum( arctan(C * Df * xi) ) ).
352  *
353  *  Reference:
354  *  [LOW01] S. H. Low. A duality model of TCP and queue management algorithms.
355  *  IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
356  *
357  *  Call this function only if you plan using surf_workstation_model_init_compound.
358  *
359  */
360 XBT_PUBLIC(void) surf_network_model_init_Reno2(const char *filename);
361
362 /** \brief Initializes the platform with the network model Vegas
363  *  \ingroup SURF_models
364  *  \param filename XML platform file name
365  *
366  *  This problem is related to max( sum( a * Df * ln(xi) ) ) which is equivalent 
367  *  to the proportional fairness.
368  *
369  *  Reference:
370  *  [LOW03] S. H. Low. A duality model of TCP and queue management algorithms.
371  *  IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
372  *
373  *  Call this function only if you plan using surf_workstation_model_init_compound.
374  *
375  */
376 XBT_PUBLIC(void) surf_network_model_init_Vegas(const char *filename);
377
378 #ifdef HAVE_SDP
379 /** \brief Initializes the platform with the network model based on SDP
380  *  \ingroup SURF_models
381  *  \param filename XML platform file name
382  *
383  *  This function implements the proportional fairness known as the maximization
384  *  of x1*x2*...*xn .
385  *
386  *  Reference:
387  *
388  *  [TAG03]. Corinne Touati, Eitan Altman, and Jerome Galtier.  
389  *  Semi-definite programming approach for bandwidth allocation and routing in networks.
390  *  Game Theory and Applications, 9:169-179, December 2003. Nova publisher.
391  *
392  *  Call this function only if you plan using surf_workstation_model_init_compound.
393  */
394 XBT_PUBLIC(void) surf_network_model_init_SDP(const char *filename);
395 #endif
396
397 #if (HAVE_GTNETS)
398 # define inc_GT 1
399 #else 
400 # define inc_GT 0
401 #endif
402 #if (HAVE_SDP)
403 # define inc_SDP 1
404 #else
405 # define inc_SDP 0
406 #endif
407
408 #define surf_network_model_description_size  5+inc_SDP+inc_GT
409
410 /** \brief The list of all available network model models
411  *  \ingroup SURF_models
412  */
413 XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[surf_network_model_description_size];
414
415 /** \brief Workstation model extension public
416  *  \ingroup SURF_models
417  *
418  *  Public functions specific to the workstation model.
419  */
420 typedef struct surf_workstation_model_extension_public {
421   surf_action_t(*execute) (void *workstation, double size);            /**< Execute a computation amount on a workstation
422                                                                         and create the corresponding action */
423   surf_action_t(*sleep) (void *workstation, double duration);          /**< Make a workstation sleep during a given duration */
424   e_surf_cpu_state_t(*get_state) (void *workstation);                  /**< Return the CPU state of a workstation */
425   double (*get_speed) (void *workstation, double load);                /**< Return the speed of a workstation */
426   double (*get_available_speed) (void *workstation);                   /**< Return tha available speed of a workstation */
427   surf_action_t(*communicate) (void *workstation_src,                  /**< Execute a communication amount between two workstations */
428                                void *workstation_dst, double size,
429                                double max_rate);
430
431   surf_action_t(*execute_parallel_task) (int workstation_nb,           /**< Execute a parallel task on several workstations */
432                                          void **workstation_list,
433                                          double *computation_amount,
434                                          double *communication_amount,
435                                          double amount,
436                                          double rate);
437   const void** (*get_route) (void *src, void *dst);                    /**< Return the network link list between two workstations */
438   int (*get_route_size) (void *src, void *dst);                        /**< Return the route size between two workstations */
439   const char* (*get_link_name) (const void *link);                     /**< Return the name of a network link */
440   double (*get_link_bandwidth) (const void *link);                     /**< Return the current bandwidth of a network link */
441   double (*get_link_latency) (const void *link);                       /**< Return the current latency of a network link */
442 } s_surf_workstation_model_extension_public_t,
443     *surf_workstation_model_extension_public_t;
444
445 /** \brief Workstation model datatype.
446  *  \ingroup SURF_models
447  *
448  */
449 typedef struct surf_workstation_model {
450   surf_model_private_t common_private;
451   surf_model_public_t common_public;
452   surf_workstation_model_extension_public_t extension_public;
453 } s_surf_workstation_model_t, *surf_workstation_model_t;
454
455 /** \brief The workstation model
456  *  \ingroup SURF_models
457  *
458  *  Note that when you create an API on top of SURF,
459  *  the workstation model should be the only one you use
460  *  because depending on the platform model, the network model and the CPU model
461  *  may not exist.
462  */
463 XBT_PUBLIC_DATA(surf_workstation_model_t) surf_workstation_model;
464
465 /** \brief Initializes the platform with a compound workstation model
466  *  \ingroup SURF_models
467  *  \param filename XML platform file name
468  *
469  *  This function should be called after a cpu_model and a
470  *  network_model have been set up.
471  *
472  */
473 XBT_PUBLIC(void) surf_workstation_model_init_compound(const char *filename);
474
475 /** \brief Initializes the platform with the workstation model CLM03
476  *  \ingroup SURF_models
477  *  \param filename XML platform file name
478  *
479  *  This platform model seperates the workstation model and the network model.
480  *  The workstation model will be initialized with the model CLM03, the network
481  *  model with the model CM02 and the CPU model with the model Cas01.
482  *  In future releases, some other network models will be implemented and will be
483  *  combined with the workstation model CLM03.
484  *
485  *  \see surf_workstation_model_init_KCCFLN05()
486  */
487 XBT_PUBLIC(void) surf_workstation_model_init_CLM03(const char *filename);
488
489 /** \brief Initializes the platform with the model KCCFLN05
490  *  \ingroup SURF_models
491  *  \param filename XML platform file name
492  *
493  *  With this model, the workstations and the network are handled
494  *  together. The network model is roughly the same as in CM02 but
495  *  interference between computations and communications can be taken
496  *  into account. This platform model is the default one for MSG and
497  *  SimDag.
498  *
499  */
500 XBT_PUBLIC(void) surf_workstation_model_init_KCCFLN05(const char *filename);
501
502 /** \brief Initializes the platform with the model KCCFLN05
503  *  \ingroup SURF_models
504  *  \param filename XML platform file name
505  *
506  *  With this model, only parallel tasks can be used. Resource sharing
507  *  is done by identifying bottlenecks and giving an equal share of
508  *  the model to each action.
509  *
510  */
511 XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(const char *filename);
512
513 #define surf_workstation_model_description_size 4
514 /** \brief The list of all available workstation model models
515  *  \ingroup SURF_models
516  */
517 XBT_PUBLIC_DATA(s_surf_model_description_t) surf_workstation_model_description[surf_workstation_model_description_size];
518
519 /** \brief The network links
520  *  \ingroup SURF_models
521  *
522  *  This dict contains all network links.
523  *
524  *  \see workstation_set
525  */
526 XBT_PUBLIC_DATA(xbt_dict_t) link_set;
527
528 /** \brief The workstations
529  *  \ingroup SURF_models
530  *
531  *  This dict contains all workstations.
532  *
533  *  \see link_set
534  */
535 XBT_PUBLIC_DATA(xbt_dict_t)  workstation_set;
536 XBT_PUBLIC_DATA(xbt_dict_t)  cpu_set;
537 /** \brief List of initialized models
538  *  \ingroup SURF_models
539  */
540 XBT_PUBLIC_DATA(xbt_dynar_t)  model_list;
541
542 /*******************************************/
543 /*** SURF Globals **************************/
544 /*******************************************/
545
546 /** \brief Initialize SURF
547  *  \ingroup SURF_simulation
548  *  \param argc argument number
549  *  \param argv arguments
550  *
551  *  This function has to be called to initialize the common
552  *  structures.  Then you will have to create the environment by
553  *  calling surf_timer_model_init() and
554  *  e.g. surf_workstation_model_init_CLM03() or
555  *  surf_workstation_model_init_KCCFLN05().
556  *
557  *  \see surf_timer_model_init(), surf_workstation_model_init_CLM03(),
558  *  surf_workstation_model_init_KCCFLN05(), surf_workstation_model_init_compound(), surf_exit()
559  */
560 XBT_PUBLIC(void) surf_init(int *argc, char **argv);     /* initialize common structures */
561
562 /** \brief Finish simulation initialization
563  *  \ingroup SURF_simulation
564  *
565  *  This function must be called before the first call to surf_solve()
566  */
567 XBT_PUBLIC(void) surf_presolve(void);
568
569 /** \brief Performs a part of the simulation
570  *  \ingroup SURF_simulation
571  *  \return the elapsed time, or -1.0 if no event could be executed
572  *
573  *  This function execute all possible events, update the action states
574  *  and returns the time elapsed.
575  *  When you call execute or communicate on a model, the corresponding actions
576  *  are not executed immediately but only when you call surf_solve.
577  *  Note that the returned elapsed time can be zero.
578  */
579 XBT_PUBLIC(double) surf_solve(void);
580
581 /** \brief Return the current time
582  *  \ingroup SURF_simulation
583  *
584  *  Return the current time in millisecond.
585  */
586 XBT_PUBLIC(double)surf_get_clock(void);
587
588 /** \brief Exit SURF
589  *  \ingroup SURF_simulation
590  *
591  *  Clean everything.
592  *
593  *  \see surf_init()
594  */
595 XBT_PUBLIC(void) surf_exit(void);
596
597 /* Prototypes of the functions that handle the properties */
598 XBT_PUBLIC_DATA(xbt_dict_t) current_property_set; /* the prop set for the currently parsed element (also used in SIMIX) */
599 void parse_properties(void);
600
601 /* Prototypes for functions handling routing and were factorized succesfully from the models */
602 void init_data(void);
603 void parse_route_elem(void);
604
605 /* surf parse file related (public because called from a test suite) */
606 XBT_PUBLIC(void) parse_platform_file(const char* file);
607
608 /* Stores the sets */
609 XBT_PUBLIC_DATA(xbt_dict_t) set_list;
610
611 void parse_foreach(void);
612 void parse_sets(void);
613 void parse_route_multi_set_endpoints(void);
614 void parse_route_multi_set_route(void);
615 void parse_cluster(void);
616 void parse_trace_init(void);
617 void parse_trace_finalize(void);
618 void parse_trace_c_connect(void);
619
620 void manage_route(xbt_dict_t route_table, const char* route_name, int action, int isMultiRoute);
621 XBT_PUBLIC_DATA(int) route_action;
622
623 /* This is used by all models when creating the routing table while parsing */
624 XBT_PUBLIC_DATA(xbt_dict_t) route_table;
625 XBT_PUBLIC_DATA(xbt_dict_t) route_multi_table;
626 XBT_PUBLIC_DATA(xbt_dict_t) route_table;
627 XBT_PUBLIC_DATA(xbt_dict_t) route_multi_table;
628 XBT_PUBLIC_DATA(xbt_dynar_t) route_link_list;
629
630 /* For the trace and trace:connect tag (store their content till the end of the parsing) */
631 XBT_PUBLIC_DATA(xbt_dict_t) traces_set_list;
632 XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_host_avail;
633 XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_power;
634 XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_link_avail;
635 XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_bandwidth;
636 XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_latency;
637
638
639 double get_cpu_power(const char* power);
640 void init_randomness(void);
641 void add_randomness(void);
642
643 SG_END_DECL()
644
645 #endif                          /* _SURF_SURF_H */