/* 0. Make sure that we already calculated the resource share at the physical
* machine layer. */
{
- ModelPtr ws_model = surf_workstation_model;
- ModelPtr vm_ws_model = surf_vm_workstation_model;
- unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model);
- unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model);
+ _XBT_GNUC_UNUSED ModelPtr ws_model = surf_workstation_model;
+ _XBT_GNUC_UNUSED ModelPtr vm_ws_model = surf_vm_workstation_model;
+ _XBT_GNUC_UNUSED unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model);
+ _XBT_GNUC_UNUSED unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model);
xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_workstation_model comes before");
/* Another option is that we call sub_ws->share_resource() here. The
ActionPtr WorkstationVMHL13Model::executeParallelTask(int workstation_nb,
void **workstation_list,
- double *computation_amount,
- double *communication_amount,
+ double *flops_amount,
+ double *bytes_amount,
double rate){
#define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
if ((workstation_nb == 1)
- && (cost_or_zero(communication_amount, 0) == 0.0))
- return ((WorkstationCLM03Ptr)workstation_list[0])->execute(computation_amount[0]);
+ && (cost_or_zero(bytes_amount, 0) == 0.0))
+ return ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
else if ((workstation_nb == 1)
- && (cost_or_zero(computation_amount, 0) == 0.0))
- return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[0],communication_amount[0], rate);
+ && (cost_or_zero(flops_amount, 0) == 0.0))
+ return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
else if ((workstation_nb == 2)
- && (cost_or_zero(computation_amount, 0) == 0.0)
- && (cost_or_zero(computation_amount, 1) == 0.0)) {
+ && (cost_or_zero(flops_amount, 0) == 0.0)
+ && (cost_or_zero(flops_amount, 1) == 0.0)) {
int i,nb = 0;
double value = 0.0;
for (i = 0; i < workstation_nb * workstation_nb; i++) {
- if (cost_or_zero(communication_amount, i) > 0.0) {
+ if (cost_or_zero(bytes_amount, i) > 0.0) {
nb++;
- value = cost_or_zero(communication_amount, i);
+ value = cost_or_zero(bytes_amount, i);
}
}
if (nb == 1)
WorkstationVMHL13::~WorkstationVMHL13()
{
/* Free the cpu_action of the VM. */
- int ret = p_action->unref();
+ _XBT_GNUC_UNUSED int ret = p_action->unref();
xbt_assert(ret == 1, "Bug: some resource still remains");
}
new_cpu_action->setBound(old_bound);
}
- int ret = p_action->unref();
+ _XBT_GNUC_UNUSED int ret = p_action->unref();
xbt_assert(ret == 1, "Bug: some resource still remains");
p_action = new_cpu_action;