Changeset 260 for palm


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
Files:
2 added
5 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"
  • palm/trunk/SOURCE/init_dvrp.f90

    r254 r260  
    44! Current revisions:
    55! -----------------
     6! Output names are changed: surface=groundplate, buildings=topography
    67! Output of messages replaced by message handling routine.
    78! Clipping implemented.
     
    146147    ENDIF
    147148
     149!
     150!-- A local dvrserver running always outputs on temporary directory DATA_DVR
     151    IF ( local_dvrserver_running )  THEN
     152       dvrp_directory = 'DATA_DVR'
     153    ENDIF
     154
    148155    IF ( dvrp_output /= 'local' )  THEN
    149156       IF ( dvrp_file /= 'default'  .AND.  dvrp_file /= '/dev/null' )  THEN
     
    176183            mode_dvrp(m)(1:9)  /= 'pathlines' )  THEN
    177184
    178           message_string = 'mode_dvrp="' // TRIM( mode_dvrp ) // '" not allowed'
     185          message_string = 'mode_dvrp="' // TRIM( mode_dvrp(m) ) // '" not allowed'
    179186          CALL message( 'init_dvrp', 'PA0198', 1, 2, 0, 6, 0 )
    180187          CALL local_stop
     
    259266
    260267!
    261 !--          Create filename for buildings
     268!--          Create filename for topography
    262269             IF ( dvrp_output == 'rtsp' )  THEN
    263270
    264271                dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) )  &
    265                               // '/buildings.dvr'
     272                              // '/topography.dvr'
    266273                dvrp_file_c = dvrp_file
    267274                CALL DVRP_OUTPUT_RTSP( m-1, dvrp_host_c, dvrp_username_c, &
     
    272279
    273280                dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) )  &
    274                               // '.buildings.dvr'
     281                              // '.topography.dvr'
    275282                dvrp_file_c = dvrp_file
    276283!                CALL DVRP_OUTPUT_FTP( m-1, 0, dvrp_host_c, dvrp_username_c, &
     
    282289                IF ( dvrp_file(1:9) /= '/dev/null' )  THEN
    283290                   dvrp_file_local   = prefix_chr // TRIM( mode_dvrp(m) )  &
    284                                        // '.buildings.dvr'
     291                                       // '.topography.dvr'
    285292                   dvrp_file_local_c = dvrp_file_local
    286293                ELSE
     
    378385
    379386!
    380 !--       Write the surface isosurface (ground plate at z=0) on file
     387!--       Write the ground plate (z=0) isosurface on file
    381388          CALL DVRP_INIT( m-1, 0 )
    382389
     
    385392          IF ( dvrp_output == 'rtsp' )  THEN
    386393
    387              dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // '/surface.dvr'
     394             dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // &
     395                           '/groundplate.dvr'
    388396             dvrp_file_c = dvrp_file
    389397             CALL DVRP_OUTPUT_RTSP( m-1, dvrp_host_c, dvrp_username_c, &
     
    393401          ELSEIF ( dvrp_output == 'ftp' )  THEN
    394402
    395              dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // '.surface.dvr'
     403             dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // &
     404                           '.groundplate.dvr'
    396405             dvrp_file_c = dvrp_file
    397406!             CALL DVRP_OUTPUT_FTP( m-1, 0, dvrp_host_c, dvrp_username_c, &
     
    403412             IF ( dvrp_file(1:9) /= '/dev/null' )  THEN
    404413                dvrp_file_local   = prefix_chr // TRIM( mode_dvrp(m) )  &
    405                      // '.surface.dvr'
     414                     // '.groundplate.dvr'
    406415                dvrp_file_local_c = dvrp_file_local
    407416             ELSE
  • palm/trunk/SOURCE/modules.f90

    r242 r260  
    66! -----------------
    77! +clip_dvrp_*, cluster_size, dvrp_overlap, dvrp_total_overlap,
    8 ! n*_dvrp in dvrp_variables
     8! local_dvrserver_running, n*_dvrp in dvrp_variables
    99! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    1010! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     
    549549
    550550    LOGICAL ::  cyclic_dvrp = .FALSE., dvrp_overlap, dvrp_total_overlap, &
    551                 lock_steering_update = .FALSE.,                          &
     551                local_dvrserver_running, lock_steering_update = .FALSE., &
    552552                use_seperate_pe_for_dvrp_output = .FALSE.
    553553
  • palm/trunk/SOURCE/parin.f90

    r257 r260  
    44! Current revisions:
    55! -----------------
     6! +local_dvrserver_running in envpar
    67! Output of messages replaced by message handling routine.
    78! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
     
    7273    USE averaging
    7374    USE control_parameters
     75    USE dvrp_variables
    7476    USE grid_variables
    7577    USE indices
     
    159161
    160162
    161     NAMELIST /envpar/  host, maximum_cpu_time_allowed, revision, return_addres,&
    162                        return_username, run_identifier, tasks_per_node, &
    163                        write_binary
     163    NAMELIST /envpar/  host, local_dvrserver_running, maximum_cpu_time_allowed,  &
     164                       revision, return_addres, return_username, run_identifier, &
     165                       tasks_per_node, write_binary
    164166
    165167!
Note: See TracChangeset for help on using the changeset viewer.