Version: 6.5.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
SALOME_ContainerManager.idl
Go to the documentation of this file.
1 // Copyright (C) 2007-2012 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 
23 #ifndef _SALOME_CONTAINERMANAGER_IDL_
24 #define _SALOME_CONTAINERMANAGER_IDL_
25 
26 #include "SALOME_Exception.idl"
27 #include "SALOME_Component.idl"
28 
32 module Engines
33 {
34 
36 typedef sequence<string> ResourceList;
38 typedef sequence<string> CompoList;
40 typedef sequence<string> FilesList;
42 typedef sequence<string> ModulesList;
43 
45 struct Parameter
46 {
47  string name;
48  string value;
49 };
51 typedef sequence<Engines::Parameter> ParameterList;
52 
55 {
57  string name;
59  string hostname;
61  string OS;
64  CompoList componentList;
65 
66  // Permits to order resources
68  long nb_proc;
70  long mem_mb;
72  long cpu_clock;
74  long nb_node;
77 
78  // Permits to configure SALOME resource management
80  string policy;
82  ResourceList resList;
83 };
84 
87 {
90 
92 
96  string mode;
97 
99  string workingdir;
100 
101  // Parallel part
103  long nb_proc;
105  boolean isMPI;
107  string parallelLib;
108 
111 };
112 
115 {
117  string name;
119  string hostname;
122  string protocol;
124  string username;
126  string applipath;
128  CompoList componentList;
130  string mode;
131 
133  string OS;
135  long mem_mb;
137  long cpu_clock;
139  long nb_node;
143  string batch;
145  string mpiImpl;
148  string iprotocol;
149 
152 
155 };
156 
158 exception NotFound {};
159 
161 {
162  string job_name;
164  string job_type;
165 
166  // Common values
167  string job_file;
168  string env_file;
169  FilesList in_files;
170  FilesList out_files;
171  string work_directory;
172  string local_directory;
173  string result_directory;
174 
179 
180  // Memory is expressed in megabytes -> mem_mb
181  // Number of Processors -> nb_proc
182  ResourceParameters resource_required;
183 
187  string queue;
188 
193 };
194 
196 {
197  long job_id;
198  Engines::JobParameters job_parameters;
199 };
200 typedef sequence<Engines::JobDescription> JobsList;
201 
203 {
204  void notify(in string event_name, in string event_data);
205 };
206 
211 interface SalomeLauncher
212 {
213  // Main methods
214  long createJob (in Engines::JobParameters job_parameters) raises (SALOME::SALOME_Exception);
215  void launchJob (in long job_id) raises (SALOME::SALOME_Exception);
216  string getJobState (in long job_id) raises (SALOME::SALOME_Exception);
217  void getJobResults(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
218  boolean getJobDumpState(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
219  void stopJob (in long job_id) raises (SALOME::SALOME_Exception);
220  void removeJob (in long job_id) raises (SALOME::SALOME_Exception);
221 
222  // Useful methods
223  long createJobWithFile(in string xmlJobFile, in string clusterName) raises (SALOME::SALOME_Exception);
224  boolean testBatch (in ResourceParameters params) raises (SALOME::SALOME_Exception);
225 
226  // SALOME kernel service methods
227  void Shutdown();
228  long getPID();
229 
230  // Observer and introspection methods
231  void addObserver(in Engines::SalomeLauncherObserver observer);
232  void removeObserver(in Engines::SalomeLauncherObserver observer);
233  Engines::JobsList getJobsList();
234  Engines::JobParameters getJobParameters(in long job_id) raises (SALOME::SALOME_Exception);
235 
236  // Save and load methods
237  void loadJobs(in string jobs_file) raises (SALOME::SALOME_Exception);
238  void saveJobs(in string jobs_file) raises (SALOME::SALOME_Exception);
239 
240 };
241 
247 {
251  Container GiveContainer(in ContainerParameters params) raises (SALOME::SALOME_Exception);
252 
254  void ShutdownContainers();
255 } ;
256 
262 {
264  string FindFirst(in ResourceList possibleResources);
265 
267  string Find(in string policy, in ResourceList possibleResources);
268 
270 
273  ResourceList GetFittingResources(in ResourceParameters params) raises (SALOME::SALOME_Exception);
274 
276  ResourceDefinition GetResourceDefinition(in string name);
277 
279 
284  void AddResource(in ResourceDefinition new_resource, in boolean write, in string xml_file)
285  raises (SALOME::SALOME_Exception);
286 
288 
293  void RemoveResource(in string resource_name, in boolean write, in string xml_file)
294  raises (SALOME::SALOME_Exception);
295 };
296 
297 
298 // For compatibility - will be erased on SALOME 6
299 typedef sequence<string> MachineList;
302 {
306  string hostname;
308  CompoList componentList;
310  MachineList computerList;
312  string OS;
314  long mem_mb;
316  long cpu_clock;
320  long nb_node;
322  boolean isMPI;
324  string workingdir;
326 
330  string mode;
332  string policy;
333 
335  string parallelLib;
336  long nb_component_nodes;
337 };
338 };
339 
340 #endif
Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS