Salome environment is already loaded when launching srun containers.
Loading it a second time creates very long PYTHONPATH & LD_LIBRARY_PATH with
bad consequences for performance.
# ssh cli76ce ${APPLI}/runRemote.sh cli76cd 2810 SALOME_Container myContainerName
# --- local arguments
# $0 : ${APPLI}/runRemote.sh: from arg name, rebuild and export $APPLI variable
+# --noenvd : optional argument. If present, the envd file is NOT sourced.
# $1 : computer name for CORBA name service (where SALOME was launched)
# $2 : port for CORBA name service
# $3 : WORKINGDIR (if $3 == WORKINDIR a working dir is given in $4. If not the working dir is $HOME)
# $4 : if $3 == WORKINGDIR, the path to the workingdir
# $5 (or $3 if no workingdir given) and following : local command to execute, with args
+
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
APPLI_HOME=$(dirname "$0")
# Sourcing files with parameters works with bash, not with dash. This is why
# we must use bash for this script.
-. "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}"
+if [ "$1" == "--noenvd" ]
+then
+ shift
+else
+ . "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}"
+fi
# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
export NSHOST=$1
# ssh cli76ce ${APPLI}/runRemoteSSL.sh IOR_OF_CURSTOM_NS SALOME_Container myContainerName
# --- local arguments
# $0 : ${APPLI}/runRemote.sh: from arg name, rebuild and export $APPLI variable
+# --noenvd : optional argument. If present, the envd file is NOT sourced.
# $1 : IOR_OF_CURSTOM_NS of reference to Engines::EmbeddedNamingService servant
# $2 : WORKINGDIR (if $2 == WORKINDIR a working dir is given in $3. If not the working dir is $HOME)
# $3 : if $2 == WORKINGDIR, the path to the workingdir
# Sourcing files with parameters works with bash, not with dash. This is why
# we must use bash for this script.
-. "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}"
+if "$1" == "--noenvd"
+then
+ shift
+else
+ . "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}"
+fi
# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
export CUSTOM_NS_IOR=$1
const std::string & workdir) const
{
std::ostringstream command;
+ bool envd = true; // source the environment
switch (protocol)
{
case rsh:
// 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=<user>")
command << "srun -n 1 -N 1 -s --mem-per-cpu=0 --cpu-bind=none --nodelist=" << hostname << " ";
+ envd = false;
break;
case pbsdsh:
command << "pbsdsh -o -h " << hostname << " ";
// generate a command with runRemote.sh
command << remoteapplipath;
command << "/" << this->GetRunRemoteExecutableScript() << " ";
+ if (!envd)
+ command << "--noenvd ";
if(this->_isSSL)
{