1 /* Copyright (c) 2002-2007 Arnaud Legrand. */
2 /* Copyright (c) 2007 Bruno Donassolo. */
3 /* All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #include "msg/private.h"
9 #include "xbt/sysdep.h"
13 /** \defgroup msg_easier_life Platform and Application management
14 * \brief This section describes functions to manage the platform creation
15 * and the application deployment. You should also have a look at
16 * \ref MSG_examples to have an overview of their usage.
18 /** @addtogroup msg_easier_life
19 * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Platforms and Applications" --> \endhtmlonly
23 /********************************* MSG **************************************/
25 /** \ingroup msg_easier_life
26 * \brief A name directory service...
28 * Finds a m_host_t using its name.
29 * \param name the name of an host.
30 * \return the corresponding host
32 m_host_t MSG_get_host_by_name(const char *name)
34 smx_host_t simix_h = NULL;
35 simix_h = SIMIX_host_get_by_name(name);
40 return (m_host_t)SIMIX_host_get_data(simix_h);
43 /** \ingroup msg_easier_life
44 * \brief A platform constructor.
46 * Creates a new platform, including hosts, links and the
48 * \param file a filename of a xml description of a platform. This file
51 * \include simgrid.dtd
53 * Here is a small example of such a platform
55 * \include small_platform.xml
57 * Have a look in the directory examples/msg/ to have a big example.
59 void MSG_create_environment(const char *file)
65 SIMIX_create_environment(file);
68 /* Initialize MSG hosts */
69 xbt_dict_foreach(SIMIX_host_get_dict(), c, name, h) {
70 __MSG_host_create(h, NULL);