Skip to content

Instantly share code, notes, and snippets.

@mcitron
Created May 23, 2023 19:15
Show Gist options
  • Save mcitron/3005a22d19d233dad47b7b91bb002623 to your computer and use it in GitHub Desktop.
Save mcitron/3005a22d19d233dad47b7b91bb002623 to your computer and use it in GitHub Desktop.
Try to compile CMSSW_10_2_27 with pythia 803.7
#!/bin/bash
TOOLS=(
pythia8 \
evtgen \
tauolapp \
)
TOOLFILE_LIST=""
for TOOL in ${TOOLS[@]}; do
TOOLFILE_LIST="$TOOLFILE_LIST $TOOL-toolfile"
done
#CMSSW_10_2_27 slc6_amd64_gcc700
eval $(curl -s -k https://raw.githubusercontent.com/cms-sw/cms-bot/master/config.map | grep 'SCRAM_ARCH=slc6_amd64_gcc700' | grep 'RELEASE_BRANCH=CMSSW_10_2_X')
git clone -b $PKGTOOLS_TAG https://github.com/cms-sw/pkgtools.git
git clone -b IB/CMSSW_10_2_X/gcc700 https://github.com/mcitron/cmsdist
pkgtools/cmsBuild -i build -a $SCRAM_ARCH -j 4 build $TOOLFILE_LIST
BUILDDIR=$PWD/build/$SCRAM_ARCH/external
WHICH_CMSSW=CMSSW_10_2_27
scramv1 project CMSSW $WHICH_CMSSW
TOOLDIR=$WHICH_CMSSW/config/toolbox/${SCRAM_ARCH}/tools/selected/
mkdir $WHICH_CMSSW/build
for TOOL in ${TOOLS[@]}; do
cp build/$SCRAM_ARCH/external/${TOOL}-toolfile/*/etc/scram.d/${TOOL}.xml $TOOLDIR/
cp -r $BUILDDIR/$TOOL $WHICH_CMSSW/build/
sed -i 's~'$BUILDDIR'~$CMSSW_BASE/build~' $TOOLDIR/$TOOL.xml
done
cd $WHICH_CMSSW
eval `scramv1 runtime -sh`
for TOOL in ${TOOLS[@]}; do
scram setup $TOOL
done
cd $CMSSW_BASE/src
scram b checkdeps
scram b -j 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment