-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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 <string>
#include <vector>
+#include <list>
#include <pthread.h>
class MpiImpl;
namespace Batch{
- class BatchManager_eClient;
+ class BatchManager;
class Job;
}
std::string expected_during_time;
std::string mem;
unsigned long nb_proc;
+
+ // Parameters for COORM
+ std::string launcher_file;
+ std::string launcher_args;
};
class LAUNCHER_EXPORT Launcher_cpp
void createJob(Launcher::Job * new_job);
void launchJob(int job_id);
const char * getJobState(int job_id);
+ const char * getAssignedHostnames(int job_id); // Get names or ids of hosts assigned to the job
void getJobResults(int job_id, std::string directory);
bool getJobDumpState(int job_id, std::string directory);
void stopJob(int job_id);
void removeJob(int job_id);
+ /*! Load the jobs from the file "jobs_file" and add them to the Launcher.
+ * Return a list with the IDs of the jobs that were successfully loaded.
+ */
+ std::list<int> loadJobs(const char* jobs_file);
+
+ //! Save the jobs of the Launcher to the file "jobs_file".
+ void saveJobs(const char* jobs_file);
+
// Useful methods
long createJobWithFile(std::string xmlExecuteFile, std::string clusterName);
std::map<int, Launcher::Job *> getJobs();
void createBatchManagerForJob(Launcher::Job * job);
- void addJobDirectlyToMap(Launcher::Job * new_job, const std::string job_reference);
+ void addJobDirectlyToMap(Launcher::Job * new_job);
// Lib methods
void SetResourcesManager( ResourcesManager_cpp* rm ) {_ResManager = rm;}
// Methods used by user interface methods
#ifdef WITH_LIBBATCH
- Batch::BatchManager_eClient *FactoryBatchManager(ParserResourcesType& params);
- std::map <int, Batch::BatchManager_eClient*> _batchmap;
+ Batch::BatchManager *FactoryBatchManager(ParserResourcesType& params);
+ std::map <int, Batch::BatchManager*> _batchmap;
#endif
ParserLauncherType ParseXmlFile(std::string xmlExecuteFile);