1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # ========================================================================
|
---|
4 | #
|
---|
5 | # *
|
---|
6 | # * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
7 | # * Software. It is distributed to you in the hope that it can be a useful
|
---|
8 | # * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
9 | # * It is distributed WITHOUT ANY WARRANTY.
|
---|
10 | # *
|
---|
11 | # * Permission to use, copy, modify and distribute this software and its
|
---|
12 | # * documentation for any purpose is hereby granted without fee,
|
---|
13 | # * provided that the above copyright notice appear in all copies and
|
---|
14 | # * that both that copyright notice and this permission notice appear
|
---|
15 | # * in supporting documentation. It is provided "as is" without express
|
---|
16 | # * or implied warranty.
|
---|
17 | # *
|
---|
18 | #
|
---|
19 | #
|
---|
20 | # Author(s): Daniela Dorner 05/2005 <mailto:dorner@astro.uni-wuerzburg.de>
|
---|
21 | #
|
---|
22 | # Copyright: MAGIC Software Development, 2000-2006
|
---|
23 | #
|
---|
24 | #
|
---|
25 | # ========================================================================
|
---|
26 | #
|
---|
27 | # This a script, which launches other scripts
|
---|
28 | #
|
---|
29 |
|
---|
30 | source `dirname $0`/sourcefile
|
---|
31 |
|
---|
32 | errorlog=$logpath/scriptlauncher/`date +%Y/%m`/error`date +%F`.log
|
---|
33 | scriptslog=$logpath/scriptlauncher/`date +%Y/%m`/jobmanager`date +%F`.log
|
---|
34 |
|
---|
35 | date #>> $scriptlog 2>&1
|
---|
36 |
|
---|
37 | path=`dirname $0`
|
---|
38 | date=`date +%Y/%m/%d`
|
---|
39 | date2=`date +%Y-%m-%d`
|
---|
40 | condordir=$logpath/condor/$date
|
---|
41 | makedir $condordir
|
---|
42 |
|
---|
43 | for i in $@
|
---|
44 | do
|
---|
45 | if [ "$i" = "allatthesametime" ]
|
---|
46 | then
|
---|
47 | continue
|
---|
48 | fi
|
---|
49 | echo "launching $i..." #>> $scriptlog 2>&1
|
---|
50 | /usr/local/bin/condor_submit -a path=$path -a prog=$i -a date=$date2 -a dir=$condordir $path/run.condor >/dev/null 2>$errorlog
|
---|
51 | if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
|
---|
52 | then
|
---|
53 | echo " waiting for $i to be done..." #>> $scriptlog 2>&1
|
---|
54 | /usr/local/bin/condor_wait $condordir/condor-$date2.log >/dev/null 2>$errorlog
|
---|
55 | fi
|
---|
56 | done
|
---|
57 |
|
---|