From 956796093cbf479feca3943cc76c9916e7455a30 Mon Sep 17 00:00:00 2001 From: secher Date: Thu, 5 Jul 2007 09:08:50 +0000 Subject: [PATCH] debugging when users are different on local and on cluster --- src/Container/SALOME_ContainerManager.cxx | 2 +- src/ResourcesManager/SALOME_ResourcesManager.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index ec4bef59f..44383901a 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -349,7 +349,7 @@ CORBA::Long SALOME_ContainerManager::batchSalomeJob( SCRUTE(fileNameToExecute) ; // Le /tmp n'est pas le meme d'un noeud a un autre ===> //string DirForTmpFiles = string("/tmp/")+string(getenv("USER"))+string("/") ; - string DirForTmpFiles = string(getenv("HOME"))+string("/Batch/") ; + string DirForTmpFiles = string("Batch/") ; Batch::Date date = Batch::Date(time(0)) ; std::string thedate = date.str() ; int lend = thedate.size() ; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index d7e2f09f9..b7627a8a5 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -615,7 +615,7 @@ std::string SALOME_ResourcesManager::BuildCmdrunSalomeBatch( tempOutputFile << "#! /bin/sh -f" << endl ; tempOutputFile << "cd " ; tempOutputFile << resInfo.AppliPath << endl ; - tempOutputFile << "export PYTHONPATH=" ; + tempOutputFile << "export PYTHONPATH=~/" ; tempOutputFile << DirForTmpFiles ; tempOutputFile << ":$PYTHONPATH" << endl ; tempOutputFile << "if test $SLURM_PROCID = 0; then" << endl ; @@ -633,7 +633,7 @@ std::string SALOME_ResourcesManager::BuildCmdrunSalomeBatch( tempOutputFile << " done" << endl ; tempOutputFile << " sleep 1" << endl ; tempOutputFile << " ./runSession waitContainers.py $arglist" << endl ; - tempOutputFile << " ./runSession python " << DirForTmpFiles << "/" << FileNameToExecute << ".py" << endl; + tempOutputFile << " ./runSession python ~/" << DirForTmpFiles << "/" << FileNameToExecute << ".py" << endl; tempOutputFile << "else" << endl ; tempOutputFile << " sleep 1" << endl ; tempOutputFile << " ./runSession waitNS.py" << endl ; @@ -697,7 +697,7 @@ std::string SALOME_ResourcesManager::BuildCmdFileNameToExecute_Batch( tempOutputFile << "#BSUB -n " ; tempOutputFile << NumberOfProcessors << endl ; tempOutputFile << "#BSUB -o runSalome.log%J" << endl ; - tempOutputFile << "mpirun -srun " ; + tempOutputFile << "mpirun -srun ~/" ; tempOutputFile << DirForTmpFiles ; tempOutputFile << "/runSalome_" ; tempOutputFile << FileNameToExecute ; @@ -755,7 +755,7 @@ std::string SALOME_ResourcesManager::BuildCmdFileNameToExecute_bsub( const ParserResourcesType& resInfo = _resourcesList[machine]; resInfo.Print() ; tempOutputFile << "#! /bin/sh -f" << endl ; - tempOutputFile << "bsub < " ; + tempOutputFile << "bsub < ~/" ; tempOutputFile << DirForTmpFiles ; tempOutputFile << "/" ; tempOutputFile << FileNameToExecute ; -- 2.39.2