Skip to content

Commit

Permalink
fix for RIVET_ANALYSIS_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Apr 18, 2024
1 parent 18d4265 commit 26955ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Projects/CMSSW/Self.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<runtime name="CMSSW_SEARCH_PATH" value="$LOCALTOP/poison" type="path" handler="warn"/>
<runtime name="CMSSW_SEARCH_PATH" value="$LOCALTOP/src" type="path" handler="warn"/>
<runtime name="CMSSW_SEARCH_PATH" value="$LOCALTOP/external/$SCRAM_ARCH/data" type="path" handler="warn"/>
<runtime name="RIVET_ANALYSIS_PATH" value="$LOCALTOP/lib/$SCRAM_ARCH" type="path"/>
<runtime name="RIVET_ANALYSIS_PATH" value="$LOCALTOP/external/$SCRAM_ARCH/lib" type="path"/>
<runtime name="RIVET_ANALYSIS_PATH" value="$LOCALTOP/lib/$SCRAM_ARCH" type="path" handler="warn"/>
<runtime name="RIVET_ANALYSIS_PATH" value="$LOCALTOP/external/$SCRAM_ARCH/lib/Rivet" type="path" handler="warn"/>
<runtime name="LANG" value="C"/>
<runtime name="TEST_SRTOPT_PATH" value="$LOCALTOP/test/$SCRAM_ARCH" type="path"/>
<ifrelease name="_CXXMODULE">
Expand Down
20 changes: 16 additions & 4 deletions SCRAM/hooks/runtime/90-cmssw-vectorize
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,25 @@ if [ -f ${LOCALTOP}/config/toolbox/${SCRAM_ARCH}/tools/selected/cmssw.xml ] ; th
for tool in $TOOLS ; do
for e in LD_LIBRARY_PATH RIVET_ANALYSIS_PATH ; do
for d in $(${SCRAM} tool info $tool | grep "^$e=" | sed "s|^$e=||" | tr ':' '\n') ; do
p="$d"
x="scram_${MATCHED_TARGET}"
isRivet=false
if [ $(echo $d | grep '/lib/Rivet$' | wc -l) -gt 0 ] ; then
p=$(echo $d | sed 's|/Rivet$||')
x="scram_${MATCHED_TARGET}/Rivet"
isRivet=true
fi
v=""
case $d in
${LOCALTOP}/* ) v=$d ;;
* ) if [ -d $d/scram_${MATCHED_TARGET} ] ; then v=$d ; fi ;;
case ${d} in
${LOCALTOP}/* ) v=${d} ;;
* ) if [ -d ${p}/${x} ] ; then v=${d} ; fi ;;
esac
if [ $v ] ; then
echo "RUNTIME:path:replace:${e}=${d}=${d}/scram_${MATCHED_TARGET}:${d}"
if $isRivet ; then
echo "RUNTIME:path:replace:${e}=${d}=${p}/${x}"
else
echo "RUNTIME:path:replace:${e}=${d}=${p}/${x}:${d}"
fi
fi
done
done
Expand Down

0 comments on commit 26955ad

Please sign in to comment.