Changeset 260 for palm/trunk/SCRIPTS


Ignore:
Timestamp:
Mar 16, 2009 11:57:58 AM (16 years ago)
Author:
raasch
Message:

automatic generation of dvrs/html file for combined dvr streams; automatic call of streaming server

Location:
palm/trunk/SCRIPTS
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/.mrun.config.default

    r255 r260  
    3131%compiler_name     mpif90                                        <hi> parallel
    3232%compiler_name_ser ifort                                         <hi> parallel
    33 %cpp_options       -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__netcdf_64bit:-D__intel_openmp_bug   <hi> parallel
     33%cpp_options       -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__netcdf_64bit   <hi> parallel
    3434%netcdf_inc        -I:<replace by netcdf include path>           <hi> parallel
    3535%netcdf_lib        -L<replace by netcdf library path>:-lnetcdf   <hi> parallel
    36 %fopts             -axW:-cpp:-openmp:-r8:-nbs:-convert:little_endian:-I:<replace by mpi include path>   <hi> parallel
    37 %lopts             -axW:-cpp:-openmp:-r8:-nbs:-Vaxlib:-L:<replace by mpi library path>                  <hi> parallel
     36%fopts             -axW:-cpp:-r8:-nbs:-convert:little_endian:-I:<replace by mpi include path>   <hi> parallel
     37%lopts             -axW:-cpp:-r8:-nbs:-Vaxlib:-L:<replace by mpi library path>                  <hi> parallel
    3838# if you want to use your own hostfile, uncomment next line
    3939#%hostfile          $base_directory/.hostfile                    <hi> parallel
  • palm/trunk/SCRIPTS/mrun

    r253 r260  
    171171     #                     interactive runs
    172172     # 05/03/09 - Siggi  - adjustments for new NEC-SX9 at RIAM (necriam)
     173     # 16/03/09 - Siggi  - dvrp_lib, dvrp_inc replaced by dvr_lib, dvr_inc,
     174     #                     dvr streaming server is automatically started using
     175     #                     new variable dvr_server and a configuration file
     176     #                     .dvrserver.config,
     177     #                     processing of dvr output files implemented, in order
     178     #                     to make dvr application more user friendly
    173179
    174180
     
    225231 localhost_realname=$(hostname)
    226232 local_compile=false
     233 local_dvrserver_running=.FALSE.
    227234 locat=normal
    228235 mainprog=""
     
    360367             [[ $delete_temporary_catalog = true ]]  &&  rm -rf $TEMPDIR
    361368          fi
     369          if [[ "$dvrserver_id" != "" ]]
     370          then
     371             echo "+++ killing dvrserver_id=$dvrserver_id"
     372             kill $dvrserver_id
     373          fi
    362374          if [[ -f ~/job_queue/JOBINFO.$QSUB_REQID ]]
    363375          then
     
    378390       then
    379391          rm -rf  ~/job_queue/JOBINFO.$QSUB_REQID
     392       fi
     393       if [[ "$dvrserver_id" != "" ]]
     394       then
     395          echo "+++ killing dvrserver_id=$dvrserver_id"
     396          kill $dvrserver_id
    380397       fi
    381398       printf "\n+++ MRUN killed by \"^C\" \n\n"
     
    13201337    if [[ ! ( $fromhost != $localhost  &&  ( "${actionout[$i]}" = tr || "${actionout[$i]}" = tra || "${actionout[$i]}" = trpe ) ) ]]
    13211338    then
    1322        if [[ "${actionout[$i]}" = tr  ||  "${actionout[$i]}" = trpe ]]
     1339       if [[ "${actionout[$i]}" = tr ]]
    13231340       then
    13241341          actionout[$i]=""
     1342       elif [[ "${actionout[$i]}" = trpe ]]
     1343       then
     1344          actionout[$i]=pe
    13251345       elif [[ "${actionout[$i]}" = tra ]]
    13261346       then
     
    14291449
    14301450
    1431      # DAS DVRP-PAKET ERFORDERT EINE ENTSPRECHENDE BIBLIOTHEK
     1451     # DAS DVR-PAKET ERFORDERT EINE ENTSPRECHENDE BIBLIOTHEK
    14321452 if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]]
    14331453 then
    1434     if [[ "$dvrp_inc" = "" ]]
    1435     then
    1436        printf "\n\n  +++ no value for \"dvrp_inc\" given in configuration file"
     1454    if [[ "$dvr_inc" = "" ]]
     1455    then
     1456       printf "\n\n  +++ no value for \"dvr_inc\" given in configuration file"
    14371457       printf "\n      This is required for the dvrp_graphics package.\n"
    1438        locat=dvrp; exit
    1439     fi
    1440     if [[ "$dvrp_lib" = "" ]]
    1441     then
    1442        printf "\n\n  +++ no value for \"dvrp_lib\" given in configuration file"
     1458       locat=dvr; exit
     1459    fi
     1460    if [[ "$dvr_lib" = "" ]]
     1461    then
     1462       printf "\n\n  +++ no value for \"dvr_lib\" given in configuration file"
    14431463       printf "\n      This is required for the dvrp_graphics package.\n"
    1444        locat=dvrp; exit
     1464       locat=dvr; exit
    14451465    fi
    14461466 fi
     
    19531973
    19541974    # COMPILE- UND LINK-OPTIONEN BESTIMMEN
    1955  fopts="$fopts $netcdf_inc $dvrp_inc"
    1956  lopts="$lopts $netcdf_lib $dvrp_lib"
     1975 fopts="$fopts $netcdf_inc $dvr_inc"
     1976 lopts="$lopts $netcdf_lib $dvr_lib"
    19571977 ROPTS="$ropts"
    19581978 if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lcsgih  ||  $host = lcsgib  ||  $host = lctit  ||  $host = lcfimm  ||  $host = lcxt4 )  &&  -n $numprocs ]]
     
    27422762
    27432763
     2764       # EVENTUELLE INPUT-KOMMANDOS ABARBEITEN
     2765    (( i = 0 ))
     2766    while (( i < iic ))
     2767    do
     2768       (( i = i + 1 ))
     2769       if (( i == 1 ))
     2770       then
     2771          printf "\n\n  *** execution of INPUT-commands:\n$striche"
     2772       fi
     2773       printf "\n  >>> ${in_command[$i]}"
     2774       eval  ${in_command[$i]}
     2775       if (( i == iic ))
     2776       then
     2777          printf "\n$striche\n"
     2778       fi
     2779    done
     2780
     2781
     2782       # VERBLEIBENDE CPU-ZEIT BERECHNEN
     2783    cpurest=${cpumax}.
     2784
     2785
     2786       # START DVR STREAMING SERVER
     2787    if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]]
     2788    then
     2789       if [[ "$dvr_server" != "" ]]
     2790       then
     2791
     2792          printf "\n\n  *** preparing the dvr streaming server configuration file"
     2793
     2794             # Check, if a dvr server is already running
     2795          running_dvrserver_id=`echo $(ps -edaf | grep .dvrserver.config | grep -v grep) | cut -d" " -f2`
     2796          if [[ "$running_dvrserver_id" != "" ]]
     2797          then
     2798
     2799             printf "\n  +++ WARNING: A dvr server with id=$running_dvrserver_id is already running!"
     2800             printf "\n      This server is used instead starting a new one!"
     2801
     2802          else
     2803
     2804                # COPY CONFIGURATION FILE FOR STREAMING SERVER FROM REPOSITORY TO HERE
     2805             if [[ -f ${PALM_BIN}/.dvrserver.config ]]
     2806             then
     2807                cp  ${PALM_BIN}/.dvrserver.config  .
     2808
     2809                   # Entering the BASEDIR, UID and GID into this file
     2810                user_id=`id -u`
     2811                group_id=`id -g`
     2812                   # & is needed as seperator, because TEMPDIR contains /
     2813                sed "s&<replace by dvr data directory>&${TEMPDIR}&g" .dvrserver.config > .dvrserver.1
     2814                sed "s/<replace by user id>/$user_id/g"    .dvrserver.1 > .dvrserver.2
     2815                sed "s/<replace by group id>/$group_id/g"  .dvrserver.2 > .dvrserver.3
     2816                mv  .dvrserver.3  .dvrserver.config
     2817                rm  .dvrserver.1  .dvrserver.2
     2818
     2819                   # Start dvr server in background, get his id and print on terminal
     2820                $dvr_server  .dvrserver.config  >>  DVR_LOGFILE  2>&1  &
     2821                dvrserver_id=`echo $(ps -edaf | grep .dvrserver.config) | cut -d" " -f2`
     2822                printf "\n  *** streaming server with id=$dvrserver_id is started in background"
     2823                local_dvrserver_running=.TRUE.
     2824             else
     2825                printf "\n  +++ missing file \".dvrserver.config\" in directory:"
     2826                printf "\n      \"$PALM_BIN\" "
     2827                locat=dvr
     2828                exit
     2829             fi
     2830
     2831          fi
     2832
     2833       else
     2834          printf "\n\n  --- INFORMATIVE: no dvr streaming server will be started"
     2835       fi
     2836    fi
     2837
     2838
    27442839       # NAMELIST-DATEI MIT WERTEN VON ENVIRONMENT-VARIABLEN ERZEUGEN (ZU
    27452840       # LESEN VON PALM)
     
    27482843          write_binary = '$write_binary', tasks_per_node = $tasks_per_node,
    27492844          maximum_cpu_time_allowed = ${cpumax}.,
    2750           revision = '$global_revision' /
     2845          revision = '$global_revision',
     2846          local_dvrserver_running = $local_dvrserver_running /
    27512847
    27522848%%END%%
    2753 
    2754 
    2755        # EVENTUELLE INPUT-KOMMANDOS ABARBEITEN
    2756     (( i = 0 ))
    2757     while (( i < iic ))
    2758     do
    2759        (( i = i + 1 ))
    2760        if (( i == 1 ))
    2761        then
    2762           printf "\n\n  *** execution of INPUT-commands:\n$striche"
    2763        fi
    2764        printf "\n  >>> ${in_command[$i]}"
    2765        eval  ${in_command[$i]}
    2766        if (( i == iic ))
    2767        then
    2768           printf "\n$striche\n"
    2769        fi
    2770     done
    2771 
    2772 
    2773        # VERBLEIBENDE CPU-ZEIT BERECHNEN
    2774     cpurest=${cpumax}.
    27752849
    27762850
     
    31783252#       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output*
    31793253       printf "\n$striche\n  *** execution finished \n"
     3254
     3255          # Stop the dvr streaming server
     3256       if [[ "$dvrserver_id" != "" ]]
     3257       then
     3258          kill $dvrserver_id
     3259          printf "\n  *** dvr server with id=$dvrserver_id has been stopped"
     3260       fi
    31803261    fi
    31813262
     
    32543335       then
    32553336          printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}  does not exist\n"
    3256        elif [[ ! -f ${localout[$i]}/_0000  &&  $files_for_pes = true ]]
     3337       elif [[ ! -d ${localout[$i]}  &&  $files_for_pes = true ]]
    32573338       then
    32583339          printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}/....  does not exist\n"
Note: See TracChangeset for help on using the changeset viewer.