]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
use of new killing method
authorsecher <secher>
Fri, 23 May 2008 07:25:22 +0000 (07:25 +0000)
committersecher <secher>
Fri, 23 May 2008 07:25:22 +0000 (07:25 +0000)
bin/shutdownSalome.py
src/Batch/Batch_BatchManager_eLSF.cxx
src/Launcher/Launcher.cxx

index 0c96154bbf2fb35540abf70131b9647dbc5422c8..49126666210e82e84554975a1194a4569a11cabe 100755 (executable)
@@ -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()
index a2699b403086712dc5f40f39cd8096afde81a7c7..d1c44e60d66ca237ef311cd8b2d1fcfa3131b054 100644 (file)
@@ -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);
index 5e88084d15fa5e277466e18de2cbbfc181c5c948..1bf8d163945d36c7c38b9acd46fbd26310e328d0 100644 (file)
@@ -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