Changeset 7927 for trunk/MagicSoft/Mars/datacenter/scripts/runganymed
- Timestamp:
- 08/24/06 12:15:46 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7920 r7927 43 43 44 44 column=fGanymed 45 #pno=24 # number of processes, i.e. number of todo-files46 47 lockfile=$lockpath/lock-getting-$program-list.txt48 45 49 46 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 53 50 date >> $scriptlog 2>&1 54 51 55 # get todo file 56 possibletodofiles=`ls -r $listpath/ToDo-*-$column-*.txt` >> $scriptlog 2>&1 57 if [ "$possibletodofiles" = "" ] 52 # get dataset # 53 gettodo >> $scriptlog 2>&1 54 dataset=$process 55 56 # lock sequ 57 lockfile=$lockpath/lock-$table-$column-$dataset.txt 58 checklock >> $scriptlog 2>&1 59 60 cd $mars 61 62 echo "run $program for dataset $dataset..." >> $scriptlog 2>&1 63 no=`printf %08d $dataset | cut -c 0-5` 64 no2=`printf %08d $dataset` 65 var1=$no 66 var2=$no2 67 outpath="$datapath/$program/$no/$no2" 68 makedir $outpath >> $scriptlog 2>&1 69 70 datasetfile="$datasetpath/$no/dataset$no2.txt" 71 # get observation mode to choose ganymed.rc file 72 wobble=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1 73 wobble2=`echo $wobble | grep ^\#` >> $scriptlog 2>&1 74 if [ "$wobble2" = "" ] 58 75 then 59 echo "ERROR: in $program no todofiles found => something went wrong in jobmanager" 60 finish >> $scriptlog 2>&1 76 mode="wobble" >> $scriptlog 2>&1 61 77 else 62 singleprocess="yes" 63 echo "todofiles: "${possibletodofiles[@]} >> $scriptlog 2>&1 64 for possibletodofile in ${possibletodofiles[@]} 65 do 66 if ! ls $possibletodofile >> $scriptlog 2>&1 67 then 68 echo "file is not on disk -> continue" >> $scriptlog 2>&1 69 continue 70 fi 71 lockfile=`echo $possibletodofile | sed -e 's/lists/locks/' -e 's/ToDo/lock/'` 72 checklock >> $scriptlog 2>&1 73 todofile=$possibletodofile 74 done 78 mode="onoff" >> $scriptlog 2>&1 75 79 fi 76 if [ "$todofile" = "" ] 77 then 78 echo "no todofile found -> exit" >> $scriptlog 2>&1 79 finish >> $scriptlog 2>&1 80 fi 80 ganymedrc=$setuppath/ganymed/ganymed_$mode.rc 81 81 82 # retrieve dataset from todo file 83 datasets=(`cat $todofile`) 84 if [ "$datasets" = "" ] 85 then 86 echo "nothing to do -> exit" >> $scriptlog 2>&1 87 finish >> $scriptlog 2>&1 88 fi 89 echo "datasets: "${datasets[@]} >> $scriptlog 2>&1 90 rm -v $todofile >> $scriptlog 2>&1 82 setstatus "start" >> $scriptlog 2>&1 91 83 92 # run ganymed for dataset 93 for dataset in ${datasets[@]} 94 do 95 echo "run $program for dataset $dataset..." >> $scriptlog 2>&1 96 no=`printf %08d $dataset | cut -c 0-5` 97 no2=`printf %08d $dataset` 98 var1=$no 99 var2=$no2 100 outpath="$datapath/$program/$no/$no2" 101 makedir $outpath >> $scriptlog 2>&1 84 ./ganymed -b -q -v4 -f --ind=$datapath/star --config=$ganymedrc --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath $datasetfile 2>> $scriptlog> /dev/null 85 check1=$? 102 86 103 datasetfile="$datasetpath/$no/dataset$no2.txt" 104 # get observation mode to choose ganymed.rc file 105 wobble=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1 106 wobble2=`echo $wobble | grep ^\#` >> $scriptlog 2>&1 107 if [ "$wobble2" = "" ] 108 then 109 mode="wobble" >> $scriptlog 2>&1 110 else 111 mode="onoff" >> $scriptlog 2>&1 112 fi 113 ganymedrc=$setuppath/ganymed/ganymed_$mode.rc 114 115 setstatus "start" >> $scriptlog 2>&1 87 case $check1 in 88 0) echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1 ;; 89 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 90 com=$Fganymed 91 check=$check1 92 ;; 93 esac 116 94 117 ./ganymed -b -q -v4 -f --ind=$datapath/star --config=$ganymedrc --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath $datasetfile 2>> $scriptlog> /dev/null 118 check1=$? 119 120 case $check1 in 121 0) echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1 ;; 122 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 123 com=$Fganymed 124 check=$check1 125 ;; 126 esac 127 128 setstatus "stop" >> $scriptlog 2>&1 129 done 95 setstatus "stop" >> $scriptlog 2>&1 130 96 131 97 finish >> $scriptlog 2>&1
Note:
See TracChangeset
for help on using the changeset viewer.