-// Copyright (C) 2012-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2012-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
{
if(_remoteWorkingDir.empty())
throw YACS::Exception("YACSEvalParamsForCluster::checkConsistency : remote work dir is not set !");
+ if(_localWorkingDir.empty())
+ throw YACS::Exception("YACSEvalParamsForCluster::checkConsistency : local work dir is not set !");
if(_wcKey.empty())
throw YACS::Exception("YACSEvalParamsForCluster::checkConsistency : WC key is not set !");
if(_nbOfProcs==0)
bool YACSEvalListOfResources::isInteractive() const
{
- const MapOfParserResourcesType& zeList(_rm->GetList());
std::vector<std::string> allMachines(getAllChosenMachines());
if(allMachines.empty())
return true;
std::vector<bool> status(sz);
for(std::vector<std::string>::const_iterator it=allMachines.begin();it!=allMachines.end();it++,ii++)
{
- std::map<std::string, ParserResourcesType>::const_iterator it2(zeList.find(*it));
- if(it2==zeList.end())
- {
- std::ostringstream oss; oss << "YACSEvalListOfResources::isInteractive : presence of non existing \"" << *it << "\" !";
- throw YACS::Exception(oss.str());
- }
- const ParserResourcesType& elt((*it2).second);
- status[ii]=(elt.Batch==none);
+ status[ii]=isMachineInteractive(*it);
}
std::size_t trueRet(std::count(status.begin(),status.end(),true)),falseRet(std::count(status.begin(),status.end(),false));
if(trueRet==sz && falseRet==0)
delete *it;
}
+bool YACSEvalListOfResources::isMachineInteractive(const std::string& machine) const
+{
+ const MapOfParserResourcesType& zeList(_rm->GetList());
+ std::map<std::string, ParserResourcesType>::const_iterator it2(zeList.find(machine));
+ if(it2==zeList.end())
+ {
+ std::ostringstream oss; oss << "YACSEvalListOfResources::isMachineInteractive : no such machine with name \"" << machine << "\" !";
+ throw YACS::Exception(oss.str());
+ }
+ const ParserResourcesType& elt((*it2).second);
+ return (elt.Batch==none);
+}
+
class EffectiveComparator
{
public: