X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=idl%2FSALOME_ContainerManager.idl;h=49ff215019e279b291b1ed5ce5ddd5807da4e535;hb=3ce0546302001755828c8476425a60c6ab61ac92;hp=7fe11b29bc92f8b7a33ec4f3505c800b138ac37a;hpb=7d2fe213bdf5bf962ce11e253020c9d3e0bc1cce;p=modules%2Fkernel.git diff --git a/idl/SALOME_ContainerManager.idl b/idl/SALOME_ContainerManager.idl index 7fe11b29b..49ff21501 100644 --- a/idl/SALOME_ContainerManager.idl +++ b/idl/SALOME_ContainerManager.idl @@ -1,162 +1,128 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _SALOME_CONTAINERMANAGER_IDL_ #define _SALOME_CONTAINERMANAGER_IDL_ #include "SALOME_Exception.idl" #include "SALOME_Component.idl" +#include "SALOME_ResourcesManager.idl" + +/*! \file SALOME_ContainerManager.idl \brief interfaces for %SALOME Container Manager service +*/ module Engines { -/*! - Type to transmit list of machines. -*/ - typedef sequence MachineList; - typedef sequence CompoList; - typedef sequence FilesList; - typedef sequence ModulesList; - -/*! - Type to describe properties of resource. -*/ -struct MachineParameters +//! Type to describe required properties of a container +struct ContainerParameters { + //! container name if given else automatic string container_name; - string hostname; - string alias; - string protocol; - string username; - string applipath; - ModulesList modList; - string OS; - long mem_mb; - long cpu_clock; - long nb_proc_per_node; - long nb_node; - boolean isMPI; - string mpiImpl; - string batch; + + //! creation mode for GiveContainer if given else automatic + /*! List of possible values: + * "find" : search the first container whose name is container_name on + * resources listed in resource_params.resList. + * Return nil if none found. + * "findorstart" : same as "find", but start a new container if none found. + * "start" : create a new container. If there is already a container with the + * same name on the chosen resource, it will be shut down. + * "get" : search an existing container on the best fitting resource. + * "getorstart" : same as "get", but start a new container if none found. + */ + string mode; + + //! container working directory if given else automatic string workingdir; - // PaCO specific informations + // Parallel part + //! Number of proc of a parallel container + long nb_proc; + //! if true start a MPI container + boolean isMPI; + //! PaCO specific information string parallelLib; - long nb_component_nodes; -}; - -/*! - exception thrown if a computer is not found in the catalog -*/ - exception NotFound {}; - enum policy {P_FIRST,P_CYCL,P_BEST}; - typedef policy ResPolicy; + //! Parameters to choose a resource + ResourceParameters resource_params; +}; -/*! - Structure used for Salome Batch Job parameters -*/ -struct BatchParameters +struct KeyValPairString { - string batch_directory; // Where batch command will be launched - // and log files will be created - string expected_during_time; // Time for the batch - // has to be like this : hh:mm - string mem; // Minimum of memory needed - // has to be like : 32gb or 512mb - long nb_proc; // Number of processors requested + string key; + string val; }; -/*! \brief Interface of the %salomelauncher - This interface is used for interaction with the unique instance - of SalomeLauncher -*/ - interface SalomeLauncher - { - long submitJob( in string xmlExecuteFile, - in string clusterName ) raises (SALOME::SALOME_Exception); - long submitSalomeJob( in string fileToExecute, - in FilesList filesToExport, - in FilesList filesToImport, - in BatchParameters batch_params, - in MachineParameters params ) raises (SALOME::SALOME_Exception); - string queryJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception); - void deleteJob( in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception); - void getResultsJob( in string directory, in long jobId, in MachineParameters params ) raises (SALOME::SALOME_Exception); - - boolean testBatch(in MachineParameters params) raises (SALOME::SALOME_Exception); - - void Shutdown(); - - long getPID(); - - } ; - +typedef sequence KeyValDict; + /*! \brief Interface of the %containerManager This interface is used for interaction with the unique instance of ContainerManager */ - interface ContainerManager - { - Container FindOrStartContainer( in MachineParameters params, - in MachineList possibleComputers); +interface ContainerManager +{ + //! GiveContainer - use mode parameter of ContainerParameters to configure + //! how this method works + //! Currently: get, start, getorstart, findorstart, find + Container GiveContainer(in ContainerParameters params) raises (SALOME::SALOME_Exception); - /*! - This operation launches a PaCO++ container. + //! Shutdown all containers that have been launched by the container manager. This termination is soft. It means that orb.shutdown is invoked meaning that completion of all CORBA + void ShutdownContainers(); + + //! Stronger version than ShutdownContainers. This method does not wait for completion of last CORBA invokation on containers. It terminates them + void ShutdownContainersNow(); - \param Description of the container resquested. - \param List of computers ressources. + long GetTimeOutToLaunchServerInSecond(); - \return Container's CORBA reference. - */ - Container FindOrStartParallelContainer( in MachineParameters params, - in MachineList possibleComputers); + void SetTimeOutToLaunchServerInSecond(in long timeInSecond); - Container StartContainer( in MachineParameters params, - in ResPolicy policy, - in CompoList componentList ); + long GetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond(); - Container GiveContainer( in MachineParameters params, - in ResPolicy policy, - in CompoList componentList ); + void SetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond(in long timeInMS); + + long GetDeltaTimeBetweenCPUMemMeasureInMilliSecond(); - void ShutdownContainers(); + void SetDeltaTimeBetweenCPUMemMeasureInMilliSecond(in long timeInMS); - } ; - -/*! \brief Interface of the %resourcesManager - This interface is used for interaction with the unique instance - of ResourcesManager -*/ - interface ResourcesManager - { - string FindFirst(in MachineList possibleComputers); + void SetOverrideEnvForContainers(in KeyValDict env); + + KeyValDict GetOverrideEnvForContainers(); + + void SetBigObjOnDiskThreshold(in long thresholdInByte); + + void SetBigObjOnDiskDirectory(in string directory); + + void SetDirectoryForReplayFiles(in string directory); + + void SetNumberOfRetry(in long nbRetry); + + long GetNumberOfRetry(); - MachineList GetFittingResources( in MachineParameters params, - in CompoList componentList ) - raises (SALOME::SALOME_Exception); + void SetCodeOnContainerStartUp(in string code); - MachineParameters GetMachineParameters( in string hostname ); + string GetCodeOnContainerStartUp(); +} ; - } ; }; #endif