Salome HOME
Code factorization
authorbarate <barate>
Wed, 16 Jan 2013 18:10:42 +0000 (18:10 +0000)
committerbarate <barate>
Wed, 16 Jan 2013 18:10:42 +0000 (18:10 +0000)
22 files changed:
src/CCC/BatchManager_CCC.cxx
src/CCC/BatchManager_CCC.hxx
src/Core/BatchManager.cxx
src/Core/BatchManager.hxx
src/Core/FactBatchManager.cxx
src/Core/FactBatchManager.hxx
src/Core/JobId.cxx
src/Core/JobId.hxx
src/LSF/BatchManager_LSF.cxx
src/LSF/BatchManager_LSF.hxx
src/LoadLeveler/BatchManager_LL.cxx
src/LoadLeveler/BatchManager_LL.hxx
src/Local/BatchManager_Local.cxx
src/Local/BatchManager_Local.hxx
src/PBS/BatchManager_PBS.cxx
src/PBS/BatchManager_PBS.hxx
src/SGE/BatchManager_SGE.cxx
src/SGE/BatchManager_SGE.hxx
src/Slurm/BatchManager_Slurm.cxx
src/Slurm/BatchManager_Slurm.hxx
src/Vishnu/BatchManager_Vishnu.cxx
src/Vishnu/BatchManager_Vishnu.hxx

index 14037041aa66956f258225ede346d34984c604ef..1703e5b2dc81799a1c148f978f355dcff70a4fb4 100644 (file)
@@ -117,13 +117,6 @@ namespace Batch {
     return id;
   }
 
-  // Ce manager permet de faire de la reprise
-  const Batch::JobId
-  BatchManager_CCC::addJob(const Batch::Job & job, const std::string reference)
-  {
-    return JobId(this, reference);
-  }
-
   // Methode pour le controle des jobs : retire un job du gestionnaire
   void BatchManager_CCC::deleteJob(const JobId & jobid)
   {
@@ -143,37 +136,6 @@ namespace Batch {
     cerr << "jobId = " << ref << "killed" << endl;
   }
 
-  // Methode pour le controle des jobs : suspend un job en file d'attente
-  void BatchManager_CCC::holdJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_CCC::holdJob");
-  }
-
-  // Methode pour le controle des jobs : relache un job suspendu
-  void BatchManager_CCC::releaseJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_CCC::releaseJob");
-  }
-
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_CCC::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_CCC::alterJob");
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_CCC::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    alterJob(jobid, param, Environnement());
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_CCC::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    alterJob(jobid, Parametre(), env);
-  }
-
   // Methode pour le controle des jobs : renvoie l'etat du job
   JobInfo BatchManager_CCC::queryJob(const JobId & jobid)
   {
index b3dcf91b5678832dad7e4057baddcbd384effaf8..67a5228576dfcc7e476f1d3e24b3e3be8ba52066 100644 (file)
@@ -55,19 +55,12 @@ namespace Batch {
     // Methodes pour le controle des jobs
     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
-    virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
-    virtual void releaseJob(const JobId & jobid); // relache un job suspendu
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
 
     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
 
-    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference); // ajoute un nouveau job sans le soumettre
-
   protected:
     void buildBatchScript(const Job & job);
     std::string getWallTime(const long edt);
index 337fd91c4542d7a1e34419c4a066b67497c3714c..233ee46eedbc35d6c6c7797598f2d27946bbe116 100644 (file)
@@ -46,6 +46,7 @@
 #include "FactBatchManager.hxx"
 #include "BatchManager.hxx"
 #include "Utils.hxx"
+#include "NotYetImplementedException.hxx"
 
 #ifdef WIN32
 #define sleep(seconds) Sleep((seconds)*1000)
@@ -58,7 +59,7 @@ namespace Batch {
   BatchManager::BatchManager(const Batch::FactBatchManager * parent, const char* host,
                              const char * username,
                              CommunicationProtocolType protocolType, const char* mpiImpl)
-    : _hostname(host), jobid_map(), _parent(parent),
+    : _hostname(host), jobid_map(), _type(parent->getType()),
       _protocol(CommunicationProtocol::getInstance(protocolType)),
       _username(username), _mpiImpl(FactoryMpiImpl(mpiImpl))
   {
@@ -74,72 +75,68 @@ namespace Batch {
   string BatchManager::__repr__() const
   {
     ostringstream oss;
-    oss << "<BatchManager of type '" << (_parent ? _parent->getType() : "unknown (no factory)") << "' connected to server '" << _hostname << "'>";
+    oss << "<BatchManager of type '" << _type << "' connected to server '" << _hostname << "'>";
     return oss.str();
   }
 
   // Recupere le l'identifiant d'un job deja soumis au BatchManager
-//   const JobId BatchManager::getJobIdByReference(const string & ref)
-//   {
-//     return JobId(this, ref);
-//   }
   const JobId BatchManager::getJobIdByReference(const char * ref)
   {
     return JobId(this, ref);
   }
 
-//   // Methode pour le controle des jobs : soumet un job au gestionnaire
-//   const JobId BatchManager::submitJob(const Job & job)
-//   {
-//     static int idx = 0;
-//     //MEDMEM::STRING sst;
-//     ostringstream sst;
-//     sst << "Jobid_" << idx++;
-//     JobId id(this, sst.str());
-//     return id;
-//   }
-
-//   // Methode pour le controle des jobs : retire un job du gestionnaire
-//   void BatchManager::deleteJob(const JobId & jobid)
-//   {
-//     // Nothing to do
-//   }
-
-//   // Methode pour le controle des jobs : suspend un job en file d'attente
-//   void BatchManager::holdJob(const JobId & jobid)
-//   {
-//     // Nothing to do
-//   }
-
-//   // Methode pour le controle des jobs : relache un job suspendu
-//   void BatchManager::releaseJob(const JobId & jobid)
-//   {
-//     // Nothing to do
-//   }
-
-//   // Methode pour le controle des jobs : modifie un job en file d'attente
-//   void BatchManager::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-//   {
-//     // Nothing to do
-//   }
-
-//   // Methode pour le controle des jobs : modifie un job en file d'attente
-//   void BatchManager::alterJob(const JobId & jobid, const Parametre & param)
-//   {
-//     // Nothing to do
-//   }
-
-//   // Methode pour le controle des jobs : modifie un job en file d'attente
-//   void BatchManager::alterJob(const JobId & jobid, const Environnement & env)
-//   {
-//     // Nothing to do
-//   }
-
-//   // Methode pour le controle des jobs : renvoie l'etat du job
-//   JobInfo BatchManager::queryJob(const JobId & jobid)
-//   {
-//     return JobInfo();
-//   }
+  // Methode pour le controle des jobs : soumet un job au gestionnaire
+  const JobId BatchManager::submitJob(const Job & job)
+  {
+    throw NotYetImplementedException("Method submitJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  // Methode pour le controle des jobs : retire un job du gestionnaire
+  void BatchManager::deleteJob(const JobId & jobid)
+  {
+    throw NotYetImplementedException("Method deleteJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  // Methode pour le controle des jobs : suspend un job en file d'attente
+  void BatchManager::holdJob(const JobId & jobid)
+  {
+    throw NotYetImplementedException("Method holdJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  // Methode pour le controle des jobs : relache un job suspendu
+  void BatchManager::releaseJob(const JobId & jobid)
+  {
+    throw NotYetImplementedException("Method releaseJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  // Methode pour le controle des jobs : modifie un job en file d'attente
+  void BatchManager::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
+  {
+    throw NotYetImplementedException("Method alterJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  // Methode pour le controle des jobs : modifie un job en file d'attente
+  void BatchManager::alterJob(const JobId & jobid, const Parametre & param)
+  {
+    throw NotYetImplementedException("Method alterJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  // Methode pour le controle des jobs : modifie un job en file d'attente
+  void BatchManager::alterJob(const JobId & jobid, const Environnement & env)
+  {
+    throw NotYetImplementedException("Method alterJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  // Methode pour le controle des jobs : renvoie l'etat du job
+  JobInfo BatchManager::queryJob(const JobId & jobid)
+  {
+    throw NotYetImplementedException("Method queryJob not implemented by Batch Manager \"" + _type + "\"");
+  }
+
+  const JobId BatchManager::addJob(const Job & job, const string & reference)
+  {
+    return JobId(this, reference);
+  }
 
   //! Wait for the end of a job
   /*!
index e12332c744ab7db50a69c163a42f4336eea2ef76..c5ad00d70a63561802d140cd0129ea50fd6ac7f2 100644 (file)
@@ -63,16 +63,16 @@ namespace Batch {
     //virtual const JobId getJobIdByReference(const std::string & ref);
     virtual const Batch::JobId getJobIdByReference(const char * ref);
 
-    // Methodes pour le controle des jobs : virtuelles pures
-    virtual const Batch::JobId submitJob(const Batch::Job & job) = 0; // soumet un job au gestionnaire
-    virtual void deleteJob(const Batch::JobId & jobid) = 0; // retire un job du gestionnaire
-    virtual void holdJob(const Batch::JobId & jobid) = 0; // suspend un job en file d'attente
-    virtual void releaseJob(const Batch::JobId & jobid) = 0; // relache un job suspendu
-    virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param, const Batch::Environnement & env) = 0; // modifie un job en file d'attente
-    virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param) = 0; // modifie un job en file d'attente
-    virtual void alterJob(const Batch::JobId & jobid, const Batch::Environnement & env) = 0; // modifie un job en file d'attente
-    virtual Batch::JobInfo queryJob(const Batch::JobId & jobid) = 0; // renvoie l'etat du job
-    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference) = 0; // ajoute un nouveau job sans le soumettre
+    // Methodes pour le controle des jobs : doivent etre implementees dans les classes filles
+    virtual const Batch::JobId submitJob(const Batch::Job & job); // soumet un job au gestionnaire
+    virtual void deleteJob(const Batch::JobId & jobid); // retire un job du gestionnaire
+    virtual void holdJob(const Batch::JobId & jobid); // suspend un job en file d'attente
+    virtual void releaseJob(const Batch::JobId & jobid); // relache un job suspendu
+    virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param, const Batch::Environnement & env); // modifie un job en file d'attente
+    virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param); // modifie un job en file d'attente
+    virtual void alterJob(const Batch::JobId & jobid, const Batch::Environnement & env); // modifie un job en file d'attente
+    virtual Batch::JobInfo queryJob(const Batch::JobId & jobid); // renvoie l'etat du job
+    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string & reference); // 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 );
@@ -85,7 +85,7 @@ namespace Batch {
     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 std::string & _type;
     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
index f9268305493568c1c5710c42df4ec5c0b7b2381d..e286e5b6ae1bb9c2eace5242f3005b7bbbe2e01f 100644 (file)
@@ -56,7 +56,7 @@ namespace Batch {
   }
 
   // Accesseur
-  string FactBatchManager::getType() const
+  const string & FactBatchManager::getType() const
   {
     return type;
   }
index dd36f7f7f100cea16122d4857392f5113828f881..9b4fd7388fb79e57998632f18bcf518db727c3c5 100644 (file)
@@ -51,7 +51,7 @@ namespace Batch {
                                               const char * username = "",
                                               CommunicationProtocolType protocolType = SSH,
                                               const char * mpi = "nompi") const = 0;
-    std::string getType() const;
+    const std::string & getType() const;
     std::string __repr__() const;
 
   protected:
index c7a740c29774710600a65ac6f8ea85d628a87649..1ff3c58647283cc33f2ef6d72d1948ee853f4cf1 100644 (file)
@@ -44,7 +44,7 @@ namespace Batch {
   }
 
   // Constructeur avec le pointeur sur le BatchManager associe et avec une reference
-  JobId::JobId(BatchManager * _p_bm, string ref) : _p_batchmanager(_p_bm), _reference(ref)
+  JobId::JobId(BatchManager * _p_bm, const string & ref) : _p_batchmanager(_p_bm), _reference(ref)
   {
     // Nothing to do
   }
index ebbcc75b67293ef46dcbdb62a75428aaa86519fb..48a3c02efa10802b31eac6c219fde29ce7ab7970 100644 (file)
@@ -51,7 +51,7 @@ namespace Batch {
     virtual ~JobId();
 
     // Constructeur avec le pointeur sur le BatchManager associe et avec une reference
-    JobId(Batch::BatchManager *, std::string ref);
+    JobId(Batch::BatchManager *, const std::string & ref);
 
     // Operateur d'affectation entre objets
     virtual JobId & operator =(const Batch::JobId &);
index 2103ee846b2578dbcd6b45928e049e4aba738b79..d35532e9e0d8e7c04e9a21f3dc4a950d0af93f2e 100644 (file)
@@ -92,13 +92,6 @@ namespace Batch {
     return id;
   }
 
-  // Ce manager permet de faire de la reprise
-  const Batch::JobId
-  BatchManager_LSF::addJob(const Batch::Job & job, const std::string reference)
-  {
-    return JobId(this, reference);
-  }
-
   // Methode pour le controle des jobs : retire un job du gestionnaire
   void BatchManager_LSF::deleteJob(const JobId & jobid)
   {
@@ -118,37 +111,6 @@ namespace Batch {
     cerr << "jobId = " << ref << "killed" << endl;
   }
 
-  // Methode pour le controle des jobs : suspend un job en file d'attente
-  void BatchManager_LSF::holdJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_LSF::holdJob");
-  }
-
-  // Methode pour le controle des jobs : relache un job suspendu
-  void BatchManager_LSF::releaseJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_LSF::releaseJob");
-  }
-
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_LSF::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_LSF::alterJob");
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_LSF::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    alterJob(jobid, param, Environnement());
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_LSF::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    alterJob(jobid, Parametre(), env);
-  }
-
   // Methode pour le controle des jobs : renvoie l'etat du job
   JobInfo BatchManager_LSF::queryJob(const JobId & jobid)
   {
index 201e3b313b2c945d6b2d5b702ae75460102a2407..a794d9163b8d6494d44b51214410a4f6b3d7781a 100644 (file)
@@ -55,19 +55,12 @@ namespace Batch {
     // Methodes pour le controle des jobs
     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
-    virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
-    virtual void releaseJob(const JobId & jobid); // relache un job suspendu
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
 
     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
 
-    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference); // ajoute un nouveau job sans le soumettre
-
   protected:
     std::string buildSubmissionScript(const Job & job);
     std::string getWallTime(const long edt);
index 1de77384368ebe7bd0de2685a0295025e685616f..c5fe1b204a840aee3975bb8a401956603ddf592b 100644 (file)
@@ -31,7 +31,6 @@
 #include <fstream>
 #include <sstream>
 
-#include <NotYetImplementedException.hxx>
 #include <Constants.hxx>
 #include <Utils.hxx>
 
@@ -226,31 +225,6 @@ namespace Batch {
     cerr << "job " << jobid.getReference() << " killed" << endl;
   }
 
-  void BatchManager_LL::holdJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_LL::holdJob");
-  }
-
-  void BatchManager_LL::releaseJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_LL::releaseJob");
-  }
-
-  void BatchManager_LL::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_LL::alterJob");
-  }
-
-  void BatchManager_LL::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    throw NotYetImplementedException("BatchManager_LL::alterJob");
-  }
-
-  void BatchManager_LL::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_LL::alterJob");
-  }
-
   JobInfo BatchManager_LL::queryJob(const JobId & jobid)
   {
     // define command to query batch
@@ -266,9 +240,4 @@ namespace Batch {
     return jobinfo;
   }
 
-  const JobId BatchManager_LL::addJob(const Job & job, const string reference)
-  {
-    return JobId(this, reference);
-  }
-
 }
index fe805de13fc1a98e4c1e67253fec3d815487bdda..6bfd34282415fb83324947975b9367cd2a3e5e2e 100644 (file)
@@ -50,13 +50,7 @@ namespace Batch {
     // Methods to control jobs
     virtual const JobId submitJob(const Job & job);
     virtual void deleteJob(const JobId & jobid);
-    virtual void holdJob(const JobId & jobid);
-    virtual void releaseJob(const JobId & jobid);
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env);
-    virtual void alterJob(const JobId & jobid, const Parametre & param);
-    virtual void alterJob(const JobId & jobid, const Environnement & env);
     virtual JobInfo queryJob(const JobId & jobid);
-    virtual const JobId addJob(const Job & job, const std::string reference);
 
   protected:
     std::string buildCommandFile(const Job & job);
index 6be23d512278b1b13da73ad7b7a8a94d18040afb..e5ee6726701250274f7033867b59613f74aceb23 100644 (file)
@@ -193,26 +193,6 @@ namespace Batch {
     // @@@ --------> SECTION CRITIQUE <-------- @@@
   }
 
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_Local::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_Local::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    alterJob(jobid, param, Environnement());
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_Local::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    alterJob(jobid, Parametre(), env);
-  }
-
-
-
   // Methode pour le controle des jobs : renvoie l'etat du job
   JobInfo BatchManager_Local::queryJob(const JobId & jobid)
   {
@@ -247,7 +227,7 @@ namespace Batch {
   // On force donc l'état du job à erreur - pour cela on ne donne pas d'Id
   // au JobId
   const Batch::JobId
-  BatchManager_Local::addJob(const Batch::Job & job, const std::string reference)
+  BatchManager_Local::addJob(const Batch::Job & job, const std::string reference)
   {
     return JobId(this, "undefined");
   }
index fc1c3eb1b258881f056299c847aef21386c01023..4946d6a6661ec32fde8b1f6770416e7615d54e1c 100644 (file)
@@ -130,16 +130,13 @@ namespace Batch {
     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
     virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
     virtual void releaseJob(const JobId & jobid); // relache un job suspendu
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
 
     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
 
-    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference); // ajoute un nouveau job sans le soumettre
+    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference); // ajoute un nouveau job sans le soumettre
 
   protected:
     int _connect; // Local connect id
index 024ebc120ca70248c2044344b978d1b273386a16..7dfd666d8dac6ccc7893af6a43c03f8b955b8c78 100644 (file)
@@ -89,13 +89,6 @@ namespace Batch {
     return id;
   }
 
-  // Ce manager permet de faire de la reprise
-  const Batch::JobId
-  BatchManager_PBS::addJob(const Batch::Job & job, const std::string reference)
-  {
-    return JobId(this, reference);
-  }
-
   // Methode pour le controle des jobs : retire un job du gestionnaire
   void BatchManager_PBS::deleteJob(const JobId & jobid)
   {
@@ -115,37 +108,6 @@ namespace Batch {
     cerr << "jobId = " << ref << "killed" << endl;
   }
 
-  // Methode pour le controle des jobs : suspend un job en file d'attente
-  void BatchManager_PBS::holdJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_PBS::holdJob");
-  }
-
-  // Methode pour le controle des jobs : relache un job suspendu
-  void BatchManager_PBS::releaseJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_PBS::releaseJob");
-  }
-
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_PBS::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_PBS::alterJob");
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_PBS::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    alterJob(jobid, param, Environnement());
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_PBS::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    alterJob(jobid, Parametre(), env);
-  }
-
   // Methode pour le controle des jobs : renvoie l'etat du job
   JobInfo BatchManager_PBS::queryJob(const JobId & jobid)
   {
index ebd51055b2e1a90bc92b94c53e9c3551f1085276..d0e9c3fa9b0375522ba580f004bf37eaebf3bd79 100644 (file)
@@ -55,19 +55,12 @@ namespace Batch {
     // Methodes pour le controle des jobs
     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
-    virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
-    virtual void releaseJob(const JobId & jobid); // relache un job suspendu
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
 
     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
 
-    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference); // ajoute un nouveau job sans le soumettre
-
   protected:
     std::string buildSubmissionScript(const Job & job);
 
index cb71a06eee650f10098a8ea51990e95b01fa6d19..6e6df0878e44a87cdf66deba9ec524c3654f5f1a 100644 (file)
@@ -108,12 +108,6 @@ namespace Batch {
     return id;
   }
 
-  // Ce manager permet de faire de la reprise
-  const Batch::JobId
-  BatchManager_SGE::addJob(const Batch::Job & job, const std::string reference)
-  {
-    return JobId(this, reference);
-  }
 
   // Methode pour le controle des jobs : retire un job du gestionnaire
   void BatchManager_SGE::deleteJob(const JobId & jobid)
@@ -134,37 +128,6 @@ namespace Batch {
     cerr << "jobId = " << ref << "killed" << endl;
   }
 
-  // Methode pour le controle des jobs : suspend un job en file d'attente
-  void BatchManager_SGE::holdJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_SGE::holdJob");
-  }
-
-  // Methode pour le controle des jobs : relache un job suspendu
-  void BatchManager_SGE::releaseJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_SGE::releaseJob");
-  }
-
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_SGE::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_SGE::alterJob");
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_SGE::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    alterJob(jobid, param, Environnement());
-  }
-
-  // Methode pour le controle des jobs : modifie un job en file d'attente
-  void BatchManager_SGE::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    alterJob(jobid, Parametre(), env);
-  }
-
   // Methode pour le controle des jobs : renvoie l'etat du job
   JobInfo BatchManager_SGE::queryJob(const JobId & jobid)
   {
index ec12da2d59e0e0c7e1ff8f03459f28a3e03a5686..acdb75d4109f2164f4ed375ec2f82bb33e34d94f 100644 (file)
@@ -55,19 +55,12 @@ namespace Batch {
     // Methodes pour le controle des jobs
     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
-    virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
-    virtual void releaseJob(const JobId & jobid); // relache un job suspendu
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
-    virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
 
     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
 
-    virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference); // ajoute un nouveau job sans le soumettre
-
   protected:
     void buildBatchScript(const Job & job);
     std::string getWallTime(const long edt);
index b1953ea10c7f99011b9eba1bcbaf12ada087b710..e74f82c38b9b6c3d6355b49da4666c1be2e39c62 100644 (file)
@@ -197,31 +197,6 @@ namespace Batch {
     cerr << "job " << jobid.getReference() << " killed" << endl;
   }
 
-  void BatchManager_Slurm::holdJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_Slurm::holdJob");
-  }
-
-  void BatchManager_Slurm::releaseJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_Slurm::releaseJob");
-  }
-
-  void BatchManager_Slurm::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_Slurm::alterJob");
-  }
-
-  void BatchManager_Slurm::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    throw NotYetImplementedException("BatchManager_Slurm::alterJob");
-  }
-
-  void BatchManager_Slurm::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_Slurm::alterJob");
-  }
-
   JobInfo BatchManager_Slurm::queryJob(const JobId & jobid)
   {
     // define command to query batch
@@ -238,9 +213,4 @@ namespace Batch {
     return jobinfo;
   }
 
-  const JobId BatchManager_Slurm::addJob(const Job & job, const string reference)
-  {
-    return JobId(this, reference);
-  }
-
 }
index 14f9dbfad01d07f07c185526ddcdaffd2ddaa40d..fd40a7f941c1d7a18bdafe27eb5962a1b2e5ed43 100644 (file)
@@ -53,13 +53,7 @@ namespace Batch {
     // Methods to control jobs
     virtual const JobId submitJob(const Job & job);
     virtual void deleteJob(const JobId & jobid);
-    virtual void holdJob(const JobId & jobid);
-    virtual void releaseJob(const JobId & jobid);
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env);
-    virtual void alterJob(const JobId & jobid, const Parametre & param);
-    virtual void alterJob(const JobId & jobid, const Environnement & env);
     virtual JobInfo queryJob(const JobId & jobid);
-    virtual const JobId addJob(const Job & job, const std::string reference);
 
   protected:
 
index f9069b1cd4eaec20ba73aaee87c0e70899c9ae50..16d116f84bfbfcfbbe12c8485d61080ac0d7e89d 100644 (file)
@@ -35,7 +35,6 @@
 #include <fstream>
 #include <sstream>
 
-#include <NotYetImplementedException.hxx>
 #include <Constants.hxx>
 #include <Utils.hxx>
 
@@ -250,31 +249,6 @@ namespace Batch {
     cerr << "job " << jobid.getReference() << " killed" << endl;
   }
 
-  void BatchManager_Vishnu::holdJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_Vishnu::holdJob");
-  }
-
-  void BatchManager_Vishnu::releaseJob(const JobId & jobid)
-  {
-    throw NotYetImplementedException("BatchManager_Vishnu::releaseJob");
-  }
-
-  void BatchManager_Vishnu::alterJob(const JobId & jobid, const Parametre & param, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_Vishnu::alterJob");
-  }
-
-  void BatchManager_Vishnu::alterJob(const JobId & jobid, const Parametre & param)
-  {
-    throw NotYetImplementedException("BatchManager_Vishnu::alterJob");
-  }
-
-  void BatchManager_Vishnu::alterJob(const JobId & jobid, const Environnement & env)
-  {
-    throw NotYetImplementedException("BatchManager_Vishnu::alterJob");
-  }
-
   JobInfo BatchManager_Vishnu::queryJob(const JobId & jobid)
   {
     // define command to query batch
@@ -293,11 +267,6 @@ namespace Batch {
     return jobinfo;
   }
 
-  const JobId BatchManager_Vishnu::addJob(const Job & job, const string reference)
-  {
-    return JobId(this, reference);
-  }
-
   void BatchManager_Vishnu::importOutputFiles(const Job & job, const std::string directory)
   {
     // Create local result directory
index d43eaaaeed4acfa374efd21c175afebf6f229852..c558ec1002af8b3c097d6f3f91b684bcef1176ce 100644 (file)
@@ -53,13 +53,7 @@ namespace Batch {
     // Methods to control jobs
     virtual const JobId submitJob(const Job & job);
     virtual void deleteJob(const JobId & jobid);
-    virtual void holdJob(const JobId & jobid);
-    virtual void releaseJob(const JobId & jobid);
-    virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env);
-    virtual void alterJob(const JobId & jobid, const Parametre & param);
-    virtual void alterJob(const JobId & jobid, const Environnement & env);
     virtual JobInfo queryJob(const JobId & jobid);
-    virtual const JobId addJob(const Job & job, const std::string reference);
     virtual void importOutputFiles(const Job & job, const std::string directory);
 
   protected: