#!/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()
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 );
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);
// 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