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
simplify a bit the CPU creation API
[simgrid.git]
/
src
/
surf
/
sg_platf.cpp
diff --git
a/src/surf/sg_platf.cpp
b/src/surf/sg_platf.cpp
index
a3ae7d8
..
1b6341f
100644
(file)
--- a/
src/surf/sg_platf.cpp
+++ b/
src/surf/sg_platf.cpp
@@
-101,11
+101,16
@@
void sg_platf_new_host(sg_platf_host_cbarg_t host)
simgrid::surf::Cpu *cpu = surf_cpu_model_pm->createCpu( h,
host->speed_peak,
simgrid::surf::Cpu *cpu = surf_cpu_model_pm->createCpu( h,
host->speed_peak,
- host->pstate,
host->speed_scale, host->speed_trace,
host->core_amount,
host->speed_scale, host->speed_trace,
host->core_amount,
- host->
initiallyOn, host->
state_trace);
+ host->state_trace);
surf_host_model->createHost(host->id, netcard, cpu, host->properties)->attach(h);
surf_host_model->createHost(host->id, netcard, cpu, host->properties)->attach(h);
+
+ if (host->pstate != 0)
+ cpu->setPState(host->pstate);
+ if (! host->initiallyOn)
+ cpu->turnOff();
+
simgrid::s4u::Host::onCreation(*h);
if (TRACE_is_enabled() && TRACE_needs_platform())
simgrid::s4u::Host::onCreation(*h);
if (TRACE_is_enabled() && TRACE_needs_platform())