Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill function declarations without definitions.
[simgrid.git] / src / simix / smx_environment.cpp
1 /* Copyright (c) 2007-2017. 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 "smx_private.hpp"
8 #include "xbt/config.h"
9 #include "xbt/log.h"
10 #include "xbt/sysdep.h"
11 #include "xbt/xbt_os_time.h"
12 #include <xbt/ex.hpp>
13
14 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix, "Logging specific to SIMIX (environment)");
15
16 /********************************* SIMIX **************************************/
17
18 /**
19  * \brief A platform constructor.
20  *
21  * Creates a new platform, including hosts, links and the
22  * routing_table.
23  * \param file a filename of a xml description of a platform. This file
24  * follows this DTD :
25  *
26  *     \include surfxml.dtd
27  *
28  * Here is a small example of such a platform
29  *
30  *     \include small_platform.xml
31  *
32  */
33 void SIMIX_create_environment(const char *file)
34 {
35   double start = 0;
36   double end = 0;
37   if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
38     start = xbt_os_time();
39   try {
40     parse_platform_file(file);
41   }
42   catch (xbt_ex& e) {
43     xbt_die("Error while loading %s: %s", file, e.what());
44   }
45   if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
46     end = xbt_os_time();
47   XBT_DEBUG("PARSE TIME: %g", (end - start));
48 }
49
50 void SIMIX_post_create_environment()
51 {
52   surf_presolve();
53 }