]>
Commit | Line | Data |
---|---|---|
9b8dc1f8 | 1 | #!/bin/sh |
2 | ||
3 | #### this is user settable ######### | |
4 | #how many files per job | |
5 | n=4 | |
6 | ||
7 | #file with the list for each job | |
8 | export datalistfile="files.txt" | |
9 | ||
10 | #where do we get our data from? | |
11 | find /data/alice3/jthomas/testData/ -name "*.root" > $datalistfile | |
12 | ||
13 | ########## DO NOT TOUCH THIS SECTION ########################################### | |
14 | ################################################################################ | |
15 | #script to be run | |
16 | export scripttorun="theNodeScript.sh" | |
17 | ||
18 | queue="stbcq" | |
19 | [[ $# -eq 1 ]] && queue=$1 | |
20 | export listoffiles="" | |
21 | i=0 | |
22 | for x in `cat $datalistfile` | |
23 | do | |
24 | listoffiles="$listoffiles $x" | |
25 | if [ $(($i%$n)) -eq 0 ] | |
26 | then | |
27 | echo $listoffiles | |
28 | echo "" | |
29 | qsub -q ${queue} -v "listoffiles,datalistfile" $scripttorun | |
30 | listoffiles="" | |
31 | fi | |
32 | ((i++)) | |
33 | done | |
34 | ################################################################################ |