+ }
+
+ // Prepare parameters to use in the Python script:
+ // 1. All parameters are strings.
+ // 2. For some booleans use "1" = True, "0" = False.
+ // 3. If a parameter is NULL, then its value is "NULL".
+
+ std::queue<std::string> script_parameters;
+
+ // ===== Number of processes (key = "nb_proc")
+ script_parameters.push(params.isMPI ? std::to_string(params.nb_proc <= 0 ? 1 : params.nb_proc) : "NULL");
+
+ // ===== Working directory (key = "workdir") and temporary directory flag (key = "isTmpDir")
+ // A working directory is requested
+ std::string workdir = params.workingdir.in();
+ std::string isTmpDir = std::to_string(0);
+ if (workdir == "$TEMPDIR")
+ {
+ // A new temporary directory is requested
+ isTmpDir = std::to_string(1);
+ workdir = Kernel_Utils::GetTmpDir();
+ }
+ script_parameters.push(workdir);
+ script_parameters.push(isTmpDir);
+
+ // ===== Server name (key = "name_server")
+ script_parameters.push(Kernel_Utils::GetHostname());
+
+ // ===== Container (key = "container")
+ std::string container;
+ if (params.isMPI)
+ {
+ container = isPythonContainer(params.container_name) ? "pyMPI SALOME_ContainerPy.py" : "SALOME_MPIContainer";
+ }
+ else
+ {
+ container = isPythonContainer(params.container_name) ? "SALOME_ContainerPy.py" : container_exe;
+ }
+ script_parameters.push(container);