A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fat trees progress
[simgrid.git]
/
src
/
surf
/
workstation_ptask_L07.hpp
diff --git
a/src/surf/workstation_ptask_L07.hpp
b/src/surf/workstation_ptask_L07.hpp
index
fcff2f3
..
aea13ee
100644
(file)
--- a/
src/surf/workstation_ptask_L07.hpp
+++ b/
src/surf/workstation_ptask_L07.hpp
@@
-1,4
+1,10
@@
-#include "workstation.hpp"
+/* Copyright (c) 2013-2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include "workstation_interface.hpp"
#ifndef WORKSTATION_L07_HPP_
#define WORKSTATION_L07_HPP_
#ifndef WORKSTATION_L07_HPP_
#define WORKSTATION_L07_HPP_
@@
-25,11
+31,8
@@
typedef CpuL07 *CpuL07Ptr;
class LinkL07;
typedef LinkL07 *LinkL07Ptr;
class LinkL07;
typedef LinkL07 *LinkL07Ptr;
-class WorkstationL07ActionLmm;
-typedef WorkstationL07ActionLmm *WorkstationL07ActionLmmPtr;
-
-/*FIXME:class WorkstationActionLmm;
-typedef WorkstationActionLmm *WorkstationActionLmmPtr;*/
+class WorkstationL07Action;
+typedef WorkstationL07Action *WorkstationL07ActionPtr;
/*********
* Tools *
/*********
* Tools *
@@
-56,10
+59,10
@@
public:
double *computation_amount,
double *communication_amount,
double rate);
double *computation_amount,
double *communication_amount,
double rate);
- xbt_dynar_t getRoute(Workstation
CLM03Ptr src, WorkstationCLM03
Ptr dst);
- ActionPtr communicate(Workstation
CLM03Ptr src, WorkstationCLM03
Ptr dst, double size, double rate);
+ xbt_dynar_t getRoute(Workstation
Ptr src, Workstation
Ptr dst);
+ ActionPtr communicate(Workstation
Ptr src, Workstation
Ptr dst, double size, double rate);
void addTraces();
void addTraces();
- Network
L07
ModelPtr p_networkModel;
+ NetworkModelPtr p_networkModel;
};
class CpuL07Model : public CpuModel {
};
class CpuL07Model : public CpuModel {
@@
-72,16
+75,22
@@
public:
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties);
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties);
+ CpuPtr createResource(const char *name, xbt_dynar_t powerPeak,
+ int pstate, double power_scale,
+ tmgr_trace_t power_trace, int core,
+ e_surf_resource_state_t state_initial,
+ tmgr_trace_t state_trace,
+ xbt_dict_t cpu_properties);
void addTraces() {DIE_IMPOSSIBLE;};
WorkstationL07ModelPtr p_workstationModel;
};
void addTraces() {DIE_IMPOSSIBLE;};
WorkstationL07ModelPtr p_workstationModel;
};
-class NetworkL07Model : public Network
Cm02
Model {
+class NetworkL07Model : public NetworkModel {
public:
public:
- NetworkL07Model() : Network
Cm02Model(0
) {};
+ NetworkL07Model() : Network
Model(
) {};
~NetworkL07Model() {surf_network_model = NULL;};
~NetworkL07Model() {surf_network_model = NULL;};
-
Resource
Ptr createResource(const char *name,
+
NetworkLink
Ptr createResource(const char *name,
double bw_initial,
tmgr_trace_t bw_trace,
double lat_initial,
double bw_initial,
tmgr_trace_t bw_trace,
double lat_initial,
@@
-92,8
+101,7
@@
public:
e_surf_link_sharing_policy_t
policy, xbt_dict_t properties);
e_surf_link_sharing_policy_t
policy, xbt_dict_t properties);
- xbt_dynar_t getRoute(WorkstationCLM03Ptr src, WorkstationCLM03Ptr dst) {DIE_IMPOSSIBLE;};
- ActionPtr communicate(RoutingEdgePtr src, RoutingEdgePtr dst, double size, double rate) {DIE_IMPOSSIBLE;};
+ ActionPtr communicate(RoutingEdgePtr /*src*/, RoutingEdgePtr /*dst*/, double /*size*/, double /*rate*/) {DIE_IMPOSSIBLE;};
void addTraces() {DIE_IMPOSSIBLE;};
WorkstationL07ModelPtr p_workstationModel;
};
void addTraces() {DIE_IMPOSSIBLE;};
WorkstationL07ModelPtr p_workstationModel;
};
@@
-102,12
+110,12
@@
public:
* Resource *
************/
* Resource *
************/
-class WorkstationL07 : public Workstation
CLM03Lmm
{
+class WorkstationL07 : public Workstation {
public:
WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu);
//bool isUsed();
bool isUsed() {DIE_IMPOSSIBLE;};
public:
WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu);
//bool isUsed();
bool isUsed() {DIE_IMPOSSIBLE;};
- void updateState(tmgr_trace_event_t
event_type, double value, double date
) {DIE_IMPOSSIBLE;};
+ void updateState(tmgr_trace_event_t
/*event_type*/, double /*value*/, double /*date*/
) {DIE_IMPOSSIBLE;};
ActionPtr execute(double size);
ActionPtr sleep(double duration);
e_surf_resource_state_t getState();
ActionPtr execute(double size);
ActionPtr sleep(double duration);
e_surf_resource_state_t getState();
@@
-117,35
+125,48
@@
public:
double getConsumedEnergy();
};
double getConsumedEnergy();
};
-class CpuL07 : public CpuLmm {
+class CpuL07 : public Cpu {
+ friend void WorkstationL07Model::addTraces();
+ tmgr_trace_event_t p_stateEvent;
+ tmgr_trace_event_t p_powerEvent;
public:
public:
- CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t properties);
+ CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t properties,
+ double power_scale,
+ double power_initial, tmgr_trace_t power_trace,
+ e_surf_resource_state_t state_initial, tmgr_trace_t state_trace);
bool isUsed();
//bool isUsed() {DIE_IMPOSSIBLE;};
void updateState(tmgr_trace_event_t event_type, double value, double date);
bool isUsed();
//bool isUsed() {DIE_IMPOSSIBLE;};
void updateState(tmgr_trace_event_t event_type, double value, double date);
- e_surf_resource_state_t getState();
- double getSpeed(double load);
- double getAvailableSpeed();
- ActionPtr execute(double size) {DIE_IMPOSSIBLE;};
- ActionPtr sleep(double duration) {DIE_IMPOSSIBLE;};
+ CpuActionPtr execute(double /*size*/) {DIE_IMPOSSIBLE;};
+ CpuActionPtr sleep(double /*duration*/) {DIE_IMPOSSIBLE;};
double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
- double getPowerPeakAt(int
pstate_index
) {THROW_UNIMPLEMENTED;};
+ double getPowerPeakAt(int
/*pstate_index*/
) {THROW_UNIMPLEMENTED;};
int getNbPstates() {THROW_UNIMPLEMENTED;};
int getNbPstates() {THROW_UNIMPLEMENTED;};
- void setPowerPeakAt(int
pstate_index
) {THROW_UNIMPLEMENTED;};
+ void setPowerPeakAt(int
/*pstate_index*/
) {THROW_UNIMPLEMENTED;};
double getConsumedEnergy() {THROW_UNIMPLEMENTED;};
double getConsumedEnergy() {THROW_UNIMPLEMENTED;};
-
- double m_powerCurrent;
};
};
-class LinkL07 : public Network
Cm02LinkLmm
{
+class LinkL07 : public Network
Link
{
public:
public:
- LinkL07(NetworkL07ModelPtr model, const char* name, xbt_dict_t props);
+ LinkL07(NetworkL07ModelPtr model, const char* name, xbt_dict_t props,
+ double bw_initial,
+ tmgr_trace_t bw_trace,
+ double lat_initial,
+ tmgr_trace_t lat_trace,
+ e_surf_resource_state_t
+ state_initial,
+ tmgr_trace_t state_trace,
+ e_surf_link_sharing_policy_t policy);
+ ~LinkL07(){
+ };
bool isUsed();
void updateState(tmgr_trace_event_t event_type, double value, double date);
double getBandwidth();
double getLatency();
bool isShared();
bool isUsed();
void updateState(tmgr_trace_event_t event_type, double value, double date);
double getBandwidth();
double getLatency();
bool isShared();
+ void updateBandwidth(double value, double date=surf_get_clock());
+ void updateLatency(double value, double date=surf_get_clock());
double m_latCurrent;
tmgr_trace_event_t p_latEvent;
double m_latCurrent;
tmgr_trace_event_t p_latEvent;
@@
-156,11
+177,19
@@
public:
/**********
* Action *
**********/
/**********
* Action *
**********/
-class WorkstationL07ActionLmm : public WorkstationActionLmm {
+class WorkstationL07Action : public WorkstationAction {
+ friend ActionPtr WorkstationL07::execute(double size);
+ friend ActionPtr WorkstationL07::sleep(double duration);
+ friend ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
+ void **workstation_list,
+ double
+ *computation_amount, double
+ *communication_amount,
+ double rate);
public:
public:
- WorkstationL07Action
Lmm
(ModelPtr model, double cost, bool failed)
- :
Action(model, cost, failed), WorkstationActionLmm
(model, cost, failed) {};
- ~WorkstationL07Action
Lmm
();
+ WorkstationL07Action(ModelPtr model, double cost, bool failed)
+ :
WorkstationAction
(model, cost, failed) {};
+ ~WorkstationL07Action();
void updateBound();
void updateBound();
@@
-174,7
+203,7
@@
public:
double getRemains();
int m_workstationNb;
double getRemains();
int m_workstationNb;
- Workstation
CLM03
Ptr *p_workstationList;
+ WorkstationPtr *p_workstationList;
double *p_computationAmount;
double *p_communicationAmount;
double m_latency;
double *p_computationAmount;
double *p_communicationAmount;
double m_latency;