1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _SALOME_CONTAINERMANAGER_IDL_
23 #define _SALOME_CONTAINERMANAGER_IDL_
25 #include "SALOME_Exception.idl"
26 #include "SALOME_Component.idl"
32 Type to transmit list of machines.
34 typedef sequence<string> MachineList;
35 typedef sequence<string> CompoList;
36 typedef sequence<string> FilesList;
37 typedef sequence<string> ModulesList;
40 Type to describe properties of resource.
42 struct MachineParameters
44 string container_name;
54 long nb_proc_per_node;
61 // PaCO specific informations
63 long nb_component_nodes;
67 exception thrown if a computer is not found in the catalog
69 exception NotFound {};
71 enum policy {P_FIRST,P_CYCL,P_BEST};
72 typedef policy ResPolicy;
75 Structure used for Salome Batch Job parameters
77 struct BatchParameters
79 string batch_directory; // Where batch command will be launched
80 // and log files will be created
81 string expected_during_time; // Time for the batch
82 // has to be like this : hh:mm
83 string mem; // Minimum of memory needed
84 // has to be like : 32gb or 512mb
85 long nb_proc; // Number of processors requested
88 /*! \brief Interface of the %salomelauncher
89 This interface is used for interaction with the unique instance
92 interface SalomeLauncher
94 long submitJob( in string xmlExecuteFile,
95 in string clusterName ) raises (SALOME::SALOME_Exception);
96 long submitSalomeJob( in string fileToExecute,
97 in FilesList filesToExport,
98 in FilesList filesToImport,
99 in BatchParameters batch_params,
100 in MachineParameters params ) raises (SALOME::SALOME_Exception);
101 string queryJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
102 void deleteJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
103 void getResultsJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
105 boolean testBatch(in MachineParameters params) raises (SALOME::SALOME_Exception);
113 /*! \brief Interface of the %containerManager
114 This interface is used for interaction with the unique instance
117 interface ContainerManager
119 Container FindOrStartContainer( in MachineParameters params,
120 in MachineList possibleComputers);
123 This operation launches a PaCO++ container.
125 \param Description of the container resquested.
126 \param List of computers ressources.
128 \return Container's CORBA reference.
130 Container FindOrStartParallelContainer( in MachineParameters params,
131 in MachineList possibleComputers);
133 Container StartContainer( in MachineParameters params,
135 in CompoList componentList );
137 Container GiveContainer( in MachineParameters params,
139 in CompoList componentList );
141 void ShutdownContainers();
145 /*! \brief Interface of the %resourcesManager
146 This interface is used for interaction with the unique instance
149 interface ResourcesManager
151 string FindFirst(in MachineList possibleComputers);
153 MachineList GetFittingResources( in MachineParameters params,
154 in CompoList componentList )
155 raises (SALOME::SALOME_Exception);
157 MachineParameters GetMachineParameters( in string hostname );