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

    r7460 r7465  
    3838
    3939user=`whoami`
     40program=ganymed
    4041source /home/$user/Mars/datacenter/scripts/sourcefile
    4142
     
    5051
    5152todofile=$listpath/ToDo-$table-$column
    52 getstatuslogpath=$logpath/getstatus/ganymed/$year
    53 getstatuslog=$getstatuslogpath/getstatus-ganymed-$datetime.log
     53getstatuslogpath=$logpath/getstatus/$program/$year
     54getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5455
    55 scriptlogpath=$logpath/run/ganymed/`date +%Y/%m/%d`
     56scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5657makedir $scriptlogpath
    57 scriptlog=$scriptlogpath/runganymed-$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-ganymed-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 ganymed 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;;
     
    8081then
    8182   echo "other file(s) on disk " >> $scriptlog 2>&1
    82    echo " -> choose one file and run ganymed" >> $scriptlog 2>&1
     83   echo " -> choose one file and run $program" >> $scriptlog 2>&1
    8384else
    8485   echo "getting list..." >> $scriptlog 2>&1
     
    8687   
    8788   case $check0 in
    88        1)   echo "check0=$check0 -> everything ok -> run ganymed" >> $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-ganymed-list.txt >> $scriptlog 2>&1
     94rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9495
    9596# choosing todo file
     
    141142  no=`printf %08d $dataset | cut -c 0-5`
    142143  no2=`printf %08d $dataset`
    143   outpath="$datapath/ganymed/$no/$no2"
     144  outpath="$datapath/$program/$no/$no2"
    144145  echo "outpath: "$outpath >> $scriptlog 2>&1
    145146  makedir $outpath >> $scriptlog 2>&1
     
    156157     mode="onoff" >> $scriptlog 2>&1
    157158  fi
    158   ganymedrc=$setuppath/ganymed/ganymed_$mode.rc
     159  ganymedrc=$setuppath/$program/$program_$mode.rc
    159160 
    160   echo "run ganymed..." >> $scriptlog 2>&1
    161   ./ganymed -b -q -v4 -f --ind=$datapth/star --config=$ganymedrc --log=$outpath/ganymed$no2.log --html=$outpath/ganymed$no2.html --out=$outpath $datasetfile  2>> $scriptlog> /dev/null
     161  echo "run $program..." >> $scriptlog 2>&1
     162  ./ganymed -b -q -v4 -f --ind=$datapath/star --config=$ganymedrc --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath $datasetfile  2>> $scriptlog> /dev/null
    162163  check1=$?
    163164
    164165  case $check1 in
    165166     0)   echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1
    166           echo "-> inserting the status for ganymed for dataset $dataset into the db" >> $scriptlog 2>&1
    167           setstatuslogpath=$logpath/setstatus/ganymed/$no
    168           makedir $setstatuslogpath >> $scriptlog 2>&1
    169           setstatuslog=$setstatuslogpath/setstatus-ganymed-$no2.log
    170 
    171           check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    172           case $check4 in
    173              1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    174              *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
    175           esac
     167          echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
     168          statustime="Now()"
     169          failed="NULL"
     170          starttime="NULL"
     171          failedtime="NULL"
     172          var1=$no
     173          var2=$no2
     174          setstatus
    176175          ;;
    177176     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note: See TracChangeset for help on using the changeset viewer.