Changeset 7477 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/03/06 16:49:10 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7475 r7477  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2006/02/03 Daniela Dorner
     21
     22   * datacenter/scripts/sourcefile:
     23     - implemented two new functions: getdolist, finish
     24
     25   * datacenter/scripts/buildsequenceentries, checkfilesforsequenceavail,
     26     checkstardone, copyscript, correcttime, dodatacheck, doexclusions,
     27     fillcallisto, fillganymed, fillstar, insertdatasets,
     28     makecallistolinks, processmcsequences, runcallisto, runganymed,
     29     runstar, writesequencefiles:
     30     - replaced corresponding pieces of code by the functions getdolist
     31       and finish
     32     - moved variable $date to function getstatus
     33     - improved logging
     34     - generalized variables $lockfile and $todofile
     35
     36
    2037 2006/02/03 Daniela Dorner, Daniel Hoehne
    2138
  • trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks

    r7476 r7477  
    3434
    3535user=`whoami`
     36program=makecallistolinks
    3637source /home/$user/Mars/datacenter/scripts/sourcefile
    3738
     
    4142callistorcnew=callisto_Dec04Jan05.rc
    4243
    43 scriptlogpath=$logpath/run/makecallistolinks/`date +%Y/%m/%d`
     44scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    4445makedir $scriptlogpath
    45 scriptlog=$scriptlogpath/makingcallistolinks`date +%F`.log
     46scriptlog=$scriptlogpath/$program`date +%F`.log
    4647
    4748date >> $scriptlog 2>&1
    4849
    4950# check if script is already running
    50 lockfile=$lockpath/lock-making-callisto-links.txt
     51lockfile=$lockpath/lock-$program.txt
    5152date > $lockfile >> $scriptlog 2>&1
    5253checklock0=$?
     
    5455    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    5556    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    56          echo "-> makecallistolinks is running -> exit" >> $scriptlog 2>&1
     57         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    5758         date  >> $scriptlog 2>&1
    5859         exit;;
  • trunk/MagicSoft/Mars/datacenter/scripts/processmcsequences

    r7460 r7477  
    5050    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    5151    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    52          echo "-> linkmc is running -> exit" >> $scriptlog 2>&1
     52         echo "-> processmcsequences is running -> exit" >> $scriptlog 2>&1
    5353         date  >> $scriptlog 2>&1
    5454         exit;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runcallisto

    r7474 r7477  
    4949table=SequenceProcessStatus
    5050column=fCallisto
    51 date=NULL
    52 datetime=`date +%F-%H-%M-%S`
    53 year=`date +%Y`
    5451#pno=500 # number of processes, i.e. number of todo-files
    5552
    5653todofile=$listpath/ToDo-$table-$column
    57 getstatuslogpath=$logpath/getstatus/$program/$year
    58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     54lockfile=$lockpath/lock-getting-$program-list.txt
    5955
    6056scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    6460date >> $scriptlog 2>&1
    6561
    66 makedir $getstatuslogpath >> $scriptlog 2>&1
    67 
    6862cd $mars
     63
     64# check if getting of list is already running
     65date > $lockfile >> $scriptlog 2>&1
     66checklock0=$?
     67case $checklock0 in
     68    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
     69    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
     70         echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
     71         date  >> $scriptlog 2>&1
     72         exit;;
     73    *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
     74esac
    6975
    7076# get todo file
     
    7581   echo " -> choose one file and start calibrating" >> $scriptlog 2>&1
    7682else
    77    date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    78    checklock0=$?
    79    case $checklock0 in
    80        0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    81        1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    82             echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    83             date  >> $scriptlog 2>&1
    84             exit;;
    85        *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
    86    esac
    87 
    88    echo "getting list..." >> $scriptlog 2>&1
    89    check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    90 
    91    case $check0 in
    92       1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    93       *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    94            rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    95            date  >> $scriptlog 2>&1
    96            exit;;
    97    esac
    98    rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
     83   # get todo list
     84   getdolist  >> $scriptlog 2>&1
     85   rm -v $lockfile >> $scriptlog 2>&1
    9986fi
    10087
     
    135122then
    136123   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    137    rm -v $todofile >> $scriptlog 2>&1
    138    rm -v $lockfile >> $scriptlog 2>&1
    139    date  >> $scriptlog 2>&1
    140    exit
     124   finish >> $scriptlog 2>&1
    141125fi
    142126
     
    272256done
    273257
    274 rm -v $todofile >> $scriptlog 2>&1
    275 rm -v $lockfile >> $scriptlog 2>&1
    276 
    277 set +C
    278 
    279 date  >> $scriptlog 2>&1
    280 
     258finish >> $scriptlog 2>&1
     259
  • trunk/MagicSoft/Mars/datacenter/scripts/runganymed

    r7469 r7477  
    4545table=DataSetProcessStatus
    4646column=fGanymed
    47 date=NULL
    48 datetime=`date +%F-%H-%M-%S`
    49 year=`date +%Y`
    5047#pno=24 # number of processes, i.e. number of todo-files
    5148
    5249todofile=$listpath/ToDo-$table-$column
    53 getstatuslogpath=$logpath/getstatus/$program/$year
    54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     50lockfile=$lockpath/lock-getting-$program-list.txt
    5551
    5652scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    6056date >> $scriptlog 2>&1
    6157
    62 makedir $getstatuslogpath >> $scriptlog 2>&1
    63 
    6458cd $mars
    6559
    6660# check if getting of list is already running
    67 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
     61date > $lockfile >> $scriptlog 2>&1
    6862checklock0=$?
    6963case $checklock0 in
     
    8377   echo " -> choose one file and run $program" >> $scriptlog 2>&1
    8478else
    85    echo "getting list..." >> $scriptlog 2>&1
    86    check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    87    
    88    case $check0 in
    89        1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    90        *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    91    esac
     79   # get todo list
     80   getdolist  >> $scriptlog 2>&1
     81   rm -v $lockfile >> $scriptlog 2>&1
    9282fi
    93 
    94 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9583
    9684# choosing todo file
     
    130118then
    131119   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    132    rm -v $todofile >> $scriptlog 2>&1
    133    rm -v $lockfile >> $scriptlog 2>&1
    134    date  >> $scriptlog 2>&1
    135    exit
     120   finish >> $scriptlog 2>&1
    136121fi
    137122
     
    178163done
    179164
    180 rm -v $todofile >> $scriptlog 2>&1
    181 rm -v $lockfile >> $scriptlog 2>&1
     165finish >> $scriptlog 2>&1
    182166
    183 set +C
    184 
    185 date  >> $scriptlog 2>&1
    186 
  • trunk/MagicSoft/Mars/datacenter/scripts/runstar

    r7469 r7477  
    4545table=SequenceProcessStatus
    4646column=fStar
    47 date=NULL
    48 datetime=`date +%F-%H-%M-%S`
    49 year=`date +%Y`
    5047#pno=500 # number of processes, i.e. number of todo-files
    5148
    5249todofile=$listpath/ToDo-$table-$column
    53 getstatuslogpath=$logpath/getstatus/$program/$year
    54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     50lockfile=$lockpath/lock-getting-$program-list.txt
    5551
    5652scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    6056date >> $scriptlog 2>&1
    6157
    62 makedir $getstatuslogpath >> $scriptlog 2>&1
    63 
    6458cd $mars
    6559
    6660# check if getting of list is already running
    67 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
     61date > $lockfile >> $scriptlog 2>&1
    6862checklock0=$?
    6963case $checklock0 in
     
    8377   echo " -> choose one file and start calculation of image parameter" >> $scriptlog 2>&1
    8478else
    85    echo "getting list..." >> $scriptlog 2>&1
    86    check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    87    
    88    case $check0 in
    89        1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    90        *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    91    esac
     79   # get todo list
     80   getdolist  >> $scriptlog 2>&1
     81   rm -v $lockfile >> $scriptlog 2>&1
    9282fi
    93 
    94 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9583
    9684# choosing todo file
     
    130118then
    131119   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    132    rm -v $todofile >> $scriptlog 2>&1
    133    rm -v $lockfile >> $scriptlog 2>&1
    134    date  >> $scriptlog 2>&1
    135    exit
     120   finish >> $scriptlog 2>&1
    136121fi
    137122
     
    170155done
    171156
    172 rm -v $todofile >> $scriptlog 2>&1
    173 rm -v $lockfile >> $scriptlog 2>&1
     157finish >> $scriptlog 2>&1
    174158
    175 set +C
    176 
    177 date  >> $scriptlog 2>&1
    178 
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r7474 r7477  
    6363}
    6464
     65function finish()
     66{
     67   rm -v $todofile
     68   rm -v $lockfile
     69   date
     70   exit
     71}
     72
     73function getdolist()
     74{
     75   datetime=`date +%F-%H-%M-%S`
     76   year=`date +%Y`
     77   date=NULL
     78   
     79   getstatuslogpath=$logpath/getstatus/$program/$year
     80   getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
     81   makedir $getstatuslogpath
     82
     83   # get todo list
     84   echo "getting todo list..."
     85   check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus | grep int | sed -e 's/(int)//'`
     86
     87   case $check0 in
     88      1)   echo "check0=$check0 -> everything ok, got todo list -> run $program";;
     89      *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit"
     90           finish ;;
     91   esac
     92
     93}
     94
    6595function resetstatusvalues()
    6696{
     
    118148   case $checkstatus in
    119149      1)   echo "checkstatus=$checkstatus -> everything ok, status has been set";;
    120       *)   echo "checkstatus=$checkstatus -> ERROR -> step could not be set";;
     150      *)   echo "checkstatus=$checkstatus -> ERROR -> step could not be set -> exit"
     151           finish ;;
    121152   esac
    122153}
  • trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles

    r7471 r7477  
    4444table=SequenceProcessStatus
    4545column=fSequenceFileWritten
    46 date=NULL
    47 datetime=`date +%F-%H-%M-%S`
    48 year=`date +%Y`
    4946
    5047todofile=$listpath/ToDo-$table-$column.txt
    51 getstatuslogpath=$logpath/getstatus/$program/$year
    52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     48lockfile=$lockpath/lock-$program.txt
    5349
    5450scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5854date >> $scriptlog 2>&1
    5955
    60 makedir $getstatuslogpath >> $scriptlog 2>&1
    61 
    6256cd $mars
    6357
    6458# check if script is already running
    65 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     59date > $lockfile >> $scriptlog 2>&1
    6660checklock0=$?
    6761case $checklock0 in
     
    7569
    7670# get todo list
    77 echo "getting list..." >> $scriptlog 2>&1
    78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    79 
    80 case $check0 in
    81     1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    82     *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    83          rm -v $todofile >> $scriptlog 2>&1
    84          rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    85          date  >> $scriptlog 2>&1
    86          exit;;
    87 esac
     71getdolist  >> $scriptlog 2>&1
    8872
    8973# get sequences from todo file
     
    9276then
    9377   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    94    rm -v $todofile >> $scriptlog 2>&1
    95    rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    96    date  >> $scriptlog 2>&1
    97    exit
     78   finish >> $scriptlog 2>&1
    9879fi
    9980
     
    11091
    11192   writesequencefilelogpath=$logpath/$program/$no
    112    echo "$programlogpath: "$writesequencefilelogpath >> $scriptlog 2>&1
    11393   makedir $writesequencefilelogpath >> $scriptlog 2>&1
     94   writesequencefilelog=$writesequencefilelogpath/writesequencefile-$no2.log
    11495
    11596   echo "write sequencefile for sequence $sequence" >> $scriptlog 2>&1
    11697   setstatus "start" >> $scriptlog 2>&1
    11798
    118    check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelogpath/writesequencefile-$no2.log | grep int | sed -e 's/(int)//'`
     99   check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelog | grep int | sed -e 's/(int)//'`
    119100   case $check2 in
    120101      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
     
    128109done
    129110
    130 rm -v $todofile >> $scriptlog 2>&1
    131 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     111finish >> $scriptlog 2>&1
    132112
    133 set +C
    134 
    135 date  >> $scriptlog 2>&1
    136 
Note: See TracChangeset for help on using the changeset viewer.