]> SALOME platform Git repositories - modules/yacs.git/blob - idl/SALOME_ContainerManager.idl
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/yacs.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
84   long nb_proc; // Number of processors requested
85 };
86
87 /*! \brief Interface of the %salomelauncher
88     This interface is used for interaction with the unique instance
89     of SalomeLauncher
90 */
91   interface SalomeLauncher
92   {
93     long submitSalomeJob( in string fileToExecute,
94                           in FilesList filesToExport,
95                           in FilesList filesToImport,
96                           in BatchParameters batch_params,
97                           in MachineParameters params ) raises (SALOME::SALOME_Exception);
98     string querySalomeJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
99     void deleteSalomeJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
100     void getResultSalomeJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
101
102     void Shutdown();
103
104     long getPID();
105
106   } ;
107   
108 /*! \brief Interface of the %containerManager
109     This interface is used for interaction with the unique instance
110     of ContainerManager
111 */
112   interface ContainerManager
113   {
114     Container FindOrStartContainer( in MachineParameters params,
115                                     in MachineList possibleComputers);
116
117     /*!
118       This operation launches a PaCO++ container.
119
120       \param Description of the container resquested.
121       \param List of computers ressources.
122
123       \return Container's CORBA reference.
124     */
125     Container FindOrStartParallelContainer( in MachineParameters params,
126                                             in MachineList possibleComputers);
127
128     Container StartContainer( in MachineParameters params,
129                               in ResPolicy policy,
130                               in CompoList componentList );
131
132     Container GiveContainer( in MachineParameters params,
133                              in ResPolicy policy,
134                              in CompoList componentList );
135
136     void ShutdownContainers();
137
138   } ;
139   
140 /*! \brief Interface of the %resourcesManager
141     This interface is used for interaction with the unique instance
142     of ResourcesManager
143 */
144   interface ResourcesManager
145   {
146     string FindFirst(in MachineList possibleComputers);
147
148     MachineList GetFittingResources( in MachineParameters params,
149                                      in CompoList componentList )
150       raises (SALOME::SALOME_Exception);
151
152     MachineParameters GetMachineParameters( in string hostname );
153
154   } ;
155 };
156   
157 #endif