Version: 9.12.0
SALOME_ResourcesManager.idl
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, 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, or (at your option) any later version.
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_RESOURCESMANAGER_IDL_
24 #define _SALOME_RESOURCESMANAGER_IDL_
25 
26 #include "SALOME_Exception.idl"
27 
31 module Engines
32 {
33 
35 typedef sequence<string> ResourceList;
37 typedef sequence<string> CompoList;
38 typedef sequence<long> IntegerList;
39 
42 {
44 
48  string name;
49 
51  string hostname;
57  string OS;
59 
61 
62  // Permits to order resources
64 
67  long nb_proc;
68 
70 
89  long mem_mb;
91  long cpu_clock;
93  long nb_node;
96 
97  // Permits to configure SALOME resource management
99  string policy;
102 };
103 
106 {
108  string name;
110  string hostname;
112  string type;
118  string protocol;
120  string username;
122  string applipath;
126 
128  string OS;
130  long mem_mb;
132  long cpu_clock;
134  long nb_node;
138  string batch;
140  string mpiImpl;
143  string iprotocol;
144 
149 
152 };
153 
159 {
161  string FindFirst(in ResourceList possibleResources);
162 
164  string Find(in string policy, in ResourceList possibleResources);
165 
167 
171 
174 
176 
181  void AddResource(in ResourceDefinition new_resource, in boolean write, in string xml_file)
182  raises (SALOME::SALOME_Exception);
183 
185 
190  void RemoveResource(in string resource_name, in boolean write, in string xml_file)
191  raises (SALOME::SALOME_Exception);
192 
194  string getMachineFile(in string resource_name, in long nb_procs, in string parallelLib)
195  raises (SALOME::SALOME_Exception);
196 
199 
201 };
202 
203 };
204 
205 #endif
static std::ostream * out
Definition: DSC_interface.cxx:381
This file contains the objects defining the main exception used in SALOME application.
Definition: Utils_SALOME_Exception.hxx:66
The main exception in SALOME application.
Definition: SALOME_Exception.idl:71
Interface of the resourcesManager This interface is used for interaction with the unique instance of ...
Definition: SALOME_ResourcesManager.idl:159
void AddResource(in ResourceDefinition new_resource, in boolean write, in string xml_file)
Add a new resource to the resource_manager.
string getMachineFile(in string resource_name, in long nb_procs, in string parallelLib)
Create a machine file for PaCO container.
void ListAllAvailableResources(out ResourceList machines, out IntegerList nbProcsOfMachines)
Return list of resources available (regarding content of CatalogResources.xml). And for each resource...
string Find(in string policy, in ResourceList possibleResources)
Find best available computer according to policy in a computers list.
string FindFirst(in ResourceList possibleResources)
Find first available resource in a resources list.
void RemoveResource(in string resource_name, in boolean write, in string xml_file)
Remove a new resource to the resource_manager.
ResourceList ListAllResourcesInCatalog()
ResourceList GetFittingResources(in ResourceParameters params)
Get a list of resources that are best suited to launch a container given constraints.
ResourceDefinition GetResourceDefinition(in string name)
Get definition of a resource.
This is a package of interfaces used for connecting new components to SALOME application.
Definition: DSC_Engines.idl:36
sequence< string > ResourceList
Type to transmit list of resources.
Definition: SALOME_ResourcesManager.idl:35
sequence< string > CompoList
components list
Definition: SALOME_ResourcesManager.idl:37
sequence< long > IntegerList
Definition: SALOME_ResourcesManager.idl:38
Module SALOME contains all base interfaces of SALOME Kernel.
Definition: HeatMarcel.hxx:25
string name
Definition: pythfilter.py:56
Type to describe a resource.
Definition: SALOME_ResourcesManager.idl:106
string hostname
hostname
Definition: SALOME_ResourcesManager.idl:110
string iprotocol
if the resource is a cluster: internal protocol to use to start a remote container (ssh or rsh) on th...
Definition: SALOME_ResourcesManager.idl:143
string protocol
protocol to connect to the resource and to start a remote container Possible values: "rsh" : uses rsh...
Definition: SALOME_ResourcesManager.idl:118
boolean can_run_containers
Specify if the resource can run containers.
Definition: SALOME_ResourcesManager.idl:148
string batch
batch system
Definition: SALOME_ResourcesManager.idl:138
long mem_mb
memory size per node
Definition: SALOME_ResourcesManager.idl:130
long nb_node
number of node
Definition: SALOME_ResourcesManager.idl:134
string OS
operating system
Definition: SALOME_ResourcesManager.idl:128
string mpiImpl
MPI implementation.
Definition: SALOME_ResourcesManager.idl:140
long nb_proc_per_node
number of proc per node
Definition: SALOME_ResourcesManager.idl:136
string name
name
Definition: SALOME_ResourcesManager.idl:108
string type
Type of the resource ("cluster" or "single_machine")
Definition: SALOME_ResourcesManager.idl:112
long cpu_clock
frequency
Definition: SALOME_ResourcesManager.idl:132
CompoList componentList
list of available components.
Definition: SALOME_ResourcesManager.idl:125
string applipath
salome application to use to start a remote container
Definition: SALOME_ResourcesManager.idl:122
string working_directory
Predefined working directory on the resource.
Definition: SALOME_ResourcesManager.idl:151
boolean can_launch_batch_jobs
Specify if the resource can launch batch jobs.
Definition: SALOME_ResourcesManager.idl:146
string username
login name to use to start a remote container
Definition: SALOME_ResourcesManager.idl:120
Type to describe required properties of a resource.
Definition: SALOME_ResourcesManager.idl:42
long nb_proc
required number of processors
Definition: SALOME_ResourcesManager.idl:67
string name
resource name - manual selection
Definition: SALOME_ResourcesManager.idl:48
long nb_proc_per_node
required number of proc per node
Definition: SALOME_ResourcesManager.idl:95
long mem_mb
required memory size
Definition: SALOME_ResourcesManager.idl:89
ResourceList resList
restricted list of resources to search in
Definition: SALOME_ResourcesManager.idl:101
CompoList componentList
if given, list of components that could be loaded on a container.
Definition: SALOME_ResourcesManager.idl:60
string hostname
host name
Definition: SALOME_ResourcesManager.idl:51
boolean can_launch_batch_jobs
if true select only resources that can launch batch jobs
Definition: SALOME_ResourcesManager.idl:53
long cpu_clock
required frequency
Definition: SALOME_ResourcesManager.idl:91
boolean can_run_containers
if true select only resources that can run containers
Definition: SALOME_ResourcesManager.idl:55
long nb_node
required number of nodes. Can be used when submitting slurm jobs.
Definition: SALOME_ResourcesManager.idl:93
string OS
if given required operating system
Definition: SALOME_ResourcesManager.idl:57
string policy
resource management policy : first, cycl, altcycl or best (can be extended)
Definition: SALOME_ResourcesManager.idl:99