1 // Copyright (C) 2007-2019 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, or (at your option) any later version.
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 "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
49 virtual std::string name() = 0; // name of mpi implementation
57 class BATCH_EXPORT MpiImpl_LAM : public MpiImpl
60 // Constructeur et destructeur
61 MpiImpl_LAM(); // constructor
62 virtual ~MpiImpl_LAM(); //Destructor
64 std::string size(); // get number of process of current job
65 std::string rank(); // get process number of current job
66 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
67 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
68 std::string halt(); // get stop command
69 std::string name(); // name of mpi implementation
77 class BATCH_EXPORT MpiImpl_MPICH1 : public MpiImpl
80 // Constructeur et destructeur
81 MpiImpl_MPICH1(); // constructor
82 virtual ~MpiImpl_MPICH1(); //Destructor
84 std::string size(); // get number of process of current job
85 std::string rank(); // get process number of current job
86 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
87 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
88 std::string halt(); // get stop command
89 std::string name(); // name of mpi implementation
97 class BATCH_EXPORT MpiImpl_MPICH2 : public MpiImpl
100 // Constructeur et destructeur
101 MpiImpl_MPICH2(); // constructor
102 virtual ~MpiImpl_MPICH2(); //Destructor
104 std::string size(); // get number of process of current job
105 std::string rank(); // get process number of current job
106 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
107 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
108 std::string halt(); // get stop command
109 std::string name(); // name of mpi implementation
117 class BATCH_EXPORT MpiImpl_OPENMPI : public MpiImpl
120 // Constructeur et destructeur
121 MpiImpl_OPENMPI(); // constructor
122 virtual ~MpiImpl_OPENMPI(); //Destructor
124 std::string size(); // get number of process of current job
125 std::string rank(); // get process number of current job
126 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
127 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
128 std::string halt(); // get stop command
129 std::string name(); // name of mpi implementation
137 class BATCH_EXPORT MpiImpl_OMPI : public MpiImpl
140 // Constructeur et destructeur
141 MpiImpl_OMPI(); // constructor
142 virtual ~MpiImpl_OMPI(); //Destructor
144 std::string size(); // get number of process of current job
145 std::string rank(); // get process number of current job
146 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
147 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
148 std::string halt(); // get stop command
149 std::string name(); // name of mpi implementation
157 class BATCH_EXPORT MpiImpl_SLURM : public MpiImpl
160 // Constructeur et destructeur
161 MpiImpl_SLURM(); // constructor
162 virtual ~MpiImpl_SLURM(); //Destructor
164 std::string size(); // get number of process of current job
165 std::string rank(); // get process number of current job
166 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
167 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
168 std::string halt(); // get stop command
169 std::string name(); // name of mpi implementation
177 class BATCH_EXPORT MpiImpl_PRUN : public MpiImpl
180 // Constructeur et destructeur
181 MpiImpl_PRUN(); // constructor
182 virtual ~MpiImpl_PRUN(); //Destructor
184 std::string size(); // get number of process of current job
185 std::string rank(); // get process number of current job
186 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
187 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
188 std::string halt(); // get stop command
189 std::string name(); // name of mpi implementation