Salome HOME
EDF11239. Debug of problem concerning container assignment on cloning inside foreach...
[modules/yacs.git] / src / engine / DeploymentTree.cxx
index bb5ec34a21df095af33edd05707562317102fe95..9dc1510dfd72e1fc6c9371b0fd46dd00f5ee8626 100644 (file)
@@ -109,9 +109,6 @@ unsigned char DeploymentTreeOnHeap::appendTask(Task *task, Scheduler *cloner)
     if((*iter3).first==task)
       return DeploymentTree::ALREADY_IN_TREE;
 
-  // if the task is not in the vector add it under condition
-  if(!isConsistentTaskRegardingShCompInst(*iter2,cloner))
-    return DeploymentTree::DUP_TASK_NOT_COMPATIBLE_WITH_EXISTING_TREE;
   DEBTRACE("add task to vector of tasks " << task);
   (*iter2).push_back(pair<Task *,Scheduler *>(task,cloner));
   return DeploymentTree::APPEND_OK;
@@ -399,23 +396,6 @@ std::vector<Task *> DeploymentTreeOnHeap::getFreeDeployableTasks() const
   return ret;
 }
 
-bool DeploymentTreeOnHeap::isConsistentTaskRegardingShCompInst(std::vector< std::pair<Task *, Scheduler * > >& tasksSharingSameCompInst, Scheduler *cloner)
-{
-  vector< std::pair<Task *, Scheduler * > >::const_iterator iter;
-  bool coexistenceOfDifferentSched=false;
-  for(iter=tasksSharingSameCompInst.begin();iter!=tasksSharingSameCompInst.end() && !coexistenceOfDifferentSched;iter++)
-    {
-      coexistenceOfDifferentSched=(((*iter).second)!=cloner);
-    }
-  if(!coexistenceOfDifferentSched)
-    return true;
-  //In this case the component is duplicated on cloning raising on runtime on different policy (schedulers) than other tasks in tasksSharingSameCompInst
-  if((tasksSharingSameCompInst[0].first)->getComponent())
-    return (tasksSharingSameCompInst[0].first)->getComponent()->isAttachedOnCloning();
-  else
-    return (tasksSharingSameCompInst[0].first)->getContainer()->isAttachedOnCloning();
-}
-
 DeploymentTree::DeploymentTree():_treeHandle(0)
 {
 }