1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 * BatchManager_eLSF.hxx : emulation of client
23 * Auteur : Bernard SECHER - CEA DEN
24 * Mail : mailto:bernard.secher@cea.fr
25 * Date : Thu Apr 24 10:17:22 2008
30 #ifndef _BATCHMANAGER_eClient_H_
31 #define _BATCHMANAGER_eClient_H_
34 #include "MpiImpl.hxx"
35 #include "Batch_BatchManager.hxx"
41 class EmulationException
44 const std::string msg;
46 EmulationException(const std::string m) : msg(m) {}
49 class BatchManager_eClient : public BatchManager
52 // Constructeur et destructeur
53 BatchManager_eClient(const Batch::FactBatchManager * parent, const char* host="localhost", const char* protocol="ssh", const char* mpiImpl="indif");
54 virtual ~BatchManager_eClient();
55 void importOutputFiles( const Job & job, const std::string directory ) throw(EmulationException);
58 std::string _protocol; // protocol to access _hostname
59 std::string _username; // username to access _hostname
60 MpiImpl *_mpiImpl; // Mpi implementation to launch executable in batch script
62 std::string BuildTemporaryFileName() const;
63 void RmTmpFile(std::string & TemporaryFileName);
64 MpiImpl* FactoryMpiImpl(string mpiImpl) throw(EmulationException);
65 void exportInputFiles(const Job & job) throw(EmulationException);