Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
3846bbc5969967e69a54ad64dd3f6653d1aba9bd
[simgrid.git] / src / msg / msg_config.c
1 /*     $Id$      */
2   
3 /* Copyright (c) 2002-2007 Arnaud Legrand.                                  */
4 /* Copyright (c) 2007 Bruno Donassolo.                                      */
5 /* All rights reserved.                                                     */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9   
10 #include "msg/private.h"
11 #include "xbt/sysdep.h"
12 #include "xbt/log.h"
13 #include "simix/simix.h"
14
15 /** \brief set a configuration variable
16  * 
17  * Currently existing configuation variable:
18  *   - workstation_model (string): Model of workstation to use.  
19  *     Possible values (defaults to "KCCFLN05"):
20  *     - "CLM03": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + support for parallel tasks
21  *     - "KCCFLN05": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + failure handling + interference between communications and computations if precised in the platform file.
22  *     - "KCCFLN05": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + failure handling + interference between communications and computations if precised in the platform file. Use maxmin for the network.
23  *     - "KCCFLN05_proportional": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + failure handling + interference between communications and computations if precised in the platform file. Uses the proportional approahc as described in the Corine Touati's PhD Thesis.
24  *     - "KCCFLN05_Vegas": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + failure handling + interference between communications and computations if precised in the platform file. Uses the fairness adapted to the TCP Vegas flow control.
25  *     - "KCCFLN05_Reno": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + failure handling + interference between communications and computations if precised in the platform file. Uses the fairness adapted to the TCP Reno flow control.
26  * 
27  * Example:
28  * MSG_config("workstation_model","KCCFLN05");
29  */
30 void MSG_config(const char *name, ...) {
31   
32   if (!msg_global) {
33      fprintf(stderr, "ERROR: Please call MSG_init() before using MSG_config()\n");
34      abort();
35   }
36    
37    
38   va_list pa;
39   /*  xbt_cfg_dump("msg_cfg_set","",_msg_cfg_set);*/
40   va_start(pa,name);
41   
42   SIMIX_config(name,pa);
43   
44   va_end(pa);
45         return;
46 }