Version: 6.5.0
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
long nb_node
number of node
Definition: SALOME_ContainerManager.idl:139
ResourceParameters resource_params
Parameters to choose a resource.
Definition: SALOME_ContainerManager.idl:110
string name
resource name - manual selection
Definition: SALOME_ContainerManager.idl:57
long nb_proc_per_node
required number of proc per node
Definition: SALOME_ContainerManager.idl:318
string policy
resource management policy : first, cycl, altcycl or best (can be extended)
Definition: SALOME_ContainerManager.idl:332
CompoList componentList
if given list of components that could be loaded on the container
Definition: SALOME_ContainerManager.idl:308
string maximum_duration
Definition: SALOME_ContainerManager.idl:178
sequence< string > ModulesList
modules list
Definition: SALOME_ContainerManager.idl:42
ResourceList resList
restricted list of resources to search in
Definition: SALOME_ContainerManager.idl:82
long cpu_clock
required frequency
Definition: SALOME_ContainerManager.idl:316
boolean isMPI
if true start a MPI container
Definition: SALOME_ContainerManager.idl:322
long cpu_clock
frequency
Definition: SALOME_ContainerManager.idl:137
The main exception in SALOME application.
Definition: SALOME_Exception.idl:70
string OS
if given required operating system
Definition: SALOME_ContainerManager.idl:61
Interface of the containerManager This interface is used for interaction with the unique instance of ...
Definition: SALOME_ContainerManager.idl:246
MachineList computerList
if given restricted list of machines to search in
Definition: SALOME_ContainerManager.idl:310
Type to describe required properties of a resource.
Definition: SALOME_ContainerManager.idl:54
Interface of the Container. This interface defines the process of loading and registration of new com...
Definition: SALOME_Component.idl:74
string mpiImpl
MPI implementation.
Definition: SALOME_ContainerManager.idl:145
string protocol
protocol to connect to the resource protocol used to start a remote container (ssh or rsh) ...
Definition: SALOME_ContainerManager.idl:122
string container_name
container name if given else automatic
Definition: SALOME_ContainerManager.idl:304
Interface of the resourcesManager This interface is used for interaction with the unique instance of ...
Definition: SALOME_ContainerManager.idl:261
sequence< Engines::Parameter > ParameterList
Generic parameter list.
Definition: SALOME_ContainerManager.idl:51
interfaces for EngineComponent and Container
CompoList componentList
if given list of components that could be loaded on a container Optional if no resource are found wit...
Definition: SALOME_ContainerManager.idl:64
string workingdir
container working directory
Definition: SALOME_ContainerManager.idl:324
CompoList componentList
list of available components
Definition: SALOME_ContainerManager.idl:128
string job_type
Job Type - Could be equal to "command" or "yacs_file" or "python_salome".
Definition: SALOME_ContainerManager.idl:164
string container_name
container name if given else automatic
Definition: SALOME_ContainerManager.idl:89
string username
login name to use to start a remote container
Definition: SALOME_ContainerManager.idl:124
boolean is_cluster_head
Specify if the resource is a cluster head;.
Definition: SALOME_ContainerManager.idl:151
string hostname
host name
Definition: SALOME_ContainerManager.idl:59
string OS
required operating system
Definition: SALOME_ContainerManager.idl:312
string parallelLib
PaCO specific informations.
Definition: SALOME_ContainerManager.idl:107
A generic parameter.
Definition: SALOME_ContainerManager.idl:45
Type to describe required properties of a container.
Definition: SALOME_ContainerManager.idl:301
exception thrown if a computer is not found in the catalog
Definition: SALOME_ContainerManager.idl:158
Definition: SALOME_ContainerManager.idl:160
This is a package of interfaces used for connecting new components to SALOME application. It also contains a set of interfaces used for management of MED component in SALOME application.
Definition: DSC_Engines.idl:36
string hostname
host name if given else automatic
Definition: SALOME_ContainerManager.idl:306
Interface of the salomelauncher This interface is used for interaction with the unique instance of Sa...
Definition: SALOME_ContainerManager.idl:211
long nb_proc
required number of proc
Definition: SALOME_ContainerManager.idl:68
long nb_proc
Number of proc of a parallel container.
Definition: SALOME_ContainerManager.idl:103
string batch
batch system
Definition: SALOME_ContainerManager.idl:143
long mem_mb
required memory size
Definition: SALOME_ContainerManager.idl:314
string iprotocol
if the resource is a cluster: internal protocol to use to start a remote container (ssh or rsh) on th...
Definition: SALOME_ContainerManager.idl:148
string parallelLib
PaCO specific informations.
Definition: SALOME_ContainerManager.idl:335
string hostname
hostname
Definition: SALOME_ContainerManager.idl:119
Definition: SALOME_ContainerManager.idl:202
Type to describe a resource.
Definition: SALOME_ContainerManager.idl:114
long nb_proc_per_node
number of proc per node
Definition: SALOME_ContainerManager.idl:141
string applipath
salome application to use to start a remote container
Definition: SALOME_ContainerManager.idl:126
string queue
Definition: SALOME_ContainerManager.idl:187
long cpu_clock
required frequency
Definition: SALOME_ContainerManager.idl:72
sequence< string > CompoList
components list
Definition: SALOME_ContainerManager.idl:38
boolean isMPI
if true start a MPI container
Definition: SALOME_ContainerManager.idl:105
string policy
resource management policy : first, cycl, altcycl or best (can be extended)
Definition: SALOME_ContainerManager.idl:80
sequence< string > FilesList
files list
Definition: SALOME_ContainerManager.idl:40
sequence< string > ResourceList
Type to transmit list of resources.
Definition: SALOME_ContainerManager.idl:36
string name
name
Definition: SALOME_ContainerManager.idl:117
string working_directory
Predefined working directory on the resource.
Definition: SALOME_ContainerManager.idl:154
Type to describe required properties of a container.
Definition: SALOME_ContainerManager.idl:86
Engines::ParameterList specific_parameters
Definition: SALOME_ContainerManager.idl:192
long mem_mb
memory size per node
Definition: SALOME_ContainerManager.idl:135
long nb_proc_per_node
required number of proc per node
Definition: SALOME_ContainerManager.idl:76
long nb_node
required number of node
Definition: SALOME_ContainerManager.idl:74
string workingdir
container working directory if given else automatic
Definition: SALOME_ContainerManager.idl:99
string OS
operating system
Definition: SALOME_ContainerManager.idl:133
Definition: SALOME_ContainerManager.idl:195
long nb_node
required number of node
Definition: SALOME_ContainerManager.idl:320
string mode
Type of resource: interactive or batch.
Definition: SALOME_ContainerManager.idl:130
long mem_mb
required memory size
Definition: SALOME_ContainerManager.idl:70
string mode
creation mode for GiveContainer if given else automatic
Definition: SALOME_ContainerManager.idl:96
string mode
creation mode for GiveContainer.
Definition: SALOME_ContainerManager.idl:330
This file contains the objects defining the main exception used in SALOME application.
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