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
Move assert befort assignment.
[simgrid.git]
/
src
/
surf
/
cpu_cas01.cpp
diff --git
a/src/surf/cpu_cas01.cpp
b/src/surf/cpu_cas01.cpp
index
52d7f2c
..
bacf715
100644
(file)
--- a/
src/surf/cpu_cas01.cpp
+++ b/
src/surf/cpu_cas01.cpp
@@
-43,10
+43,10
@@
CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel()
if (optim == "Full") {
setUpdateMechanism(UM_FULL);
} else if (optim == "Lazy") {
if (optim == "Full") {
setUpdateMechanism(UM_FULL);
} else if (optim == "Lazy") {
- setUpdateMechanism(UM_LAZY);
+ xbt_assert(select || xbt_cfg_is_default_value("cpu/maxmin-selective-update"),
+ "You cannot disable cpu selective update when using the lazy update mechanism");
select = true;
select = true;
- xbt_assert(select || (xbt_cfg_is_default_value("cpu/maxmin-selective-update")),
- "Disabling selective update while using the lazy update mechanism is dumb!");
+ setUpdateMechanism(UM_LAZY);
} else {
xbt_die("Unsupported optimization (%s) for this model", optim.c_str());
}
} else {
xbt_die("Unsupported optimization (%s) for this model", optim.c_str());
}