Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid into...
authorJonathan Rouzaud-Cornabas <jonathan.rouzaud-cornabas@ens-lyon.fr>
Tue, 2 Oct 2012 13:08:17 +0000 (15:08 +0200)
committerJonathan Rouzaud-Cornabas <jonathan.rouzaud-cornabas@ens-lyon.fr>
Tue, 2 Oct 2012 13:08:17 +0000 (15:08 +0200)
1  2 
examples/msg/cloud/masterslave_virtual_machines.c
include/msg/msg.h

@@@ -63,11 -63,7 +63,11 @@@ int master(int argc, char *argv[]) 
      argv[0] = xbt_strdup(slavename);
      argv[1] = bprintf("%d",i);
      argv[2] = NULL;
 -    msg_vm_t vm = MSG_vm_start(slaves[i],2);
 +
 +    char vmName[64];
 +    snprintf(vmName, 64, "vm_%d", i);
 +
 +    msg_vm_t vm = MSG_vm_start(slaves[i],vmName,2);
      MSG_vm_bind(vm, MSG_process_create_with_arguments(slavename,slave_fun,NULL,slaves[i],2,argv));
    }
  
@@@ -216,7 -212,6 +216,6 @@@ int main(int argc, char *argv[]
    res = MSG_main();
    XBT_INFO("Simulation time %g", MSG_get_clock());
  
-   MSG_clean();
    free(hosts);
    free(hostnames);
    xbt_dynar_free(&hosts_dynar);
diff --combined include/msg/msg.h
@@@ -56,7 -56,6 +56,6 @@@ XBT_PUBLIC(void) MSG_config(const char 
  
  XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv);
  XBT_PUBLIC(msg_error_t) MSG_main(void);
- XBT_PUBLIC(msg_error_t) MSG_clean(void);
  XBT_PUBLIC(void) MSG_function_register(const char *name,
                                         xbt_main_func_t code);
  XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code);
@@@ -294,6 -293,8 +293,8 @@@ XBT_PUBLIC(msg_host_t *) MSG_get_host_t
  #define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h);
  XBT_PUBLIC(msg_error_t) MSG_get_errno(void);
  
+ XBT_PUBLIC(msg_error_t) MSG_clean(void);
  XBT_PUBLIC(msg_error_t) MSG_task_get(msg_task_t * task, m_channel_t channel);
  XBT_PUBLIC(msg_error_t) MSG_task_get_with_timeout(msg_task_t * task,
                                                    m_channel_t channel,
@@@ -321,6 -322,8 +322,6 @@@ XBT_PUBLIC(msg_error_t) MSG_set_channel
  XBT_PUBLIC(int) MSG_get_channel_number(void);
  #endif
  
 -#include "instr/instr.h"
 -
  /** @brief Opaque type describing a Virtual Machine.
   *  @ingroup msg_VMs
   *
   * Usual lack of guaranty of any kind applies here, and is even increased.
   *
   */
 -typedef struct msg_vm *msg_vm_t;
  /* This function should not be called directly, but rather from MSG_vm_start_from_template that does not exist yet*/
 -XBT_PUBLIC(msg_vm_t) MSG_vm_start(msg_host_t location, int coreAmount);
 +XBT_PUBLIC(msg_vm_t) MSG_vm_start(msg_host_t location, const char *name, int coreAmount);
  
  XBT_PUBLIC(int) MSG_vm_is_suspended(msg_vm_t);
  XBT_PUBLIC(int) MSG_vm_is_running(msg_vm_t);
@@@ -373,8 -377,6 +374,8 @@@ xbt_dynar_t<msg_vm_t> MSG_vm_get_list_f
  xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_hosts(msg_dynar_t<msg_host_t>)
  + des fonctions de filtrage sur les dynar
  */
 +#include "instr/instr.h"
 +
  
  
  /* ****************************************************************************************** */