1 // Copyright (C) 2012-2015 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (EDF R&D)
21 #include "YACSEvalResource.hxx"
23 #include "DeploymentTree.hxx"
24 #include "Container.hxx"
25 #include "Exception.hxx"
27 #include "SalomeContainer.hxx"
28 #include "SalomeHPContainer.hxx"
29 #include "ComponentInstance.hxx"
31 #include "ResourcesManager.hxx"
39 const char YACSEvalVirtualYACSContainer::CONTAINER_NAME_KEY[]="container_name";
41 const char YACSEvalVirtualYACSContainer::CPU_CLOCK_KEY[]="cpu_clock";
43 const char YACSEvalVirtualYACSContainer::HOSTNAME_KEY[]="hostname";
45 const char YACSEvalVirtualYACSContainer::MEM_KEY[]="mem_mb";
47 const char YACSEvalVirtualYACSContainer::NB_NODE_KEY[]="nb_node";
49 const char YACSEvalVirtualYACSContainer::NB_PROC_PER_NODE_KEY[]="nb_proc_per_node";
51 const char YACSEvalVirtualYACSContainer::NB_RESOURCE_PROCS_KEY[]="nb_resource_procs";
53 const char YACSEvalVirtualYACSContainer::POLICY_KEY[]="policy";
55 const char YACSEvalVirtualYACSContainer::OS_KEY[]="OS";
58 * This class is here only to avoid "friend class YACSEvalListOfResources".
60 class YACSEvalResourceEff : public YACSEvalResource
63 YACSEvalResourceEff(YACSEvalListOfResources *gf, const std::vector< YACS::ENGINE::Container * >& conts);
66 YACSEvalResourceEff::YACSEvalResourceEff(YACSEvalListOfResources *gf, const std::vector< YACS::ENGINE::Container * >& conts):YACSEvalResource(gf,conts)
70 void YACSEvalNonConstLocker::checkNonLocked() const
73 throw YACS::Exception("YACSEvalNonConstLocker::checkNonLocked : this is locked and trying to invoke non-const method !");
76 YACSEvalVirtualYACSContainer::YACSEvalVirtualYACSContainer():_gf(0),_cont(0)
80 void YACSEvalVirtualYACSContainer::set(YACSEvalResource *gf, YACS::ENGINE::Container *cont)
89 _propertyMap=listOfPropertiesInYACSContainer();
92 YACSEvalVirtualYACSContainer::YACSEvalVirtualYACSContainer(YACSEvalResource *gf, YACS::ENGINE::Container *cont):_gf(gf),_cont(cont)
96 _propertyMap=listOfPropertiesInYACSContainer();
99 YACSEvalVirtualYACSContainer::~YACSEvalVirtualYACSContainer()
106 * \param [in,out] entry - Resource type instance to be updated with \a this.
108 void YACSEvalVirtualYACSContainer::aggregate(ParserResourcesType& entry) const
110 if(entry.HostName.empty())
111 entry.HostName=getHostName();
112 entry.DataForSort._memInMB=std::max(entry.DataForSort._memInMB,getMem());
113 entry.DataForSort._nbOfProcPerNode=std::max(entry.DataForSort._nbOfProcPerNode,getNbProcPerNode());
114 entry.DataForSort._nbOfNodes=std::max(entry.DataForSort._nbOfNodes,getNbNodes());
115 entry.DataForSort._CPUFreqMHz=std::max(entry.DataForSort._CPUFreqMHz,getCPUFreq());
116 std::vector<YACS::ENGINE::ComponentInstance *> comps(_gf->getGodFather()->getDeploymentTree()->getComponentsLinkedToContainer(_cont));
117 std::set<std::string> compNames;
118 for(std::vector<YACS::ENGINE::ComponentInstance *>::const_iterator it=comps.begin();it!=comps.end();it++)
120 YACS::ENGINE::ComponentInstance *elt(*it);
122 compNames.insert(elt->getCompoName());
124 compNames.insert(entry.ComponentsList.begin(),entry.ComponentsList.end());
125 compNames.erase(std::string());
126 std::vector<std::string> compNames2(compNames.begin(),compNames.end());
127 entry.ComponentsList=compNames2;
130 std::string YACSEvalVirtualYACSContainer::findDefault(bool isInteractive) const
132 std::vector<std::string> possibleHosts(_gf->getAllFittingMachines());
133 for(std::vector<std::string>::const_iterator it=possibleHosts.begin();it!=possibleHosts.end();it++)
135 if(_gf->getGodFather()->hasRightInteractiveStatus(*it,isInteractive))
138 throw YACS::Exception("YACSEvalVirtualYACSContainer::findDefault : impossible to find a right machine with requested interactive status !");
141 void YACSEvalVirtualYACSContainer::setWantedMachine(const std::string& machine)
144 std::vector<std::string> possibleHosts(_gf->getAllFittingMachines());
145 if(std::find(possibleHosts.begin(),possibleHosts.end(),machine)==possibleHosts.end())
146 throw YACS::Exception("YACSEvalVirtualYACSContainer::setWantedMachine : the specified machine is not in the list of available !");
147 std::string oldMachine(getChosenMachine());
148 setMachineNoCheck(machine);
151 _gf->notifyWantedMachine(this,oldMachine,machine);
153 catch(YACS::Exception& e)
155 setMachineNoCheck(oldMachine);
160 std::vector<std::string> YACSEvalVirtualYACSContainer::listOfPropertyKeys() const
162 std::set<std::string> s;
163 std::map<std::string,std::string>::const_iterator it;
164 for(it=_overloadedPropertyMap.begin();it!=_overloadedPropertyMap.end();it++)
165 s.insert((*it).first);
166 for(it=_propertyMap.begin();it!=_propertyMap.end();it++)
167 s.insert((*it).first);
168 std::vector<std::string> ret(s.begin(),s.end());
172 std::string YACSEvalVirtualYACSContainer::getValueOfKey(const char *key) const
174 std::map<std::string,std::string>::const_iterator it;
175 it=_overloadedPropertyMap.find(key);
176 if(it!=_overloadedPropertyMap.end())
178 it=_propertyMap.find(key);
179 if(it!=_propertyMap.end())
181 return std::string();
184 void YACSEvalVirtualYACSContainer::setProperty(const std::string& key, const std::string &value)
187 _overloadedPropertyMap[key]=value;
190 void YACSEvalVirtualYACSContainer::apply()
192 YACS::ENGINE::SalomeContainer *cont0(dynamic_cast<YACS::ENGINE::SalomeContainer *>(_cont));
193 YACS::ENGINE::SalomeHPContainer *cont1(dynamic_cast<YACS::ENGINE::SalomeHPContainer *>(_cont));
196 cont0->setProperty(HOSTNAME_KEY,getValueOfKey(HOSTNAME_KEY));
201 cont1->setProperty(HOSTNAME_KEY,getValueOfKey(HOSTNAME_KEY));
205 throw YACS::Exception("YACSEvalVirtualYACSContainer::apply : unrecognized container !");
208 unsigned int YACSEvalVirtualYACSContainer::getValueOfKeyUInt(const char *key) const
210 std::string v(getValueOfKey(key));
214 std::istringstream iss(v);
219 std::map<std::string,std::string> YACSEvalVirtualYACSContainer::listOfPropertiesInYACSContainer() const
221 YACS::ENGINE::SalomeContainer *cont0(dynamic_cast<YACS::ENGINE::SalomeContainer *>(_cont));
222 YACS::ENGINE::SalomeHPContainer *cont1(dynamic_cast<YACS::ENGINE::SalomeHPContainer *>(_cont));
223 std::map<std::string,std::string> props;
225 props=cont0->getProperties();
227 props=cont1->getProperties();
231 YACSEvalResource::~YACSEvalResource()
235 std::vector<std::string> YACSEvalResource::getAllChosenMachines() const
237 std::set<std::string> s;
238 for(std::vector< YACSEvalVirtualYACSContainer >::const_iterator it=_containers.begin();it!=_containers.end();it++)
239 s.insert((*it).getChosenMachine());
240 std::vector<std::string> ret(s.begin(),s.end());
244 std::vector<std::string> YACSEvalResource::getAllFittingMachines() const
246 ParserResourcesType ref;
248 return _gf->getFittingResources(&ref);
251 void YACSEvalResource::setWantedMachine(const std::string& machine)
254 std::vector<std::string> possibleHosts(getAllFittingMachines());
255 if(std::find(possibleHosts.begin(),possibleHosts.end(),machine)==possibleHosts.end())
256 throw YACS::Exception("YACSEvalResource::setWantedMachine : the specified machine is not in the list of available !");
257 for(std::vector< YACSEvalVirtualYACSContainer >::iterator it=_containers.begin();it!=_containers.end();it++)
258 (*it).setMachineNoCheck(machine);
261 YACSEvalVirtualYACSContainer *YACSEvalResource::at(std::size_t i) const
263 if(i>=_containers.size())
264 throw YACS::Exception("YACSEvalResource::at : invalid input ! must be < size !");
265 return const_cast<YACSEvalVirtualYACSContainer *>(&_containers[i]);
268 void YACSEvalResource::apply()
270 for(std::vector< YACSEvalVirtualYACSContainer >::iterator it=_containers.begin();it!=_containers.end();it++)
274 void YACSEvalResource::fitWithCurrentCatalogAbs()
276 std::vector<std::string> ress(getAllFittingMachines());
278 throw YACS::Exception("YACSEvalResource::fitWithCurrentCatalogAbs : no suitable host in your catalog of resource !");
279 setMachineNoCheck(ress.front());
282 void YACSEvalResource::aggregate(ParserResourcesType& entry) const
284 for(std::vector< YACSEvalVirtualYACSContainer >::const_iterator it=_containers.begin();it!=_containers.end();it++)
285 (*it).aggregate(entry);
288 void YACSEvalResource::notifyWantedMachine(YACSEvalVirtualYACSContainer *sender, const std::string& oldMachine, const std::string& newMachine)
290 _gf->notifyWantedMachine(sender,oldMachine,newMachine);
293 void YACSEvalResource::setMachineNoCheck(const std::string& machine)
295 for(std::vector< YACSEvalVirtualYACSContainer >::iterator it=_containers.begin();it!=_containers.end();it++)
296 (*it).setMachineNoCheck(machine);
299 YACSEvalResource::YACSEvalResource(YACSEvalListOfResources *gf, const std::vector< YACS::ENGINE::Container * >& conts):_gf(gf)
301 std::size_t sz(conts.size());
302 _containers.resize(sz);
303 for(std::size_t i=0;i<sz;i++)
304 _containers[i].set(this,conts[i]);
307 YACSEvalListOfResources::YACSEvalListOfResources(int maxLevOfPara, ResourcesManager_cpp *rm, const YACS::ENGINE::DeploymentTree& dt):_maxLevOfPara(maxLevOfPara),_rm(rm),_dt(new YACS::ENGINE::DeploymentTree(dt))
309 std::vector<YACS::ENGINE::Container *> conts(_dt->getAllContainers());
310 std::map<std::string, std::vector<YACS::ENGINE::Container *> > listOfHosts;
311 for(std::vector<YACS::ENGINE::Container *>::const_iterator it=conts.begin();it!=conts.end();it++)
313 std::vector<YACS::ENGINE::ComponentInstance *> cis(dt.getComponentsLinkedToContainer(*it));
314 YACS::ENGINE::SalomeContainer *c1(dynamic_cast<YACS::ENGINE::SalomeContainer *>(*it));
315 YACS::ENGINE::SalomeHPContainer *c2(dynamic_cast<YACS::ENGINE::SalomeHPContainer *>(*it));
318 zeHost=c1->getProperty(YACSEvalVirtualYACSContainer::HOSTNAME_KEY);
320 zeHost=c2->getProperty(YACSEvalVirtualYACSContainer::HOSTNAME_KEY);
321 listOfHosts[zeHost].push_back(*it);
323 for(std::map<std::string, std::vector<YACS::ENGINE::Container *> >::const_iterator it=listOfHosts.begin();it!=listOfHosts.end();it++)
324 _resources.push_back(new YACSEvalResourceEff(this,(*it).second));
325 fitWithCurrentCatalog();
328 std::vector<std::string> YACSEvalListOfResources::getAllChosenMachines() const
330 std::set<std::string> s;
331 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
333 std::vector<std::string> tmp((*it)->getAllChosenMachines());
334 s.insert(tmp.begin(),tmp.end());
336 std::vector<std::string> ret(s.begin(),s.end());
340 std::vector<std::string> YACSEvalListOfResources::getAllFittingMachines() const
342 ParserResourcesType ref;
343 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
344 (*it)->aggregate(ref);
345 return getFittingResources(&ref);
348 void YACSEvalListOfResources::setWantedMachine(const std::string& machine)
351 std::vector<std::string> possibleHosts(getAllFittingMachines());
352 if(std::find(possibleHosts.begin(),possibleHosts.end(),machine)==possibleHosts.end())
353 throw YACS::Exception("YACSEvalResource::setWantedMachine : the specified machine is not in the list of available !");
354 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
355 (*it)->setMachineNoCheck(machine);
358 YACSEvalResource *YACSEvalListOfResources::at(std::size_t i) const
361 throw YACS::Exception("YACSEvalListOfResources::at : invalid id !");
362 return _resources[i];
365 bool YACSEvalListOfResources::isInteractive() const
367 const MapOfParserResourcesType& zeList(_rm->GetList());
368 std::vector<std::string> allMachines(getAllChosenMachines());
369 if(allMachines.empty())
371 std::size_t ii(0),sz(allMachines.size());
372 std::vector<bool> status(sz);
373 for(std::vector<std::string>::const_iterator it=allMachines.begin();it!=allMachines.end();it++,ii++)
375 std::map<std::string, ParserResourcesType>::const_iterator it2(zeList.find(*it));
376 if(it2==zeList.end())
378 std::ostringstream oss; oss << "YACSEvalListOfResources::isInteractive : presence of non existing \"" << *it << "\" !";
379 throw YACS::Exception(oss.str());
381 const ParserResourcesType& elt((*it2).second);
382 status[ii]=(elt.ClusterInternalProtocol==sh || elt.ClusterInternalProtocol==rsh || elt.ClusterInternalProtocol==ssh);
384 std::size_t trueRet(std::count(status.begin(),status.end(),true)),falseRet(std::count(status.begin(),status.end(),false));
385 if(trueRet==sz && falseRet==0)
387 else if(trueRet==0 && falseRet==sz)
389 throw YACS::Exception("YACSEvalListOfResources::isInteractive : mix of interactive and non interactive ! internal error !");
392 unsigned int YACSEvalListOfResources::getNumberOfProcsDeclared() const
394 std::vector<std::string> chosen(getAllChosenMachines());
396 for(std::vector<std::string>::const_iterator it=chosen.begin();it!=chosen.end();it++)
397 ret+=getNumberOfProcOfResource(*it);
401 void YACSEvalListOfResources::apply()
403 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
407 YACSEvalListOfResources::~YACSEvalListOfResources()
410 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
414 class EffectiveComparator
417 virtual ~EffectiveComparator() { }
418 virtual EffectiveComparator *copy() const = 0;
419 virtual bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const = 0;
422 // comparator for a null request in scheme
423 class BasicComparator : public EffectiveComparator
426 EffectiveComparator *copy() const { return new BasicComparator; }
427 bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const;
430 class MemAwareComparator : public EffectiveComparator
433 EffectiveComparator *copy() const { return new MemAwareComparator; }
434 bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const;
437 class CompromiseComparator : public EffectiveComparator
440 CompromiseComparator(int memMB, int nbProcs):_memMB(memMB),_nbProcs(nbProcs) { }
441 EffectiveComparator *copy() const { return new CompromiseComparator(_memMB,_nbProcs); }
442 bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const;
451 CompareRes(const ParserResourcesType *request, const MapOfParserResourcesType& zeCatalog);
452 CompareRes(const CompareRes& other);
453 bool operator()(const std::string& res1, const std::string& res2);
454 ~CompareRes() { delete _comp; }
456 EffectiveComparator *_comp;
457 const ParserResourcesType *_request;
458 const MapOfParserResourcesType& _zeCatalog;
461 bool BasicComparator::compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const
463 int nbOfProcs1(elt1._nbOfNodes*elt1._nbOfProcPerNode),nbOfProcs2(elt2._nbOfNodes*elt2._nbOfProcPerNode);
464 return nbOfProcs1<nbOfProcs2;
467 bool MemAwareComparator::compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const
469 return elt1._memInMB<elt2._memInMB;
472 bool CompromiseComparator::compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const
474 double v1a(elt1._memInMB/_memMB),v1b(elt1._nbOfNodes*elt1._nbOfProcPerNode/_nbProcs);
475 double v2a(elt2._memInMB/_memMB),v2b(elt2._nbOfNodes*elt2._nbOfProcPerNode/_nbProcs);
476 return std::min(v1a,v1b)<std::min(v2a,v2b);
479 CompareRes::CompareRes(const ParserResourcesType *request, const MapOfParserResourcesType& zeCatalog):_comp(0),_request(request),_zeCatalog(zeCatalog)
481 const ResourceDataToSort& tmp(_request->DataForSort);
482 // all request items are set to default -> Basic comparison on procs
483 if(request->DataForSort._nbOfNodes==1 && request->DataForSort._nbOfProcPerNode==1 && request->DataForSort._memInMB==0)
484 _comp=new BasicComparator;
485 // all items are set to default except memory -> Memory aware only
486 else if(request->DataForSort._memInMB!=0 && request->DataForSort._nbOfNodes==1 && request->DataForSort._nbOfProcPerNode==1)
487 _comp=new MemAwareComparator;
488 // memory and procs are set by the user -> do the best possible.
489 else if(request->DataForSort._memInMB!=0 && ( request->DataForSort._nbOfNodes!=1 || request->DataForSort._nbOfProcPerNode!=1 ) )
490 _comp=new CompromiseComparator(request->DataForSort._memInMB,request->DataForSort._nbOfNodes*request->DataForSort._nbOfProcPerNode);
492 _comp=new BasicComparator;
495 CompareRes::CompareRes(const CompareRes& other):_comp(other._comp->copy()),_request(other._request),_zeCatalog(other._zeCatalog)
499 bool CompareRes::operator()(const std::string& res1, const std::string& res2)
501 std::map<std::string, ParserResourcesType>::const_iterator it1(_zeCatalog.find(res1)),it2(_zeCatalog.find(res2));
502 if(it1==_zeCatalog.end() || it2==_zeCatalog.end())
503 throw YACS::Exception("Internal error during comparison !");
504 const ParserResourcesType& elt1((*it1).second);
505 const ParserResourcesType& elt2((*it2).second);
506 return _comp->compare(elt1.DataForSort,elt2.DataForSort);
510 * Implements an another alg than those proposed by default in ResourcesManager_cpp in "ResourcesManager.hxx".
512 std::vector<std::string> YACSEvalListOfResources::getFittingResources(ParserResourcesType *request) const
514 int mlop(getMaxLevelOfParallelism());
515 request->DataForSort._memInMB*=mlop;
516 request->DataForSort._nbOfNodes*=mlop;
518 const MapOfParserResourcesType& zeListInCatalog(_rm->GetList());
519 std::vector<std::string> list0;
520 // first keep those having relevant components
521 const std::vector<std::string>& listExpected(request->ComponentsList);
522 std::set<std::string> listExpected2(listExpected.begin(),listExpected.end());
523 for(std::map<std::string, ParserResourcesType>::const_iterator it=zeListInCatalog.begin();it!=zeListInCatalog.end();it++)
525 const std::vector<std::string>& compoList((*it).second.ComponentsList);
526 std::set<std::string> s1(compoList.begin(),compoList.end());
527 std::vector<std::string> diff;
528 std::set_difference(listExpected2.begin(),listExpected2.end(),s1.begin(),s1.end(),std::inserter(diff,diff.begin()));
530 list0.push_back((*it).first);
532 // sort list0 regarding request
533 std::sort(list0.begin(),list0.end(),CompareRes(request,zeListInCatalog));
534 // if HostName in request is defined and in list0 put it first.
535 std::string tmp(request->HostName);
538 std::vector<std::string>::iterator it1(std::find(list0.begin(),list0.end(),tmp));
540 {// HostName in list0 so put it in first place.
542 list0.insert(list0.begin(),tmp);
548 void YACSEvalListOfResources::notifyWantedMachine(YACSEvalVirtualYACSContainer *sender, const std::string& oldMachine, const std::string& newMachine)
550 const MapOfParserResourcesType& zeList(_rm->GetList());
551 std::map<std::string, ParserResourcesType>::const_iterator itOld(zeList.find(oldMachine)),itNew(zeList.find(newMachine));
552 if(itOld==zeList.end() || itNew==zeList.end())
553 throw YACS::Exception("YACSEvalListOfResources::notifyWantedMachine : internal error !");
554 const ParserResourcesType& oldPRT((*itOld).second);
555 const ParserResourcesType& newPRT((*itNew).second);
556 if(oldPRT.ClusterInternalProtocol==newPRT.ClusterInternalProtocol)
558 // the batch/interactive mode has changed -> try to change for all.
559 std::queue<std::string> sts;
562 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
564 std::size_t sz((*it)->size());
565 for(std::size_t i=0;i<sz;i++)
567 YACSEvalVirtualYACSContainer *cont((*it)->at(i));
570 sts.push(cont->findDefault(newPRT.ClusterInternalProtocol==sh));
574 catch(YACS::Exception& e)
576 std::ostringstream oss; oss << "YACSEvalListOfResources::notifyWantedMachine : switching from interactive/batch must be global ! " << e.what();
577 throw YACS::Exception(oss.str());
579 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
581 std::size_t sz((*it)->size());
582 for(std::size_t i=0;i<sz;i++)
584 YACSEvalVirtualYACSContainer *cont((*it)->at(i));
587 cont->setMachineNoCheck(sts.front());
593 bool YACSEvalListOfResources::hasRightInteractiveStatus(const std::string& machineToTest, bool isInteractive) const
595 const MapOfParserResourcesType& zeList(_rm->GetList());
596 std::map<std::string, ParserResourcesType>::const_iterator it(zeList.find(machineToTest));
598 throw YACS::Exception("YACSEvalListOfResources::hasRightInteractiveStatus : internal error !");
599 const ParserResourcesType& elt((*it).second);
600 bool myStatus(elt.ClusterInternalProtocol==sh);
601 return myStatus==isInteractive;
604 void YACSEvalListOfResources::fitWithCurrentCatalog()
606 std::vector<std::string> ress(getAllFittingMachines());
608 throw YACS::Exception("YACSEvalListOfResources::fitWithCurrentCatalog : no available resource in your catalog !");
609 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
610 (*it)->setMachineNoCheck(ress.front());
613 unsigned int YACSEvalListOfResources::getNumberOfProcOfResource(const std::string& machine) const
615 const MapOfParserResourcesType& zeList(_rm->GetList());
616 std::map<std::string, ParserResourcesType>::const_iterator it(zeList.find(machine));
618 throw YACS::Exception("YACSEvalListOfResources::getNumberOfProcOfResource : internal error !");
619 const ParserResourcesType& PRT((*it).second);
620 const ResourceDataToSort& RDT(PRT.DataForSort);
621 unsigned int ret(RDT._nbOfNodes*RDT._nbOfProcPerNode);