ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/BatchSubmitCMS2/writeConfig.sh
(Generate patch)

Comparing UserCode/FGolf/BatchSubmitCMS2/writeConfig.sh (file contents):
Revision 1.2 by fgolf, Fri Apr 20 16:22:27 2012 UTC vs.
Revision 1.6 by fgolf, Tue May 28 07:00:33 2013 UTC

# Line 2 | Line 2
2  
3   UNIVERSE="grid"
4   EXE="wrapper.sh"
5 < INPUT="wrapper.sh, job_input/input.tgz"
5 > INPUT="wrapper.sh, job_input/input.tgz, appendTimeStamp.sh"
6   SITE="UCSD"
7   PROXY="/tmp/x509up_u31032"
8  
# Line 18 | Line 18 | ERR="${LOGDIR}/job_logs/1e.\$(Cluster).\
18   #
19   # prepare input sandbox
20   #
21 + g++ sweepRoot.C -o sweepRoot `root-config --cflags --libs`
22   cd ${DIR}/job_input
23   rm input.*
24 + mv ../sweepRoot .
25   tar -czf input.tgz --exclude='*CVS*' *
26   cd ${DIR}
27  
28 <
29 <    DATATYPE=$1
30 <    REALDATA=$2
31 <    RUNLIST=$3
32 <    DATADIR=$4
33 <    COPYDIRBASE=$5
34 <    COPYDIR=/hadoop/cms/store/user/$USER/${COPYDIRBASE}
28 > #
29 > # arguments to run the script
30 > #
31 > SAMPLE="$1"
32 > ATYPE="$2"
33 > RUNLIST="$3"
34 > OPTIONS="$4"
35 > DATADIR="$5"
36 > COPYDIRBASE="$6"
37 > COPYDIR="/hadoop/cms/store/user/$USER/${COPYDIRBASE}"
38  
39   #
40   # write configuration
# Line 49 | Line 54 | output=${OUT}
54   error =${ERR}
55   notification=Never
56   x509userproxy=${PROXY}
57 < " > condor_${COPYDIRBASE}.cmd
57 > " > condor_${COPYDIRBASE##*/}.cmd
58  
59      #
60      # now set the rest of the arguments
61      # for each job
62      #
63  
64 <    for FILE in `ls ${DATADIR}/*.root`; do
64 >    if [ -d $DATADIR ]; then
65 >        DATADIR=${DATADIR}/*.root  
66 >    fi
67 >    for FILE in `ls ${DATADIR}`; do
68          echo "
69   executable=${EXE}
70   transfer_executable=True
71 < arguments=`echo ${FILE##*/} | sed 's/\.root//g'` ${DATATYPE} ${FILE} ${REALDATA} ${RUNLIST} ${COPYDIR}
71 > arguments=\"`echo ${FILE##*/} | sed 's/\.root//g'` ${FILE} ${SAMPLE} ${ATYPE} ${RUNLIST} ${OPTIONS} ${COPYDIR}\"
72   queue
73 < " >> condor_${COPYDIRBASE}.cmd
73 > " >> condor_${COPYDIRBASE##*/}.cmd
74      done
75  
76 < echo "[writeConfig] wrote condor_${COPYDIRBASE}.cmd"
69 <
76 > echo "[writeConfig] wrote condor_${COPYDIRBASE##*/}.cmd"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines