Ignore:
Timestamp:
08/24/06 12:15:46 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7920 r7927  
    4343
    4444column=fStar
    45 #pno=500 # number of processes, i.e. number of todo-files
    46 
    47 lockfile=$lockpath/lock-getting-$program-list.txt
    4845
    4946scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5350date >> $scriptlog 2>&1
    5451
    55 # get todo file
    56 possibletodofiles=`ls -r $listpath/ToDo-*-$column-*.txt`  >> $scriptlog 2>&1
    57 if [ "$possibletodofiles" = "" ]
    58 then
    59    echo "ERROR: in $program no todofiles found => something went wrong in jobmanager"
    60    finish >> $scriptlog 2>&1
    61 else
    62    singleprocess="yes"
    63    echo "todofiles: "${possibletodofiles[@]} >> $scriptlog 2>&1
    64    for possibletodofile in ${possibletodofiles[@]}
    65    do
    66       if ! ls $possibletodofile >> $scriptlog 2>&1
    67       then
    68          echo "file is not on disk -> continue" >> $scriptlog 2>&1
    69          continue
    70       fi
    71       lockfile=`echo $possibletodofile | sed -e 's/lists/locks/' -e 's/ToDo/lock/'`
    72       checklock >> $scriptlog 2>&1
    73       todofile=$possibletodofile
    74    done
    75 fi
    76 if [ "$todofile" = "" ]
    77 then
    78    echo "no todofile found -> exit"  >> $scriptlog 2>&1
    79    finish >> $scriptlog 2>&1
    80 fi
     52# get sequence #
     53gettodo >> $scriptlog 2>&1
     54sequence=$process
    8155
    82 # retrieve sequence from todo file
    83 sequences=(`cat $todofile`)
    84 if [ "$sequences" = "" ]
    85 then
    86    echo "nothing to do -> exit"  >> $scriptlog 2>&1
    87    finish >> $scriptlog 2>&1
    88 fi
    89 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1
    90 rm -v $todofile >> $scriptlog 2>&1
     56# lock sequ
     57lockfile=$lockpath/lock-$table-$column-$sequence.txt
     58checklock >> $scriptlog 2>&1
    9159
    9260cd $mars
    9361
    94 # run star for sequence
    95 for sequence in ${sequences[@]}
    96 do
    97   echo "run $program for sequence $sequence..." >> $scriptlog 2>&1
    98   no=`printf %08d $sequence | cut -c 0-4`
    99   no2=`printf %08d $sequence`
    100   var1=$no
    101   var2=$no2
    102   outpath="$datapath/$program/$no/$no2"
    103   inpath=`echo $outpath | sed -e 's/star/callisto/'`
    104   makedir $outpath >> $scriptlog 2>&1
     62echo "run $program for sequence $sequence..." >> $scriptlog 2>&1
     63no=`printf %08d $sequence | cut -c 0-4`
     64no2=`printf %08d $sequence`
     65var1=$no
     66var2=$no2
     67outpath="$datapath/$program/$no/$no2"
     68inpath=`echo $outpath | sed -e 's/star/callisto/'`
     69makedir $outpath >> $scriptlog 2>&1
    10570
    106   sequfile="$sequpath/$no/sequence$no2.txt"
    107  
    108   setstatus "start" >> $scriptlog 2>&1
     71sequfile="$sequpath/$no/sequence$no2.txt"
    10972
    110   ./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile  2>> $scriptlog> /dev/null
    111   check1=$?
     73setstatus "start" >> $scriptlog 2>&1
    11274
    113   case $check1 in
    114      0)   echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1;;
    115      *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    116           com=$Fstar
    117           check=$check1
    118           ;;
    119   esac
    120  
    121   setstatus "stop" >> $scriptlog 2>&1
    122 done
     75./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile  2>> $scriptlog> /dev/null
     76check1=$?
     77
     78case $check1 in
     79   0)   echo " check1=$check1 -> everything ok " >> $scriptlog 2>&1;;
     80   *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     81        com=$Fstar
     82        check=$check1
     83        ;;
     84esac
     85
     86setstatus "stop" >> $scriptlog 2>&1
    12387
    12488finish >> $scriptlog 2>&1
Note: See TracChangeset for help on using the changeset viewer.