Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve MSG doc a bit
[simgrid.git] / src / msg / msg_config.c
1 /* Copyright (c) 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "msg_private.h"
8 #include "xbt/sysdep.h"
9 #include "xbt/log.h"
10 #include "simix/simix.h"
11
12 /** \brief set a configuration variable
13  *
14  * Currently existing configuation variable:
15  *   - workstation/model (string): Model of workstation to use.
16  *     Possible values (defaults to "KCCFLN05"):
17  *     - "CLM03": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + support for parallel tasks
18  *     - "KCCFLN05": realistic TCP behavior + basic CPU model (see [CML03 at CCGrid03]) + failure handling + interference between communications and computations if precised in the platform file.
19  *     - "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.
20  *     - "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.
21  *     - "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.
22  *     - "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.
23  *
24  * Example:
25  * MSG_config("workstation/model","KCCFLN05");
26  */
27 void MSG_config(const char *name, ...)
28 {
29   va_list pa;
30
31   if (!msg_global) {
32     fprintf(stderr,
33             "ERROR: Please call MSG_init() before using MSG_config()\n");
34     abort();
35   }
36   va_start(pa, name);
37   xbt_cfg_set_vargs(_surf_cfg_set, name, pa);
38   va_end(pa);
39   return;
40 }