]> SALOME platform Git repositories - modules/kernel.git/blob - idl/SALOME_ContainerManager.idl
Salome HOME
merge from branch BR_V5_DEV
[modules/kernel.git] / idl / SALOME_ContainerManager.idl
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 #ifndef _SALOME_CONTAINERMANAGER_IDL_
23 #define _SALOME_CONTAINERMANAGER_IDL_
24
25 #include "SALOME_Exception.idl"
26 #include "SALOME_Component.idl"
27
28 module Engines
29 {
30
31 /*!
32     Type to transmit list of machines.
33 */
34   typedef sequence<string> MachineList;
35   typedef sequence<string> CompoList;
36   typedef sequence<string> FilesList;
37   typedef sequence<string> ModulesList;
38
39 /*!
40     Type to describe properties of resource.
41 */
42 struct MachineParameters
43 {
44   string container_name;
45   string hostname;
46   string alias;
47   string protocol;
48   string username;
49   string applipath;
50   ModulesList modList;
51   string OS;
52   long mem_mb;
53   long cpu_clock;
54   long nb_proc_per_node;
55   long nb_node;
56   boolean isMPI;
57   string mpiImpl;
58   string batch;
59   string workingdir;
60
61   // PaCO specific informations
62   string parallelLib;
63   long nb_component_nodes;
64 };
65
66 /*!
67     exception thrown if a computer is not found in the catalog
68 */
69   exception NotFound {};
70
71   enum policy {P_FIRST,P_CYCL,P_BEST};
72   typedef policy ResPolicy;
73
74 /*!
75   Structure used for Salome Batch Job parameters
76 */
77 struct BatchParameters
78 {
79   string batch_directory; // Where batch command will be launched
80                           // and log files will be created
81   string expected_during_time; // Time for the batch
82                                // has to be like this : hh:mm
83   string mem; // Minimum of memory needed
84               // has to be like : 32gb or 512mb
85   long nb_proc; // Number of processors requested
86 };
87
88 /*! \brief Interface of the %salomelauncher
89     This interface is used for interaction with the unique instance
90     of SalomeLauncher
91 */
92   interface SalomeLauncher
93   {
94     long submitJob( in string xmlExecuteFile,
95                     in string clusterName ) raises (SALOME::SALOME_Exception);
96     long submitSalomeJob( in string fileToExecute,
97                           in FilesList filesToExport,
98                           in FilesList filesToImport,
99                           in BatchParameters batch_params,
100                           in MachineParameters params ) raises (SALOME::SALOME_Exception);
101     string queryJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
102     void deleteJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
103     void getResultsJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
104
105     boolean testBatch(in MachineParameters params) raises (SALOME::SALOME_Exception);
106
107     void Shutdown();
108
109     long getPID();
110
111   } ;
112   
113 /*! \brief Interface of the %containerManager
114     This interface is used for interaction with the unique instance
115     of ContainerManager
116 */
117   interface ContainerManager
118   {
119     Container FindOrStartContainer( in MachineParameters params,
120                                     in MachineList possibleComputers);
121
122     /*!
123       This operation launches a PaCO++ container.
124
125       \param Description of the container resquested.
126       \param List of computers ressources.
127
128       \return Container's CORBA reference.
129     */
130     Container FindOrStartParallelContainer( in MachineParameters params,
131                                             in MachineList possibleComputers);
132
133     Container StartContainer( in MachineParameters params,
134                               in ResPolicy policy,
135                               in CompoList componentList );
136
137     Container GiveContainer( in MachineParameters params,
138                              in ResPolicy policy,
139                              in CompoList componentList );
140
141     void ShutdownContainers();
142
143   } ;
144   
145 /*! \brief Interface of the %resourcesManager
146     This interface is used for interaction with the unique instance
147     of ResourcesManager
148 */
149   interface ResourcesManager
150   {
151     string FindFirst(in MachineList possibleComputers);
152
153     MachineList GetFittingResources( in MachineParameters params,
154                                      in CompoList componentList )
155       raises (SALOME::SALOME_Exception);
156
157     MachineParameters GetMachineParameters( in string hostname );
158
159   } ;
160 };
161   
162 #endif