Ignore:
Timestamp:
08/13/09 13:28:51 (15 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/scripts
Files:
3 added
2 edited

Legend:

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

    r9488 r9489  
    2020#   Author(s): Daniela Dorner  05/2006 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2007
     22#   Copyright: MAGIC Software Development, 2000-2009
    2323#
    2424#
     
    4545echo "" >> $jmscriptlog 2>&1
    4646echo "" >> $jmscriptlog 2>&1
    47 echo -n `date +%F\ %T`" starting jobmanager for setup " >> $jmscriptlog 2>&1
    48 
    49 # decide which jobmanager you want to run
    50 # setup of the different jobmanagers (which scripts they start)
    51 #  the number of jobs are defined in the file setup
    52 case $1 in
    53    data) echo -n "'data'" >> $jmscriptlog 2>&1
    54          scripts=( "runganymed" "runstar" "runcallisto" ) # not used: "dodatacheck" "cutslices"
    55          scriptscolname=( "fGanymed" "fStar" "fCallisto" ) # not used: "fDataCheckDone" "fCompmux"
    56          pnosweek=( ${pnoganymed[@]} ${pnostar[@]} ${pnocallisto[@]} ) # not used: ${pnodatacheck[@]} ${pnocutslices[@]}
    57          pnoswe=( ${pnoganymedwe[@]} ${pnostarwe[@]} ${pnocallistowe[@]} ) # not used: ${pnodatacheckwe[@]} ${pnocutsliceswe[@]}
    58          break
    59          ;;
    60      mc) echo -n "'mc'" >> $jmscriptlog 2>&1
    61          scripts=( "runcorsika" "runreflector" "runcamera" )
    62          scriptscolname=( "fCorsikaFileAvail" "fReflectorFileAvail" "fCameraFileAvail" )
    63          pnosweek=( ${pnocorsika[@]} ${pnoreflector[@]} ${pnocamera[@]} )
    64          pnoswe=( ${pnocorsikawe[@]} ${pnoreflectorwe[@]} ${pnocamerawe[@]} )
    65          break
    66          ;;
    67   ctamc) echo -n "'cta mc'" >> $jmscriptlog 2>&1
    68          scripts=( "runsimtel" )
    69          scriptscolname=( "fCorsikaSimTelarray" )
    70          pnosweek=( ${pnosimtel[@]} )
    71          pnoswe=( ${pnosimtelwe[@]} )
    72          break
    73          ;;
    74       *) echo ""
    75          echo "'$1' is a wrong commandline option for jobmanager -> exit" >> $jmscriptlog 2>&1
    76          echo "'$1' is a wrong commandline option for jobmanager -> exit"
    77          printprocesslog "WARN '$1' is a wrong commandline option for jobmanager"
    78          finish >> $jmscriptlog 2>&1
    79          break
    80          ;;
    81 esac
     47echo -n `date +%F\ %T`" starting jobmanager for setup "$AUTOMATIONSETUP >> $jmscriptlog 2>&1
    8248
    8349# choose commands according to queueing system (defined in setup)
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r9456 r9489  
    3838fi
    3939
    40 source `dirname $0`/setup
    41 
    42 mars=`dirname $0 | sed -e 's/\/datacenter\/scripts//'`
    43 macrospath=$mars/datacenter/macros
    44 scriptspath=$mars/datacenter/scripts
     40if [ "$AUTOMATIONSETUP" = "" ]
     41then
     42   echo "Please set the environment variable \$AUTOMATIONSETUP."
     43   exit
     44fi
     45
     46source `dirname $0`/setup.$AUTOMATIONSETUP
    4547
    4648datetime=`date +%F-%H-%M-%S`
     
    157159jmerrorlog=$runlogpath/jobmanager-error`date +%F`.log
    158160jmscriptlog=$runlogpath/jobmanager`date +%F`.log
    159 steps=$mars/resources/steps.rc
     161
     162# check if rc-files are available
    160163if ! ls $steps >/dev/null
    161164then
     
    163166   finish
    164167fi
    165 sqlrc=$mars/sql.rc
    166168if ! ls $sqlrc >/dev/null
    167169then
     
    169171   finish
    170172fi
     173
    171174# resetting values
    172175pno=0
     
    186189# in the following the functions, which are needed by several scripts, are
    187190# defined
    188 
    189 # function to do continue in a loop and produce according logging
    190 function cont()
    191 {
    192    date
    193    echo ""
    194    continue
    195 }
    196191
    197192# function to check if a process is already locked
     
    368363   then
    369364      printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus)"
    370       cont
     365      echo `date +%F\ %T`" ERROR could not query number of processes from db (program: $program, function getstatus)"
     366      continue
    371367   fi
    372368}
Note: See TracChangeset for help on using the changeset viewer.