Changeset 7465 for trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7460 r7465 38 38 39 39 user=`whoami` 40 program=callisto 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 43 44 44 45 # define callisto.rc files 45 callistorcnew=$setuppath/ callisto/callisto.rc46 callistorcmarapr05=$setuppath/ callisto/callisto_MarApr05.rc46 callistorcnew=$setuppath/$program/$program.rc 47 callistorcmarapr05=$setuppath/$program/$program_MarApr05.rc 47 48 48 49 table=SequenceProcessStatus … … 54 55 55 56 todofile=$listpath/ToDo-$table-$column 56 getstatuslogpath=$logpath/getstatus/ callisto/$year57 getstatuslog=$getstatuslogpath/getstatus- callisto-$datetime.log58 59 scriptlogpath=$logpath/run/ callisto/`date +%Y/%m/%d`57 getstatuslogpath=$logpath/getstatus/$program/$year 58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 59 60 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 60 61 makedir $scriptlogpath 61 scriptlog=$scriptlogpath/run callisto-$datetime.log62 scriptlog=$scriptlogpath/run$program-$datetime.log 62 63 63 64 date >> $scriptlog 2>&1 … … 74 75 echo " -> choose one file and start calibrating" >> $scriptlog 2>&1 75 76 else 76 date > $lockpath/lock-getting- callisto-list.txt >> $scriptlog 2>&177 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 77 78 checklock0=$? 78 79 case $checklock0 in 79 80 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 80 81 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 81 echo "-> getting list for callistois running -> exit" >> $scriptlog 2>&182 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 82 83 date >> $scriptlog 2>&1 83 84 exit;; … … 89 90 90 91 case $check0 in 91 1) echo "check0=$check0 -> everything ok -> run callisto" >> $scriptlog 2>&1;;92 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 92 93 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 93 rm -v $lockpath/lock-getting- callisto-list.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 94 95 date >> $scriptlog 2>&1 95 96 exit;; 96 97 esac 97 rm -v $lockpath/lock-getting- callisto-list.txt >> $scriptlog 2>&198 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 98 99 fi 99 100 … … 146 147 no=`printf %08d $sequence | cut -c 0-4` 147 148 no2=`printf %08d $sequence` 148 outpath="$datapath/ callisto/$no/$no2"149 outpath="$datapath/$program/$no/$no2" 149 150 echo "outpath: "$outpath >> $scriptlog 2>&1 150 151 makedir $outpath >> $scriptlog 2>&1 … … 154 155 155 156 # find callisto.rc file 156 if [ -e $outpath/ callisto.rc ]157 if [ -e $outpath/$program.rc ] 157 158 then 158 echo "found callisto.rc in $outpath -> using this " >> $scriptlog 2>&1159 callistorcseq=$outpath/ callisto.rc159 echo "found $program.rc in $outpath -> using this " >> $scriptlog 2>&1 160 callistorcseq=$outpath/$program.rc 160 161 else 161 echo "no callisto.rc found in $outpath -> making link " >> $scriptlog 2>&1162 echo "no $program.rc found in $outpath -> making link " >> $scriptlog 2>&1 162 163 if [ 49735 -lt $sequence ] && [ $sequence -lt 53516 ] 163 164 then 164 ln -vs $callistorcmarapr05 $outpath/ callisto.rc >> $scriptlog 2>&1165 ln -vs $callistorcmarapr05 $outpath/$program.rc >> $scriptlog 2>&1 165 166 else 166 ln -vs $callistorcnew $outpath/ callisto.rc >> $scriptlog 2>&1167 ln -vs $callistorcnew $outpath/$program.rc >> $scriptlog 2>&1 167 168 fi 168 callistorcseq=$outpath/ callisto.rc169 callistorcseq=$outpath/$program.rc 169 170 fi 170 171 171 172 echo "run callisto..." >> $scriptlog 2>&1 172 ./callisto -b -q -v4 -f -raw --log=$outpath/ callisto$no2.log --html=$outpath/callisto$no2.html --out=$outpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null173 ./callisto -b -q -v4 -f -raw --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null 173 174 check1=$? 174 175 … … 246 247 247 248 # set status for calibration if merpp updates are also done 248 echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1 249 setstatuslogpath=$logpath/setstatus/callisto/$no 250 makedir $setstatuslogpath >> $scriptlog 2>&1 251 setstatuslog=$setstatuslogpath/setstatus-callisto-$no2.log 252 253 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 254 case $check4 in 255 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 256 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 257 esac 249 echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 250 statustime="Now()" 251 failed="NULL" 252 starttime="NULL" 253 failedtime="NULL" 254 var1=$no 255 var2=$no2 256 setstatus 258 257 ;; 259 258 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note:
See TracChangeset
for help on using the changeset viewer.