#include "Batch_JobId.hxx"
#include "Batch_JobInfo.hxx"
#include "Batch_InvalidArgumentException.hxx"
+#include "Batch_CommunicationProtocol.hxx"
+#include "Batch_MpiImpl.hxx"
namespace Batch {
{
public:
// Constructeur et destructeur
- //BatchManager(std::string host="localhost") throw(InvalidArgumentException); // connexion a la machine host
- BatchManager(const Batch::FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException); // connexion a la machine host
+ BatchManager(const Batch::FactBatchManager * parent, const char * host = "localhost",
+ const char * username = "",
+ CommunicationProtocolType protocolType = SSH, const char * mpiImpl = "nompi");
virtual ~BatchManager();
virtual std::string __repr__() const;
virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference) = 0; // ajoute un nouveau job sans le soumettre
virtual std::string waitForJobEnd(const Batch::JobId & jobid, long timeout = -1,
long initSleepTime = 1, long maxSleepTime = 600);
+ virtual void importOutputFiles( const Job & job, const std::string directory );
+ bool importDumpStateFile( const Job & job, const std::string directory );
+
+ // Get the underlying communication protocol
+ const CommunicationProtocol & getProtocol() const;
protected:
std::string _hostname; // serveur ou tourne le BatchManager
// std::map< const std::string, const Batch::JobId * > jobid_map; // table des jobs deja soumis
std::map< std::string, const Batch::JobId * > jobid_map; // table des jobs deja soumis
const Batch::FactBatchManager * _parent;
+ const CommunicationProtocol & _protocol; // protocol to access _hostname
+ const std::string _username; // username to access _hostname
+ MpiImpl *_mpiImpl; // Mpi implementation to launch executable in batch script
+
+ MpiImpl* FactoryMpiImpl(std::string mpiImpl);
+ void exportInputFiles(const Job & job);
private: