From d02eb83971042e73041932625f05c53998f7225a Mon Sep 17 00:00:00 2001 From: secher Date: Fri, 23 May 2008 07:25:22 +0000 Subject: [PATCH] use of new killing method --- bin/shutdownSalome.py | 31 ++++----------------------- src/Batch/Batch_BatchManager_eLSF.cxx | 7 ++++-- src/Launcher/Launcher.cxx | 6 +----- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/bin/shutdownSalome.py b/bin/shutdownSalome.py index 0c96154bb..491266662 100755 --- a/bin/shutdownSalome.py +++ b/bin/shutdownSalome.py @@ -1,28 +1,5 @@ #!/usr/bin/env python -import orbmodule -import Engines -import Registry -import SALOME -import SALOMEDS -import SALOME_ModuleCatalog -clt=orbmodule.client() -obj = clt.Resolve('Kernel/Session') -if obj != None: - ses = obj._narrow(SALOME.Session) - ses.StopSession() -obj = clt.Resolve('SalomeLauncher') -if obj != None: - cm = obj._narrow(Engines.SalomeLauncher) - cm.Shutdown() -obj = clt.Resolve('Kernel/ModulCatalog') -if obj != None: - mc = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) - mc.shutdown() -obj = clt.Resolve('Registry') -if obj != None: - reg = obj._narrow(Registry.Components) - reg.Shutdown() -obj = clt.Resolve('myStudyManager') -if obj != None: - sm = obj._narrow(SALOMEDS.StudyManager) - sm.Shutdown() +import salome +salome.salome_init() +salome.lcc.shutdownServers() +salome.SALOME_LifeCycleCORBA_killOmniNames() diff --git a/src/Batch/Batch_BatchManager_eLSF.cxx b/src/Batch/Batch_BatchManager_eLSF.cxx index a2699b403..d1c44e60d 100644 --- a/src/Batch/Batch_BatchManager_eLSF.cxx +++ b/src/Batch/Batch_BatchManager_eLSF.cxx @@ -241,6 +241,9 @@ namespace Batch { std::string rootNameToExecute = fileToExecute.substr(p1+1,p2-p1-1); std::string fileNameToExecute = "~/" + dirForTmpFiles + "/" + string(basename(fileToExecute.c_str())); + int idx = dirForTmpFiles.find("Batch/"); + std::string filelogtemp = dirForTmpFiles.substr(idx+6, dirForTmpFiles.length()); + std::string TmpFileName = BuildTemporaryFileName(); ofstream tempOutputFile; tempOutputFile.open(TmpFileName.c_str(), ofstream::out ); @@ -251,8 +254,8 @@ namespace Batch { if( mem > 0 ) tempOutputFile << "#BSUB -M " << mem*1024 << endl ; tempOutputFile << "#BSUB -n " << nbproc << endl ; - tempOutputFile << "#BSUB -o " << dirForTmpFiles << "/runSalome.output.log%J" << endl ; - tempOutputFile << "#BSUB -e " << dirForTmpFiles << "/runSalome.error.log%J" << endl ; + tempOutputFile << "#BSUB -o runSalome.output.log." << filelogtemp << endl ; + tempOutputFile << "#BSUB -e runSalome.error.log." << filelogtemp << endl ; if( workDir.size() > 0 ) tempOutputFile << "cd " << workDir << endl ; tempOutputFile << _mpiImpl->boot("",nbproc); diff --git a/src/Launcher/Launcher.cxx b/src/Launcher/Launcher.cxx index 5e88084d1..1bf8d1639 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -362,11 +362,7 @@ string Launcher_cpp::buildSalomeCouplingScript(const string fileToExecute, const // Stop application tempOutputFile << " rm " << filelogtemp << "\n" - << " ./runSession killCurrentPort" << endl; - // waiting standard killing improvement by P. Rascle - tempOutputFile << " killall notifd" << endl; - tempOutputFile << " killall omniNames" << endl; - tempOutputFile << " rm core.*" << endl; + << " ./runSession shutdownSalome.py" << endl; // ------------------------------------- // Other nodes launch a container -- 2.39.2