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)
90 _propertyMap=listOfPropertiesInYACSContainer();
93 YACSEvalVirtualYACSContainer::YACSEvalVirtualYACSContainer(YACSEvalResource *gf, YACS::ENGINE::Container *cont):_gf(gf),_cont(cont)
97 _propertyMap=listOfPropertiesInYACSContainer();
100 YACSEvalVirtualYACSContainer::~YACSEvalVirtualYACSContainer()
107 * \param [in,out] entry - Resource type instance to be updated with \a this.
109 void YACSEvalVirtualYACSContainer::aggregate(ParserResourcesType& entry) const
111 if(entry.HostName.empty())
112 entry.HostName=getHostName();
113 entry.DataForSort._memInMB=std::max(entry.DataForSort._memInMB,getMem());
114 entry.DataForSort._nbOfProcPerNode=std::max(entry.DataForSort._nbOfProcPerNode,getNbProcPerNode());
115 entry.DataForSort._nbOfNodes=std::max(entry.DataForSort._nbOfNodes,getNbNodes());
116 entry.DataForSort._CPUFreqMHz=std::max(entry.DataForSort._CPUFreqMHz,getCPUFreq());
117 std::vector<YACS::ENGINE::ComponentInstance *> comps(_gf->getGodFather()->getDeploymentTree()->getComponentsLinkedToContainer(_cont));
118 std::set<std::string> compNames;
119 for(std::vector<YACS::ENGINE::ComponentInstance *>::const_iterator it=comps.begin();it!=comps.end();it++)
121 YACS::ENGINE::ComponentInstance *elt(*it);
123 compNames.insert(elt->getCompoName());
125 compNames.insert(entry.ComponentsList.begin(),entry.ComponentsList.end());
126 compNames.erase(std::string());
127 std::vector<std::string> compNames2(compNames.begin(),compNames.end());
128 entry.ComponentsList=compNames2;
131 std::string YACSEvalVirtualYACSContainer::findDefault(bool isInteractive) const
133 std::vector<std::string> possibleHosts(_gf->getAllFittingMachines());
134 for(std::vector<std::string>::const_iterator it=possibleHosts.begin();it!=possibleHosts.end();it++)
136 if(_gf->getGodFather()->hasRightInteractiveStatus(*it,isInteractive))
139 throw YACS::Exception("YACSEvalVirtualYACSContainer::findDefault : impossible to find a right machine with requested interactive status !");
142 void YACSEvalVirtualYACSContainer::setWantedMachine(const std::string& machine)
145 std::vector<std::string> possibleHosts(_gf->getAllFittingMachines());
146 if(std::find(possibleHosts.begin(),possibleHosts.end(),machine)==possibleHosts.end())
147 throw YACS::Exception("YACSEvalVirtualYACSContainer::setWantedMachine : the specified machine is not in the list of available !");
148 std::string oldMachine(getChosenMachine());
149 setMachineNoCheck(machine);
152 _gf->notifyWantedMachine(this,oldMachine,machine);
154 catch(YACS::Exception& e)
156 setMachineNoCheck(oldMachine);
161 std::vector<std::string> YACSEvalVirtualYACSContainer::listOfPropertyKeys() const
163 std::set<std::string> s;
164 std::map<std::string,std::string>::const_iterator it;
165 for(it=_overloadedPropertyMap.begin();it!=_overloadedPropertyMap.end();it++)
166 s.insert((*it).first);
167 for(it=_propertyMap.begin();it!=_propertyMap.end();it++)
168 s.insert((*it).first);
169 std::vector<std::string> ret(s.begin(),s.end());
173 std::string YACSEvalVirtualYACSContainer::getValueOfKey(const char *key) const
175 std::map<std::string,std::string>::const_iterator it;
176 it=_overloadedPropertyMap.find(key);
177 if(it!=_overloadedPropertyMap.end())
179 it=_propertyMap.find(key);
180 if(it!=_propertyMap.end())
182 return std::string();
185 void YACSEvalVirtualYACSContainer::setProperty(const std::string& key, const std::string &value)
188 _overloadedPropertyMap[key]=value;
191 void YACSEvalVirtualYACSContainer::apply()
193 YACS::ENGINE::SalomeContainer *cont0(dynamic_cast<YACS::ENGINE::SalomeContainer *>(_cont));
194 YACS::ENGINE::SalomeHPContainer *cont1(dynamic_cast<YACS::ENGINE::SalomeHPContainer *>(_cont));
197 cont0->setProperty(HOSTNAME_KEY,getValueOfKey(HOSTNAME_KEY));
202 cont1->setProperty(HOSTNAME_KEY,getValueOfKey(HOSTNAME_KEY));
206 throw YACS::Exception("YACSEvalVirtualYACSContainer::apply : unrecognized container !");
209 unsigned int YACSEvalVirtualYACSContainer::getValueOfKeyUInt(const char *key) const
211 std::string v(getValueOfKey(key));
215 std::istringstream iss(v);
220 std::map<std::string,std::string> YACSEvalVirtualYACSContainer::listOfPropertiesInYACSContainer() const
222 YACS::ENGINE::SalomeContainer *cont0(dynamic_cast<YACS::ENGINE::SalomeContainer *>(_cont));
223 YACS::ENGINE::SalomeHPContainer *cont1(dynamic_cast<YACS::ENGINE::SalomeHPContainer *>(_cont));
224 std::map<std::string,std::string> props;
226 props=cont0->getProperties();
228 props=cont1->getProperties();
232 YACSEvalResource::~YACSEvalResource()
236 std::vector<std::string> YACSEvalResource::getAllChosenMachines() const
238 std::set<std::string> s;
239 for(std::vector< YACSEvalVirtualYACSContainer >::const_iterator it=_containers.begin();it!=_containers.end();it++)
240 s.insert((*it).getChosenMachine());
241 std::vector<std::string> ret(s.begin(),s.end());
245 std::vector<std::string> YACSEvalResource::getAllFittingMachines() const
247 ParserResourcesType ref;
249 return _gf->getFittingResources(&ref);
252 void YACSEvalResource::setWantedMachine(const std::string& machine)
255 std::vector<std::string> possibleHosts(getAllFittingMachines());
256 if(std::find(possibleHosts.begin(),possibleHosts.end(),machine)==possibleHosts.end())
257 throw YACS::Exception("YACSEvalResource::setWantedMachine : the specified machine is not in the list of available !");
258 for(std::vector< YACSEvalVirtualYACSContainer >::iterator it=_containers.begin();it!=_containers.end();it++)
259 (*it).setMachineNoCheck(machine);
262 YACSEvalVirtualYACSContainer *YACSEvalResource::at(std::size_t i) const
264 if(i>=_containers.size())
265 throw YACS::Exception("YACSEvalResource::at : invalid input ! must be < size !");
266 return const_cast<YACSEvalVirtualYACSContainer *>(&_containers[i]);
269 void YACSEvalResource::apply()
271 for(std::vector< YACSEvalVirtualYACSContainer >::iterator it=_containers.begin();it!=_containers.end();it++)
275 void YACSEvalResource::fitWithCurrentCatalogAbs()
277 std::vector<std::string> ress(getAllFittingMachines());
279 throw YACS::Exception("YACSEvalResource::fitWithCurrentCatalogAbs : no suitable host in your catalog of resource !");
280 setMachineNoCheck(ress.front());
283 void YACSEvalResource::aggregate(ParserResourcesType& entry) const
285 for(std::vector< YACSEvalVirtualYACSContainer >::const_iterator it=_containers.begin();it!=_containers.end();it++)
286 (*it).aggregate(entry);
289 void YACSEvalResource::notifyWantedMachine(YACSEvalVirtualYACSContainer *sender, const std::string& oldMachine, const std::string& newMachine)
291 _gf->notifyWantedMachine(sender,oldMachine,newMachine);
294 void YACSEvalResource::setMachineNoCheck(const std::string& machine)
296 for(std::vector< YACSEvalVirtualYACSContainer >::iterator it=_containers.begin();it!=_containers.end();it++)
297 (*it).setMachineNoCheck(machine);
300 YACSEvalResource::YACSEvalResource(YACSEvalListOfResources *gf, const std::vector< YACS::ENGINE::Container * >& conts):_gf(gf)
302 std::size_t sz(conts.size());
303 _containers.resize(sz);
304 for(std::size_t i=0;i<sz;i++)
305 _containers[i].set(this,conts[i]);
308 YACSEvalListOfResources::YACSEvalListOfResources(int maxLevOfPara, ResourcesManager_cpp *rm, const YACS::ENGINE::DeploymentTree& dt):_maxLevOfPara(maxLevOfPara),_rm(rm),_dt(new YACS::ENGINE::DeploymentTree(dt))
310 std::vector<YACS::ENGINE::Container *> conts(_dt->getAllContainers());
311 std::map<std::string, std::vector<YACS::ENGINE::Container *> > listOfHosts;
312 for(std::vector<YACS::ENGINE::Container *>::const_iterator it=conts.begin();it!=conts.end();it++)
314 std::vector<YACS::ENGINE::ComponentInstance *> cis(dt.getComponentsLinkedToContainer(*it));
315 YACS::ENGINE::SalomeContainer *c1(dynamic_cast<YACS::ENGINE::SalomeContainer *>(*it));
316 YACS::ENGINE::SalomeHPContainer *c2(dynamic_cast<YACS::ENGINE::SalomeHPContainer *>(*it));
319 zeHost=c1->getProperty(YACSEvalVirtualYACSContainer::HOSTNAME_KEY);
321 zeHost=c2->getProperty(YACSEvalVirtualYACSContainer::HOSTNAME_KEY);
322 listOfHosts[zeHost].push_back(*it);
324 for(std::map<std::string, std::vector<YACS::ENGINE::Container *> >::const_iterator it=listOfHosts.begin();it!=listOfHosts.end();it++)
325 _resources.push_back(new YACSEvalResourceEff(this,(*it).second));
326 fitWithCurrentCatalog();
329 std::vector<std::string> YACSEvalListOfResources::getAllChosenMachines() const
331 std::set<std::string> s;
332 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
334 std::vector<std::string> tmp((*it)->getAllChosenMachines());
335 s.insert(tmp.begin(),tmp.end());
337 std::vector<std::string> ret(s.begin(),s.end());
341 std::vector<std::string> YACSEvalListOfResources::getAllFittingMachines() const
343 ParserResourcesType ref;
344 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
345 (*it)->aggregate(ref);
346 return getFittingResources(&ref);
349 void YACSEvalListOfResources::setWantedMachine(const std::string& machine)
352 std::vector<std::string> possibleHosts(getAllFittingMachines());
353 if(std::find(possibleHosts.begin(),possibleHosts.end(),machine)==possibleHosts.end())
354 throw YACS::Exception("YACSEvalResource::setWantedMachine : the specified machine is not in the list of available !");
355 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
356 (*it)->setMachineNoCheck(machine);
359 YACSEvalResource *YACSEvalListOfResources::at(std::size_t i) const
362 throw YACS::Exception("YACSEvalListOfResources::at : invalid id !");
363 return _resources[i];
366 bool YACSEvalListOfResources::isInteractive() const
368 const MapOfParserResourcesType& zeList(_rm->GetList());
369 std::vector<std::string> allMachines(getAllChosenMachines());
370 if(allMachines.empty())
372 std::size_t ii(0),sz(allMachines.size());
373 std::vector<bool> status(sz);
374 for(std::vector<std::string>::const_iterator it=allMachines.begin();it!=allMachines.end();it++,ii++)
376 std::map<std::string, ParserResourcesType>::const_iterator it2(zeList.find(*it));
377 if(it2==zeList.end())
379 std::ostringstream oss; oss << "YACSEvalListOfResources::isInteractive : presence of non existing \"" << *it << "\" !";
380 throw YACS::Exception(oss.str());
382 const ParserResourcesType& elt((*it2).second);
383 status[ii]=(elt.ClusterInternalProtocol==sh || elt.ClusterInternalProtocol==rsh || elt.ClusterInternalProtocol==ssh);
385 std::size_t trueRet(std::count(status.begin(),status.end(),true)),falseRet(std::count(status.begin(),status.end(),false));
386 if(trueRet==sz && falseRet==0)
388 else if(trueRet==0 && falseRet==sz)
390 throw YACS::Exception("YACSEvalListOfResources::isInteractive : mix of interactive and non interactive ! internal error !");
393 unsigned int YACSEvalListOfResources::getNumberOfProcsDeclared() const
395 std::vector<std::string> chosen(getAllChosenMachines());
397 for(std::vector<std::string>::const_iterator it=chosen.begin();it!=chosen.end();it++)
398 ret+=getNumberOfProcOfResource(*it);
402 void YACSEvalListOfResources::apply()
404 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
408 YACSEvalListOfResources::~YACSEvalListOfResources()
411 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
415 class EffectiveComparator
418 virtual ~EffectiveComparator() { }
419 virtual EffectiveComparator *copy() const = 0;
420 virtual bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const = 0;
423 // comparator for a null request in scheme
424 class BasicComparator : public EffectiveComparator
427 EffectiveComparator *copy() const { return new BasicComparator; }
428 bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const;
431 class MemAwareComparator : public EffectiveComparator
434 EffectiveComparator *copy() const { return new MemAwareComparator; }
435 bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const;
438 class CompromiseComparator : public EffectiveComparator
441 CompromiseComparator(int memMB, int nbProcs):_memMB(memMB),_nbProcs(nbProcs) { }
442 EffectiveComparator *copy() const { return new CompromiseComparator(_memMB,_nbProcs); }
443 bool compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const;
452 CompareRes(const ParserResourcesType *request, const MapOfParserResourcesType& zeCatalog);
453 CompareRes(const CompareRes& other);
454 bool operator()(const std::string& res1, const std::string& res2);
455 ~CompareRes() { delete _comp; }
457 EffectiveComparator *_comp;
458 const ParserResourcesType *_request;
459 const MapOfParserResourcesType& _zeCatalog;
462 bool BasicComparator::compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const
464 int nbOfProcs1(elt1._nbOfNodes*elt1._nbOfProcPerNode),nbOfProcs2(elt2._nbOfNodes*elt2._nbOfProcPerNode);
465 return nbOfProcs1<nbOfProcs2;
468 bool MemAwareComparator::compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const
470 return elt1._memInMB<elt2._memInMB;
473 bool CompromiseComparator::compare(const ResourceDataToSort& elt1, const ResourceDataToSort& elt2) const
475 double v1a(elt1._memInMB/_memMB),v1b(elt1._nbOfNodes*elt1._nbOfProcPerNode/_nbProcs);
476 double v2a(elt2._memInMB/_memMB),v2b(elt2._nbOfNodes*elt2._nbOfProcPerNode/_nbProcs);
477 return std::min(v1a,v1b)<std::min(v2a,v2b);
480 CompareRes::CompareRes(const ParserResourcesType *request, const MapOfParserResourcesType& zeCatalog):_comp(0),_request(request),_zeCatalog(zeCatalog)
482 const ResourceDataToSort& tmp(_request->DataForSort);
483 // all request items are set to default -> Basic comparison on procs
484 if(request->DataForSort._nbOfNodes==1 && request->DataForSort._nbOfProcPerNode==1 && request->DataForSort._memInMB==0)
485 _comp=new BasicComparator;
486 // all items are set to default except memory -> Memory aware only
487 else if(request->DataForSort._memInMB!=0 && request->DataForSort._nbOfNodes==1 && request->DataForSort._nbOfProcPerNode==1)
488 _comp=new MemAwareComparator;
489 // memory and procs are set by the user -> do the best possible.
490 else if(request->DataForSort._memInMB!=0 && ( request->DataForSort._nbOfNodes!=1 || request->DataForSort._nbOfProcPerNode!=1 ) )
491 _comp=new CompromiseComparator(request->DataForSort._memInMB,request->DataForSort._nbOfNodes*request->DataForSort._nbOfProcPerNode);
493 _comp=new BasicComparator;
496 CompareRes::CompareRes(const CompareRes& other):_comp(other._comp->copy()),_request(other._request),_zeCatalog(other._zeCatalog)
500 bool CompareRes::operator()(const std::string& res1, const std::string& res2)
502 std::map<std::string, ParserResourcesType>::const_iterator it1(_zeCatalog.find(res1)),it2(_zeCatalog.find(res2));
503 if(it1==_zeCatalog.end() || it2==_zeCatalog.end())
504 throw YACS::Exception("Internal error during comparison !");
505 const ParserResourcesType& elt1((*it1).second);
506 const ParserResourcesType& elt2((*it2).second);
507 return _comp->compare(elt1.DataForSort,elt2.DataForSort);
511 * Implements an another alg than those proposed by default in ResourcesManager_cpp in "ResourcesManager.hxx".
513 std::vector<std::string> YACSEvalListOfResources::getFittingResources(ParserResourcesType *request) const
515 int mlop(getMaxLevelOfParallelism());
516 request->DataForSort._memInMB*=mlop;
517 request->DataForSort._nbOfNodes*=mlop;
519 const MapOfParserResourcesType& zeListInCatalog(_rm->GetList());
520 std::vector<std::string> list0;
521 // first keep those having relevant components
522 const std::vector<std::string>& listExpected(request->ComponentsList);
523 std::set<std::string> listExpected2(listExpected.begin(),listExpected.end());
524 for(std::map<std::string, ParserResourcesType>::const_iterator it=zeListInCatalog.begin();it!=zeListInCatalog.end();it++)
526 const std::vector<std::string>& compoList((*it).second.ComponentsList);
527 std::set<std::string> s1(compoList.begin(),compoList.end());
528 std::vector<std::string> diff;
529 std::set_difference(listExpected2.begin(),listExpected2.end(),s1.begin(),s1.end(),std::inserter(diff,diff.begin()));
531 list0.push_back((*it).first);
533 // sort list0 regarding request
534 std::sort(list0.begin(),list0.end(),CompareRes(request,zeListInCatalog));
535 // if HostName in request is defined and in list0 put it first.
536 std::string tmp(request->HostName);
539 std::vector<std::string>::iterator it1(std::find(list0.begin(),list0.end(),tmp));
541 {// HostName in list0 so put it in first place.
543 list0.insert(list0.begin(),tmp);
549 void YACSEvalListOfResources::notifyWantedMachine(YACSEvalVirtualYACSContainer *sender, const std::string& oldMachine, const std::string& newMachine)
551 const MapOfParserResourcesType& zeList(_rm->GetList());
552 std::map<std::string, ParserResourcesType>::const_iterator itOld(zeList.find(oldMachine)),itNew(zeList.find(newMachine));
553 if(itOld==zeList.end() || itNew==zeList.end())
554 throw YACS::Exception("YACSEvalListOfResources::notifyWantedMachine : internal error !");
555 const ParserResourcesType& oldPRT((*itOld).second);
556 const ParserResourcesType& newPRT((*itNew).second);
557 if(oldPRT.ClusterInternalProtocol==newPRT.ClusterInternalProtocol)
559 // the batch/interactive mode has changed -> try to change for all.
560 std::queue<std::string> sts;
563 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
565 std::size_t sz((*it)->size());
566 for(std::size_t i=0;i<sz;i++)
568 YACSEvalVirtualYACSContainer *cont((*it)->at(i));
571 sts.push(cont->findDefault(newPRT.ClusterInternalProtocol==sh));
575 catch(YACS::Exception& e)
577 std::ostringstream oss; oss << "YACSEvalListOfResources::notifyWantedMachine : switching from interactive/batch must be global ! " << e.what();
578 throw YACS::Exception(oss.str());
580 for(std::vector<YACSEvalResource *>::const_iterator it=_resources.begin();it!=_resources.end();it++)
582 std::size_t sz((*it)->size());
583 for(std::size_t i=0;i<sz;i++)
585 YACSEvalVirtualYACSContainer *cont((*it)->at(i));
588 cont->setMachineNoCheck(sts.front());
594 bool YACSEvalListOfResources::hasRightInteractiveStatus(const std::string& machineToTest, bool isInteractive) const
596 const MapOfParserResourcesType& zeList(_rm->GetList());
597 std::map<std::string, ParserResourcesType>::const_iterator it(zeList.find(machineToTest));
599 throw YACS::Exception("YACSEvalListOfResources::hasRightInteractiveStatus : internal error !");
600 const ParserResourcesType& elt((*it).second);
601 bool myStatus(elt.ClusterInternalProtocol==sh);
602 return myStatus==isInteractive;
605 void YACSEvalListOfResources::fitWithCurrentCatalog()
607 std::vector<std::string> ress(getAllFittingMachines());
609 throw YACS::Exception("YACSEvalListOfResources::fitWithCurrentCatalog : no available resource in your catalog !");
610 for(std::vector<YACSEvalResource *>::iterator it=_resources.begin();it!=_resources.end();it++)
611 (*it)->setMachineNoCheck(ress.front());
614 unsigned int YACSEvalListOfResources::getNumberOfProcOfResource(const std::string& machine) const
616 const MapOfParserResourcesType& zeList(_rm->GetList());
617 std::map<std::string, ParserResourcesType>::const_iterator it(zeList.find(machine));
619 throw YACS::Exception("YACSEvalListOfResources::getNumberOfProcOfResource : internal error !");
620 const ParserResourcesType& PRT((*it).second);
621 const ResourceDataToSort& RDT(PRT.DataForSort);
622 unsigned int ret(RDT._nbOfNodes*RDT._nbOfProcPerNode);