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/runstar

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=star
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    5051
    5152todofile=$listpath/ToDo-$table-$column
    52 getstatuslogpath=$logpath/getstatus/star/$year
    53 getstatuslog=$getstatuslogpath/getstatus-star-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/star/`date +%Y/%m/%d`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/runstar-$datetime.log
     58scriptlog=$scriptlogpath/run$program-$datetime.log
    5859
    5960date >> $scriptlog 2>&1
     
    6465
    6566# check if getting of list is already running
    66 date > $lockpath/lock-getting-star-list.txt >> $scriptlog 2>&1
     67date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    6768checklock0=$?
    6869case $checklock0 in
    6970    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    7071    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    71          echo "-> getting list for star is running -> exit" >> $scriptlog 2>&1
     72         echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    7273         date  >> $scriptlog 2>&1
    7374         exit;;
     
    8687   
    8788   case $check0 in
    88        1)   echo "check0=$check0 -> everything ok -> run star" >> $scriptlog 2>&1;;
     89       1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    8990       *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    9091   esac
    9192fi
    9293
    93 rm -v $lockpath/lock-getting-star-list.txt >> $scriptlog 2>&1
     94rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9495
    9596# choosing todo file
     
    124125esac
    125126
    126 
    127127# retrieve sequence from todo file
    128128sequences=(`cat $todofile`)
     
    142142  no=`printf %08d $sequence | cut -c 0-4`
    143143  no2=`printf %08d $sequence`
    144   outpath="$datapath/star/$no/$no2"
    145   inpath=`echo $outpath | sed -e 's/star/callisto/'`
     144  outpath="$datapath/$program/$no/$no2"
     145  inpath=`echo $outpath | sed -e 's/$program/callisto/'`
    146146  echo "inpath: "$inpath >> $scriptlog 2>&1
    147147  echo "outpath: "$outpath >> $scriptlog 2>&1
     
    151151  echo "sequfile: "$sequfile >> $scriptlog 2>&1
    152152 
    153   echo "run star..." >> $scriptlog 2>&1
    154   ./star -b -q -v4 -f --log=$outpath/star$no2.log --html=$outpath/star$no2.html --ind=$inpath --out=$outpath $sequfile  2>> $scriptlog> /dev/null
     153  echo "run $program..." >> $scriptlog 2>&1
     154  ./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile  2>> $scriptlog> /dev/null
    155155  check1=$?
    156156
    157157  case $check1 in
    158158     0)   echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1
    159           echo "-> inserting the status for star for sequence $sequence into the db" >> $scriptlog 2>&1
    160           setstatuslogpath=$logpath/setstatus/star/$no
    161           makedir $setstatuslogpath >> $scriptlog 2>&1
    162           setstatuslog=$setstatuslogpath/setstatus-star-$no2.log
    163 
    164           check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    165           case $check4 in
    166              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    167              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    168           esac
     159          echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     160          statustime="Now()"
     161          failed="NULL"
     162          starttime="NULL"
     163          failedtime="NULL"
     164          var1=$no
     165          var2=$no2
     166          setstatus
    169167          ;;
    170168     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note: See TracChangeset for help on using the changeset viewer.