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_
33 #include "Batch_Defines.hxx"
35 #include "MpiImpl.hxx"
36 #include "Batch_BatchManager.hxx"
42 class BATCH_EXPORT EmulationException
45 const std::string msg;
47 EmulationException(const std::string m) : msg(m) {}
50 class BATCH_EXPORT BatchManager_eClient : public BatchManager
53 // Constructeur et destructeur
54 BatchManager_eClient(const Batch::FactBatchManager * parent, const char* host="localhost", const char* protocol="ssh", const char* mpiImpl="indif");
55 virtual ~BatchManager_eClient();
56 void importOutputFiles( const Job & job, const std::string directory ) throw(EmulationException);
59 std::string _protocol; // protocol to access _hostname
60 std::string _username; // username to access _hostname
61 MpiImpl *_mpiImpl; // Mpi implementation to launch executable in batch script
63 std::string BuildTemporaryFileName() const;
64 void RmTmpFile(std::string & TemporaryFileName);
65 MpiImpl* FactoryMpiImpl(string mpiImpl) throw(EmulationException);
66 void exportInputFiles(const Job & job) throw(EmulationException);