Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sanitize the network_model->communicate() API
[simgrid.git] / src / surf / HostImpl.cpp
index cb08a98..3176374 100644 (file)
@@ -80,9 +80,7 @@ Action *HostModel::executeParallelTask(int host_nb,
     action = host_list[0]->pimpl_cpu->execution_start(flops_amount[0]);
   } else if ((host_nb == 1)
            && (cost_or_zero(flops_amount, 0) == 0.0)) {
-    action = surf_network_model->communicate(host_list[0]->pimpl_netcard,
-                                         host_list[0]->pimpl_netcard,
-                       bytes_amount[0], rate);
+    action = surf_network_model->communicate(host_list[0], host_list[0], bytes_amount[0], rate);
   } else if ((host_nb == 2)
              && (cost_or_zero(flops_amount, 0) == 0.0)
              && (cost_or_zero(flops_amount, 1) == 0.0)) {
@@ -96,7 +94,7 @@ Action *HostModel::executeParallelTask(int host_nb,
       }
     }
     if (nb == 1) {
-      action = surf_network_model->communicate(host_list[0]->pimpl_netcard, host_list[1]->pimpl_netcard, value, rate);
+      action = surf_network_model->communicate(host_list[0], host_list[1], value, rate);
     } else if (nb == 0) {
        xbt_die("Cannot have a communication with no flop to exchange in this model. You should consider using the ptask model");
     } else {