Public Member Functions | |
SALOME_ContainerManager (CORBA::ORB_ptr orb, PortableServer::POA_var poa, SALOME_NamingService *ns) | |
~SALOME_ContainerManager () | |
Engines::Container_ptr | GiveContainer (const Engines::ContainerParameters ¶ms) |
Give a suitable Container given constraints. More... | |
void | ShutdownContainers () |
Loop on all the containers listed in naming service, ask shutdown on each. More... | |
void | Shutdown () |
shutdown all the containers, then the ContainerManager servant More... | |
Static Public Member Functions | |
static char * | GetenvThreadSafe (const char *name) |
static std::string | GetenvThreadSafeAsString (const char *name) |
static int | SystemThreadSafe (const char *command) |
static void | AddOmninamesParams (std::ostream &fileStream, SALOME_NamingService *ns) |
static void | MakeTheCommandToBeLaunchedASync (std::string &command) |
static int | GetTimeOutToLoaunchServer () |
static void | SleepInSecond (int ellapseTimeInSecond) |
Static Public Attributes | |
static const char * | _ContainerManagerNameInNS |
Protected Types | |
typedef std::vector< std::string > | actual_launch_machine_t |
Protected Member Functions | |
Engines::Container_ptr | FindContainer (const Engines::ContainerParameters ¶ms, const Engines::ResourceList &possibleResources) |
Find a container given constraints (params) on a list of machines (possibleComputers) agy : this method is ThreadSafe. More... | |
Engines::Container_ptr | FindContainer (const Engines::ContainerParameters ¶ms, const std::string &resource) |
Find a container given constraints (params) on a machine (theMachine) agy : this method is ThreadSafe. More... | |
std::string | BuildCommandToLaunchRemoteContainer (const std::string &resource_name, const Engines::ContainerParameters ¶ms, const std::string &container_exe="SALOME_Container") const |
std::string | BuildCommandToLaunchLocalContainer (const Engines::ContainerParameters ¶ms, const std::string &machinesFile, const std::string &container_exe, std::string &tmpFileName) const |
std::string | BuildTempFileToLaunchRemoteContainer (const std::string &resource_name, const Engines::ContainerParameters ¶ms, std::string &tmpFileName) const |
void | AddOmninamesParams (std::string &command) const |
void | AddOmninamesParams (std::ostream &fileStream) const |
std::string | GetMPIZeroNode (const std::string machine, const std::string machinesFile) const |
std::string | machinesFile (const int nbproc) |
std::set< pid_t > | getpidofprogram (const std::string program) |
Engines::Container_ptr | LaunchContainer (const Engines::ContainerParameters ¶ms, const std::string &resource_selected, const std::string &hostname, const std::string &machFile, const std::string &containerNameInNS) |
bool | checkPaCOParameters (Engines::ContainerParameters ¶ms, std::string resource_selected) |
Engines::Container_ptr | StartPaCOPPContainer (const Engines::ContainerParameters ¶ms, std::string resource_selected) |
std::string | BuildCommandToLaunchPaCOProxyContainer (const Engines::ContainerParameters ¶ms, std::string machine_file_name, std::string &proxy_hostname) |
std::string | BuildCommandToLaunchPaCONodeContainer (const Engines::ContainerParameters ¶ms, const std::string &machine_file_name, SALOME_ContainerManager::actual_launch_machine_t &vect_machine, const std::string &proxy_hostname) |
void | LogConfiguration (const std::string &log_type, const std::string &exe_type, const std::string &container_name, const std::string &hostname, std::string &begin, std::string &end) |
CORBA::Object_ptr | LaunchPaCOProxyContainer (const std::string &command, const Engines::ContainerParameters ¶ms, const std::string &hostname) |
bool | LaunchPaCONodeContainer (const std::string &command, const Engines::ContainerParameters ¶ms, const std::string &name, SALOME_ContainerManager::actual_launch_machine_t &vect_machine) |
Static Protected Member Functions | |
static void | RmTmpFile (std::string &tmpFile) |
static std::string | BuildTemporaryFileName () |
static std::string | getCommandToRunRemoteProcess (AccessProtocolType protocol, const std::string &hostname, const std::string &username) |
Protected Attributes | |
CORBA::ORB_var | _orb |
PortableServer::POA_var | _poa |
SALOME_ResourcesManager_Client * | _resManager |
SALOME_NamingService * | _NS |
bool | _isAppliSalomeDefined |
different behaviour if $APPLI exists (SALOME Application) More... | |
int | _nbprocUsed |
attribute that contains the number of processes used in batch mode by MPI containers More... | |
Utils_Mutex | _giveContainerMutex1 |
attributes to allow concurrency for // GiveContainer More... | |
pid_t | _pid_mpiServer |
Static Protected Attributes | |
static omni_mutex | _numInstanceMutex |
SALOME_ContainerManager::SALOME_ContainerManager | ( | CORBA::ORB_ptr | orb, |
PortableServer::POA_var | poa, | ||
SALOME_NamingService * | ns | ||
) |
Constructor
orb | Define a CORBA single thread policy for the server, which avoid to deal with non thread-safe usage like Change_Directory in SALOME naming service |
SALOME_ContainerManager::~SALOME_ContainerManager | ( | ) |
destructor
Engines::Container_ptr SALOME_ContainerManager::GiveContainer | ( | const Engines::ContainerParameters & | params | ) |
Give a suitable Container given constraints.
CORBA Method:
params | Container Parameters required for the container |
void SALOME_ContainerManager::ShutdownContainers | ( | ) |
Loop on all the containers listed in naming service, ask shutdown on each.
CORBA Method:
void SALOME_ContainerManager::Shutdown | ( | ) |
shutdown all the containers, then the ContainerManager servant
CORBA method:
|
protected |
Find a container given constraints (params) on a list of machines (possibleComputers) agy : this method is ThreadSafe.
|
protected |
Find a container given constraints (params) on a machine (theMachine) agy : this method is ThreadSafe.
|
protected |
Builds the script to be launched
If SALOME Application not defined ($APPLI), see BuildTempFileToLaunchRemoteContainer()
Else rely on distant configuration. Command is under the form (example): ssh user distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \ SALOME_Container containerName &"
|
protected |
builds the command to be launched.
|
protected |
Builds in a temporary file the script to be launched.
Used if SALOME Application ($APPLI) is not defined. The command is build with data from CatalogResources, in which every path used on remote computer must be defined.
|
staticprotected |
removes the generated temporary file in case of a remote launch. This method is thread safe
|
protected |
add to command all options relative to naming service.
|
protected |
add to command all options relative to naming service.
|
staticprotected |
generate a file name in /tmp directory
|
static |
add to command all options relative to naming service.
|
static |
|
protected |
different behaviour if $APPLI exists (SALOME Application)
|
protected |
attribute that contains the number of processes used in batch mode by MPI containers
|
protected |
attributes to allow concurrency for // GiveContainer