1 /* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "smx_private.hpp"
7 #include "src/include/surf/surf.hpp"
8 #include "xbt/xbt_os_time.h"
11 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix, "Logging specific to SIMIX (environment)");
13 /********************************* SIMIX **************************************/
16 * \brief A platform constructor.
18 * Creates a new platform, including hosts, links and the
20 * \param file a filename of a xml description of a platform. This file
23 * \include surfxml.dtd
25 * Here is a small example of such a platform
27 * \include small_platform.xml
30 void SIMIX_create_environment(const char *file)
34 if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
35 start = xbt_os_time();
37 parse_platform_file(file);
40 xbt_die("Error while loading %s: %s", file, e.what());
42 if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
44 XBT_DEBUG("PARSE TIME: %g", (end - start));
47 void SIMIX_post_create_environment()