From: Anthony Geay Date: Thu, 6 May 2021 05:43:05 +0000 (+0200) Subject: Patch for EMC2 Platform cpubind=none in srun case X-Git-Tag: EMC2P_V_1_3_3_P1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FEMC2P_V_1_3;p=modules%2Fkernel.git Patch for EMC2 Platform cpubind=none in srun case --- diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 464ae22c8..f2eb0f2bc 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -526,7 +526,7 @@ SALOME_ContainerManager::LaunchContainer(const Engines::ContainerParameters& par { const ParserResourcesType resInfo(_resManager->GetResourceDefinition(resource_selected)); - std::string command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, + std::string command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, resInfo.UserName, resInfo.AppliPath); // Launch remote command @@ -757,10 +757,10 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer(const std::string& // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \ // SALOME_Container containerName -ORBInitRef NameService=IOR:01000..." - // or + // or // "ssh -l user machine distantLauncher remote -p hostNS -m portNS -d dir // -- SALOME_Container contName -ORBInitRef NameService=IOR:01000..." - command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, + command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, resInfo.UserName, resInfo.AppliPath, wdir); @@ -1142,7 +1142,7 @@ std::string SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer (const else if (resInfo.Protocol == srun) { - command = "srun -n 1 -N 1 -s --mem-per-cpu=0 --nodelist="; + command = "srun -n 1 -N 1 -s --mem-per-cpu=0 --cpu-bind=none --nodelist="; std::string commandRcp = "rcp "; commandRcp += tmpFileName; commandRcp += " "; @@ -1184,7 +1184,7 @@ std::string SALOME_ContainerManager::GetMPIZeroNode(const std::string machine, c { if (_isAppliSalomeDefined) { - command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, + command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, resInfo.UserName, resInfo.AppliPath); command += " mpirun -np 1 hostname -s > " + tmpFile; } @@ -1262,7 +1262,7 @@ std::string SALOME_ContainerManager::getCommandToRunRemoteProcess(AccessProtocol case srun: // no need to redefine the user with srun, the job user is taken by default // (note: for srun, user id can be specified with " --uid=") - command << "srun -n 1 -N 1 -s --mem-per-cpu=0 --nodelist=" << hostname << " "; + command << "srun -n 1 -N 1 -s --mem-per-cpu=0 --cpu-bind=none --nodelist=" << hostname << " "; break; case pbsdsh: command << "pbsdsh -o -h " << hostname << " "; @@ -1290,7 +1290,7 @@ std::string SALOME_ContainerManager::getCommandToRunRemoteProcess(AccessProtocol { // if $APPLI is a regular file, we asume it's a salome Launcher // generate a command with a salome launcher - command << remoteapplipath + command << remoteapplipath << " remote" << " -m " << GetenvThreadSafeAsString("NSHOST") // hostname of CORBA name server @@ -1407,7 +1407,7 @@ long SALOME_ContainerManager::SystemWithPIDThreadSafe(const std::vector