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_
34 class MpiImplException
37 const std::string msg;
39 MpiImplException(const std::string m) : msg(m) {}
45 // Constructeur et destructeur
46 MpiImpl(); // constrcuctor
47 virtual ~MpiImpl(); //Destructor
49 virtual std::string size() = 0; // get number of process of current job
50 virtual std::string rank() = 0; // get process number of current job
51 virtual std::string boot(const std::string machinefile, const unsigned int nbnodes) = 0; // get boot command
52 virtual std::string run(const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute) = 0; // get run command
53 virtual std::string halt() = 0; // get stop command
61 class MpiImpl_LAM : public MpiImpl
64 // Constructeur et destructeur
65 MpiImpl_LAM(); // constructor
66 virtual ~MpiImpl_LAM(); //Destructor
68 std::string size(); // get number of process of current job
69 std::string rank(); // get process number of current job
70 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
71 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
72 std::string halt(); // get stop command
80 class MpiImpl_MPICH1 : public MpiImpl
83 // Constructeur et destructeur
84 MpiImpl_MPICH1(); // constructor
85 virtual ~MpiImpl_MPICH1(); //Destructor
87 std::string size(); // get number of process of current job
88 std::string rank(); // get process number of current job
89 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
90 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
91 std::string halt(); // get stop command
99 class MpiImpl_MPICH2 : public MpiImpl
102 // Constructeur et destructeur
103 MpiImpl_MPICH2(); // constructor
104 virtual ~MpiImpl_MPICH2(); //Destructor
106 std::string size(); // get number of process of current job
107 std::string rank(); // get process number of current job
108 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
109 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
110 std::string halt(); // get stop command
118 class MpiImpl_OPENMPI : public MpiImpl
121 // Constructeur et destructeur
122 MpiImpl_OPENMPI(); // constructor
123 virtual ~MpiImpl_OPENMPI(); //Destructor
125 std::string size(); // get number of process of current job
126 std::string rank(); // get process number of current job
127 std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
128 std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
129 std::string halt(); // get stop command
137 class MpiImpl_SLURM : public MpiImpl
140 // Constructeur et destructeur
141 MpiImpl_SLURM(); // constructor
142 virtual ~MpiImpl_SLURM(); //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