]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/Documentation/examples/PBS/theNodeScript.sh
c603a8b6796b7d75dae418b07079914a897bc35a
[u/mrichter/AliRoot.git] / PWG2 / FLOW / Documentation / examples / PBS / theNodeScript.sh
1 #!/bin/sh
2 # this one runs on the nodes
3 # works only with the correct submit script!
4 #
5 # it expects a shell var $datalistfile with the name of the file holding
6 # the list of files to process to be exported by the submit script
7 # also $listoffiles must be present.
8
9 #following makes the directories and saves the file with the files for each job
10 basedir=$PBS_O_WORKDIR/outputStbcAnalysis
11 [[ ! -d ${basedir} ]] && mkdir ${basedir}
12 dir=${basedir}/${PBS_JOBID}
13 [[ ! -d ${dir} ]] && mkdir ${dir}
14 echo $listoffiles
15 [[ -f ${dir}/${datalistfile} ]] && rm ${dir}/${datalistfile}
16 [[ ! -f ${dir}/${datalistfile} ]] && touch ${dir}/${datalistfile}
17 for x in $listoffiles
18 do
19   echo ${x} >> ${dir}/${datalistfile}
20 done
21
22 #change to the proper directory ${dir}
23 cd ${dir}
24
25 ################################################################################
26 ## YOUR CODE HERE ##, you have $datafile in pwd to work with
27 ################################################################################
28 #example:
29 source /project/alice/alisoft/scripts/setAlice.sh -s /data/alice3/mikolaj/alisoft/releases/trunk/
30 cp $PBS_O_WORKDIR/runStarFlowAnalysis.C .
31 root -b -q runStarFlowAnalysis.C\("\"$datalistfile\""\)
32
33 ################################################################################