1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 * BatchManager_ePBS.hxx : emulation of PBS client
25 * Auteur : Bernard SECHER - CEA DEN
26 * Mail : mailto:bernard.secher@cea.fr
27 * Date : Thu Apr 24 10:17:22 2008
32 #ifndef _BATCHMANAGER_EPBS_H_
33 #define _BATCHMANAGER_EPBS_H_
35 #include "Batch_Defines.hxx"
36 #include "Batch_JobId.hxx"
37 #include "Batch_JobInfo.hxx"
38 #include "Batch_FactBatchManager.hxx"
39 #include "Batch_BatchManager_eClient.hxx"
43 class BATCH_EXPORT BatchManager_ePBS : public BatchManager_eClient
46 // Constructeur et destructeur
47 BatchManager_ePBS(const FactBatchManager * parent, const char * host="localhost",
48 const char * username="",
49 CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi",
50 int nb_proc_per_node=1); // connexion a la machine host
51 virtual ~BatchManager_ePBS();
53 // Recupere le nom du serveur par defaut
54 // static string BatchManager_LSF::getDefaultServer();
56 // Methodes pour le controle des jobs
57 virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
58 virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
59 virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
60 virtual void releaseJob(const JobId & jobid); // relache un job suspendu
61 virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
62 virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
63 virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
64 virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
65 virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
67 virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
68 virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
70 virtual const Batch::JobId addJob(const Batch::Job & job, const std::string reference); // ajoute un nouveau job sans le soumettre
73 void buildBatchScript(const Job & job);
76 int _nb_proc_per_node;
80 // Recupere le l'identifiant d'un job deja soumis au BatchManager
81 //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); }
82 virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }