Ignore:
Timestamp:
01/30/06 17:13:07 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/runcallisto

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=callisto
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    4344
    4445# define callisto.rc files
    45 callistorcnew=$setuppath/callisto/callisto.rc
    46 callistorcmarapr05=$setuppath/callisto/callisto_MarApr05.rc
     46callistorcnew=$setuppath/$program/$program.rc
     47callistorcmarapr05=$setuppath/$program/$program_MarApr05.rc
    4748
    4849table=SequenceProcessStatus
     
    5455
    5556todofile=$listpath/ToDo-$table-$column
    56 getstatuslogpath=$logpath/getstatus/callisto/$year
    57 getstatuslog=$getstatuslogpath/getstatus-callisto-$datetime.log
    58 
    59 scriptlogpath=$logpath/run/callisto/`date +%Y/%m/%d`
     57getstatuslogpath=$logpath/getstatus/$program/$year
     58getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     59
     60scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    6061makedir $scriptlogpath
    61 scriptlog=$scriptlogpath/runcallisto-$datetime.log
     62scriptlog=$scriptlogpath/run$program-$datetime.log
    6263
    6364date >> $scriptlog 2>&1
     
    7475   echo " -> choose one file and start calibrating" >> $scriptlog 2>&1
    7576else
    76    date > $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1
     77   date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    7778   checklock0=$?
    7879   case $checklock0 in
    7980       0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    8081       1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    81             echo "-> getting list for callisto is running -> exit" >> $scriptlog 2>&1
     82            echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    8283            date  >> $scriptlog 2>&1
    8384            exit;;
     
    8990
    9091   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;;
    9293      *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    93            rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1
     94           rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9495           date  >> $scriptlog 2>&1
    9596           exit;;
    9697   esac
    97    rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1
     98   rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9899fi
    99100
     
    146147  no=`printf %08d $sequence | cut -c 0-4`
    147148  no2=`printf %08d $sequence`
    148   outpath="$datapath/callisto/$no/$no2"
     149  outpath="$datapath/$program/$no/$no2"
    149150  echo "outpath: "$outpath >> $scriptlog 2>&1
    150151  makedir $outpath >> $scriptlog 2>&1
     
    154155 
    155156  # find callisto.rc file
    156   if [ -e $outpath/callisto.rc ]
     157  if [ -e $outpath/$program.rc ]
    157158  then
    158      echo "found callisto.rc in $outpath -> using this " >> $scriptlog 2>&1
    159      callistorcseq=$outpath/callisto.rc
     159     echo "found $program.rc in $outpath -> using this " >> $scriptlog 2>&1
     160     callistorcseq=$outpath/$program.rc
    160161  else
    161      echo "no callisto.rc found in $outpath -> making link " >> $scriptlog 2>&1
     162     echo "no $program.rc found in $outpath -> making link " >> $scriptlog 2>&1
    162163     if [ 49735 -lt $sequence ] && [ $sequence -lt 53516 ]
    163164     then
    164         ln -vs $callistorcmarapr05 $outpath/callisto.rc >> $scriptlog 2>&1
     165        ln -vs $callistorcmarapr05 $outpath/$program.rc >> $scriptlog 2>&1
    165166     else
    166         ln -vs $callistorcnew $outpath/callisto.rc >> $scriptlog 2>&1
     167        ln -vs $callistorcnew $outpath/$program.rc >> $scriptlog 2>&1
    167168     fi
    168      callistorcseq=$outpath/callisto.rc
     169     callistorcseq=$outpath/$program.rc
    169170  fi
    170171
    171172  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/null
     173  ./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
    173174  check1=$?
    174175
     
    246247         
    247248          # 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
    258257          ;;
    259258     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note: See TracChangeset for help on using the changeset viewer.