Exemple #1
0
/**
 * @brief Internal function to create a SIMIX host.
 * @param name name of the host to create
 * @param data some user data (may be nullptr)
 */
sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host)
{
  /* Create surf associated resource */
  surf_vm_model_create(name, ind_phys_host);
  sg_host_t host = sg_host_by_name(name);
  SIMIX_host_create(host);

  /* We will be able to register the VM to its physical host, so that we can promptly
   * retrieve the list VMs on the physical host. */

  return host;
}
Exemple #2
0
void SIMIX_post_create_environment(void) {

  void **workstation = NULL;
  xbt_lib_cursor_t cursor = NULL;
  char *name = NULL;

  xbt_lib_foreach(host_lib, cursor, name, workstation) {
    if(workstation[SURF_WKS_LEVEL])
      SIMIX_host_create(name, workstation[SURF_WKS_LEVEL], NULL);
  }
  surf_presolve();
}