SALOME documentation central

idl/SALOME_ContainerManager.idl

Go to the documentation of this file.
00001 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 //  This library is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU Lesser General Public
00008 //  License as published by the Free Software Foundation; either
00009 //  version 2.1 of the License.
00010 //
00011 //  This library is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 //  Lesser General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU Lesser General Public
00017 //  License along with this library; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 #ifndef _SALOME_CONTAINERMANAGER_IDL_
00023 #define _SALOME_CONTAINERMANAGER_IDL_
00024 
00025 #include "SALOME_Exception.idl"
00026 #include "SALOME_Component.idl"
00027 
00031 module Engines
00032 {
00033 
00035   typedef sequence<string> MachineList;
00037   typedef sequence<string> CompoList;
00039   typedef sequence<string> FilesList;
00041   typedef sequence<string> ModulesList;
00042 
00044 struct MachineParameters
00045 {
00047   string container_name;
00049   string hostname;
00051   CompoList componentList;
00053   MachineList computerList;
00055   string OS;
00057   long mem_mb;
00059   long cpu_clock;
00061   long nb_proc_per_node;
00063   long nb_node;
00065   boolean isMPI;
00067   string workingdir;
00069 
00073   string mode;
00075   string policy;
00076 
00078   string parallelLib;
00079   long nb_component_nodes;
00080 };
00081 
00083 struct MachineDefinition
00084 {
00086   string hostname;
00088   string alias;
00090   string protocol;
00092   string username;
00094   string applipath;
00096   CompoList componentList;
00098   string OS;
00100   long mem_mb;
00102   long cpu_clock;
00104   long nb_proc_per_node;
00106   long nb_node;
00108   string mpiImpl;
00110   string batch;
00111   long nb_component_nodes;
00112 };
00114   exception NotFound {};
00115 
00117 struct BatchParameters
00118 {
00120   string batch_directory; 
00122   string expected_during_time; 
00124   string mem; 
00126   long nb_proc; 
00127 };
00128 
00133   interface SalomeLauncher
00134   {
00135     long submitJob( in string xmlExecuteFile,
00136                     in string clusterName ) raises (SALOME::SALOME_Exception);
00137     long submitSalomeJob( in string fileToExecute,
00138                  in FilesList filesToExport,
00139                  in FilesList filesToImport,
00140                  in BatchParameters batch_params,
00141                  in MachineParameters params ) raises (SALOME::SALOME_Exception);
00142     string queryJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
00143     void deleteJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
00144     void getResultsJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception);
00145 
00146     boolean testBatch(in MachineParameters params) raises (SALOME::SALOME_Exception);
00147 
00148     void Shutdown();
00149 
00150     long getPID();
00151 
00152   } ;
00153   
00158   interface ContainerManager
00159   {
00161     Container FindOrStartContainer( in MachineParameters params);
00162 
00164 
00170     Container StartParallelContainer( in MachineParameters params);
00171 
00173     Container StartContainer( in MachineParameters params);
00174 
00176 
00181     Container GiveContainer( in MachineParameters params);
00182 
00184     void ShutdownContainers();
00185 
00186   } ;
00187   
00192   interface ResourcesManager
00193   {
00195     string FindFirst(in MachineList possibleComputers);
00196 
00198     string Find(in string policy, in MachineList possibleComputers);
00199 
00201 
00204     MachineList GetFittingResources( in MachineParameters params)
00205                                     raises (SALOME::SALOME_Exception);
00206 
00208     MachineDefinition GetMachineParameters( in string hostname );
00209 
00210   } ;
00211 };
00212   
00213 #endif