27 #include <SALOMEconfig.h>
28 #include CORBA_CLIENT_HEADER(SALOME_Component)
29 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
53 void ShutdownContainers()
override;
55 void ShutdownContainersNow()
override;
61 void SetCodeOnContainerStartUp(
const char *code)
override;
63 char *GetCodeOnContainerStartUp()
override;
70 CORBA::Long GetTimeOutToLaunchServerInSecond()
override;
72 void SetTimeOutToLaunchServerInSecond(CORBA::Long timeInSecond)
override;
74 CORBA::Long GetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond()
override;
76 void SetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond(CORBA::Long timeInMS)
override;
78 CORBA::Long GetDeltaTimeBetweenCPUMemMeasureInMilliSecond()
override;
80 void SetDeltaTimeBetweenCPUMemMeasureInMilliSecond(CORBA::Long timeInMS)
override;
82 void SetBigObjOnDiskThreshold(CORBA::Long thresholdInByte)
override;
84 void SetBigObjOnDiskDirectory(
const char *directory)
override;
86 void SetDirectoryForReplayFiles(
const char *directory)
override;
88 void SetNumberOfRetry(CORBA::Long nbRetry)
override;
90 CORBA::Long GetNumberOfRetry()
override;
96 void ShutdownContainersGeneric(std::function<
void(Engines::Container_ptr)> funcToBeCalledOnContainer);
100 Engines::Container_ptr
104 Engines::Container_ptr
106 const std::string& resource);
108 std::string GetCppBinaryOfKernelSSLContainer()
const;
110 std::string GetCppBinaryOfKernelContainer()
const;
112 std::string GetRunRemoteExecutableScript()
const;
114 std::string BuildCommandToLaunchRemoteContainer(
const std::string & resource_name,
116 const std::string& container_exe=
"SALOME_Container")
const;
119 const std::string& machinesFile,
120 const std::string& container_exe,
121 std::string& tmpFileName)
const;
123 std::string BuildTempFileToLaunchRemoteContainer(
const std::string& resource_name,
126 static void RmTmpFile(std::string& tmpFile);
128 void AddOmninamesParams(std::string&
command)
const;
130 void AddOmninamesParams(std::ostream& fileStream)
const;
132 static std::string BuildTemporaryFileName();
134 std::string GetMPIZeroNode(
const std::string machine,
const std::string machinesFile)
const;
136 std::string machinesFile(
const int nbproc);
138 std::string getCommandToRunRemoteProcessCommon(
const std::string& templateName,
const std::string& remoteScript,
141 const std::string & username,
142 const std::string & applipath,
143 const std::string & workdir)
const;
147 const std::string & username,
148 const std::string & applipath,
149 const std::string & workdir=
"")
const;
153 const std::string & username,
154 const std::string & applipath,
155 const std::string & workdir=
"")
const;
157 Engines::Container_ptr
159 const std::string & resource_selected,
161 const std::string & machFile,
162 const std::string & containerNameInNS);
191 Engines::Container_ptr
197 std::string machine_file_name,
198 std::string & proxy_hostname);
201 const std::string & machine_file_name,
203 const std::string & proxy_hostname);
205 void LogConfiguration(
const std::string & log_type,
206 const std::string & exe_type,
213 LaunchPaCOProxyContainer(
const std::string&
command,
218 LaunchPaCONodeContainer(
const std::string&
command,
220 const std::string&
name,
224 static char *GetenvThreadSafe(
const char *
name);
225 static std::string GetenvThreadSafeAsString(
const char *
name);
226 static int SystemThreadSafe(
const char *
command);
227 static long SystemWithPIDThreadSafe(
const std::vector<std::string>&
command);
229 static void MakeTheCommandToBeLaunchedASync(std::string&
command);
230 static int GetTimeOutToLoaunchServer();
231 static void SleepInSecond(
int ellapseTimeInSecond);
#define CONTAINER_EXPORT
Definition: SALOME_Container.hxx:37
AccessProtocolType
Definition: SALOME_ResourcesCatalog_Parser.hxx:44
Definition: SALOME_ContainerManager.hxx:44
void DeclareUsingSalomeSession()
Definition: SALOME_ContainerManager.hxx:68
PortableServer::POA_var _poa
Definition: SALOME_ContainerManager.hxx:165
std::vector< std::pair< std::string, std::string > > _override_env
Definition: SALOME_ContainerManager.hxx:238
SALOME_NamingService_Abstract * _NS
Definition: SALOME_ContainerManager.hxx:168
std::string _code_to_exe_on_startup
Definition: SALOME_ContainerManager.hxx:242
int _nbprocUsed
attribute that contains the number of processes used in batch mode by MPI containers
Definition: SALOME_ContainerManager.hxx:174
static Utils_Mutex _systemMutex
Definition: SALOME_ContainerManager.hxx:236
static omni_mutex _numInstanceMutex
Definition: SALOME_ContainerManager.hxx:179
static const int TIME_OUT_TO_LAUNCH_CONT
Definition: SALOME_ContainerManager.hxx:233
static Utils_Mutex _getenvMutex
Definition: SALOME_ContainerManager.hxx:235
pid_t _pid_mpiServer
Definition: SALOME_ContainerManager.hxx:184
static const int DFT_DELTA_TIME_NS_LOOKUP_IN_MS
Definition: SALOME_ContainerManager.hxx:234
CORBA::ORB_var _orb
Definition: SALOME_ContainerManager.hxx:164
int _delta_time_ns_lookup_in_ms
Definition: SALOME_ContainerManager.hxx:240
int _time_out_in_second
Definition: SALOME_ContainerManager.hxx:239
int _delta_time_measure_in_ms
Definition: SALOME_ContainerManager.hxx:241
static const char * _ContainerManagerNameInNS
Definition: SALOME_ContainerManager.hxx:92
Utils_Mutex _giveContainerMutex1
attributes to allow concurrency for // GiveContainer
Definition: SALOME_ContainerManager.hxx:182
std::vector< std::string > actual_launch_machine_t
Definition: SALOME_ContainerManager.hxx:187
SALOME_ResourcesManager_Client * _resManager
Definition: SALOME_ContainerManager.hxx:167
bool _isAppliSalomeDefined
different behaviour if $APPLI exists (SALOME Application)
Definition: SALOME_ContainerManager.hxx:171
Definition: SALOME_NamingService_Abstract.hxx:46
Definition: SALOME_ResourcesManager_Client.hxx:33
Definition: Utils_Mutex.hxx:37
sequence< string > ResourceList
Type to transmit list of resources.
Definition: SALOME_ResourcesManager.idl:35
sequence< KeyValPairString > KeyValDict
Definition: SALOME_ContainerManager.idl:76
poa
Definition: SALOME_ContainerPy.py:377
list command
Definition: TestKernelHelpers.py:48
container_name
Definition: TestLifeCycleCORBA.py:42
ContainerManager
Definition: TestLifeCycleCORBA.py:57
string name
Definition: pythfilter.py:56
orb
Definition: salome.py:122
hostname
Definition: test.py:29
Type to describe required properties of a container.
Definition: SALOME_ContainerManager.idl:38