Changeset 7912 for trunk/MagicSoft/Mars/datacenter/scripts/runganymed
- Timestamp:
- 08/22/06 15:47:15 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.