3 /* Copyright (c) 2007 Arnaud Legrand, Bruno Donnassolo.
4 All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
10 #include "xbt/sysdep.h"
12 #include "xbt/xbt_os_time.h"
13 #include "xbt/config.h"
15 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix,
16 "Logging specific to SIMIX (environment)");
18 /********************************* SIMIX **************************************/
21 * \brief A platform constructor.
23 * Creates a new platform, including hosts, links and the
25 * \param file a filename of a xml description of a platform. This file
28 * \include surfxml.dtd
30 * Here is a small example of such a platform
32 * \include small_platform.xml
35 void SIMIX_create_environment(const char *file)
37 xbt_dict_cursor_t cursor = NULL;
39 void *workstation = NULL;
43 surf_config_models_setup(file);
44 parse_platform_file(file);
45 surf_config_models_create_elms();
46 start = xbt_os_time();
49 DEBUG1("PARSE TIME: %lg", (end - start));
51 xbt_dict_foreach(surf_model_resource_set(surf_workstation_model), cursor,
53 __SIMIX_host_create(name, workstation, NULL);