-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample_condor_sub_script_from_S_Sen.sh
47 lines (47 loc) · 1.24 KB
/
example_condor_sub_script_from_S_Sen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/bash
SDIR="/afs/cern.ch/work/s/ssen/Professor/CMSSW_10_1_4/src/CP5-mc-CONDOR/6"
WDIR="/tmp/ssen/work"
ODIR="/afs/cern.ch/work/s/ssen/Professor/CMSSW_10_1_4/src/CP5-mc-CONDOR/6/out"
OTAG="OUT"
j=0
while [ $j -lt 4 ]
do
let "j=j+1"
echo $j
cat > subscript_$j.sh <<EOF
#!/bin/bash
pushd ${CMSSW_BASE}/src/
export SCRAM_ARCH=slc6_amd64_gcc630
export RIVET_DATA_PATH=/afs/cern.ch/work/s/ssen/Professor/CMSSW_10_1_4/src/GeneratorInterface/RivetInterface/data
export RIVET_REF_PATH=/afs/cern.ch/work/s/ssen/Professor/CMSSW_10_1_4/src/GeneratorInterface/RivetInterface/data
echo \${PWD}
eval \`scram runtime -sh\`
#source Rivet/rivetSetup.sh
scram arch
popd
echo \${PWD}
mkdir -p ${WDIR}_$j
cd ${WDIR}_$j
cp ${SDIR}/CP5_20.py .
echo \${PWD}
ls -lrt
which cmsRun
cmsRun CP5_20.py
cp *yoda ${ODIR}/$j.yoda
cd ${ODIR}
echo \${PWD}
#rm -r -f ${WDIR}_$j
EOF
cat > condor_$j.sub <<EOF
universe = vanilla
executable = subscript_$j.sh
output = hello_$j.out
error = hello_$j.err
log = hello_${cluster}_${process}.log
+JobFlavour = "espresso"
queue
EOF
chmod 755 subscript_$j.sh
chmod 755 condor_$j.sub
condor_submit condor_$j.sub
done