Salome HOME
Removed CASCatch
[modules/kernel.git] / src / Batch / MpiImpl.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.hxx : 
22  *
23  * Auteur : Bernard SECHER - CEA/DEN
24  * Date   : Juillet 2007
25  * Projet : SALOME
26  *
27  */
28
29 #ifndef _BL_MPIIMPL_H_
30 #define _BL_MPIIMPL_H_
31
32 #include <string>
33 #include "Utils_SALOME_Exception.hxx"
34 #include <SALOMEconfig.h>
35
36 class MpiImpl
37 {
38 public:
39   // Constructeur et destructeur
40   MpiImpl(); // constrcuctor
41   virtual ~MpiImpl(); //Destructor
42   
43   virtual std::string size() = 0; // get number of process of current job
44   virtual std::string rank() = 0; // get process number of current job
45   virtual std::string boot(const std::string machinefile, const unsigned int nbnodes) = 0; // get boot command
46   virtual std::string run(const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute) = 0; // get run command
47   virtual std::string halt() = 0; // get stop command
48
49 protected:
50
51 private:
52
53 };
54
55 class MpiImpl_LAM : public MpiImpl
56 {
57 public:
58   // Constructeur et destructeur
59   MpiImpl_LAM(); // constructor
60   virtual ~MpiImpl_LAM(); //Destructor
61
62   std::string size(); // get number of process of current job
63   std::string rank(); // get process number of current job
64   std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
65   std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
66   std::string halt(); // get stop command
67
68 protected:
69   
70 private:
71
72 };
73
74 class MpiImpl_MPICH1 : public MpiImpl
75 {
76 public:
77   // Constructeur et destructeur
78   MpiImpl_MPICH1(); // constructor
79   virtual ~MpiImpl_MPICH1(); //Destructor
80   
81   std::string size(); // get number of process of current job
82   std::string rank(); // get process number of current job
83   std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
84   std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
85   std::string halt(); // get stop command
86
87 protected:
88   
89 private:
90
91 };
92
93 class MpiImpl_MPICH2 : public MpiImpl
94 {
95 public:
96   // Constructeur et destructeur
97   MpiImpl_MPICH2(); // constructor
98   virtual ~MpiImpl_MPICH2(); //Destructor
99
100   std::string size(); // get number of process of current job
101   std::string rank(); // get process number of current job
102   std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
103   std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
104   std::string halt(); // get stop command
105
106 protected:
107
108 private:
109
110 };
111
112 class MpiImpl_OPENMPI : public MpiImpl
113 {
114 public:
115   // Constructeur et destructeur
116   MpiImpl_OPENMPI(); // constructor
117   virtual ~MpiImpl_OPENMPI(); //Destructor
118
119   std::string size(); // get number of process of current job
120   std::string rank(); // get process number of current job
121   std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
122   std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
123   std::string halt(); // get stop command
124
125 protected:
126
127 private:
128
129 };
130
131 #endif