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