Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Fix bad cast, CpuL07::getModel() is a CpuL07Model* not a HostL07Model*
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 15 Dec 2015 13:04:25 +0000 (14:04 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 15 Dec 2015 13:07:08 +0000 (14:07 +0100)
Close https://github.com/mquinson/simgrid/issues/41

src/surf/host_ptask_L07.cpp

index 45148d9..20b4d50 100644 (file)
@@ -465,9 +465,9 @@ Action *CpuL07::execute(double size)
   host_list[0] = sg_host_by_name(getName());
   flops_amount[0] = size;
 
-  return static_cast<HostL07Model*>(getModel())->executeParallelTask(1, host_list,
-                                             flops_amount,
-                                     bytes_amount, -1);
+  return static_cast<CpuL07Model*>(getModel())
+    ->p_hostModel
+    ->executeParallelTask( 1, host_list, flops_amount, bytes_amount, -1);
 }
 
 Action *CpuL07::sleep(double duration)