-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathcs5
executable file
·76 lines (63 loc) · 2.78 KB
/
cs5
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
if [ $(checkLs.sh | wc -l) -eq 110 -o $(checkLs.sh | wc -l) -eq 124 ]; then
echo try sending command checkLs.sh to check the contents of the channels directories...
else
# find directories with data to sort
find . -name "rplhighpass.mat" | adirfiles | sort > highpassdirs.txt
# find completed learn jobs
find . -name "learn_job*.o*" | sort > learnfiles.txt
# find directories with completed learn jobs
cat learnfiles.txt | adirfiles | sort | uniq > learndirs.txt
# find directories with completed learn jobs that found sua
grep -l sigma $(cat learnfiles.txt) | adirfiles | sort > suadirs.txt
# find directories with completed decode jobs
find . -name "hmmsort.mat" | adirfiles | sort > hmmsortdirs.txt
# find directories with completed learn jobs that did not find any sua
grep -l spikeforms $(cat learnfiles.txt) | adirfiles | sort | uniq > nosuadirs.txt
# find directories where hmmlearn failed
grep -L sigma $(cat learnfiles.txt) | xargs grep -L spikeforms | adirfiles | uniq > hmmfail.txt
# find directories where hmmlearn has not finished
comm -23 highpassdirs.txt learndirs.txt > nolearndirs.txt
# find directories where hmmsort.mat have not been created
comm -23 suadirs.txt hmmsortdirs.txt > nohmmsortdirs.txt
# find directories where hmmdecode has finished so we can cross-check
# with nodecodedirs.txt to see if hmmdecode needs to be re-run
find . -name "decode_job*.o*" | adirfiles | sort | uniq > decodedirs.txt
comm -12 nohmmsortdirs.txt decodedirs.txt > decodefail.txt
comm -23 nohmmsortdirs.txt decodedirs.txt > nodecodedirs.txt
# find directories with completed transfer jobs
find . -name "transferred.txt" | adirfiles | sort > transferreddirs.txt
wc -l highpassdirs.txt learndirs.txt suadirs.txt hmmsortdirs.txt nosuadirs.txt
echo "Still sorting..."
for i in `cat nolearndirs.txt`; do
echo $i
sed -n '3p' $i/decode_job????.pbs
done
echo "Not decoded..."
for i in `cat nodecodedirs.txt`; do
echo $i
sed -n '3p' $i/decode*pbs
done
echo "hmmlearn failed..."
cat hmmfail.txt
for i in $(cat hmmfail.txt); do
echo $i;
tail -n 20 $i/learn*.o*;
done
echo "hmmdecode failed..."
cat decodefail.txt
for i in $(cat decodefail.txt); do
echo $i;
tail -n 20 $i/decode*.o*;
done
find . -name 'channel*' > allchannels.txt
echo "Not transferred..."
cat allchannels.txt transferreddirs.txt nodecodedirs.txt hmmfail.txt nolearndirs.txt | sort | uniq -u > notransferreddirs.txt
echo "Failed transferred..."
find . -name 'transfer_job0000.pbs.e*' | adirfiles > allTE.txt
cat notransferreddirs.txt allTE.txt | sort | uniq -d > failedTransferred.txt
cat failedTransferred.txt
rm allTE.txt
#rm highpassdirs.txt learndirs.txt learnfiles.txt suadirs.txt hmmsortdirs.txt nosuadirs.txt
wc -l hmmfail.txt nolearndirs.txt nodecodedirs.txt transferreddirs.txt notransferreddirs.txt failedTransferred.txt
fi