namespace simgrid {
namespace surf {
-Host *HostCLM03Model::createHost(const char *name,RoutingEdge *netElm, Cpu *cpu, xbt_dict_t props){
- Host *host = new simgrid::surf::Host(surf_host_model, name, props,
- (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL),
- netElm, cpu);
- XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->p_storage));
- return host;
-}
-
double HostCLM03Model::shareResources(double now){
adjustWeightOfDummyCpuActions();
public:
HostCLM03Model(): HostModel(){}
~HostCLM03Model() {}
- Host *createHost(const char *name, RoutingEdge *netElm, Cpu *cpu, xbt_dict_t props) override;
double shareResources(double now) override;
void updateActionsState(double now, double delta) override;
/*********
* Model *
*********/
+Host *HostModel::createHost(const char *name,RoutingEdge *netElm, Cpu *cpu, xbt_dict_t props){
+ Host *host = new simgrid::surf::Host(surf_host_model, name, props,
+ (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL),
+ netElm, cpu);
+ XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->p_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
HostModel() : Model() {}
~HostModel() {}
- virtual Host *createHost(const char *name, RoutingEdge *net, Cpu *cpu, xbt_dict_t props)=0;
+ Host *createHost(const char *name, RoutingEdge *net, Cpu *cpu, xbt_dict_t props);
void addTraces() override {DIE_IMPOSSIBLE;}
virtual void adjustWeightOfDummyCpuActions();
return action;
}
-Host *HostL07Model::createHost(const char *name,RoutingEdge *netElm, Cpu *cpu, xbt_dict_t props)
-{
- return new simgrid::surf::Host(this, name, props,
- (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL),
- netElm, cpu);
-}
-
Action *NetworkL07Model::communicate(RoutingEdge *src, RoutingEdge *dst,
double size, double rate)
{
double shareResources(double now) override;
void updateActionsState(double now, double delta);
- Host *createHost(const char *name,RoutingEdge *netElm, Cpu *cpu, xbt_dict_t props) override;
Action *executeParallelTask(int host_nb,
sg_host_t *host_list,
double *flops_amount,
VMModel() :HostModel(){}
~VMModel(){};
- Host *createHost(const char *name, RoutingEdge *netElm, Cpu *cpu,xbt_dict_t props) override {DIE_IMPOSSIBLE;}
-
/**
* @brief Create a new VM
*