SALOME_Exception.idl
SALOME_Comm.idl
SALOME_ModuleCatalog.idl
- SALOME_RessourcesCatalog.idl
+ SALOME_ResourcesManager.idl
+ SALOME_Launcher.idl
SALOMEDS.idl
SALOMEDS_Attributes.idl
SALOME_Component.idl
SALOME_Exception.idl \
SALOME_Comm.idl \
SALOME_ModuleCatalog.idl \
- SALOME_RessourcesCatalog.idl \
+ SALOME_ResourcesManager.idl \
+ SALOME_Launcher.idl \
SALOMEDS.idl \
SALOMEDS_Attributes.idl \
SALOME_Component.idl \
SALOME_ExceptionSK.cc \
SALOME_CommSK.cc \
SALOME_ModuleCatalogSK.cc \
- SALOME_RessourcesCatalogSK.cc \
+ SALOME_ResourcesManagerSK.cc \
+ SALOME_LauncherSK.cc \
SALOMEDSSK.cc \
SALOMEDS_AttributesSK.cc \
SALOME_ComponentSK.cc \
DYNIDL_SRCS = \
SALOME_PortsDynSK.cc Calcium_PortsDynSK.cc SALOME_ContainerManagerDynSK.cc \
SALOME_CommDynSK.cc SALOME_RegistryDynSK.cc SALOME_ModuleCatalogDynSK.cc \
- SALOMEDSDynSK.cc SALOME_SessionDynSK.cc SALOME_RessourcesCatalogDynSK.cc \
+ SALOMEDSDynSK.cc SALOME_SessionDynSK.cc SALOME_ResourcesManagerDynSK.cc SALOME_LauncherDynSK.cc \
DSC_EnginesDynSK.cc SALOME_ComponentDynSK.cc SALOME_GenericObjDynSK.cc SALOME_TypesDynSK.cc \
Palm_PortsDynSK.cc SALOME_ExceptionDynSK.cc SALOMEDS_AttributesDynSK.cc \
LoggerDynSK.cc SALOME_PACOExtensionDynSK.cc SALOME_ParamPortsDynSK.cc SALOME_PyNodeDynSK.cc \
#include "SALOME_Exception.idl"
#include "SALOME_Component.idl"
+#include "SALOME_ResourcesManager.idl"
-/*! \file SALOME_ContainerManager.idl \brief interfaces for %SALOME launcher and container manager
+/*! \file SALOME_ContainerManager.idl \brief interfaces for %SALOME Container Manager service
*/
module Engines
{
-//! Type to transmit list of resources.
-typedef sequence<string> ResourceList;
-//! components list
-typedef sequence<string> CompoList;
-//! files list
-typedef sequence<string> FilesList;
-//! modules list
-typedef sequence<string> ModulesList;
-
-//! A generic parameter
-struct Parameter
-{
- string name;
- string value;
-};
-//! Generic parameter list
-typedef sequence<Engines::Parameter> ParameterList;
-
-//! Type to describe required properties of a resource
-struct ResourceParameters
-{
- //! resource name - manual selection
- string name;
- //! host name
- string hostname;
- //! if true select only resources that can launch batch jobs
- boolean can_launch_batch_jobs;
- //! if true select only resources that can run containers
- boolean can_run_containers;
- //! if given required operating system
- string OS;
- //! if given list of components that could be loaded on a container
- //! Optional if no resource are found with this constraint
- CompoList componentList;
-
- // Permits to order resources
- //! required number of proc
- long nb_proc;
- //! required memory size
- long mem_mb;
- //! required frequency
- long cpu_clock;
- //! required number of node
- long nb_node;
- //! required number of proc per node
- long nb_proc_per_node;
-
- // Permits to configure SALOME resource management
- //! resource management policy : first, cycl, altcycl or best (can be extended)
- string policy;
- //! restricted list of resources to search in
- ResourceList resList;
-};
-
//! Type to describe required properties of a container
struct ContainerParameters
{
ResourceParameters resource_params;
};
-//! Type to describe a resource
-struct ResourceDefinition
-{
- //! name
- string name;
- //! hostname
- string hostname;
- //! Type of the resource ("cluster" or "single_machine")
- string type;
- //! protocol to connect to the resource
- //! protocol used to start a remote container (ssh or rsh)
- string protocol;
- //! login name to use to start a remote container
- string username;
- //! salome application to use to start a remote container
- string applipath;
- //! list of available components
- CompoList componentList;
-
- //! operating system
- string OS;
- //! memory size per node
- long mem_mb;
- //! frequency
- long cpu_clock;
- //! number of node
- long nb_node;
- //! number of proc per node
- long nb_proc_per_node;
- //! batch system
- string batch;
- //! MPI implementation
- string mpiImpl;
- //! if the resource is a cluster:
- //! internal protocol to use to start a remote container (ssh or rsh) on the cluster
- string iprotocol;
-
- //! Specify if the resource can launch batch jobs
- boolean can_launch_batch_jobs;
- //! Specify if the resource can run containers
- boolean can_run_containers;
-
- //! Predefined working directory on the resource
- string working_directory;
-};
-
-//! exception thrown if a computer is not found in the catalog
-exception NotFound {};
-
-struct JobParameters
-{
- string job_name;
- //! Job Type - Could be equal to "command" or "yacs_file" or "python_salome"
- string job_type;
-
- // Common values
- string job_file;
- string env_file;
- FilesList in_files;
- FilesList out_files;
- string work_directory;
- string local_directory;
- string result_directory;
-
- /*! Time for the batch (has to be like this : hh:mm) - Could be empty, in
- this case, default value of the selected resource will be used.
- */
- string maximum_duration;
-
- // Memory is expressed in megabytes -> mem_mb
- // Number of Processors -> nb_proc
- ResourceParameters resource_required;
-
- /*!
- Name of the batch queue choosed - optional
- */
- string queue;
-
- /*!
- Specific parameters for each type of job - optional
- */
- Engines::ParameterList specific_parameters;
-};
-
-struct JobDescription
-{
- long job_id;
- Engines::JobParameters job_parameters;
-};
-typedef sequence<Engines::JobDescription> JobsList;
-
-interface SalomeLauncherObserver
-{
- void notify(in string event_name, in string event_data);
-};
-
-/*! \brief Interface of the %salomelauncher
- This interface is used for interaction with the unique instance
- of SalomeLauncher
-*/
-interface SalomeLauncher
-{
- // Main methods
- long createJob (in Engines::JobParameters job_parameters) raises (SALOME::SALOME_Exception);
- void launchJob (in long job_id) raises (SALOME::SALOME_Exception);
- string getJobState (in long job_id) raises (SALOME::SALOME_Exception);
- void getJobResults(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
- boolean getJobDumpState(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
- void stopJob (in long job_id) raises (SALOME::SALOME_Exception);
- void removeJob (in long job_id) raises (SALOME::SALOME_Exception);
-
- // Useful methods
- long createJobWithFile(in string xmlJobFile, in string clusterName) raises (SALOME::SALOME_Exception);
- boolean testBatch (in ResourceParameters params) raises (SALOME::SALOME_Exception);
-
- // SALOME kernel service methods
- void Shutdown();
- long getPID();
-
- // Observer and introspection methods
- void addObserver(in Engines::SalomeLauncherObserver observer);
- void removeObserver(in Engines::SalomeLauncherObserver observer);
- Engines::JobsList getJobsList();
- Engines::JobParameters getJobParameters(in long job_id) raises (SALOME::SALOME_Exception);
-
- // Save and load methods
- void loadJobs(in string jobs_file) raises (SALOME::SALOME_Exception);
- void saveJobs(in string jobs_file) raises (SALOME::SALOME_Exception);
-
-};
-
/*! \brief Interface of the %containerManager
This interface is used for interaction with the unique instance
of ContainerManager
//! Shutdown all containers that have been launched by the container manager
void ShutdownContainers();
} ;
-
-/*! \brief Interface of the %resourcesManager
- This interface is used for interaction with the unique instance
- of ResourcesManager
-*/
-interface ResourcesManager
-{
- //! Find first available resource in a resources list
- string FindFirst(in ResourceList possibleResources);
-
- //! Find best available computer according to policy in a computers list
- string Find(in string policy, in ResourceList possibleResources);
-
- //! Get a list of resources that are best suited to launch a container given constraints
- /*!
- The constraints are resource constraints (params) and components constraints (componentList)
- */
- ResourceList GetFittingResources(in ResourceParameters params) raises (SALOME::SALOME_Exception);
-
- //! Get definition of a resource
- ResourceDefinition GetResourceDefinition(in string name) raises (SALOME::SALOME_Exception);
-
- //! Add a new resource to the resource_manager
- /*!
- write -> true, resource manager will add it into a xml_file
- xml_file -> could be empty, in this case if write is true, resource manager will write
- the resource in its first ResourceCatalog file
- */
- void AddResource(in ResourceDefinition new_resource, in boolean write, in string xml_file)
- raises (SALOME::SALOME_Exception);
-
- //! Remove a new resource to the resource_manager
- /*!
- write -> true, resource manager will write a new xml_file
- xml_file -> could be empty, in this case if write is true, resource manager will write
- the resource in its first ResourceCatalog file
- */
- void RemoveResource(in string resource_name, in boolean write, in string xml_file)
- raises (SALOME::SALOME_Exception);
-};
-
-// For compatibility - will be erased on SALOME 6
-typedef sequence<string> MachineList;
-//! Type to describe required properties of a container.
-struct MachineParameters
-{
- //! container name if given else automatic
- string container_name;
- //! host name if given else automatic
- string hostname;
- //! if given list of components that could be loaded on the container
- CompoList componentList;
- //! if given restricted list of machines to search in
- MachineList computerList;
- //! required operating system
- string OS;
- //! required memory size
- long mem_mb;
- //! required frequency
- long cpu_clock;
- //! required number of proc per node
- long nb_proc_per_node;
- //! required number of node
- long nb_node;
- //! if true start a MPI container
- boolean isMPI;
- //! container working directory
- string workingdir;
- //! creation mode for GiveContainer.
- /*!start creates a new container
- * get try to find an existing container
- * getorstart use an existing container if it exists or creates a new one
- */
- string mode;
- //! resource management policy : first, cycl, altcycl or best (can be extended)
- string policy;
-
- //! PaCO specific informations
- string parallelLib;
- long nb_component_nodes;
-};
};
#endif
--- /dev/null
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _SALOME_LAUNCHER_IDL_
+#define _SALOME_LAUNCHER_IDL_
+
+#include "SALOME_Exception.idl"
+#include "SALOME_ResourcesManager.idl"
+
+/*! \file SALOME_Launcher.idl \brief interfaces for %SALOME Launcher service
+*/
+
+module Engines
+{
+
+//! files list
+typedef sequence<string> FilesList;
+
+//! A generic parameter
+struct Parameter
+{
+ string name;
+ string value;
+};
+//! Generic parameter list
+typedef sequence<Engines::Parameter> ParameterList;
+
+struct JobParameters
+{
+ string job_name;
+ //! Job Type - Could be equal to "command" or "yacs_file" or "python_salome"
+ string job_type;
+
+ // Common values
+ string job_file;
+ string env_file;
+ FilesList in_files;
+ FilesList out_files;
+ string work_directory;
+ string local_directory;
+ string result_directory;
+
+ /*! Time for the batch (has to be like this : hh:mm) - Could be empty, in
+ this case, default value of the selected resource will be used.
+ */
+ string maximum_duration;
+
+ // Memory is expressed in megabytes -> mem_mb
+ // Number of Processors -> nb_proc
+ ResourceParameters resource_required;
+
+ /*!
+ Name of the batch queue choosed - optional
+ */
+ string queue;
+
+ /*!
+ Specific parameters for each type of job - optional
+ */
+ Engines::ParameterList specific_parameters;
+};
+
+struct JobDescription
+{
+ long job_id;
+ Engines::JobParameters job_parameters;
+};
+typedef sequence<Engines::JobDescription> JobsList;
+
+interface SalomeLauncherObserver
+{
+ void notify(in string event_name, in string event_data);
+};
+
+/*! \brief Interface of the %salomelauncher
+ This interface is used for interaction with the unique instance
+ of SalomeLauncher
+*/
+interface SalomeLauncher
+{
+ // Main methods
+ long createJob (in Engines::JobParameters job_parameters) raises (SALOME::SALOME_Exception);
+ void launchJob (in long job_id) raises (SALOME::SALOME_Exception);
+ string getJobState (in long job_id) raises (SALOME::SALOME_Exception);
+ void getJobResults(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
+ boolean getJobDumpState(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
+ void stopJob (in long job_id) raises (SALOME::SALOME_Exception);
+ void removeJob (in long job_id) raises (SALOME::SALOME_Exception);
+
+ // Useful methods
+ long createJobWithFile(in string xmlJobFile, in string clusterName) raises (SALOME::SALOME_Exception);
+ boolean testBatch (in ResourceParameters params) raises (SALOME::SALOME_Exception);
+
+ // SALOME kernel service methods
+ void Shutdown();
+ long getPID();
+
+ // Observer and introspection methods
+ void addObserver(in Engines::SalomeLauncherObserver observer);
+ void removeObserver(in Engines::SalomeLauncherObserver observer);
+ Engines::JobsList getJobsList();
+ Engines::JobParameters getJobParameters(in long job_id) raises (SALOME::SALOME_Exception);
+
+ // Save and load methods
+ void loadJobs(in string jobs_file) raises (SALOME::SALOME_Exception);
+ void saveJobs(in string jobs_file) raises (SALOME::SALOME_Exception);
+
+};
+
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _SALOME_RESOURCESMANAGER_IDL_
+#define _SALOME_RESOURCESMANAGER_IDL_
+
+#include "SALOME_Exception.idl"
+
+/*! \file SALOME_ResourcesManager.idl \brief interfaces for %SALOME Resources Manager service
+*/
+
+module Engines
+{
+
+//! Type to transmit list of resources.
+typedef sequence<string> ResourceList;
+//! components list
+typedef sequence<string> CompoList;
+
+//! Type to describe required properties of a resource
+struct ResourceParameters
+{
+ //! resource name - manual selection
+ string name;
+ //! host name
+ string hostname;
+ //! if true select only resources that can launch batch jobs
+ boolean can_launch_batch_jobs;
+ //! if true select only resources that can run containers
+ boolean can_run_containers;
+ //! if given required operating system
+ string OS;
+ //! if given list of components that could be loaded on a container
+ //! Optional if no resource are found with this constraint
+ CompoList componentList;
+
+ // Permits to order resources
+ //! required number of proc
+ long nb_proc;
+ //! required memory size
+ long mem_mb;
+ //! required frequency
+ long cpu_clock;
+ //! required number of node
+ long nb_node;
+ //! required number of proc per node
+ long nb_proc_per_node;
+
+ // Permits to configure SALOME resource management
+ //! resource management policy : first, cycl, altcycl or best (can be extended)
+ string policy;
+ //! restricted list of resources to search in
+ ResourceList resList;
+};
+
+//! Type to describe a resource
+struct ResourceDefinition
+{
+ //! name
+ string name;
+ //! hostname
+ string hostname;
+ //! Type of the resource ("cluster" or "single_machine")
+ string type;
+ //! protocol to connect to the resource
+ //! protocol used to start a remote container (ssh or rsh)
+ string protocol;
+ //! login name to use to start a remote container
+ string username;
+ //! salome application to use to start a remote container
+ string applipath;
+ //! list of available components
+ CompoList componentList;
+
+ //! operating system
+ string OS;
+ //! memory size per node
+ long mem_mb;
+ //! frequency
+ long cpu_clock;
+ //! number of node
+ long nb_node;
+ //! number of proc per node
+ long nb_proc_per_node;
+ //! batch system
+ string batch;
+ //! MPI implementation
+ string mpiImpl;
+ //! if the resource is a cluster:
+ //! internal protocol to use to start a remote container (ssh or rsh) on the cluster
+ string iprotocol;
+
+ //! Specify if the resource can launch batch jobs
+ boolean can_launch_batch_jobs;
+ //! Specify if the resource can run containers
+ boolean can_run_containers;
+
+ //! Predefined working directory on the resource
+ string working_directory;
+};
+
+/*! \brief Interface of the %resourcesManager
+ This interface is used for interaction with the unique instance
+ of ResourcesManager
+*/
+interface ResourcesManager
+{
+ //! Find first available resource in a resources list
+ string FindFirst(in ResourceList possibleResources);
+
+ //! Find best available computer according to policy in a computers list
+ string Find(in string policy, in ResourceList possibleResources);
+
+ //! Get a list of resources that are best suited to launch a container given constraints
+ /*!
+ The constraints are resource constraints (params) and components constraints (componentList)
+ */
+ ResourceList GetFittingResources(in ResourceParameters params) raises (SALOME::SALOME_Exception);
+
+ //! Get definition of a resource
+ ResourceDefinition GetResourceDefinition(in string name) raises (SALOME::SALOME_Exception);
+
+ //! Add a new resource to the resource_manager
+ /*!
+ write -> true, resource manager will add it into a xml_file
+ xml_file -> could be empty, in this case if write is true, resource manager will write
+ the resource in its first ResourceCatalog file
+ */
+ void AddResource(in ResourceDefinition new_resource, in boolean write, in string xml_file)
+ raises (SALOME::SALOME_Exception);
+
+ //! Remove a new resource to the resource_manager
+ /*!
+ write -> true, resource manager will write a new xml_file
+ xml_file -> could be empty, in this case if write is true, resource manager will write
+ the resource in its first ResourceCatalog file
+ */
+ void RemoveResource(in string resource_name, in boolean write, in string xml_file)
+ raises (SALOME::SALOME_Exception);
+};
+
+};
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 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
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-// File : SALOME_RessourcesCatalog.idl
-// Author : Estelle Deville
-// $Header$
-//
-/*! \file SALOME_RessourcesCatalog.idl \brief interfaces for %SALOME Resources Catalog
-*/
-
-/*! \brief module that provides interface to manage the Resources Catalog of %SALOME
-*/
-module SALOME_RessourcesCatalog{
-
- //! Information about a processor
- struct proc_info{
- //! processor number
- long number;
- //! model name
- string model_name;
- //! frequency in MHz
- float cpu_mhz;
- //! cache size in MB
- float cache_size;
- };
-
- //! a list of processor informations
- typedef sequence<proc_info> ListOfProc;
-
- //! Information about a computer
- /*!
- Os and informations about processors
- */
- struct computer_info{
- //! computer name
- string name;
- //! OS name
- string OS;
- //! OS version
- string OS_version;
- //! processors list
- ListOfProc procs;
- };
-
- //! Container type
- enum ContainerType {
- Cpp, /*!< C++ container */
- python, /*!< python container */
- NP /*!< NP container */
- };
- //! a list of container types
- typedef sequence<ContainerType> ListOfContainerType;
-
- //! a list of computer names
- typedef sequence<string> ListOfComputer;
-
- //! exception thrown if a computer is not found in the catalog
- exception NotFound {};
-
- //------------------------------------------------------------------
-/*! \brief interface to get information about Resources
-*/
- interface RessourcesCatalog {
- //! Get the catalog computers list
- ListOfComputer GetComputerList();
- //! Get the container types list for a given computer
- ListOfContainerType GetContainerTypeList (in string computer) raises(NotFound);
- //! Get computer information for a given computer
- computer_info GetComputerInfo(in string computer) raises(NotFound);
- };
-};
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(SALOMEDS)
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
-#include CORBA_SERVER_HEADER(SALOME_ContainerManager)
+#include CORBA_SERVER_HEADER(SALOME_Launcher)
#include CORBA_CLIENT_HEADER(SALOME_Session)
#include CORBA_SERVER_HEADER(SALOME_Exception)
#include "SALOME_Launcher_defs.hxx"
#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
+#include CORBA_CLIENT_HEADER(SALOME_Launcher)
#include "Launcher.hxx"
#include <string>
Engines::ContainerManager_var contManager = LCC.getContainerManager();
Engines::ResourcesManager_var resManager = LCC.getResourcesManager();
- Engines::MachineParameters params;
+ Engines::ContainerParameters params;
LCC.preSet(params);
params.container_name = _containerName.c_str();
- params.hostname = _refMachine.c_str();
-
- Engines::ContainerParameters new_params;
- LCC.convert(params, new_params);
- new_params.mode = CORBA::string_dup("findorstart");
- container = contManager->GiveContainer(new_params);
+ params.resource_params.hostname = _refMachine.c_str();
+ params.mode = CORBA::string_dup("findorstart");
+ container = contManager->GiveContainer(params);
if (CORBA::is_nil(container))
{
INFOS("machine " << _refMachine << " unreachable");
#include CORBA_CLIENT_HEADER(SALOME_Registry)
#include CORBA_CLIENT_HEADER(SALOMEDS)
#include CORBA_CLIENT_HEADER(Logger)
+#include CORBA_CLIENT_HEADER(SALOME_Launcher)
#include "SALOME_ContainerManager.hxx"
#include "SALOME_Component_i.hxx"
//=============================================================================
/*! \brief Find an already existing and registered component instance.
*
- * \param params machine parameters like type or name...
+ * \param params container parameters like type or name...
* \param componentName the name of component class
* \param studyId default = 0 : multistudy instance
* \return a CORBA reference of the component instance, or _nil if not found
*/
//=============================================================================
Engines::EngineComponent_ptr
-SALOME_LifeCycleCORBA::FindComponent(const Engines::MachineParameters& params,
+SALOME_LifeCycleCORBA::FindComponent(const Engines::ContainerParameters& params,
const char *componentName,
int studyId)
{
if (! isKnownComponentClass(componentName))
return Engines::EngineComponent::_nil();
- Engines::ContainerParameters new_params;
- convert(params, new_params);
+ Engines::ContainerParameters new_params(params);
new_params.resource_params.componentList.length(1);
new_params.resource_params.componentList[0] = componentName;
new_params.resource_params.can_run_containers = true;
}
//=============================================================================
-/*! \brief Load a component instance on a container defined by machine parameters
+/*! \brief Load a component instance on a container defined by its parameters
*
- * \param params machine parameters like type or name...
+ * \param params container parameters like type or name...
* \param componentName the name of component class
* \param studyId default = 0 : multistudy instance
* \return a CORBA reference of the component instance, or _nil if problem
//=============================================================================
Engines::EngineComponent_ptr
-SALOME_LifeCycleCORBA::LoadComponent(const Engines::MachineParameters& params,
+SALOME_LifeCycleCORBA::LoadComponent(const Engines::ContainerParameters& params,
const char *componentName,
int studyId)
{
if (! isKnownComponentClass(componentName))
return Engines::EngineComponent::_nil();
- Engines::ContainerParameters new_params;
- convert(params, new_params);
+ Engines::ContainerParameters new_params(params);
new_params.resource_params.componentList.length(1);
new_params.resource_params.componentList[0] = componentName;
new_params.resource_params.can_run_containers = true;
//=============================================================================
/*! \brief Find an already existing and registered component instance or load a new
- * component instance on a container defined by machine parameters.
+ * component instance on a container defined by its parameters.
*
- * \param params machine parameters like type or name...
+ * \param params container parameters like type or name...
* \param componentName the name of component class
* \param studyId default = 0 : multistudy instance
* \return a CORBA reference of the component instance, or _nil if problem
*/
//=============================================================================
-Engines::EngineComponent_ptr
-SALOME_LifeCycleCORBA::
-FindOrLoad_Component(const Engines::MachineParameters& params,
- const char *componentName,
- int studyId)
-{
- // --- Check if Component Name is known in ModuleCatalog
-
- if (! isKnownComponentClass(componentName))
- return Engines::EngineComponent::_nil();
-
- Engines::ContainerParameters new_params;
- convert(params, new_params);
- new_params.resource_params.componentList.length(1);
- new_params.resource_params.componentList[0] = componentName;
- new_params.resource_params.can_run_containers = true;
-
- // For Compatibility -> if hostname == localhost put name == hostname
- if (std::string(new_params.resource_params.hostname.in()) == "localhost")
- {
- new_params.resource_params.hostname = CORBA::string_dup(Kernel_Utils::GetHostname().c_str());
- new_params.resource_params.name = CORBA::string_dup("localhost");
- }
-
- Engines::ResourceList_var listOfResources;
- try
- {
- listOfResources = _ResManager->GetFittingResources(new_params.resource_params);
- }
- catch( const SALOME::SALOME_Exception& ex )
- {
- return Engines::EngineComponent::_nil();
- }
-
- Engines::EngineComponent_var compo = _FindComponent(new_params,
- componentName,
- studyId,
- listOfResources);
-
- if(CORBA::is_nil(compo))
- {
- new_params.resource_params.resList = listOfResources;
- compo = _LoadComponent(new_params,
- componentName,
- studyId);
- }
-
- return compo._retn();
-}
-
Engines::EngineComponent_ptr
SALOME_LifeCycleCORBA::
FindOrLoad_Component(const Engines::ContainerParameters& params,
std::string st2Container(stContainer);
int rg=st2Container.find("/");
- Engines::MachineParameters_var params=new Engines::MachineParameters;
+ Engines::ContainerParameters params;
preSet(params);
if (rg<0)
{
// containerName doesn't contain "/" => Local container
- params->container_name=CORBA::string_dup(stContainer);
- params->hostname="";
+ params.container_name = CORBA::string_dup(stContainer);
}
else
{
stContainer[rg]='\0';
- params->container_name=CORBA::string_dup(stContainer+rg+1);
- params->hostname=CORBA::string_dup(stContainer);
+ params.container_name = CORBA::string_dup(stContainer+rg+1);
+ params.resource_params.hostname = CORBA::string_dup(stContainer);
}
- params->isMPI = false;
- SCRUTE(params->container_name);
+ params.isMPI = false;
+ SCRUTE(params.container_name);
free(stContainer);
return FindOrLoad_Component(params, componentName);
}
}
//=============================================================================
-/*!
- * Not so complex... useful ?
+/*! \brief Initialisation of a given Engines::ResourceParameters with default values.
*/
//=============================================================================
-bool
-SALOME_LifeCycleCORBA::isMpiContainer(const Engines::ContainerParameters& params)
- throw(IncompatibleComponent)
-{
- if( params.isMPI )
- return true;
- else
- return false;
-}
-
-
-//=============================================================================
-/*! \brief Initialisation of a given Engines::MachineParameters with default values.
- *
- * - container_name = "" : not relevant
- * - hostname = "" : not relevant
- * - OS = "" : not relevant
- * - nb_proc = 0 : not relevant
- * - mem_mb = 0 : not relevant
- * - cpu_clock = 0 : not relevant
- * - nb_proc_per_node = 0 : not relevant
- * - nb_node = 0 : not relevant
- * - isMPI = false : standard components
- */
-//=============================================================================
-
-void SALOME_LifeCycleCORBA::preSet(Engines::MachineParameters& params)
-{
- params.container_name = "";
- params.hostname = "";
- params.OS = "";
- params.mem_mb = 0;
- params.cpu_clock = 0;
- params.nb_proc_per_node = 0;
- params.nb_node = 0;
- params.isMPI = false;
- params.workingdir = "";
- params.mode = "";
- params.policy = "";
- params.parallelLib = "";
- params.nb_component_nodes = 0;
-}
-
void
SALOME_LifeCycleCORBA::preSet(Engines::ResourceParameters& params)
{
params.can_run_containers = false;
}
+//=============================================================================
+/*! \brief Initialisation of a given Engines::ContainerParameters with default values.
+ */
+//=============================================================================
+
void SALOME_LifeCycleCORBA::preSet( Engines::ContainerParameters& params)
{
params.container_name = "";
SALOME_LifeCycleCORBA::preSet(params.resource_params);
}
-void
-SALOME_LifeCycleCORBA::convert(const Engines::MachineParameters& params_in,
- Engines::ContainerParameters& params_out)
-{
- SALOME_LifeCycleCORBA::preSet(params_out);
-
- // Container part
- params_out.container_name = params_in.container_name;
- params_out.mode = params_in.mode;
- params_out.workingdir = params_in.workingdir;
- params_out.isMPI = params_in.isMPI;
- params_out.parallelLib = params_in.parallelLib;
-
- // Resource part
- params_out.resource_params.hostname = params_in.hostname;
- params_out.resource_params.OS = params_in.OS;
- params_out.resource_params.mem_mb = params_in.mem_mb;
- params_out.resource_params.cpu_clock = params_in.cpu_clock;
- params_out.resource_params.nb_node = params_in.nb_node;
- params_out.resource_params.nb_proc_per_node = params_in.nb_proc_per_node;
- params_out.resource_params.policy = params_in.policy;
- params_out.resource_params.componentList = params_in.componentList;
-
- params_out.resource_params.resList.length(params_in.computerList.length());
- for (CORBA::ULong i = 0; i < params_in.computerList.length(); i++)
- params_out.resource_params.resList[i] = params_in.computerList[i];
-}
-
//=============================================================================
/*!
* \return a number of processors not 0, only for MPI containers
int SALOME_LifeCycleCORBA::NbProc(const Engines::ContainerParameters& params)
{
- if( !isMpiContainer(params) )
+ if( !params.isMPI )
return 0;
else if( params.nb_proc <= 0 )
return 1;
for(unsigned int i=0; i < listOfResources.length(); i++)
{
const char * currentResource = listOfResources[i];
- CORBA::Object_var obj = _NS->ResolveComponent(currentResource,
+ Engines::ResourceDefinition_var resource_definition =
+ _ResManager->GetResourceDefinition(currentResource);
+ CORBA::Object_var obj = _NS->ResolveComponent(resource_definition->hostname.in(),
containerName,
componentName,
nbproc);
{
resourcesOK->length(lghtOfresourcesOK);
CORBA::String_var bestResource = _ResManager->FindFirst(resourcesOK);
- CORBA::Object_var obj = _NS->ResolveComponent(bestResource,
+ Engines::ResourceDefinition_var resource_definition =
+ _ResManager->GetResourceDefinition(bestResource);
+ CORBA::Object_var obj = _NS->ResolveComponent(resource_definition->hostname.in(),
containerName,
componentName,
nbproc);
virtual ~SALOME_LifeCycleCORBA();
Engines::EngineComponent_ptr
- FindComponent(const Engines::MachineParameters& params,
+ FindComponent(const Engines::ContainerParameters& params,
const char *componentName,
int studyId=0);
Engines::EngineComponent_ptr
- LoadComponent(const Engines::MachineParameters& params,
+ LoadComponent(const Engines::ContainerParameters& params,
const char *componentName,
int studyId=0);
- Engines::EngineComponent_ptr
- FindOrLoad_Component(const Engines::MachineParameters& params,
- const char *componentName,
- int studyId =0);
-
- // SALOME 6 - Interface
Engines::EngineComponent_ptr
FindOrLoad_Component(const Engines::ContainerParameters& params,
const char *componentName,
Engines::EngineComponent_ptr
FindOrLoad_Component(const char *containerName,
- const char *componentName); // for compatibility
+ const char *componentName);
// Parallel extension
Engines::EngineComponent_ptr
bool isKnownComponentClass(const char *componentName);
- bool isMpiContainer(const Engines::ContainerParameters& params)
- throw(IncompatibleComponent);
-
int NbProc(const Engines::ContainerParameters& params);
- static void preSet(Engines::MachineParameters& outparams);
static void preSet(Engines::ResourceParameters& outparams);
static void preSet(Engines::ContainerParameters& outparams);
void shutdownServers();
static void killOmniNames();
- // For SALOME 5.1.x
- // Will be deleted on SALOME 6
- void convert(const Engines::MachineParameters& params_in,
- Engines::ContainerParameters& params_out);
protected:
/*! Establish if a component called "componentName" in a container called
{
SALOME_LifeCycleCORBA _LCC(&_NS);
- Engines::MachineParameters params;
+ Engines::ContainerParameters params;
_LCC.preSet(params);
Engines::EngineComponent_var mycompo =
_LCC.FindOrLoad_Component(params,"SalomeTestComponent");
{
SALOME_LifeCycleCORBA _LCC(&_NS);
- Engines::MachineParameters params;
+ Engines::ContainerParameters params;
_LCC.preSet(params);
std::string hostname=Kernel_Utils::GetHostname();
- params.hostname=hostname.c_str();
+ params.resource_params.hostname=hostname.c_str();
Engines::EngineComponent_var mycompo =
_LCC.FindOrLoad_Component(params,"SalomeTestComponent");
CPPUNIT_ASSERT(!CORBA::is_nil(mycompo));
{
SALOME_LifeCycleCORBA _LCC(&_NS);
- Engines::MachineParameters params;
+ Engines::ContainerParameters params;
_LCC.preSet(params);
std::string containerName = "myContainer";
params.container_name = containerName.c_str();
std::string remoteHost = GetRemoteHost();
- Engines::MachineParameters params;
+ Engines::ContainerParameters params;
_LCC.preSet(params);
- params.hostname = remoteHost.c_str();
+ params.resource_params.hostname = remoteHost.c_str();
Engines::EngineComponent_var mycompo1 =
_LCC.FindOrLoad_Component(params,"SalomeTestComponent");
std::string remoteHost = GetRemoteHost();
- Engines::MachineParameters params;
+ Engines::ContainerParameters params;
_LCC.preSet(params);
- params.hostname = remoteHost.c_str();
+ params.resource_params.hostname = remoteHost.c_str();
params.container_name = "anotherContainer";
Engines::EngineComponent_var mycompo1 =
containerName,
componentName)
-class MachineParameters (Engines.MachineParameters):
- def __init__(self, container_name='', hostname='', componentList=[], computerList=[], OS='',
- mem_mb=0, cpu_clock=0, nb_proc_per_node=0, nb_node=0, isMPI=False, workingdir='',
- mode='start', policy='altcycl', parallelLib='', nb_component_nodes=0):
- Engines.MachineParameters.__init__(self,container_name, hostname, componentList, computerList, OS,
- mem_mb, cpu_clock, nb_proc_per_node, nb_node, isMPI, workingdir,
- mode, policy, parallelLib, nb_component_nodes)
-
class ContainerParameters (Engines.ContainerParameters):
def __init__(self, container_name='', mode='start', workingdir='', nb_proc=0, isMPI=False, parallelLib='',resource_params=None):
if resource_params is None:resource_params=ResourceParameters()
class ResourceParameters (Engines.ResourceParameters):
def __init__(self, name="", hostname="", OS="", componentList=[],
nb_proc=0, mem_mb=0, cpu_clock=0, nb_node=0, nb_proc_per_node=0,
- policy="", resList=[]):
- Engines.ResourceParameters.__init__(self, name, hostname, OS, componentList,
- nb_proc, mem_mb, cpu_clock, nb_node, nb_proc_per_node,
- policy, resList)
+ policy="", resList=[], can_launch_batch_jobs = False, can_run_containers = False):
+ Engines.ResourceParameters.__init__(self, name, hostname, can_launch_batch_jobs, can_run_containers,
+ OS, componentList, nb_proc, mem_mb, cpu_clock, nb_node,
+ nb_proc_per_node, policy, resList)
class JobParameters (Engines.JobParameters):
def __init__(self, job_name="", job_type="", job_file="", env_file="", in_files=[], out_files=[],
class ResourceDefinition(Engines.ResourceDefinition):
def __init__(self, name="", hostname="", protocol="rsh", username="", applipath="", componentList=[],
mode="interactive", OS="", mem_mb=1, cpu_clock=1, nb_node=1, nb_proc_per_node=1,
- batch="", mpiImpl="", iprotocol="rsh"):
- Engines.ResourceDefinition.__init__(self, name, hostname, protocol, username, applipath, componentList,
- mode, OS, mem_mb, cpu_clock, nb_node, nb_proc_per_node, batch,
- mpiImpl, iprotocol)
+ batch="", mpiImpl="", iprotocol="rsh", type = "single_machine",
+ can_launch_batch_jobs = False, can_run_containers = False, working_directory = ""):
+ Engines.ResourceDefinition.__init__(self, name, hostname, type, protocol, username, applipath,
+ componentList, OS, mem_mb, cpu_clock, nb_node, nb_proc_per_node,
+ batch, mpiImpl, iprotocol, can_launch_batch_jobs,
+ can_run_containers, working_directory)
obj=lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent")
comp=obj._narrow(Engines.TestComponent)
comp.Coucou(1)
- param={}
- #param['hostname']='cli76cc'
- param['hostname']=host
- param['container_name']='FactoryServer'
+ param = LifeCycleCORBA.ContainerParameters()
+ param.resource_params.hostname = host
+ param.container_name = 'FactoryServer'
comp=lcc.FindOrLoad_Component(param,'SalomeTestComponent')
engine=lcc.FindComponent(param,'SalomeTestComponent')
engine.Coucou(1)
ContainerManager = rootContext.resolve( context_name )
try :
- myContainerparamsCPP = Engines.MachineParameters( 'myContainer' , host , 'osf' , 0 , 0 , 0 , 0 , 0 )
+ myContainerparamsCPP = LifeCycleCORBA.ContainerParameters()
+ param.resource_params.hostname = host
+ param.container_name = 'myContainer'
computerlistCPP = [host]
containerCPP = ContainerManager.FindOrStartContainer( myContainerparamsCPP , computerlistCPP )
containerCPP.ping()
ComponentparamsCPP={}
ComponentparamsCPP['hostname']=host
ComponentparamsCPP['container_name']='myContainer'
- compCPP=lcc.FindOrLoad_Component(ComponentparamsCPP,'SalomeTestComponent')
+ compCPP=lcc.FindOrLoad_Component(myContainerparamsCPP,'SalomeTestComponent')
compCPP.Coucou(1)
- engineCPP=lcc.FindComponent(ComponentparamsCPP,'SalomeTestComponent')
+ engineCPP=lcc.FindComponent(myContainerparamsCPP,'SalomeTestComponent')
engineCPP.Coucou(1)
except :
print 'ContainerManager.FindOrStartContainer( myContainerparams , computerlist ) C++ failed'
try :
- myContainerparamsPy = Engines.MachineParameters( 'myContainerPy' , host , 'osf' , 0 , 0 , 0 , 0 , 0 )
+ myContainerparamsPy = LifeCycleCORBA.ContainerParameters()
+ param.resource_params.hostname = host
+ param.container_name = 'myContainerPy'
computerlistPy = [host]
containerPy = ContainerManager.FindOrStartContainer( myContainerparamsPy , computerlistPy )
containerPy.ping()
- ComponentparamsPy={}
- ComponentparamsPy['hostname']=host
- ComponentparamsPy['container_name']='myContainerPy'
- compPy=lcc.FindOrLoad_Component(ComponentparamsPy,'SALOME_TestComponentPy')
+ compPy=lcc.FindOrLoad_Component(myContainerparamsPy,'SALOME_TestComponentPy')
compPy.Coucou(1)
- enginePy=lcc.FindComponent(ComponentparamsPy,'SALOME_TestComponentPy')
+ enginePy=lcc.FindComponent(myContainerparamsPy,'SALOME_TestComponentPy')
enginePy.Coucou(1)
except :
print 'ContainerManager.FindOrStartContainer( myContainerparams , computerlist ) Python failed'
}
}
-%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) const Engines::MachineParameters &
+// We use a dictionary to represent ContainerParameters structure instead of the CORBA
+// structure itself because it would require a transformation from the Python
+// ContainerParameters structure, generated by omniOrbPy, to a C++ ContainerParameters
+// structure, generated by omniOrb, and this would be quite complex.
+%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) const Engines::ContainerParameters &
{
$1 = PyDict_Check($input)? 1 : 0;
}
-%typemap(in) const Engines::MachineParameters &
+%typemap(in) const Engines::ContainerParameters &
{
- //printf("typemap in on Engines::MachineParameters\n");
- MESSAGE("typemap in on Engines::MachineParameters");
+ MESSAGE("typemap in on Engines::ContainerParameters");
if (PyDict_Check($input) == 1)
{
- Engines::MachineParameters *param = new Engines::MachineParameters ;
+ Engines::ContainerParameters *param = new Engines::ContainerParameters ;
SALOME_LifeCycleCORBA::preSet(*param);
PyObject *key, *value;
{
param->container_name = CORBA::string_dup(PyString_AsString(value));
}
+ else if (strcmp(keystr,"resource_name")==0)
+ {
+ param->resource_params.name = CORBA::string_dup(PyString_AsString(value));
+ }
else if (strcmp(keystr,"hostname")==0)
{
- param->hostname = CORBA::string_dup(PyString_AsString(value));
+ param->resource_params.hostname = CORBA::string_dup(PyString_AsString(value));
}
else if (strcmp(keystr,"OS")==0)
{
- param->OS = CORBA::string_dup(PyString_AsString(value));
+ param->resource_params.OS = CORBA::string_dup(PyString_AsString(value));
}
else if (strcmp(keystr,"mem_mb")==0)
{
- param->mem_mb = PyLong_AsLong(value);
+ param->resource_params.mem_mb = PyLong_AsLong(value);
}
else if (strcmp(keystr,"cpu_clock")==0)
{
- param->cpu_clock = PyLong_AsLong(value);
+ param->resource_params.cpu_clock = PyLong_AsLong(value);
}
else if (strcmp(keystr,"nb_proc_per_node")==0)
{
- param->nb_proc_per_node = PyLong_AsLong(value);
+ param->resource_params.nb_proc_per_node = PyLong_AsLong(value);
}
else if (strcmp(keystr,"nb_node")==0)
{
- param->nb_node = PyLong_AsLong(value);
+ param->resource_params.nb_node = PyLong_AsLong(value);
}
else if (strcmp(keystr,"isMPI")==0)
{
else if (strcmp(keystr,"mode")==0)
param->mode = CORBA::string_dup(PyString_AsString(value));
else if (strcmp(keystr,"policy")==0)
- param->policy = CORBA::string_dup(PyString_AsString(value));
+ param->resource_params.policy = CORBA::string_dup(PyString_AsString(value));
else if (strcmp(keystr,"parallelLib")==0)
{
param->parallelLib = CORBA::string_dup(PyString_AsString(value));
}
- else if (strcmp(keystr,"nb_component_nodes")==0)
- {
- param->nb_component_nodes = PyLong_AsLong(value);
- }
}
$1 = param;
}
else
{
- MESSAGE("Not a dictionnary");
- PyErr_SetString(PyExc_TypeError,"Must Be a Python Dictionnary");
+ MESSAGE("Not a ContainerParameters struct");
+ PyErr_SetString(PyExc_TypeError,"Must Be a Python ContainerParameters object");
return NULL;
}
}
-%typemap(freearg) const Engines::MachineParameters &
+%typemap(freearg) const Engines::ContainerParameters &
{
MESSAGE("delete $1");
delete $1;
}
// ============================================================================
-/*! \brief build a container name, given a MachineParameters struct.
+/*! \brief build a container name, given a ContainerParameters struct.
*
- * Build a container name with a MachineParameters struct. In case of multi
- * processor machine, container name is suffixed with _nbproc. nproc equals
- * (number of nodes)*(number of processor per nodes).
- * \param params struct from which we get container name (may be
- * empty), number of nodes and number of processor
- * per node.
+ * Build a container name with a ContainerParameters struct. In case of multi
+ * processor machine, container name is suffixed with number of processors.
+ * \param params struct from which we get container name (may be empty) and
+ * number of processors.
* \return a container name without the path.
- * \sa BuildContainerNameForNS(const Engines::MachineParameters& params,
+ * \sa BuildContainerNameForNS(const Engines::ContainerParameters& params,
* const char *hostname)
*/
// ============================================================================
-std::string
-SALOME_NamingService::ContainerName(const Engines::MachineParameters& params)
-{
- int nbproc;
-
- if ( !params.isMPI )
- nbproc = 0;
- else if ( (params.nb_node <= 0) && (params.nb_proc_per_node <= 0) )
- nbproc = 1;
- else if ( params.nb_node == 0 )
- nbproc = params.nb_proc_per_node;
- else if ( params.nb_proc_per_node == 0 )
- nbproc = params.nb_node;
- else
- nbproc = params.nb_node * params.nb_proc_per_node;
-
- std::string ret = ContainerName(params.container_name);
-
- if ( nbproc >= 1 )
- {
- char *suffix = new char[8];
- sprintf(suffix, "_%d", nbproc);
- ret += suffix;
- }
-
- return ret;
-}
-
std::string
SALOME_NamingService::ContainerName(const Engines::ContainerParameters& params)
{
*/
// ============================================================================
-std::string
-SALOME_NamingService::
-BuildContainerNameForNS(const Engines::MachineParameters& params,
- const char *hostname)
-{
- std::string ret = "/Containers/";
- ret += hostname;
- ret += "/";
- ret += ContainerName(params);
-
- return ret;
-}
-
std::string
SALOME_NamingService::
BuildContainerNameForNS(const Engines::ContainerParameters& params,
BuildContainerNameForNS(const Engines::ContainerParameters& params,
const char *hostname);
- // Will Be deleted on SALOME 6
- std::string ContainerName(const Engines::MachineParameters& params);
- std::string
- BuildContainerNameForNS(const Engines::MachineParameters& params,
- const char *hostname);
int Find(const char* name)
throw(ServiceUnreachable);
bool Create_Directory(const char* Path)
${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
${CMAKE_CURRENT_SOURCE_DIR}/../../Utils
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA
${CMAKE_BINARY_DIR}/idl
${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test
${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test
SET(COMMON_LIBS
${CPPUNIT_LIBS}
SalomeNS
+ SalomeLifeCycleCORBA
${OMNIORB_LIBS}
)
-I$(srcdir)/$(RPATH)/Basics \
-I$(srcdir)/$(RPATH)/SALOMELocalTrace \
-I$(srcdir)/$(RPATH)/Utils \
+ -I$(srcdir)/$(RPATH)/LifeCycleCORBA \
-I$(top_builddir)/idl \
@CORBA_CXXFLAGS@ @CORBA_INCLUDES@
# This local variable defines the list of dependant libraries common to all target in this package.
COMMON_LIBS =\
@CPPUNIT_LIBS@ \
- ../libSalomeNS.la @CORBA_LIBS@
+ ../libSalomeNS.la \
+ ../../LifeCycleCORBA/libSalomeLifeCycleCORBA.la \
+ @CORBA_LIBS@
#
# ===============================================================
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
#include "Basics_Utils.hxx"
+#include "SALOME_LifeCycleCORBA.hxx"
#include <iostream>
#include <fstream>
void
NamingServiceTest::testContainerNameParams()
{
- Engines::MachineParameters params;
- params.container_name = "";
- params.hostname = "";
- params.OS = "";
- params.mem_mb = 0;
- params.cpu_clock = 0;
- params.nb_proc_per_node = 0;
- params.nb_node = 0;
- params.isMPI = false;
+ Engines::ContainerParameters params;
+ SALOME_LifeCycleCORBA::preSet(params);
std::string ref0 = "FactoryServer";
std::string ret = _NS.ContainerName(params);
void
NamingServiceTest::testBuildContainerNameForNSParams()
{
- Engines::MachineParameters params;
- params.container_name = "";
- params.hostname = "";
- params.OS = "";
- params.mem_mb = 0;
- params.cpu_clock = 0;
- params.nb_proc_per_node = 0;
- params.nb_node = 0;
- params.isMPI = false;
+ Engines::ContainerParameters params;
+ SALOME_LifeCycleCORBA::preSet(params);
params.container_name = "theContainerName";
std::string ref0 = "/Containers/theHostName/theContainerName";