1 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
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. */
8 #include "xbt/sysdep.h"
10 #include "xbt/xbt_os_time.h"
11 #include "xbt/config.h"
13 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix,
14 "Logging specific to SIMIX (environment)");
16 /********************************* SIMIX **************************************/
19 * \brief A platform constructor.
21 * Creates a new platform, including hosts, links and the
23 * \param file a filename of a xml description of a platform. This file
26 * \include surfxml.dtd
28 * Here is a small example of such a platform
30 * \include small_platform.xml
33 void SIMIX_create_environment(const char *file)
35 xbt_dict_cursor_t cursor = NULL;
37 void *workstation = NULL;
41 surf_config_models_setup(file);
42 parse_platform_file(file);
43 surf_config_models_create_elms();
44 start = xbt_os_time();
47 DEBUG1("PARSE TIME: %lg", (end - start));
49 xbt_dict_foreach(surf_model_resource_set(surf_workstation_model), cursor,
51 __SIMIX_host_create(name, workstation, NULL);