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
23 * Auteur : Bernard SECHER - CEA/DEN
29 #ifndef _BL_MPIIMPL_H_
30 #define _BL_MPIIMPL_H_
32 #include "Batch_Defines.hxx"
35 class BATCH_EXPORT MpiImplException
38 const std::string msg;
40 MpiImplException(const std::string m) : msg(m) {}
43 class BATCH_EXPORT MpiImpl
46 // Constructeur et destructeur
47 MpiImpl(); // constrcuctor
48 virtual ~MpiImpl(); //Destructor
50 virtual std::string size() = 0; // get number of process of current job
51 virtual std::string rank() = 0; // get process number of current job
52 virtual std::string boot(const std::string machinefile, const unsigned int nbnodes) = 0; // get boot command
53 virtual std::string run(const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute) = 0; // get run command
54 virtual std::string halt() = 0; // get stop command
62 class BATCH_EXPORT MpiImpl_LAM : public MpiImpl
65 // Constructeur et destructeur
66 MpiImpl_LAM(); // constructor
67 virtual ~MpiImpl_LAM(); //Destructor
69 std::string size(); // get number of process of current job
70 std::string rank(); // get process number of current job
71 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
72 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
73 std::string halt(); // get stop command
81 class BATCH_EXPORT MpiImpl_MPICH1 : public MpiImpl
84 // Constructeur et destructeur
85 MpiImpl_MPICH1(); // constructor
86 virtual ~MpiImpl_MPICH1(); //Destructor
88 std::string size(); // get number of process of current job
89 std::string rank(); // get process number of current job
90 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
91 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
92 std::string halt(); // get stop command
100 class BATCH_EXPORT MpiImpl_MPICH2 : public MpiImpl
103 // Constructeur et destructeur
104 MpiImpl_MPICH2(); // constructor
105 virtual ~MpiImpl_MPICH2(); //Destructor
107 std::string size(); // get number of process of current job
108 std::string rank(); // get process number of current job
109 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
110 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
111 std::string halt(); // get stop command
119 class BATCH_EXPORT MpiImpl_OPENMPI : public MpiImpl
122 // Constructeur et destructeur
123 MpiImpl_OPENMPI(); // constructor
124 virtual ~MpiImpl_OPENMPI(); //Destructor
126 std::string size(); // get number of process of current job
127 std::string rank(); // get process number of current job
128 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
129 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
130 std::string halt(); // get stop command
138 class BATCH_EXPORT MpiImpl_SLURM : public MpiImpl
141 // Constructeur et destructeur
142 MpiImpl_SLURM(); // constructor
143 virtual ~MpiImpl_SLURM(); //Destructor
145 std::string size(); // get number of process of current job
146 std::string rank(); // get process number of current job
147 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
148 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
149 std::string halt(); // get stop command