/*********
* Model *
*********/
-HostImpl* HostModel::createHost(const char* name, Cpu* cpu, kernel::routing::NetCard* netcard, xbt_dynar_t storageList)
-{
- HostImpl *host = new simgrid::surf::HostImpl(surf_host_model, name, storageList, cpu);
- xbt_lib_set(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL, (void*)storageList);
-
- XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->storage_));
- return host;
-}
/* Each VM has a dummy CPU action on the PM layer. This CPU action works as the
* constraint (capacity) of the VM in the PM layer. If the VM does not have any
public:
HostModel() : Model() {}
- HostImpl* createHost(const char* name, Cpu* cpu, kernel::routing::NetCard* net, xbt_dynar_t storageList);
-
virtual void adjustWeightOfDummyCpuActions();
virtual Action *executeParallelTask(int host_nb, sg_host_t *host_list,
double *flops_amount, double *bytes_amount, double rate);
#include "src/include/simgrid/sg_config.h"
#include "src/surf/xml/platf_private.hpp"
+#include "src/surf/HostImpl.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
#include "surf/surf_routing.h" // FIXME: brain dead public header
if (host->speed_trace)
cpu->setSpeedTrace(host->speed_trace);
- surf_host_model->createHost(host->id, cpu, netcard, mount_list)->attach(h);
+ simgrid::surf::HostImpl* hi = new simgrid::surf::HostImpl(surf_host_model, host->id, mount_list, cpu);
+ hi->attach(h);
+ xbt_lib_set(storage_lib, host->id, ROUTING_STORAGE_HOST_LEVEL, (void*)mount_list);
+
mount_list = nullptr;
if (host->properties) {