]> SALOME platform Git repositories - modules/kernel.git/blob - src/Batch/Batch_BatchManager_eClient.hxx
Salome HOME
Fix compilation problems on Win32 platform
[modules/kernel.git] / src / Batch / Batch_BatchManager_eClient.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
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.
8 // 
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.
13 //
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
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 /*
21  * BatchManager_eLSF.hxx : emulation of client
22  *
23  * Auteur : Bernard SECHER - CEA DEN
24  * Mail   : mailto:bernard.secher@cea.fr
25  * Date   : Thu Apr 24 10:17:22 2008
26  * Projet : PAL Salome 
27  *
28  */
29
30 #ifndef _BATCHMANAGER_eClient_H_
31 #define _BATCHMANAGER_eClient_H_
32
33 #include "Batch_Defines.hxx"
34
35 #include "MpiImpl.hxx"
36 #include "Batch_BatchManager.hxx"
37
38 namespace Batch {
39
40   class Job;
41
42   class BATCH_EXPORT EmulationException
43   {
44   public:
45     const std::string msg;
46     
47     EmulationException(const std::string m) : msg(m) {}
48   };
49
50   class BATCH_EXPORT BatchManager_eClient : public BatchManager
51   {
52   public:
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);
57
58   protected:
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
62
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);
67
68   private:
69
70   };
71
72 }
73
74 #endif