~maddevelopers/mg5amcnlo/3.0.2-alpha0

« back to all changes in this revision

Viewing changes to Template/bin/monitor

Added Template and HELAS into bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#  
 
3
#   First we need to get into the main directory
 
4
#
 
5
if [[  ! -d ./bin  ]]; then
 
6
    cd ../
 
7
    if [[ ! -d ./bin ]]; then
 
8
        echo "Error: survey must be executed from the main, or bin directory"
 
9
        exit
 
10
    fi
 
11
fi
 
12
#
 
13
#  Now let shell know where to find important executables
 
14
#
 
15
main=`pwd`
 
16
dirbin=$main/bin
 
17
# Begin Local versions
 
18
# set dirbin = /home/tstelzer/bin/MG_ME
 
19
# End Local versions 
 
20
cd SubProcesses
 
21
t=`find ./ -maxdepth 2 -name "ajob*" |wc -l`
 
22
r=`find ./ -maxdepth 2 -name "run.ajob*" |wc -l`
 
23
w=`find ./ -maxdepth 2 -name "wait.ajob*" |wc -l`
 
24
d=`find ./ -maxdepth 2 -name "done.ajob*" |wc -l`
 
25
 
 
26
echo "waiting while finishing jobs on cluster"
 
27
while [[  $d -lt $t  ]]; do    
 
28
    echo $w $r $d $t
 
29
    rm -f ../status
 
30
    echo $w $r $d $t > ../status
 
31
    $dirbin/gen_crossxhtml-pl $1
 
32
    sleep 10
 
33
    t=`find ./ -maxdepth 2 -name "ajob*" |wc -l`
 
34
    r=`find ./ -maxdepth 2 -name "run.ajob*" |wc -l`
 
35
    w=`find ./ -maxdepth 2 -name "wait.ajob*" |wc -l`
 
36
    d=`find ./ -maxdepth 2 -name "done.ajob*" |wc -l`
 
37
done
 
38
 
 
39
rm -f ../running_jobs