Skip to content

Commit

Permalink
Merge pull request #20676 from bendavid/gridpackoverride_94x
Browse files Browse the repository at this point in the history
Allow gridpack execution to override runtime environment also for legacy gridpacks
  • Loading branch information
cmsbuild committed Sep 29, 2017
2 parents 72a21c5 + 80968af commit 8cebce7
Showing 1 changed file with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,34 @@ echo "%MSG-MG5 random seed used for the run = $rnum"
ncpu=${4}
echo "%MSG-MG5 thread count requested = $ncpu"

echo "%MSG-MG5 residual arguments = ${@:5}"
echo "%MSG-MG5 residual/optional arguments = ${@:5}"

if [ -n "${5}" ]; then
use_gridpack_env=${5}
echo "%MSG-MG5 use_gridpack_env = $use_gridpack_env"
fi

if [ -n "${6}" ]; then
scram_arch_version=${6}
echo "%MSG-MG5 override scram_arch_version = $scram_arch_version"
fi

if [ -n "${7}" ]; then
cmssw_version=${7}
echo "%MSG-MG5 override cmssw_version = $cmssw_version"
fi

LHEWORKDIR=`pwd`

if [ "$use_gridpack_env" = false -a -n "$scram_arch_version" -a -n "$cmssw_version" ]; then
echo "%MSG-MG5 CMSSW version = $cmssw_version"
export SCRAM_ARCH=${scram_arch_version}
scramv1 project CMSSW ${cmssw_version}
cd ${cmssw_version}/src
eval `scramv1 runtime -sh`
cd $LHEWORKDIR
fi

if [[ -d lheevent ]]
then
echo 'lheevent directory found'
Expand Down

0 comments on commit 8cebce7

Please sign in to comment.