1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef _BL_MPIIMPL_H_
24 #define _BL_MPIIMPL_H_
26 #include "Batch_Defines.hxx"
29 class BATCH_EXPORT MpiImplException
32 const std::string msg;
34 MpiImplException(const std::string m) : msg(m) {}
37 class BATCH_EXPORT MpiImpl
40 // Constructeur et destructeur
41 MpiImpl(); // constrcuctor
42 virtual ~MpiImpl(); //Destructor
44 virtual std::string size() = 0; // get number of process of current job
45 virtual std::string rank() = 0; // get process number of current job
46 virtual std::string boot(const std::string machinefile, const unsigned int nbnodes) = 0; // get boot command
47 virtual std::string run(const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute) = 0; // get run command
48 virtual std::string halt() = 0; // get stop command
56 class BATCH_EXPORT MpiImpl_LAM : public MpiImpl
59 // Constructeur et destructeur
60 MpiImpl_LAM(); // constructor
61 virtual ~MpiImpl_LAM(); //Destructor
63 std::string size(); // get number of process of current job
64 std::string rank(); // get process number of current job
65 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
66 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
67 std::string halt(); // get stop command
75 class BATCH_EXPORT MpiImpl_MPICH1 : public MpiImpl
78 // Constructeur et destructeur
79 MpiImpl_MPICH1(); // constructor
80 virtual ~MpiImpl_MPICH1(); //Destructor
82 std::string size(); // get number of process of current job
83 std::string rank(); // get process number of current job
84 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
85 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
86 std::string halt(); // get stop command
94 class BATCH_EXPORT MpiImpl_MPICH2 : public MpiImpl
97 // Constructeur et destructeur
98 MpiImpl_MPICH2(); // constructor
99 virtual ~MpiImpl_MPICH2(); //Destructor
101 std::string size(); // get number of process of current job
102 std::string rank(); // get process number of current job
103 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
104 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
105 std::string halt(); // get stop command
113 class BATCH_EXPORT MpiImpl_OPENMPI : public MpiImpl
116 // Constructeur et destructeur
117 MpiImpl_OPENMPI(); // constructor
118 virtual ~MpiImpl_OPENMPI(); //Destructor
120 std::string size(); // get number of process of current job
121 std::string rank(); // get process number of current job
122 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
123 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
124 std::string halt(); // get stop command
132 class BATCH_EXPORT MpiImpl_SLURM : public MpiImpl
135 // Constructeur et destructeur
136 MpiImpl_SLURM(); // constructor
137 virtual ~MpiImpl_SLURM(); //Destructor
139 std::string size(); // get number of process of current job
140 std::string rank(); // get process number of current job
141 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
142 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
143 std::string halt(); // get stop command
151 class BATCH_EXPORT MpiImpl_PRUN : public MpiImpl
154 // Constructeur et destructeur
155 MpiImpl_PRUN(); // constructor
156 virtual ~MpiImpl_PRUN(); //Destructor
158 std::string size(); // get number of process of current job
159 std::string rank(); // get process number of current job
160 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
161 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
162 std::string halt(); // get stop command