Changeset 503 for palm


Ignore:
Timestamp:
Mar 3, 2010 12:27:06 AM (15 years ago)
Author:
raasch
Message:

New:
---

Changed:


combine_plot_fields is now directly called within mrun and must not be given
by an output command in the configuration file any more.

Utility programs (combine_plot_fields, interpret_config) are created by mbuild
separately for each block in the configuration file. Depending on option -K,
mrun is using the utility programs for the respective block.
Parallel make for utility programs.

Default configuration files updated.

mbuild, mrun, UTIL/Makefile

Errors:


Location:
palm/trunk
Files:
6 edited

Legend:

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

    r410 r503  
    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   <hi> parallel
     33%cpp_options       -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf   <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%mopts             -j:4                                          <hi> parallel
    3637%fopts             -axW:-cpp:-r8:-nbs:-convert:little_endian:-I:<replace by mpi include path>   <hi> parallel
    3738%lopts             -axW:-cpp:-r8:-nbs:-Vaxlib:-L:<replace by mpi library path>                  <hi> parallel
     
    6465# Combine all particle information files
    6566OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
    66 #
    67 # Collect plot data (2d/3d) into one file
    68 OC:combine_plot_fields.x
    6967#
    7068#----------------------------------------------------------------------------
  • palm/trunk/SCRIPTS/.mrun.config.imuk_hlrn

    r494 r503  
    3737%compiler_name     mpif90                                        lcmuk parallel
    3838%compiler_name_ser ifort                                         lcmuk parallel
    39 %cpp_options       -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__netcdf_64bit   lcmuk parallel
     39%cpp_options       -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf   lcmuk parallel
    4040%netcdf_inc        -I:/muksoft_64/packages/netcdf/3.6.2/include            lcmuk parallel
    4141%netcdf_lib        -L/muksoft_64/packages/netcdf/3.6.2/lib:-lnetcdf        lcmuk parallel
     42%mopts             -j:4                                          lcmuk parallel
    4243%fopts             -axW:-cpp:-r8:-nbs:-convert:little_endian:-I:/muksoft_64/packages/mpich2/2.1.0.5/include     lcmuk parallel
    4344%lopts             -axW:-cpp:-r8:-nbs:-Vaxlib:-L:/muksoft_64/packages/mpich2/2.1.0.5/lib                    lcmuk parallel
     
    5354%netcdf_inc        -I:/sw/dataformats/netcdf/3.6.2/include    lcsgih parallel
    5455%netcdf_lib        -L/sw/dataformats/netcdf/3.6.2/lib:-lnetcdf:-lnetcdff      lcsgih parallel
     56%mopts             -j:4                                       lcsgih parallel
    5557%fopts             -g:-w:-xT:-O3:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-convert:little_endian  lcsgih parallel
    5658%lopts             -g:-w:-xT:-O3:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-Vaxlib   lcsgih parallel
     
    8284# Combine all particle information files
    8385OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
    84 #
    85 # Collect plot data (2d/3d) into one file
    86 OC:combine_plot_fields.x
    8786#
    8887#----------------------------------------------------------------------------
  • palm/trunk/SCRIPTS/.mrun.config.imuk_ice2_netcdf4

    r494 r503  
    3737%compiler_name     mpif90                                        lcmuk parallel
    3838%compiler_name_ser ifort                                         lcmuk parallel
    39 %cpp_options       -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__netcdf_64bit   lcmuk parallel
     39%cpp_options       -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf   lcmuk parallel
    4040%netcdf_inc        -I:/muksoft_64/packages/netcdf/3.6.2/include            lcmuk parallel
    4141%netcdf_lib        -L/muksoft_64/packages/netcdf/3.6.2/lib:-lnetcdf        lcmuk parallel
     42%mopts             -j:4                                          lcmuk parallel
    4243%fopts             -axW:-cpp:-r8:-nbs:-convert:little_endian:-I:/muksoft_64/packages/mpich2/2.1.0.5/include     lcmuk parallel
    4344%lopts             -axW:-cpp:-r8:-nbs:-Vaxlib:-L:/muksoft_64/packages/mpich2/2.1.0.5/lib                    lcmuk parallel
     
    8384# Combine all particle information files
    8485OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
    85 #
    86 # Collect plot data (2d/3d) into one file
    87 OC:combine_plot_fields.x
    8886#
    8987#----------------------------------------------------------------------------
  • palm/trunk/SCRIPTS/mbuild

    r493 r503  
    11#!/bin/ksh
    2 # mbuild - Programmuebersetzungsscript
     2# mbuild - script for compiling the PALM code and its utility programs
    33# $Id$
    44
    5      # Prozedur zur Uebersetzung von Programmteilen mittels make-Mechanismus
    6      # auf einem Remote-Rechner, ausgehend von Quellcode auf einem lokalen
    7      # Rechner
    8 
    9      # Folgende Probleme existieren unter Linux, wenn keine AT&T-Korn-Shell
    10      # verwendet wird:
    11      # Wertzuweisungen an Variablen innerhalb von DO-Schleifen werden nicht
    12      # nach aussen weitergegeben. "while read line" funktioniert nicht
    13      # innerhalb einer Pipe.
    14 
    15      # letzte Aenderung:
    16      # 06/05/02 - Siggi - Beginn der Entwicklung
    17      # 12/06/02 - Siggi - Abschluss der Entwicklungsarbeiten
    18      # 23/06/02 - Siggi - voerst kein make-clean, Abbruch bei batch-mode
    19      # 24/07/02 - Siggi - Keine Verwendung der temporaeren Datei tmp_mbuild
    20      #                    unter linux mehr noetig, da nun AT&T-Korn-Shell
    21      #                    benutzt wird
    22      # 12/09/02 - Siggi - ibmh (hanni.hlrn.de) validiert
    23      # 19/12/02 - Siggi - ibmb validiert
     5     # Procedure to compile code on local and remote hosts using the
     6     # make-mechanism. The source code must be provided on the local host.
     7
     8     # Last changes:
     9     # 06/05/02 - Siggi - start development
     10     # 12/06/02 - Siggi - first version finished
     11     # 12/09/02 - Siggi - ibmh (hanni.hlrn.de) included
     12     # 19/12/02 - Siggi - ibmb included
    2413     # 05/02/03 - Siggi - hostname nobela included
    2514     # 04/03/03 - Siggi - host nech included
     
    116105     #                    removed; modules should now be given in the
    117106     #                    configuration file
    118 
    119 
    120 
    121     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
     107     # 02/03/10 - Siggi - utility programs are created separately for each
     108     #                    block in the configuration file,
     109     #                    parallel make for utility programs
     110
     111
     112    # VARIABLE DECLARATIONS + DEFAULT VALUES
    122113 compile_utility_programs=false
    123114 config_file=.mrun.config
     
    142133 typeset  -L40 version="MBUILD  2.1  Rev$Rev$"
    143134
    144     # FEHLERBEHANDLUNG
    145     # BEI EXIT:
     135    # ERROR HANDLING
     136    # IN CASE OF EXIT:
    146137 trap 'rm -rf  $working_directory/tmp_mbuild
    147138       if [[ $locat != normal ]]
     
    153144
    154145
    155     # BEI TERMINAL-BREAK:
     146    # IN CASE OF TERMINAL-BREAK:
    156147 trap 'rm -rf  $working_directory/tmp_mbuild
    157148       printf "\n\n +++ mbuild killed by \"^C\" \n\n"
     
    162153 tmp_mbuild=${working_directory}/tmp_mbuild
    163154
    164     # SHELLSCRIPT-OPTIONEN EINLESEN
     155    # READ SHELLSCRIPT-OPTIONS
    165156 while  getopts  :c:h:m:s:u  option
    166157 do
     
    178169
    179170
    180     # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN
     171    # CHECK, IF CONFIGURATION-FILE EXISTS
    181172 if [[ ! -f $config_file ]]
    182173 then
     
    189180
    190181
    191     # LOKALEN RECHNER ERMITTELN
     182    # DETERMINE THE LOCAL HOST
    192183 local_host_real_name=$(hostname)
    193184# local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
     
    195186
    196187
    197     # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN
     188    # DETERMINE HOST-IDENTIFIER (local_host) FROM THE CONFIG-FILE
    198189 line=""
    199190 grep  "%host_identifier"  $config_file  >  $tmp_mbuild
     
    238229
    239230 
    240     # BENUTZERNAMEN AUF LOKALEM RECHNER AUS KONFIGURATIONSDATEI ERMITTELN
     231    # DETERMINE USER NAME ON LOCAL HOST FROM THE CONFIG-FILE
    241232 line=""
    242233 grep  " $local_host" $config_file | grep "%remote_username"  >  $tmp_mbuild
     
    258249
    259250
    260     # LOKALEN QUELLTEXTPFAD ERMITTELN.
    261     # ZUERST PRUEFEN, OB EIN GLOBALER QUELLTEXTPFAD FUER ALLE RECHNER
    262     # VEREINBART WURDE.
    263     # DAZU ZUNAECHST ALLE IN DER KONFIGURATIONSDATEI VEREINBARTEN GLOBALEN
    264     # VARIABLEN SETZEN, WEIL DIESE EVTL. IN PFADNAMEN VERWENDET WERDEN
     251    # DETERMINE LOCAL SOURCE-CODE PATH.
     252    # FIRST CHECK, IF A GLOBAL SOURCE-CODE PATH HAS BEEN DECLARED FOR ALL HOSTS.
     253    # THEREFORE, FIRST SET ALL GLOBAL VARIABLES DECLARED IN THE CONFIG-FILE,
     254    # BECAUSE THEY MAY BE USED AS PART OF THE PATH NAME.
    265255 line=""
    266256 grep "%" $config_file  >  $tmp_mbuild
     
    272262       value=`echo $line | cut -d" " -s -f2`
    273263       eval export $var=\$value
    274 #       eval echo \"   $var=\$$var \"   # AUSGABE ZU TESTZWECKEN
    275264    fi
    276265 done < $tmp_mbuild
    277266
    278     # NUN PRUEFEN, OB EIN GLOBALER QUELLTEXTPFAD VEREINBART WURDE
     267    # NOW CHECK, IF A GLOBAL SOURCE-CODE-PATH HAS BEEN DECLARED
    279268 line=""
    280269 grep "%source_path" $config_file  >  $tmp_mbuild
     
    317306
    318307
    319     # GLOBALEN DEPOSITORY-PFAD ERMITTELN
     308    # DETERMINE GLOBAL DEPOSITORY-PATH
    320309 line=""
    321310 grep "%depository_path" $config_file  >  $tmp_mbuild
     
    333322
    334323
    335     # PRUEFEN, OB IN KONFIGURATIONSDATEI EIN HAUPTPROGRAMM
    336     # VEREINBART WURDE
     324    # CHECK, IF A MAIN PROGRAM HAS BEEN DEFINED IN THE CONFIG-FILE
    337325 if [[ $(grep -c "%mainprog" $config_file) != 1 ]]
    338326 then
     
    352340
    353341
    354     # MAKEFILE vorhanden
     342    # CHECK IF MAKEFILE EXITS
    355343 [[ "$makefile" = "" ]]  &&  makefile=$local_source_path/Makefile
    356344 if [[ ! -f $makefile ]]
     
    363351
    364352
    365     # HEADER-AUSGABE (TEIL1: MELDUNGEN UEBER LOKALEN RECHNER)
     353    # HEADER-OUTPUT (PART1: MESSAGES CONCERNING THE LOCAL HOST)
    366354 calltime=$(date)
    367355 printf "\n"
     
    389377 then
    390378
    391        # IN JEDEM FALL ALLEN DATEIEN WRITE-PERMIT GEBEN, DAMIT ES AUF
    392        # DEN REMOTE-RECHNERN NICHT EVTL. ZU PROBLEMEN BEIM UEBERSCHREIBEN KOMMT
     379       # IN ANY CASE, GIVE ALL FILES WRITE-PERMIT, IN ORDER TO AVOID PROBLEMS
     380       # WITH OVERWRITING FILES ON THE REMOTE HOST
    393381    cd  $local_source_path
    394382    printf "\n\n  *** tar of makefile and source files in $local_source_path" 
     
    400388
    401389
    402     # BESTAETIGUNG ZUM WEITERMACHEN EINHOLEN
     390    # GET CONFIRMATION TO CONTINUE
    403391 if [[ $host = all ]]
    404392 then
     
    487475                         then
    488476                            printf "\n  +++ remote host \"$remote_host\" unknown";
    489                             printf "\n      please inform S. Raasch!"
     477                            printf "\n      please inform PALM group support!"
    490478                         fi;;
    491479    esac
     
    588576
    589577    remote_md=$(eval echo $remote_md)
    590     [[ "$condition1" != "" ]]  &&  remote_md=${remote_md}_$condition1
    591     [[ "$condition2" != "" ]]  &&  remote_md=${remote_md}_$condition2
     578    block=""
     579    [[ "$condition1" != "" ]]  &&  block=_$condition1
     580    [[ "$condition2" != "" ]]  &&  block=${block}_$condition2
     581    remote_md==${remote_md}$block
    592582
    593583
     
    803793
    804794
    805        # get modules to be load
     795       # get modules to be loaded
    806796    line=""
    807797    grep  "$remote_host_string" $config_file | grep "%modules"  >  $tmp_mbuild
     
    959949       if [[ $answer = c  ||  $answer = C ]]
    960950       then
    961           silent=false
     951          silent=true
    962952       fi
    963953       if [[ $answer = s  ||  $answer = S ]]
     
    10421032          then
    10431033             module_calls="module load ${modules};"
     1034          else
     1035             module_calls=""
    10441036          fi
    10451037
     
    11381130             ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)"
    11391131          else
    1140                 # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
     1132                # TIT ERLAUBT NUR DIE AUSFUEHRUNG GANZ BESTIMMTER KOMMANDOS
    11411133                # MIT SSH, DESHALB AUFRUF PER PIPE
    11421134             print "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p  ${remote_ud}/../SCRIPTS)"  |  ssh ${remote_username}@${remote_addres}  2>&1
     
    11461138          if [[ $local_host = decalpha ]]
    11471139          then
    1148                 # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTï¿œNDIGEN PFADES
     1140                # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTAENDIGEN PFADES
    11491141                # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
    11501142                # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
     
    11811173          if [[ $remote_host = nech ]]
    11821174          then
    1183              make_call_string="sxmake  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
    1184           else
    1185              make_call_string="make  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
     1175             make_call_string="sxmake  $make_options  BLOCK=$block  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
     1176          else
     1177             make_call_string="make  $make_options  BLOCK=$block  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
    11861178          fi
    11871179
     
    11901182          then
    11911183             module_calls="module load ${modules};"
     1184          else
     1185             module_calls=""
    11921186          fi
    11931187
     
    12921286
    12931287
    1294              # NEUE VERSION AUF LOKALEM RECHNER ZUSAMMENPACKEN
     1288             # TAR NEW VERSION ON LOCAL HOST
    12951289          printf "\n  *** tar update on local host ..."
    12961290          tar -cf  ${mainprog}_current_version.tar  *.$suf *.o *.mod
     
    13031297          echo "  *** compiling the utility programs ..."
    13041298          cd ${local_source_path}/../UTIL
    1305           make  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"
     1299
     1300             # TOUCH FILES IN ORDER TO FORCE COMPILATION FOR EVERY BLOCK
     1301          touch  *.f90
     1302          make  $make_options  BLOCK=$block  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"
    13061303          cd  -  > /dev/null
    13071304       fi
     
    13251322
    13261323
    1327     # ABSCHLIESSENDE ARBEITEN
     1324    # FINAL WORK
    13281325 rm -f  hosts_found_in_config_file
    13291326
  • palm/trunk/SCRIPTS/mrun

    r493 r503  
    11#!/bin/ksh
    2 # mrun - Plot-Shellskript
     2# mrun - script for running PALM jobs
    33# $Id$
    44
    5      # Prozedur zum Starten von Modellaeufen
    6 
    7      # letzte Aenderung:
     5     # Procedure for interactive/batch PALM runs (initial runs and automatic
     6     # restart runs)
     7
     8     # Last changes:
    89     # 03/03/94 - Siggi - Entwicklungsbeginn
    910     # 21/03/94 - Siggi - Entwicklungsabschluss (Version 1.0)
     
    200201     # 08/02/10 - Siggi  - loading of modules now controlled via configuration
    201202     #                     file (modules)
     203     # 02/03/10 - Siggi  - for each block in the configuration file, separate
     204     #                     utility programs are used, combine_plot_fields is
     205     #                     directly called and must not be given by an output
     206     #                     command in the configuration file any more
    202207
    203208
     
    671676       locat=options; exit
    672677    fi
     678    block=_$cond1
     679    [[ -n $cond2 ]]  &&  block=${block}_$cond2
    673680 fi
    674681
     
    973980       /home/COAR/NC/raasch/pub/interpret_config_necriam.x
    974981    else
    975        interpret_config.x
     982
     983       if [[ "$host" != $localhost ]]
     984       then
     985
     986             # REMOTE JOB FROM LOCAL HOST: JUST TAKE THE FIRST EXECUTABLE FOUND
     987          interpret_config_executable=`ls -1 ${PALM_BIN}/interpret_config*.x 2>/dev/null`
     988          if [[ $? != 0 ]]
     989          then
     990             printf "\n\n  +++ no interpret_config found"
     991             printf "\n      run \"mbuild -u -h ...\" to generate utilities for this host"
     992             locat=interpret_config; exit
     993          fi
     994          interpret_config_executable=`echo $interpret_config_executable | cut -d" " -f1`
     995          $interpret_config_executable
     996
     997       else
     998
     999             # CHECK, IF THERE IS AN EXECUTABLE FOR THE BLOCK
     1000          if [[ ! -f ${PALM_BIN}/interpret_config${block}.x ]]
     1001          then
     1002             printf "\n\n  +++ no interpret_config found for given block \"$cond1 $cond2\""
     1003             printf "\n      run \"mbuild -u -h ...\" to generate utilities for this block"
     1004             locat=interpret_config; exit
     1005          else
     1006             interpret_config${block}.x
     1007          fi
     1008
     1009       fi
    9761010    fi
    9771011    rm .mrun_environment
     
    33553389                fi
    33563390
    3357 #             if [[ $scirocco = true ]]
    3358 #             then
    3359 #                mpiexec  -machinefile hostfile  -n $ii  a.out  $ROPTS
    3360 #             else
    3361 #                mpirun  -machinefile hostfile  -np $ii  a.out  $ROPTS
    3362 #             fi
    33633391             fi
    33643392          elif [[ $host = decalpha ]]
     
    34703498
    34713499       fi
     3500    fi
     3501
     3502
     3503
     3504       # Call of combine_plot_fields in order to merge single files written
     3505       # by each PE into one file.
     3506    if [[ ! -f ${PALM_BIN}/combine_plot_fields${block}.x ]]
     3507    then
     3508       printf "\n\n\n  +++ WARNING: no combine_plot_fields found for given block \"$cond1 $cond2\""
     3509       printf "\n      2d- and/or 3d-data may be incomplete!"
     3510       printf "\n      Run \"mbuild -u -h $localhost\" to generate utilities for this block.\n"
     3511    else
     3512       printf "\n\n\n *** post-processing: now executing \"combine_plot_fields${block}.x\" ..."
     3513       combine_plot_fields${block}.x
    34723514    fi
    34733515
  • palm/trunk/UTIL/Makefile

    r494 r503  
    33# Actual revisions:
    44# -----------------
     5# utility programs are created separately for each block in the configuration
     6# file,
    57# compare_palm_logs added
    68# added PROG3 in 'all:' statement (line 39, bugfix)
     
    1719#------------------------------------------------------------------------------!
    1820
    19 PROG1 =  ../SCRIPTS/combine_plot_fields.x
    20 PROG2 =  ../SCRIPTS/compare_palm_logs.x
    21 PROG3 =  ../SCRIPTS/interpret_config.x
     21PROG1 =  ../SCRIPTS/combine_plot_fields$(BLOCK).x
     22PROG2 =  ../SCRIPTS/compare_palm_logs$(BLOCK).x
     23PROG3 =  ../SCRIPTS/interpret_config$(BLOCK).x
    2224
    2325OBJS1 =  combine_plot_fields.o
Note: See TracChangeset for help on using the changeset viewer.