1 // Copyright (C) 2012-2020 INRIA
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _BATCHMANAGER_OAR_H_
21 #define _BATCHMANAGER_OAR_H_
23 #include "Defines.hxx"
25 #include "JobInfo.hxx"
26 #include "FactBatchManager.hxx"
27 #include "BatchManager.hxx"
31 class BATCH_EXPORT BatchManager_OAR : public BatchManager
35 BatchManager_OAR(const FactBatchManager * parent, const char * host="localhost",
36 const char * username="",
37 CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi");
40 virtual ~BatchManager_OAR();
43 virtual const JobId runJob(const Job & job);
46 virtual void deleteJob(const JobId & jobid);
48 // Donne l'etat du job
49 virtual JobInfo queryJob(const JobId & jobid);
51 // Modifie un job en file d'attente
52 virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); }
54 // Modifie un job en file d'attente
55 virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); }
58 std::string buildBatchScript(const Job & job);
59 std::string convertSecTo_H_M_S(long seconds) const;
63 // Recupere l'identifiant d'un job deja soumis au BatchManager
64 virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }