Version: 8.3.0
SALOME_ResourcesManager Class Reference

#include <SALOME_ResourcesManager.hxx>

Inheritance diagram for SALOME_ResourcesManager:

Public Member Functions

 SALOME_ResourcesManager (CORBA::ORB_ptr orb, PortableServer::POA_var poa, SALOME_NamingService *ns, const char *xmlFilePath)
 just for test More...
 
 SALOME_ResourcesManager (CORBA::ORB_ptr orb, PortableServer::POA_var poa, SALOME_NamingService *ns)
 Standard constructor, parse resource file. More...
 
 ~SALOME_ResourcesManager ()
 Standard Destructor. More...
 
Engines::ResourceListGetFittingResources (const Engines::ResourceParameters &params)
 get the name of resources fitting the specified constraints (params) More...
 
charFindFirst (const Engines::ResourceList &listOfResources)
 dynamically obtains the first machines More...
 
charFind (const char *policy, const Engines::ResourceList &listOfResources)
 
Engines::ResourceDefinitionGetResourceDefinition (const char *name)
 
void AddResource (const Engines::ResourceDefinition &new_resource, CORBA::Boolean write, const char *xml_file)
 
void RemoveResource (const char *resource_name, CORBA::Boolean write, const char *xml_file)
 
chargetMachineFile (const char *resource_name, CORBA::Long nb_procs, const char *parallelLib)
 
void ListAllAvailableResources (Engines::ResourceList_out machines, Engines::IntegerList_out nbProcsOfMachines)
 Return list of resources available (regarding containt of CatalogResources.xml). More...
 
void Shutdown ()
 CORBA method: shutdown all the containers, then the ContainerManager servant. More...
 
ResourcesManager_cppGetImpl ()
 

Static Public Attributes

static const char_ResourcesManagerNameInNS = "/ResourcesManager"
 

Protected Attributes

SALOME_NamingService_NS
 
CORBA::ORB_var _orb
 
PortableServer::POA_var _poa
 
ResourcesManager_cpp _rm
 

Constructor & Destructor Documentation

SALOME_ResourcesManager::SALOME_ResourcesManager ( CORBA::ORB_ptr  orb,
PortableServer::POA_var  poa,
SALOME_NamingService ns,
const char xmlFilePath 
)
SALOME_ResourcesManager::SALOME_ResourcesManager ( CORBA::ORB_ptr  orb,
PortableServer::POA_var  poa,
SALOME_NamingService ns 
)

Standard constructor, parse resource file.

  • if ${APPLI} exists in environment, look for ${HOME}/${APPLI}/CatalogResources.xml
  • else look for default: ${KERNEL_ROOT_DIR}/share/salome/resources/kernel/CatalogResources.xml
  • parse XML resource file.

References _NS, _orb, _poa, _ResourcesManagerNameInNS, MESSAGE, and SALOME_NamingService::Register().

SALOME_ResourcesManager::~SALOME_ResourcesManager ( )

Standard Destructor.

References MESSAGE.

Member Function Documentation

char * SALOME_ResourcesManager::Find ( const char policy,
const Engines::ResourceList listOfResources 
)
char * SALOME_ResourcesManager::FindFirst ( const Engines::ResourceList listOfResources)

dynamically obtains the first machines

References _rm, ResourcesManager_cpp::Find(), and resourceList_CORBAtoCPP().

Engines::ResourceList * SALOME_ResourcesManager::GetFittingResources ( const Engines::ResourceParameters params)

get the name of resources fitting the specified constraints (params)

If hostname specified, check it is local or known in resources catalog.

Else

  • select first machines with corresponding OS (all machines if parameter OS empty),
  • then select the sublist of machines on which the component is known (if the result is empty, that probably means that the inventory of components is probably not done, so give complete list from previous step)

References _rm, SALOME::BAD_PARAM, ResourcesManager_cpp::GetFittingResources(), INFOS, MESSAGE, ResourcesException::msg, resourceList_CPPtoCORBA(), resourceParameters_CORBAtoCPP(), and THROW_SALOME_CORBA_EXCEPTION.

Referenced by SALOME_Launcher::testBatch().

ResourcesManager_cpp* SALOME_ResourcesManager::GetImpl ( )
void SALOME_ResourcesManager::ListAllAvailableResources ( Engines::ResourceList_out  machines,
Engines::IntegerList_out  nbProcsOfMachines 
)

Return list of resources available (regarding containt of CatalogResources.xml).

And for each resource the number of proc available of it.

References ResourceDataToSort::_nbOfNodes, ResourceDataToSort::_nbOfProcPerNode, _rm, ParserResourcesType::DataForSort, ResourcesManager_cpp::GetList(), and ParserResourcesType::HostName.

void SALOME_ResourcesManager::RemoveResource ( const char resource_name,
CORBA::Boolean  write,
const char xml_file 
)
void SALOME_ResourcesManager::Shutdown ( )

CORBA method: shutdown all the containers, then the ContainerManager servant.

References _NS, _poa, _ResourcesManagerNameInNS, SALOME_NamingService::Destroy_Name(), and MESSAGE.

Referenced by SALOME_Launcher::Shutdown().

Field Documentation

SALOME_NamingService* SALOME_ResourcesManager::_NS
protected
CORBA::ORB_var SALOME_ResourcesManager::_orb
protected

Referenced by SALOME_ResourcesManager().

PortableServer::POA_var SALOME_ResourcesManager::_poa
protected
const char * SALOME_ResourcesManager::_ResourcesManagerNameInNS = "/ResourcesManager"
static