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
Make a list of WorkstationVM, instead of iterating over all hosts to list them.
[simgrid.git]
/
src
/
surf
/
surf_interface.cpp
diff --git
a/src/surf/surf_interface.cpp
b/src/surf/surf_interface.cpp
index
1860479
..
2654254
100644
(file)
--- a/
src/surf/surf_interface.cpp
+++ b/
src/surf/surf_interface.cpp
@@
-90,6
+90,8
@@
xbt_dynar_t surf_path = NULL;
xbt_dynar_t host_that_restart = NULL;
xbt_dict_t watched_hosts_lib;
xbt_dynar_t host_that_restart = NULL;
xbt_dict_t watched_hosts_lib;
+surf_callback(void, void) surfExitCallbacks;
+
s_surf_model_description_t surf_plugin_description[] = {
{"Energy",
"Cpu energy consumption.",
s_surf_model_description_t surf_plugin_description[] = {
{"Energy",
"Cpu energy consumption.",
@@
-154,7
+156,7
@@
s_surf_model_description_t surf_workstation_model_description[] = {
s_surf_model_description_t surf_vm_workstation_model_description[] = {
{"default",
s_surf_model_description_t surf_vm_workstation_model_description[] = {
{"default",
- "Default vm workstation model.
)
",
+ "Default vm workstation model.",
surf_vm_workstation_model_init_current_default},
{NULL, NULL, NULL} /* this array must be NULL terminated */
};
surf_vm_workstation_model_init_current_default},
{NULL, NULL, NULL} /* this array must be NULL terminated */
};
@@
-443,6
+445,8
@@
void surf_exit(void)
xbt_dynar_free(&model_list_invoke);
routing_exit();
xbt_dynar_free(&model_list_invoke);
routing_exit();
+ surf_callback_emit(surfExitCallbacks);
+
if (maxmin_system) {
lmm_system_free(maxmin_system);
maxmin_system = NULL;
if (maxmin_system) {
lmm_system_free(maxmin_system);
maxmin_system = NULL;
@@
-537,7
+541,7
@@
double Model::shareResourcesLazy(double now)
value = lmm_variable_getvalue(action->getVariable());
if (value > 0) {
if (action->getRemains() > 0) {
value = lmm_variable_getvalue(action->getVariable());
if (value > 0) {
if (action->getRemains() > 0) {
- value = action->getRemains() / value;
+ value = action->getRemains
NoUpdate
() / value;
min = now + value;
} else {
value = 0.0;
min = now + value;
} else {
value = 0.0;
@@
-604,7
+608,7
@@
double Model::shareResourcesMaxMin(ActionListPtr running_actions,
if (value > 0) {
if (action->getRemains() > 0)
if (value > 0) {
if (action->getRemains() > 0)
- min = action->getRemains() / value;
+ min = action->getRemains
NoUpdate
() / value;
else
min = 0.0;
if ((action->getMaxDuration() >= 0) && (action->getMaxDuration() < min))
else
min = 0.0;
if ((action->getMaxDuration() >= 0) && (action->getMaxDuration() < min))
@@
-618,7
+622,7
@@
double Model::shareResourcesMaxMin(ActionListPtr running_actions,
value = lmm_variable_getvalue(action->getVariable());
if (value > 0) {
if (action->getRemains() > 0)
value = lmm_variable_getvalue(action->getVariable());
if (value > 0) {
if (action->getRemains() > 0)
- value = action->getRemains() / value;
+ value = action->getRemains
NoUpdate
() / value;
else
value = 0.0;
if (value < min) {
else
value = 0.0;
if (value < min) {