-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheventwrapper
More file actions
executable file
·35 lines (34 loc) · 1.04 KB
/
eventwrapper
File metadata and controls
executable file
·35 lines (34 loc) · 1.04 KB
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
#!/bin/tcsh -f
# usage: eventwrapper useThresholds filename [dirs]
# set arguments
@ useThresholds = $1
set filename = $2
# get number of arguments
@ nargs = $#argv
if ( $nargs > 2 ) then
# if there are more arguments, loop over them instead of looping over
# directories in local directory
set dirs = ($argv[3-$nargs])
# get current directory
set thisDir = `pwd`
foreach i ($dirs)
cd $i
echo 'hostname; unset DISPLAY; cd $PBS_O_WORKDIR;'"hostname > eventout3; /ccb/home/syen/matlab/Cat/bin/eventCompute $useThresholds $filename >> eventout3 2>&1" | qsub -V -l nodes=1 -j oe -o $PWD/qsubEvent3 -N eventCompute -
cd $thisDir
end
else
set dirs = (`ls -d [a-z][1-9]`)
foreach i ($dirs)
cd $i
foreach j (*)
cd $j
foreach k (*)
cd $k
echo 'hostname; unset DISPLAY; cd $PBS_O_WORKDIR;'"hostname > eventout3; /ccb/home/syen/matlab/Cat/bin/eventCompute $useThresholds $filename >> eventout3 2>&1" | qsub -V -l nodes=1 -j oe -o $PWD/qsubEvent3 -N eventCompute -
cd ..
end
cd ..
end
cd ..
end
endif