Changeset 7912
- Timestamp:
- 08/22/06 15:47:15 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7911 r7912 80 80 - implemented usage of gettodo instead of getdolist (faster) 81 81 82 * datacenter/scripts/dodatacheck: 82 * datacenter/scripts/dodatacheck, datacenter/scripts/runcallisto, 83 datacenter/scripts/runganymed, datacenter/scripts/runstar: 83 84 - improved logging and comments 84 85 - adapted find-to-do-file-algorithm -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7909 r7912 58 58 59 59 # get todo file 60 echo "checking if other todo-files are there">> $scriptlog 2>&161 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&160 possibletodofiles=`ls -r $listpath/ToDo-*-$column-*.txt` >> $scriptlog 2>&1 61 if [ "$possibletodofiles" = "" ] 62 62 then 63 echo " other file(s) on disk " >> $scriptlog 2>&164 echo " -> choose one file and start calibrating">> $scriptlog 2>&163 echo "ERROR: in $program no todofiles found => something went wrong in jobmanager" 64 finish >> $scriptlog 2>&1 65 65 else 66 # check if getting of list is already running 67 checklock "getting list of" >> $scriptlog 2>&1 68 # get todo list 69 gettodo >> $scriptlog 2>&1 70 rm -v $lockfile >> $scriptlog 2>&1 66 singleprocess="yes" 67 echo "todofiles: "${possibletodofiles[@]} >> $scriptlog 2>&1 68 for possibletodofile in ${possibletodofiles[@]} 69 do 70 if ! ls $possibletodofile >> $scriptlog 2>&1 71 then 72 echo "file is not on disk -> continue" >> $scriptlog 2>&1 73 continue 74 fi 75 lockfile=`echo $possibletodofile | sed -e 's/lists/locks/' -e 's/ToDo/lock/'` 76 checklock >> $scriptlog 2>&1 77 todofile=$possibletodofile 78 done 71 79 fi 72 73 # choose todo file 74 nr=bla 75 echo "finding the right todo-file" >> $scriptlog 2>&1 76 todofiles=`ls -r $listpath/ToDo-$table-$column-*` 77 78 for todofile in ${todofiles[@]} 79 do 80 if ! ls $todofile >> $scriptlog 2>&1 81 then 82 echo "file is not on disk -> continue" >> $scriptlog 2>&1 83 continue 84 fi 85 lockfile=`echo $todofile | sed -e 's/lists/locks/' -e 's/ToDo/lock/'` 86 date > $lockfile >> $scriptlog 2>&1 87 checklock=$? 88 case $checklock in 89 0) echo "checklock=$checklock -> setting number" >> $scriptlog 2>&1 90 nr=${i} 91 break;; 92 1) echo "checklock=$checklock -> file exists -> continue" >> $scriptlog 2>&1;; 93 *) echo "checklock=$checklock -> something went completely wrong" >> $scriptlog 2>&1;; 94 esac 95 done 96 97 case $nr in 98 bla) echo "everything is beeing processed -> exit" >> $scriptlog 2>&1 99 date >> $scriptlog 2>&1 100 exit;; 101 12345678) echo "process nr: "$nr >> $scriptlog 2>&1;; 102 esac 80 if [ "$todofile" = "" ] 81 then 82 echo "no todofile found -> exit" >> $scriptlog 2>&1 83 finish >> $scriptlog 2>&1 84 fi 103 85 104 86 # get sequence(s) from todo file … … 116 98 for sequence in ${sequences[@]} 117 99 do 100 echo "run $program for sequence $sequence..." >> $scriptlog 2>&1 118 101 no=`printf %08d $sequence | cut -c 0-4` 119 102 no2=`printf %08d $sequence` … … 121 104 var2=$no2 122 105 outpath="$datapath/$program/$no/$no2" 123 echo "outpath: "$outpath >> $scriptlog 2>&1124 106 makedir $outpath >> $scriptlog 2>&1 125 107 126 108 sequfile="$sequpath/$no/sequence$no2.txt" 127 echo "sequfile: "$sequfile >> $scriptlog 2>&1128 109 129 110 # find callisto.rc file … … 143 124 fi 144 125 145 echo "run $program..." >> $scriptlog 2>&1146 126 setstatus "start" >> $scriptlog 2>&1 147 127 … … 150 130 151 131 case $check1 in 152 0) echo " check1=$check1 -> everything ok -> doing update..." >> $scriptlog 2>&1132 0) echo " check1=$check1 -> everything ok -> doing update..." >> $scriptlog 2>&1 153 133 # running merpp update if calibration worked 154 134 # finding files, which have to be updated 155 echo "finding files to be updated " >> $scriptlog 2>&1135 echo "finding files to be updated..." >> $scriptlog 2>&1 156 136 calfiles=`find $outpath -name *_Y_* ` 157 echo " files to be updated: "$calfiles >> $scriptlog 2>&1137 echo " files to be updated: "$calfiles >> $scriptlog 2>&1 158 138 if [ "$calfiles" = "" ] 159 139 then 160 echo " no files found -> continue with next sequence" >> $scriptlog 2>&1140 echo " no files found -> continue with next sequence" >> $scriptlog 2>&1 161 141 continue 162 142 fi … … 176 156 cacofile=`find /magic/subsystemdata/caco/ -name dc_[2][0][0-2][0-9]_[0,1][0-9]_[0-3][0-9]_*${runno}_${source}.txt` 177 157 # cacofile=`find /magic/subsystemdata/caco/ -name dc_[2][0][0-2][0-9]_[0,1][0-9]_[0-3][0-9]_*${runno}_*.txt` 178 echo "runno: "$runno >> $scriptlog 2>&1179 echo "ccfile: "$ccfile >> $scriptlog 2>&1180 158 if [ "$ccfile" = "" ] 181 159 then … … 186 164 break 187 165 fi 188 echo "cacofile: "$cacofile >> $scriptlog 2>&1189 166 if [ "$cacofile" = "" ] 190 167 then … … 218 195 check2=$? 219 196 case $check2 in 220 0) echo " check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1;;221 *) echo " check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1197 0) echo " check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1;; 198 *) echo " check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1 222 199 com=$Fmerppcc 223 200 comadd=$runno … … 228 205 check3=$? 229 206 case $check3 in 230 0) echo " check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1;;231 *) echo " check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1207 0) echo " check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1;; 208 *) echo " check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1 232 209 com=$Fmerppcaco 233 210 comadd=$runno … … 237 214 done 238 215 ;; 239 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1216 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 240 217 com=$Fcallisto 241 218 check=$check1 242 219 ;; 243 220 esac 244 # set status 245 echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 221 246 222 setstatus "stop" >> $scriptlog 2>&1 247 223 done -
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7909 r7912 53 53 date >> $scriptlog 2>&1 54 54 55 # findingtodo file56 echo "checking if other todo-files are there">> $scriptlog 2>&157 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&155 # get todo file 56 possibletodofiles=`ls -r $listpath/ToDo-*-$column-*.txt` >> $scriptlog 2>&1 57 if [ "$possibletodofiles" = "" ] 58 58 then 59 echo " other file(s) on disk " >> $scriptlog 2>&160 echo " -> choose one file and run $program">> $scriptlog 2>&159 echo "ERROR: in $program no todofiles found => something went wrong in jobmanager" 60 finish >> $scriptlog 2>&1 61 61 else 62 # check if getting of list is already running 63 checklock "getting list of" >> $scriptlog 2>&1 64 # get todo list 65 gettodo >> $scriptlog 2>&1 66 rm -v $lockfile >> $scriptlog 2>&1 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 67 75 fi 68 69 # choosing todo file 70 nr=bla 71 echo "finding the right todo-file" >> $scriptlog 2>&1 72 todofiles=`ls $listpath/ToDo-$table-$column-*` 73 74 for todofile in ${todofiles[@]} 75 do 76 if ! ls $todofile >> $scriptlog 2>&1 77 then 78 echo "file is not on disk -> continue" >> $scriptlog 2>&1 79 continue 80 fi 81 lockfile=`echo $todofile | sed -e 's/lists/locks/' -e 's/ToDo/lock/'` 82 date > $lockfile >> $scriptlog 2>&1 83 checklock=$? 84 case $checklock in 85 0) echo "checklock=$checklock -> setting number" >> $scriptlog 2>&1 86 nr=${i} 87 break;; 88 1) echo "checklock=$checklock -> file exists -> continue" >> $scriptlog 2>&1;; 89 *) echo "checklock=$checklock -> something went completely wrong" >> $scriptlog 2>&1;; 90 esac 91 done 92 93 case $nr in 94 bla) echo "everything is beeing processed -> exit" >> $scriptlog 2>&1 95 date >> $scriptlog 2>&1 96 exit;; 97 12345678) echo "process nr: "$nr >> $scriptlog 2>&1;; 98 esac 76 if [ "$todofile" = "" ] 77 then 78 echo "no todofile found -> exit" >> $scriptlog 2>&1 79 finish >> $scriptlog 2>&1 80 fi 99 81 100 82 # retrieve dataset from todo file … … 110 92 for dataset in ${datasets[@]} 111 93 do 94 echo "run $program for dataset $dataset..." >> $scriptlog 2>&1 112 95 no=`printf %08d $dataset | cut -c 0-5` 113 96 no2=`printf %08d $dataset` … … 115 98 var2=$no2 116 99 outpath="$datapath/$program/$no/$no2" 117 echo "outpath: "$outpath >> $scriptlog 2>&1118 100 makedir $outpath >> $scriptlog 2>&1 119 101 120 102 datasetfile="$datasetpath/$no/dataset$no2.txt" 121 echo "datasetfile: "$datasetfile >> $scriptlog 2>&1122 103 # get observation mode to choose ganymed.rc file 123 104 wobble=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1 … … 131 112 ganymedrc=$setuppath/ganymed/ganymed_$mode.rc 132 113 133 echo "run $program..." >> $scriptlog 2>&1134 114 setstatus "start" >> $scriptlog 2>&1 135 115 … … 138 118 139 119 case $check1 in 140 0) echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1 ;;141 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1120 0) echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1 ;; 121 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 142 122 com=$Fganymed 143 123 check=$check1 144 124 ;; 145 125 esac 146 echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1126 147 127 setstatus "stop" >> $scriptlog 2>&1 148 128 done -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7909 r7912 53 53 date >> $scriptlog 2>&1 54 54 55 # findingtodo file56 echo "checking if other todo-files are there">> $scriptlog 2>&157 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&155 # get todo file 56 possibletodofiles=`ls -r $listpath/ToDo-*-$column-*.txt` >> $scriptlog 2>&1 57 if [ "$possibletodofiles" = "" ] 58 58 then 59 echo " other file(s) on disk " >> $scriptlog 2>&160 echo " -> choose one file and start calculation of image parameter">> $scriptlog 2>&159 echo "ERROR: in $program no todofiles found => something went wrong in jobmanager" 60 finish >> $scriptlog 2>&1 61 61 else 62 # check if getting of list is already running 63 checklock "getting list of" >> $scriptlog 2>&1 64 # get todo list 65 gettodo >> $scriptlog 2>&1 66 rm -v $lockfile >> $scriptlog 2>&1 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 67 75 fi 68 69 # choosing todo file 70 nr=bla 71 echo "finding the right todo-file" >> $scriptlog 2>&1 72 todofiles=`ls -r $listpath/ToDo-$table-$column-*` 73 74 for todofile in ${todofiles[@]} 75 do 76 if ! ls $todofile >> $scriptlog 2>&1 77 then 78 echo "file is not on disk -> continue" >> $scriptlog 2>&1 79 continue 80 fi 81 lockfile=`echo $todofile | sed -e 's/lists/locks/' -e 's/ToDo/lock/'` 82 date > $lockfile >> $scriptlog 2>&1 83 checklock=$? 84 case $checklock in 85 0) echo "checklock=$checklock -> setting number" >> $scriptlog 2>&1 86 nr=${i} 87 break;; 88 1) echo "checklock=$checklock -> file exists -> continue" >> $scriptlog 2>&1;; 89 *) echo "checklock=$checklock -> something went completely wrong" >> $scriptlog 2>&1;; 90 esac 91 done 92 93 case $nr in 94 bla) echo "everything is beeing processed -> exit" >> $scriptlog 2>&1 95 date >> $scriptlog 2>&1 96 exit;; 97 12345678) echo "process nr: "$nr >> $scriptlog 2>&1;; 98 esac 76 if [ "$todofile" = "" ] 77 then 78 echo "no todofile found -> exit" >> $scriptlog 2>&1 79 finish >> $scriptlog 2>&1 80 fi 99 81 100 82 # retrieve sequence from todo file … … 112 94 for sequence in ${sequences[@]} 113 95 do 96 echo "run $program for sequence $sequence..." >> $scriptlog 2>&1 114 97 no=`printf %08d $sequence | cut -c 0-4` 115 98 no2=`printf %08d $sequence` … … 118 101 outpath="$datapath/$program/$no/$no2" 119 102 inpath=`echo $outpath | sed -e 's/star/callisto/'` 120 echo "inpath: "$inpath >> $scriptlog 2>&1121 echo "outpath: "$outpath >> $scriptlog 2>&1122 103 makedir $outpath >> $scriptlog 2>&1 123 104 124 105 sequfile="$sequpath/$no/sequence$no2.txt" 125 echo "sequfile: "$sequfile >> $scriptlog 2>&1126 106 127 echo "run $program..." >> $scriptlog 2>&1128 107 setstatus "start" >> $scriptlog 2>&1 129 108 … … 132 111 133 112 case $check1 in 134 0) echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1;;135 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1113 0) echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1;; 114 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 136 115 com=$Fstar 137 116 check=$check1 138 117 ;; 139 118 esac 140 echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1119 141 120 setstatus "stop" >> $scriptlog 2>&1 142 121 done
Note:
See TracChangeset
for help on using the changeset viewer.