-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
#include "SALOME_ResourcesCatalog_Parser.hxx"
-#include "Utils_SALOME_Exception.hxx"
#include <iostream>
#include <sstream>
case blaunch:
return "blaunch";
default:
- throw SALOME_Exception("Unknown protocol");
+ throw ResourcesException("Unknown protocol");
}
}
else if (protocolStr == "blaunch")
return blaunch;
else
- throw SALOME_Exception((string("Unknown protocol ") + protocolStr).c_str());
+ throw ResourcesException((string("Unknown protocol ") + protocolStr).c_str());
}
ostream & operator<<(ostream &os, const ParserResourcesType &prt)
case single_machine:
return "single_machine";
default:
- throw SALOME_Exception("Unknown resource type");
+ throw ResourcesException("Unknown resource type");
}
}
return "ll";
case vishnu:
return "vishnu";
- case ssh_batch:
- return "ssh_batch";
+ case oar:
+ return "oar";
+ case coorm:
+ return "coorm";
default:
- throw SALOME_Exception("Unknown batch type");
+ throw ResourcesException("Unknown batch type");
}
}
case prun:
return "prun";
default:
- throw SALOME_Exception("Unknown MPI implementation type");
+ throw ResourcesException("Unknown MPI implementation type");
}
}
else if (resourceTypeStr == "single_machine")
type = single_machine;
else
- throw SALOME_Exception((string("Unknown resource type ") + resourceTypeStr).c_str());
+ throw ResourcesException((string("Unknown resource type ") + resourceTypeStr).c_str());
}
void ParserResourcesType::setBatchTypeStr(const string & batchTypeStr)
Batch = slurm;
else if (batchTypeStr == "ccc")
Batch = ccc;
- else if (batchTypeStr == "ssh_batch")
- Batch = ssh_batch;
else if (batchTypeStr == "ll")
Batch = ll;
else if (batchTypeStr == "vishnu")
Batch = vishnu;
- else if (batchTypeStr == "")
+ else if (batchTypeStr == "oar")
+ Batch = oar;
+ else if (batchTypeStr == "coorm")
+ Batch = coorm;
+ else if (batchTypeStr == "" || batchTypeStr == "none" || batchTypeStr == "ssh_batch")
Batch = none;
else
- throw SALOME_Exception((string("Unknown batch type ") + batchTypeStr).c_str());
+ throw ResourcesException((string("Unknown batch type ") + batchTypeStr).c_str());
}
void ParserResourcesType::setMpiImplTypeStr(const string & mpiImplTypeStr)
else if (mpiImplTypeStr == "" || mpiImplTypeStr == "no mpi")
mpi = nompi;
else
- throw SALOME_Exception((string("Unknown MPI implementation type ") + mpiImplTypeStr).c_str());
+ throw ResourcesException((string("Unknown MPI implementation type ") + mpiImplTypeStr).c_str());
}
void ParserResourcesType::setClusterInternalProtocolStr(const string & internalProtocolTypeStr)
else if (canLaunchBatchJobsStr == "false")
can_launch_batch_jobs = false;
else
- throw SALOME_Exception((string("Invalid boolean value for can_launch_batch_jobs: ") +
+ throw ResourcesException((string("Invalid boolean value for can_launch_batch_jobs: ") +
canLaunchBatchJobsStr).c_str());
}
else if (canRunContainersStr == "false")
can_run_containers = false;
else
- throw SALOME_Exception((string("Invalid boolean value for can_run_containers: ") +
+ throw ResourcesException((string("Invalid boolean value for can_run_containers: ") +
canRunContainersStr).c_str());
}