Changeset 18765


Ignore:
Timestamp:
02/20/17 13:26:16 (8 years ago)
Author:
Daniela Dorner
Message:
addapted to new way of submitting jobs in JobManager
Location:
trunk/DataCheck/Processing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Processing/RunCallisto.sh

    r18250 r18765  
    99set -C
    1010
    11 for (( i=0; i<100; i++ ))
    12 do
    13    # get todo list
    14    gettodo "1"
     11# get night and seqid
     12if [ "$night" = "" ] && [ "$seqid" = "" ]
     13then
     14   # if no number are provided by JobManager
     15   for (( i=0; i<100; i++ ))
     16   do
     17      # avoid too many simultaneous queries
     18      sleep $(( ( RANDOM % 10 )  + 1 ))
     19      # get todo list
     20      gettodo "1"
     21      echo ${primaries[@]}
    1522
    16    # get all needed variables
    17    night=${primaries[0]}
    18    seqid=${primaries[1]}
     23      # get all needed variables
     24      night=${primaries[0]}
     25      seqid=${primaries[1]}
     26      nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
     27      seqnum=$night"_"`printf %03d $seqid`
     28
     29      # check if script is already running
     30      lockfile=$lockpath"/lock-"$program"-"$seqnum".txt"
     31      checklock continue
     32      printprocesslog "INFO got todo with try #"$i
     33      break
     34   done
     35else
    1936   nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
    2037   seqnum=$night"_"`printf %03d $seqid`
    21 
    2238   # check if script is already running
    2339   lockfile=$lockpath"/lock-"$program"-"$seqnum".txt"
    24    checklock continue
    25    printprocesslog "INFO got todo with try #"$i
    26    break
    27 done
     40   checklock
     41   s=0
     42   primaries=( $night $seqid )
     43fi
    2844
    2945# get all needed paths and files
     
    4763cd $mars
    4864
     65# set status in DB
     66#  maybe already done in JobManager
     67#  but do it again to have real runtime
     68setstatus "start"
     69
    4970# run callisto
    5071printprocesslog "INFO starting callisto.C for sequence "$seqnum
    51 setstatus "start"
    5272
    5373printprocesslog "DEBUG root -q -b fact/analysis/callisto.C\("\"$seqfile\""\,"\"$outpath\""\,\""$drstime"\"\,\""$delays"\"\) | tee $logfile "
  • trunk/DataCheck/Processing/RunStar.sh

    r17891 r18765  
    99set -C
    1010
    11 for (( i=0; i<100; i++ ))
    12 do
    13    # get todo list
    14    gettodo "1"
     11# get night and seqid
     12if [ "$night" = "" ] && [ "$seqid" = "" ]
     13then
     14   # if no number are provided by JobManager
     15   for (( i=0; i<100; i++ ))
     16   do
     17      # avoid too many simultaneous queries
     18      sleep $(( ( RANDOM % 10 )  + 1 ))
     19      # get todo list
     20      gettodo "1"
     21      echo ${primaries[@]}
    1522
    16    # get all needed variables
    17    night=${primaries[0]}
    18    seqid=${primaries[1]}
     23      # get all needed variables
     24      night=${primaries[0]}
     25      seqid=${primaries[1]}
     26      nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
     27      seqnum=$night"_"`printf %03d $seqid`
     28
     29      # check if script is already running
     30      lockfile=$lockpath"/lock-"$program"-"$seqnum".txt"
     31      checklock continue
     32      printprocesslog "INFO got todo with try #"$i
     33      break
     34   done
     35else
    1936   nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
    2037   seqnum=$night"_"`printf %03d $seqid`
    21 
    2238   # check if script is already running
    2339   lockfile=$lockpath"/lock-"$program"-"$seqnum".txt"
    24    checklock continue
    25    printprocesslog "INFO got todo with try #"$i
    26    break
    27 done
     40   checklock
     41   s=0
     42   primaries=( $night $seqid )
     43fi
    2844
    2945# get all needed paths and files
     
    3652cd $mars
    3753
     54# set status in DB
     55#  maybe already done in JobManager
     56#  but do it again to have real runtime
     57setstatus "start"
     58
    3859# run star
    3960printprocesslog "INFO starting star.C for sequence "$seqnum
    40 setstatus "start"
    4161
    4262#check1=`root -q -b fact/star.C\("\"$seqfile\""\,7.5\,3.9\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
     
    6585   0)   printprocesslog "INFO merpp was successful for sequence "$seqnum" (check1=$check1)"
    6686        ;;
    67    *)   printprocesslog "ERROR merpp3.C failed for sequence "$seqnum" (check1=$check1)"
    68         check=10
     87   *)   printprocesslog "ERROR merpp.C failed for sequence "$seqnum" (check1=$check1)"
     88        check=10$check1
    6989        ;;
    7090esac
Note: See TracChangeset for help on using the changeset viewer.