3 #include "xbt/sysdep.h"
6 /** \defgroup msg_easier_life Platform and Application management
7 * \brief This section describes functions to manage the platform creation
8 * and the application deployment. You should also have a look at
9 * \ref MSG_examples to have an overview of their usage.
10 * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Platforms and Applications" --> \endhtmlonly
14 /********************************* MSG **************************************/
16 /** \ingroup msg_easier_life
17 * \brief A name directory service...
19 * Finds a m_host_t using its name.
20 * \param name the name of an host.
21 * \return the corresponding host
23 m_host_t MSG_get_host_by_name(const char *name)
25 smx_host_t simix_h = NULL;
27 simix_h = SIMIX_host_get_by_name(name);
28 if (simix_h == NULL) {
31 else return (m_host_t)simix_h->data;
34 /** \ingroup msg_easier_life
35 * \brief A platform constructor.
37 * Creates a new platform, including hosts, links and the
39 * \param file a filename of a xml description of a platform. This file
42 * \include surfxml.dtd
44 * Here is a small example of such a platform
46 * \include small_platform.xml
48 * Have a look in the directory examples/msg/ to have a big example.
50 void MSG_create_environment(const char *file)
52 smx_host_t *workstation = NULL;
55 SIMIX_create_environment(file);
57 /* Initialize MSG hosts */
58 workstation = SIMIX_host_get_table();
59 for (i=0; i< SIMIX_host_get_number();i++) {
60 __MSG_host_create(workstation[i], NULL);