in FilesList filesToImport,
in BatchParameters batch_params,
in MachineParameters params ) raises (SALOME::SALOME_Exception);
- string querySalomeJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
- void deleteSalomeJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
- void getResultSalomeJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
+ string queryJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
+ void deleteJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
+ void getResultsJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
void Shutdown();
long jobId;
vector<string> aMachineList;
+ if(!_ResManager)
+ throw LauncherException("You must set Resources Manager to Launcher!!");
+
// verify if cluster is in resources catalog
machineParams params;
params.hostname = clusterName;
long jobId;
vector<string> aMachineList;
+ if(!_ResManager)
+ throw LauncherException("You must set Resources Manager to Launcher!!");
+
// check batch params
if ( !check(batch_params) )
throw LauncherException("Batch parameters are bad (see informations above)");
* \param params : Constraints for the choice of the batch cluster
*/
//=============================================================================
-string Launcher_cpp::querySalomeJob( long id,
- const machineParams& params) throw(LauncherException)
+string Launcher_cpp::queryJob( long id,
+ const machineParams& params) throw(LauncherException)
{
+ if(!_ResManager)
+ throw LauncherException("You must set Resources Manager to Launcher!!");
+
// find a cluster matching params structure
vector<string> aCompoList ;
vector<string> aMachineList = _ResManager->GetFittingResources( params , aCompoList ) ;
return par[STATE];
}
+string Launcher_cpp::queryJob( long id,
+ const std::string clusterName)
+{
+ machineParams params;
+ params.hostname = clusterName;
+ return queryJob(id,params);
+}
+
//=============================================================================
/*! CORBA Method:
* Delete a batch job on a cluster
* \param params : Constraints for the choice of the batch cluster
*/
//=============================================================================
-void Launcher_cpp::deleteSalomeJob( const long id,
- const machineParams& params) throw(LauncherException)
+void Launcher_cpp::deleteJob( const long id,
+ const machineParams& params) throw(LauncherException)
{
+ if(!_ResManager)
+ throw LauncherException("You must set Resources Manager to Launcher!!");
+
// find a cluster matching params structure
vector<string> aCompoList ;
vector<string> aMachineList = _ResManager->GetFittingResources( params , aCompoList ) ;
jobId.deleteJob();
}
+void Launcher_cpp::deleteJob( long id,
+ const std::string clusterName)
+{
+ machineParams params;
+ params.hostname = clusterName;
+ deleteJob(id,params);
+}
+
//=============================================================================
/*! CORBA Method:
* Get result files of job on a cluster
* \param params : Constraints for the choice of the batch cluster
*/
//=============================================================================
-void Launcher_cpp::getResultSalomeJob( const string directory,
- const long id,
- const machineParams& params) throw(LauncherException)
+void Launcher_cpp::getResultsJob( const string directory,
+ const long id,
+ const machineParams& params) throw(LauncherException)
{
+ if(!_ResManager)
+ throw LauncherException("You must set Resources Manager to Launcher!!");
+
vector<string> aCompoList ;
vector<string> aMachineList = _ResManager->GetFittingResources( params , aCompoList ) ;
ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]);
_batchmap[clustername]->importOutputFiles( *job, directory );
}
+void Launcher_cpp::getResultsJob( const std::string directory,
+ long id,
+ const std::string clusterName)
+{
+ machineParams params;
+ params.hostname = clusterName;
+ getResultsJob(directory,id,params);
+}
+
//=============================================================================
/*!
* Factory to instanciate the good batch manager for choosen cluster.
const batchParams& batch_params,
const machineParams& params) throw(LauncherException);
- std::string querySalomeJob( const long jobId, const machineParams& params) throw(LauncherException);
- void deleteSalomeJob( const long jobId, const machineParams& params) throw(LauncherException);
- void getResultSalomeJob( const std::string directory, const long jobId, const machineParams& params ) throw(LauncherException);
+ std::string queryJob( const long jobId, const machineParams& params) throw(LauncherException);
+ std::string queryJob( const long jobId, const std::string clusterName);
+ void deleteJob( const long jobId, const machineParams& params) throw(LauncherException);
+ void deleteJob( const long jobId, const std::string clusterName);
+ void getResultsJob( const std::string directory, const long jobId, const machineParams& params ) throw(LauncherException);
+ void getResultsJob( const std::string directory, const long jobId, const std::string clusterName );
void SetResourcesManager( ResourcesManager_cpp* rm ) { _ResManager = rm; }
* \param params : Constraints for the choice of the batch cluster
*/
//=============================================================================
-char* SALOME_Launcher::querySalomeJob( const CORBA::Long jobId,
- const Engines::MachineParameters& params)
+char* SALOME_Launcher::queryJob( const CORBA::Long jobId,
+ const Engines::MachineParameters& params)
{
string status;
machineParams p;
p.mem_mb = params.mem_mb;
try{
- status = _l.querySalomeJob(jobId,p);
+ status = _l.queryJob(jobId,p);
}
catch(const LauncherException &ex){
INFOS("Caught exception.");
* \param params : Constraints for the choice of the batch cluster
*/
//=============================================================================
-void SALOME_Launcher::deleteSalomeJob( const CORBA::Long jobId,
- const Engines::MachineParameters& params)
+void SALOME_Launcher::deleteJob( const CORBA::Long jobId,
+ const Engines::MachineParameters& params)
{
machineParams p;
p.hostname = params.hostname;
p.mem_mb = params.mem_mb;
try{
- _l.deleteSalomeJob(jobId,p);
+ _l.deleteJob(jobId,p);
}
catch(const LauncherException &ex){
INFOS("Caught exception.");
* \param params : Constraints for the choice of the batch cluster
*/
//=============================================================================
-void SALOME_Launcher::getResultSalomeJob( const char *directory,
- const CORBA::Long jobId,
- const Engines::MachineParameters& params)
+void SALOME_Launcher::getResultsJob( const char *directory,
+ const CORBA::Long jobId,
+ const Engines::MachineParameters& params)
{
machineParams p;
p.hostname = params.hostname;
p.mem_mb = params.mem_mb;
try{
- _l.getResultSalomeJob( directory, jobId, p );
+ _l.getResultsJob( directory, jobId, p );
}
catch(const LauncherException &ex){
INFOS("Caught exception.");
const Engines::BatchParameters& batch_params,
const Engines::MachineParameters& params);
- char* querySalomeJob( const CORBA::Long jobId, const Engines::MachineParameters& params);
- void deleteSalomeJob( const CORBA::Long jobId, const Engines::MachineParameters& params);
- void getResultSalomeJob( const char * directory, const CORBA::Long jobId, const Engines::MachineParameters& params );
+ char* queryJob( const CORBA::Long jobId, const Engines::MachineParameters& params);
+ void deleteJob( const CORBA::Long jobId, const Engines::MachineParameters& params);
+ void getResultsJob( const char * directory, const CORBA::Long jobId, const Engines::MachineParameters& params );
void Shutdown();