Changeset 807 for palm


Ignore:
Timestamp:
Jan 25, 2012 11:53:51 AM (13 years ago)
Author:
maronga
Message:

new utility check_namelist_files implemented

Location:
palm/trunk
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mbuild

    r793 r807  
    123123     # 27/11/11 - Siggi - Bugfix for make options setting (-j)
    124124     # 12/12/11 - BjornM- added mrun GUI to ulitity programs
     125     # 25/01/12 - BjornM- compilation of check_namelist_files (namelist file
     126     #                    check program) has been added to the utility branch),
     127     #                    modfified the compilation of mrungui
    125128
    126129
     
    336339 done < $tmp_mbuild
    337340
    338 
     341 if [[ $found = false ]]
     342 then
     343    printf "\n  +++ no \%depository_path found in"
     344    printf "\n                            $config_file"
     345    locat=depository_path; exit
     346  fi
    339347
    340348    # CHECK, IF A MAIN PROGRAM HAS BEEN DEFINED IN THE CONFIG-FILE
     
    398406    printf "\n\n  *** tar of makefile and source files in $local_source_path" 
    399407    tar -cf  ${mainprog}_sources.tar  Makefile  *.$suf
     408    printf "\n"
     409
     410 else
     411    cd  $local_source_path
     412    printf "\n\n  *** tar of makefile and source files in $local_source_path" 
     413 
     414    cat Makefile_check|while read line
     415    do
     416       line=$(echo $line|grep RCS)
     417       if [[ $line == *"RCS"* ]]
     418       then
     419          line=$(echo $line|sed 's/RCS = //g')
     420          break
     421       fi
     422    done
     423
     424    tar -cf  ${mainprog}_sources_check.tar  Makefile_check  $line
    400425    printf "\n"
    401426
     
    13641389          make  $make_options  BLOCK=$block  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"
    13651390
    1366              # check if qmake is available and compile mrungui in that case
     1391             # CHECK IF QMAKE IS AVAILABLE AND COMPILE MRUNGUI
     1392          printf "\n\n"
     1393          echo "  *** compiling the mrun GUI"
    13671394          if which qmake >/dev/null; then
    13681395             cd mrungui
     
    13741401             cd ..
    13751402          else
    1376              echo "  +++ no qmake found. The mrun GUI (optional) cannot be compiled."
    1377           fi
    1378 
    1379 
    1380           cd  -  > /dev/null
    1381        fi
    1382 
    1383     fi
    1384 
     1403             echo "  +++ no qmake found. The (optional) GUI will not be compiled."
     1404          fi
     1405
     1406             # COMPILE CHECK_NAMELIST_FILES
     1407          printf "\n\n"
     1408          echo "  *** compiling check_namelist_files ..."
     1409
     1410          check_depository_path=${local_source_path}/../UTIL
     1411          cd $check_depository_path
     1412          mkdir check_tmp
     1413          mv ${local_source_path}/${mainprog}_sources_check.tar ./check_tmp
     1414          cd check_tmp
     1415          tar -xf  ${mainprog}_sources_check.tar
     1416          rm -rf ${mainprog}_sources_check.tar
     1417
     1418          copts_check="-cpp -D_parallel -D__check"
     1419          make  -f Makefile_check $make_options F90=$compiler_name_ser  COPT="$copts_check"
     1420
     1421          tar -cf  check_namelist_files.tar Makefile_check check_namelist_files.x *.f90 *.o *.mod
     1422          mv check_namelist_files.tar $check_depository_path
     1423          mv check_namelist_files.x $PALM_BIN
     1424          cd $check_depository_path
     1425          rm -rf check_tmp
     1426
     1427       fi
     1428    fi
    13851429 done
    13861430
  • palm/trunk/SCRIPTS/mrun

    r759 r807  
    234234     # 15/09/11 - Siggi  - new option -w tp set the maximum number of parallel
    235235     #                     io streams, option -T is obligatory from now on
     236     # 25/01/12 - BjornM - a namelist file check prior to the model run has
     237     #                     been implemented (check_namelist_files).
     238     #                     New option -z can be used to skip the check
    236239
    237240 
     
    248251 archive_save=true
    249252 archive_system=none
     253 check_namelist_files=true
    250254 compiler_name=""
    251255 cond1=""
     
    311315 package_list=""
    312316 punkte="..........................................................."
     317 p3d_suffix=""
    313318 queue=none
    314319 read_from_config=""
     
    449454    # BEI TERMINAL-BREAK:
    450455 trap 'rm -rf  $working_directory/tmp_mrun
     456       rm -rf  $working_directory/tmp_check_namelist_files
    451457       [[ $tmpcreate = true ]]  &&  (cd; rm -rf $TEMPDIR)
    452458       if [[ -f ~/job_queue/JOBINFO.$QSUB_REQID ]]
     
    479485    # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES
    480486    # FUER FOLGEJOBS BENOETIGT WIRD
    481  while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY: option
     487 while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:z option
    482488 do
    483489   case  $option  in
     
    521527       (y)   ocean_file_appendix=true; mc="$mc -y";;
    522528       (Y)   run_coupled_model=true; coupled_dist=$OPTARG; mc="$mc -Y'$OPTARG'";;
     529       (z)   check_namelist_files=false; mc="$mc -z";;
    523530       (\?)  printf "\n  +++ unknown option $OPTARG \n"
    524531             printf "\n  --> type \"$0 ?\" for available options \n"
     
    23942401    fi
    23952402 fi
    2396  
    2397 
    2398 
    2399 
    2400      # FALLS AUF DIESER MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE-
    2401      # CHENDE AKTIONEN DURCHGEFUEHRT
     2403
     2404#### PERFORM PARAMETER FILE CHECK (COUPLED RUNS ARE NOT SUPPORTED YET)
     2405 if [[ $check_namelist_files == true && $fromhost == $localhost && $run_coupled_model == false ]]
     2406 then
     2407    if [[ $ocean_file_appendix == true ]]
     2408    then
     2409       d3par_string="d3o#"
     2410       d3fpar_string="d3of"
     2411    else
     2412       d3par_string="d3#"
     2413       d3fpar_string="d3f"
     2414    fi
     2415
     2416    tmp_check=${working_directory}/tmp_check
     2417
     2418#   GET PARAMETER FILE SUFFIX (USUALLY "_P3D")
     2419    line=""
     2420    found=false
     2421    grep  "$d3par_string" $config_file | grep "PARIN"  >  $tmp_check
     2422    while read line1
     2423    do
     2424       line="$line1"
     2425       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     2426       then
     2427             # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     2428          p3d_suffix=`echo $line | tr -s " " | cut -d" " -s -f5`
     2429          found=true
     2430       fi
     2431    done < $tmp_check
     2432
     2433    if [[ $found = false ]]
     2434    then
     2435       printf "\n  +++ no PARIN list entry found for $d3par_string in the configuration file."
     2436
     2437       locat=check_namelist; exit
     2438    fi
     2439
     2440#   GET RESTART PARAMETER FILE SUFFIX (USUALLY "_P3DF"). THIS FILE MIGHT IS
     2441#   NOT NECESSARILY REQUIRED
     2442    line=""
     2443    found=false
     2444    grep  "d3f" $config_file | grep "PARIN"  >  $tmp_check
     2445    while read line1
     2446    do
     2447       line="$line1"
     2448       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     2449       then
     2450          p3df_suffix=`echo $line | tr -s " " | cut -d" " -s -f5`
     2451          found=true
     2452       fi
     2453    done < $tmp_check
     2454
     2455    if [[ $found = false ]]
     2456    then
     2457       printf "\n  +++ no PARIN list entry found for d3f in the configuration file."
     2458    fi
     2459
     2460    rm -rf ${working_directory}/tmp_check
     2461
     2462#   DEFINE VARIABLES FOR FREQUENTLY USED DIRECTORIES
     2463    check_depository="${working_directory}/trunk/UTIL"
     2464    check_sources="${working_directory}/tmp_check_namelist_files"
     2465
     2466#   CHECK IF THE A P3DF FILE MUST BE CHECKED
     2467    for  item  in  $input_list
     2468    do
     2469       if [[ "$item" == "restart" || "$item" == d3f || "$item" == d3of ]]
     2470       then
     2471          check_restart=1
     2472       else
     2473          check_restart=0
     2474       fi
     2475    done
     2476
     2477#   ERROR IF NO PARAMETER FILE WAS FOUND, OTHERWISE PROCEED
     2478    if [[ ! -f $working_directory/JOBS/$fname/INPUT/${fname}${p3d_suffix} ]]
     2479    then
     2480       printf "\n\n  +++ ERROR: parameter file (${fname}${p3d_suffix}) not found."
     2481       locat=check_namelist; exit
     2482    fi
     2483   
     2484#   CHECK IF THE RESTART PARAMETER FILE EXISTS (IF NECESSARY)
     2485    if  [[ $check_restart == 1 ]]
     2486    then
     2487       if [[ ! -f $working_directory/JOBS/$fname/INPUT/${fname}${p3df_suffix} ]]
     2488       then
     2489          printf "\n\n  +++ WARNING: restart parameter file (${fname}${p3df_suffix}) is missing." 
     2490          check_restart=0
     2491          answer=dummy
     2492          printf "\n\n"
     2493
     2494          while [[ "$answer" != c  &&  "$answer" != C  && "$answer" != a  &&  "$answer" != A ]]
     2495          do
     2496             printf " >>> continue anyway (c(ontinue)/a(bort)) ?  "
     2497             read  answer
     2498          done
     2499          if [[ $answer = a  ||  $answer = A ]]
     2500          then
     2501             printf "\n  +++ Aborting...."
     2502             locat=normal; exit
     2503          fi
     2504       else
     2505          check_restart=1
     2506       fi
     2507    fi
     2508
     2509#   CREATE TEMPORARY SOURCES_FOR_CHECK PATH
     2510    mkdir $check_sources
     2511    cd $check_sources
     2512
     2513#   CHECK FOR USER CODE, OTHERWISE USE THE PRECOMPILED CHECK_NAMELIST_FILES.X
     2514    if [[ -d $working_directory/USER_CODE/$fname ]]
     2515    then
     2516       printf "\n\n  *** copying files from $check_depository"
     2517       cp $check_depository/check_namelist_files.tar ./
     2518
     2519       printf "\n\n  *** untar of makefile and source files in $check_sources"
     2520       tar -xf check_namelist_files.tar  >  /dev/null  2>&1
     2521
     2522       printf "\n\n  *** adding user code."
     2523       cp $working_directory/USER_CODE/$fname/* ./
     2524       touch check_namelist_files.f90
     2525
     2526#      GET COMPILER OPTIONS AND PERFORM MAKE
     2527       printf "\n\n  *** compiling code if necessary...\n"
     2528       copts_check="-cpp -D_parallel -D__check"
     2529       make -f Makefile_check F90=$compiler_name_ser  COPT="$copts_check"
     2530
     2531#      GET MAKE OUTPUT
     2532       if [[ $? != 0 ]]
     2533       then
     2534          rm -rf  $check_sources
     2535          locat=check_namelist; exit
     2536       fi
     2537    else
     2538       cp $PALM_BIN/check_namelist_files.x ./
     2539    fi
     2540
     2541    cp $working_directory/JOBS/$fname/INPUT/${fname}${p3d_suffix} ./PARIN
     2542    if [[ $check_restart == 1 ]]
     2543    then
     2544       cp $working_directory/JOBS/$fname/INPUT/${fname}${p3df_suffix} ./PARINF   
     2545    fi
     2546
     2547#   CREATE ENVPAR FILE, WHICH IS NEEDED BY CHECK_NAMELIST_FILES.X
     2548    cat  >  ENVPAR  <<  %%END%%
     2549 &envpar  run_identifier = '$fname', host = '$localhost',
     2550            write_binary = '$write_binary', tasks_per_node = $tasks_per_node,
     2551            maximum_parallel_io_streams = $maximum_parallel_io_streams,
     2552            maximum_cpu_time_allowed = ${cpumax}.,
     2553            revision = '$global_revision',
     2554            local_dvrserver_running = $local_dvrserver_running /
     2555
     2556%%END%%
     2557
     2558#   SAFETY CHECK: ONLY PROCEED IF THE PARAMETER CHECK PROGRAM WAS PROPERLY COMPILED
     2559    if [[ ! -f check_namelist_files.x ]] then
     2560       printf "\n  +++ WARNING: check_namelist_files.x not found."
     2561       answer=dummy
     2562       printf "\n\n"
     2563       while [[ "$answer" != c  &&  "$answer" != C  && "$answer" != a  &&  "$answer" != A ]]
     2564       do
     2565          printf " >>> continue anyway (c(ontinue)/a(bort)) ?  "
     2566          read  answer
     2567       done
     2568       if [[ $answer = a  ||  $answer = A ]]
     2569       then
     2570          printf "\n  +++ Aborting..."
     2571          rm -rf  $check_sources
     2572          locat=normal; exit
     2573       else
     2574          printf "\n  *** Skipping parameter file check."
     2575       fi       
     2576    else
     2577#      STARTING THE PARAMETER FILE CHECK
     2578       printf "\n\n  *** starting parameter file check..."
     2579
     2580#      CHECKING THE P3D FILE
     2581       printf "\n\n      (1) checking $fname$p3d_suffix" 
     2582       echo "$numprocs 0" > VARIN
     2583       errors=`./check_namelist_files.x < VARIN 2>&1`
     2584
     2585       check_error=false
     2586       if [[ "$errors" == "" ]]
     2587       then
     2588          printf " --> o.k."
     2589       else
     2590          printf " --> failed."
     2591          check_error=true
     2592          printf "\n\n  $errors"
     2593       fi
     2594
     2595#      CHECKING THE PD3F FILE IF NECESSARY
     2596       if [[ $check_restart == 1 && $check_error == false ]]
     2597       then
     2598          printf "\n\n      (2) checking $fname$p3df_suffix" 
     2599
     2600#         FIRST CHECK IF INITIALIZING_ACTIONS="READ_RESTART_DATA" IS SET IN &INIPAR LIST
     2601          found=false
     2602          cat PARINF|while read line
     2603          do
     2604             line=$(echo $line|sed 's/ //g')
     2605             if [[ $line == *"&inipar"* ]]
     2606             then
     2607                start_search=true
     2608             fi
     2609
     2610             if [[ $start_search == true ]]
     2611             then
     2612                if [[ $line == *"initializing_actions='read_restart_data'"* ]]
     2613                then
     2614                   found=true
     2615                   break
     2616                fi
     2617             fi
     2618
     2619             if [[ $line == *"/"* ]]
     2620             then
     2621                start_search=false
     2622             fi
     2623
     2624          done
     2625
     2626          if [[ $found = false ]]
     2627          then
     2628             printf "\n\n  +++ ERROR: initializing_actions = 'read_restart_data' not found"
     2629             printf "\n      in &inipar list in $fname$p3df_suffix."
     2630             rm -rf  $check_sources
     2631             locat=check_namelist; exit
     2632          fi
     2633
     2634          echo "$numprocs 1" > VARIN
     2635          errors=`./check_namelist_files.x < VARIN 2>&1`
     2636
     2637          if [[ "$errors" == "" ]]
     2638          then
     2639             printf " --> o.k."
     2640          else
     2641             printf " --> failed."
     2642             check_error=true
     2643             printf "\n\n  $errors"
     2644          fi
     2645       fi
     2646   
     2647#      REPORT ERRORS AND CONTINUE/EXIT
     2648       if [[ $check_error == true ]]
     2649       then
     2650          printf "\n  +++ errors found in the parameter file!\n"
     2651          answer=dummy
     2652          printf "\n\n"
     2653
     2654          while [[ "$answer" != c  &&  "$answer" != C  && "$answer" != a  &&  "$answer" != A ]]
     2655          do
     2656          printf " >>> continue anyway (c(ontinue)/a(bort)) ?  "
     2657          read  answer
     2658          done
     2659
     2660          if [[ $answer = a  ||  $answer = A ]]
     2661          then
     2662             printf "\n  +++ Aborting..."
     2663             rm -rf  $check_sources
     2664             locat=normal; exit
     2665          fi
     2666        else
     2667          printf "\n\n  *** parameter file(s) seem(s) to be o.k.\n"
     2668        fi
     2669        rm -rf $check_sources
     2670    fi
     2671 else
     2672    printf "\n\n  +++ skipping parameter file check\n"
     2673 fi
     2674
     2675 cd $working_directory
     2676
     2677    # FALLS AUF DIESER MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE-
     2678    # CHENDE AKTIONEN DURCHGEFUEHRT
    24022679 if [[ $do_batch = false ]]
    24032680 then
     
    25882865          [[ "$module_calls" != "" ]]  &&  eval $module_calls
    25892866          make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
     2867
    25902868       fi
    25912869
  • palm/trunk/SOURCE/check_open.f90

    r766 r807  
    44! Current revisions:
    55! -----------------
    6 !
     6! New cpp directive "__check" implemented which is used by check_namelist_files
     7!
    78!
    89! Former revisions:
     
    116117    IF ( openfile(file_id)%opened )  RETURN
    117118
     119#if .NOT. defined ( __check )
    118120!
    119121!-- Only certain files are allowed to be re-opened
     
    138140       END SELECT
    139141    ENDIF
     142#endif
    140143
    141144!
     
    189192       CASE ( 11 )
    190193
     194#if defined ( __check )
     195!
     196!--       In case of a prior parameter file check, the p3d data is stored in
     197!--       PARIN, while the p3df is stored in PARINF. This only applies to
     198!--       check_namelist_files!
     199          IF ( check_restart == 2 ) THEN
     200             OPEN ( 11, FILE='PARINF'//coupling_char, FORM='FORMATTED', &
     201                        STATUS='OLD' )
     202          ELSE
     203             OPEN ( 11, FILE='PARIN'//coupling_char, FORM='FORMATTED', &
     204                        STATUS='OLD' )
     205          END IF
     206#else
     207
    191208          OPEN ( 11, FILE='PARIN'//coupling_char, FORM='FORMATTED', &
    192209                     STATUS='OLD' )
     210#endif
    193211
    194212       CASE ( 13 )
     
    219237                CALL local_system( 'mkdir  BINOUT' // coupling_char )
    220238             ENDIF
    221 #if defined( __parallel )
     239#if defined( __parallel ) .AND. .NOT. defined ( __check )
    222240!
    223241!--          Set a barrier in order to allow that all other processors in the
     
    258276                        FORM='UNFORMATTED', POSITION='APPEND' )
    259277          ELSE
    260 #if defined( __parallel )
     278#if defined( __parallel ) .AND. .NOT. defined ( __check )
    261279!
    262280!--          Set a barrier in order to allow that all other processors in the
     
    639657                CALL local_system( 'mkdir  PARTICLE_INFOS' // coupling_char )
    640658             ENDIF
    641 #if defined( __parallel )
     659#if defined( __parallel ) .AND. .NOT. defined ( __check )
    642660!
    643661!--          Set a barrier in order to allow that thereafter all other
     
    688706                CALL local_system( 'mkdir  PARTICLE_DATA' // coupling_char )
    689707             ENDIF
    690 #if defined( __parallel )
     708#if defined( __parallel ) .AND. .NOT. defined ( __check )
    691709!
    692710!--          Set a barrier in order to allow that thereafter all other
     
    12911309                                       TRIM( coupling_char ) // '/' )
    12921310                ENDIF
    1293 #if defined( __parallel )
    1294 !
     1311#if defined( __parallel ) .AND. .NOT. defined ( __check )
     1312! 
    12951313!--             Set a barrier in order to allow that all other processors in the
    12961314!--             directory created by PE0 can open their file
  • palm/trunk/SOURCE/check_parameters.f90

    r775 r807  
    44! Current revisions:
    55! -----------------
    6 !
     6! New cpp directive "__check" implemented which is used by check_namelist_files
    77!
    88! Former revisions:
     
    217217
    218218#if defined( __parallel )
     219
     220#if defined( __check )
     221
     222!
     223!--    NOTE: coupled runs have not been implemented in the check_namelist_files
     224!--    program.
     225!--    check_namelist_files will need the following information of the other
     226!--    model (atmosphere/ocean).
     227       dt_coupling = remote
     228       dt_max = remote
     229       restart_time = remote
     230       dt_restart= remote
     231       simulation_time_since_reference = remote
     232       dx = remote
     233
     234#endif
     235
     236#if .NOT. defined( __check )
    219237       IF ( myid == 0 ) THEN
    220238          CALL MPI_SEND( dt_coupling, 1, MPI_REAL, target_id, 11, comm_inter, &
     
    224242       ENDIF
    225243       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    226       
     244#endif     
    227245       IF ( dt_coupling /= remote )  THEN
    228246          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
     
    232250       ENDIF
    233251       IF ( dt_coupling <= 0.0 )  THEN
     252#if .NOT. defined( __check )
    234253          IF ( myid == 0  ) THEN
    235254             CALL MPI_SEND( dt_max, 1, MPI_REAL, target_id, 19, comm_inter, ierr )
     
    238257          ENDIF   
    239258          CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    240          
     259#endif         
    241260          dt_coupling = MAX( dt_max, remote )
    242261          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
     
    245264          CALL message( 'check_parameters', 'PA0005', 0, 1, 0, 6, 0 )
    246265       ENDIF
     266#if .NOT. defined( __check )
    247267       IF ( myid == 0 ) THEN
    248268          CALL MPI_SEND( restart_time, 1, MPI_REAL, target_id, 12, comm_inter, &
     
    252272       ENDIF
    253273       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    254      
     274#endif     
    255275       IF ( restart_time /= remote )  THEN
    256276          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
     
    259279          CALL message( 'check_parameters', 'PA0006', 1, 2, 0, 6, 0 )
    260280       ENDIF
     281#if .NOT. defined( __check )
    261282       IF ( myid == 0 ) THEN
    262283          CALL MPI_SEND( dt_restart, 1, MPI_REAL, target_id, 13, comm_inter, &
     
    266287       ENDIF   
    267288       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    268      
     289#endif     
    269290       IF ( dt_restart /= remote )  THEN
    270291          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
     
    275296
    276297       simulation_time_since_reference = end_time - coupling_start_time
     298#if .NOT. defined( __check )
    277299       IF  ( myid == 0 ) THEN
    278300          CALL MPI_SEND( simulation_time_since_reference, 1, MPI_REAL, target_id, &
     
    282304       ENDIF
    283305       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    284      
     306#endif     
    285307       IF ( simulation_time_since_reference /= remote )  THEN
    286308          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
     
    291313       ENDIF
    292314
    293  
     315#if .NOT. defined( __check )
    294316       IF ( myid == 0 ) THEN
    295317          CALL MPI_SEND( dx, 1, MPI_REAL, target_id, 15, comm_inter, ierr )
     
    299321       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    300322
    301 
     323#endif
    302324       IF ( coupling_mode == 'atmosphere_to_ocean') THEN
    303325
     
    318340       ENDIF
    319341
     342#if .NOT. defined( __check )
    320343       IF ( myid == 0) THEN
    321344          CALL MPI_SEND( dy, 1, MPI_REAL, target_id, 16, comm_inter, ierr )
     
    324347       ENDIF
    325348       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
    326 
     349#endif
    327350       IF ( coupling_mode == 'atmosphere_to_ocean') THEN
    328351
     
    365388    ENDIF
    366389
    367 #if defined( __parallel )
     390#if defined( __parallel ) .AND. .NOT. defined ( __check )
    368391!
    369392!-- Exchange via intercommunicator
     
    29332956!
    29342957
     2958#if .NOT. defined( __check )
    29352959!-- Check netcdf precison
    29362960    ldum = .FALSE.
    29372961    CALL define_netcdf_header( 'ch', ldum, 0 )
    2938 
     2962#endif
    29392963!
    29402964!-- Check, whether a constant diffusion coefficient shall be used
  • palm/trunk/SOURCE/init_grid.f90

    r760 r807  
    44! Current revisions:
    55! -----------------
    6 !
     6! New cpp directive "__check" implemented which is used by check_namelist_files
    77!
    88! Former revisions:
     
    534534
    535535             ENDIF
    536 #if defined( __parallel )
     536#if defined( __parallel ) .AND. .NOT. defined ( __check )
    537537             CALL MPI_BARRIER( comm2d, ierr )
    538538#endif
     
    739739          ENDIF
    740740       ENDDO
    741 
     741#if .NOT. defined ( __check )
    742742!
    743743!--    Exchange of lateral boundary values (parallel computers) and cyclic
     
    766766         
    767767       ENDIF
    768 
     768#endif
    769769    ENDIF
    770770
     771#if .NOT. defined ( __check )
    771772!
    772773!-- Preliminary: to be removed after completion of the topography code!
     
    11601161                nzb_tmp, vertical_influence, wall_l, wall_n, wall_r, wall_s )
    11611162
     1163#endif
    11621164
    11631165 END SUBROUTINE init_grid
  • palm/trunk/SOURCE/init_masks.f90

    r773 r807  
    44! Current revisions:
    55! -----------------
     6! New cpp directive "__check" implemented which is used by check_namelist_files
    67!
    78! Former revisions:
     
    346347!--    Set global masks along all three dimensions (required by
    347348!--    define_netcdf_header).
    348 #if defined( __parallel )
     349#if defined( __parallel ) .AND. .NOT. defined ( __check )
    349350!
    350351!--    PE0 receives partial arrays from all processors of the respective mask
    351352!--    and outputs them. Here a barrier has to be set, because otherwise
    352353!--    "-MPI- FATAL: Remote protocol queue full" may occur.
     354
    353355       CALL MPI_BARRIER( comm2d, ierr )
    354356
     
    438440       ENDIF
    439441
    440 #else
     442#elif .NOT. defined ( __parallel )
    441443!
    442444!--    Local arrays can be relocated directly.
  • palm/trunk/SOURCE/init_pegrid.f90

    r781 r807  
    44! Current revisions:
    55! -----------------
    6 !
     6! New cpp directive "__check" implemented which is used by check_namelist_files
    77!
    88! ATTENTION: nnz_x undefined problem still has to be solved!!!!!!!!
     
    215215    IF ( bc_ns /= 'cyclic' )  cyclic(2) = .FALSE.
    216216
     217
     218#if .NOT. defined( __check)
    217219!
    218220!-- Create the virtual processor grid
     
    240242    CALL MPI_COMM_RANK( comm1dy, myidy, ierr )
    241243
     244#endif
    242245
    243246!
     
    525528    DEALLOCATE( nxlf , nxrf , nynf , nysf )
    526529
     530
     531#if .NOT. defined( __check)
    527532!
    528533!-- Collect index bounds from other PEs (to be written to restart file later)
     
    554559
    555560    ENDIF
     561
     562#endif
    556563
    557564#if defined( __print )
     
    589596#endif
    590597
    591 #if defined( __parallel )
     598#if defined( __parallel ) .AND. .NOT. defined( __check)
    592599#if defined( __mpi2 )
    593600!
     
    933940
    934941          IF ( i == mg_switch_to_pe0_level )  THEN
    935 #if defined( __parallel )
     942#if defined( __parallel ) .AND. .NOT. defined( __check )
    936943!
    937944!--          Save the grid size of the subdomain at the switch level, because
     
    966973                              ( nzt_l - nzb + 2 )
    967974
    968 #else
     975#elif .NOT. defined ( __parallel )
    969976             message_string = 'multigrid gather/scatter impossible ' // &
    970977                          'in non parallel mode'
     
    10081015    grid_level = 0
    10091016
    1010 #if defined( __parallel )
     1017#if defined( __parallel ) .AND. .NOT. defined ( __check )
    10111018!
    10121019!-- Gridpoint number for the exchange of ghost points (y-line for 2D-arrays)
     
    10911098#endif
    10921099
    1093 #if defined( __parallel )
     1100#if defined( __parallel ) .AND. .NOT. defined ( __check )
    10941101!
    10951102!-- Setting of flags for inflow/outflow conditions in case of non-cyclic
     
    11511158                        comm1dx, ierr )
    11521159
    1153 #else
     1160#elif .NOT. defined ( __parallel )
    11541161    IF ( bc_lr == 'dirichlet/radiation' )  THEN
    11551162       inflow_l  = .TRUE.
     
    11681175    ENDIF
    11691176#endif
     1177
    11701178!
    11711179!-- At the outflow, u or v, respectively, have to be calculated for one more
  • palm/trunk/SOURCE/local_stop.f90

    r668 r807  
    44! Current revisions:
    55! -----------------
     6! New cpp directive "__check" implemented which is used by check_namelist_files
    67!
    78! Former revisions:
     
    4142
    4243
    43 #if defined( __parallel )
     44#if defined( __parallel ) .AND. .NOT. defined ( __check )
    4445    IF ( coupling_mode == 'uncoupled' )  THEN
    4546       IF ( abort_mode == 1 )  THEN
  • palm/trunk/SOURCE/modules.f90

    r806 r807  
    55! Current revisions:
    66! -----------------
    7 !
     7! New cpp directive "__check" implemented which is used by check_namelist_files.
     8! New parameter check_restart has been defined which is needed by
     9! check_namelist_files only.
    810!
    911! Former revisions:
     
    351353          w_av
    352354 END MODULE averaging
    353 
    354355
    355356
     
    520521                vg_vertical_gradient_level_ind(10) = -9999, &
    521522                subs_vertical_gradient_level_i(10) = -9999
     523
     524#if defined ( __check )
     525    INTEGER :: check_restart = 0
     526#endif
    522527
    523528    INTEGER, DIMENSION(:), ALLOCATABLE ::  grid_level_count
     
    12551260!------------------------------------------------------------------------------!
    12561261
    1257 #if defined( __parallel )
     1262#if defined( __parallel ) .AND. .NOT. defined ( __check )
    12581263#if defined( __lc )
    12591264    USE MPI
     
    12851290                type_x, type_x_int, type_xy, type_y, type_y_int
    12861291
    1287     INTEGER ::  ibuf(12), pcoord(2), pdims(2), status(MPI_STATUS_SIZE)
     1292    INTEGER ::  ibuf(12), pcoord(2), pdims(2)
     1293
     1294#if .NOT. defined ( __check )
     1295    INTEGER ::  status(MPI_STATUS_SIZE)
     1296#endif
     1297
    12881298
    12891299    INTEGER, DIMENSION(:), ALLOCATABLE ::  ngp_yz, type_xz, type_yz
  • palm/trunk/SOURCE/parin.f90

    r786 r807  
    44! Current revisions:
    55! -----------------
    6 !
     6! New cpp directive "__check" implemented which is used by check_namelist_files
    77!
    88! Former revisions:
     
    255255!--       machines one can not distinguish between errors produced by a wrong
    256256!--       "inipar" namelist or because this namelist is totally missing.
    257           READ ( 11, inipar, ERR=10, END=11 )
    258           GOTO 12
     257           READ ( 11, inipar, ERR=10, END=11 )
     258
     259#if defined ( __check )
     260!
     261!--       In case of a namelist file check, &inipar from the p3d file is
     262!--       used. The p3d file here must be closed and the p3df file for reading
     263!--       3dpar is opened.
     264          IF ( check_restart == 1 ) THEN
     265             CALL close_file( 11 )
     266             check_restart = 2
     267             CALL check_open( 11 )             
     268             initializing_actions = 'read_restart_data'
     269          END IF
     270#endif
     271           GOTO 12
     272
    259273 10       message_string = 'errors in \$inipar &or no \$inipar-namelist ' // &
    260274                           'found (CRAY-machines only)'
     
    268282!--       a prior run). All PEs are reading from file created by PE0 (see
    269283!--       check_open)
     284
     285
    270286 12       IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
    271 
     287#if .NOT. defined ( __check )
    272288             CALL read_var_list
    273289!
     
    278294!--          Increment the run count
    279295             runnr = runnr + 1
    280 
     296#endif
    281297          ENDIF
    282298
     
    342358
    343359       ENDIF
    344 #if defined( __parallel )
     360#if defined( __parallel ) .AND. .NOT. ( __check )
    345361       CALL MPI_BARRIER( MPI_COMM_WORLD, ierr )
    346362#endif
  • palm/trunk/SOURCE/poisfft.f90

    r764 r807  
    44! Current revisions:
    55! -----------------
    6 !
     6! New cpp directive "__check" implemented which is used by check_namelist_files
     7! (most of the code is unneeded by check_namelist_files).
     8!
    79!
    810! Former revisions:
     
    106108
    107109    PRIVATE
     110
     111#if .NOT. defined ( __check )
    108112    PUBLIC  poisfft, poisfft_init
    109113
     
    115119       MODULE PROCEDURE poisfft_init
    116120    END INTERFACE poisfft_init
     121#else
     122    PUBLIC  poisfft_init
     123
     124    INTERFACE poisfft_init
     125       MODULE PROCEDURE poisfft_init
     126    END INTERFACE poisfft_init
     127#endif
    117128
    118129 CONTAINS
     
    124135    END SUBROUTINE poisfft_init
    125136
    126 
     137#if .NOT. defined ( __check )
    127138    SUBROUTINE poisfft( ar, work )
    128139
     
    15811592
    15821593#endif
    1583 
     1594#endif
    15841595 END MODULE poisfft_mod
  • palm/trunk/SOURCE/poisfft_hybrid.f90

    r668 r807  
    44! Current revisions:
    55! -----------------
     6! New cpp directive "__check" implemented which is used by check_namelist_files
     7! (most of the code is unneeded by check_namelist_files).
    68!
    79! Former revisions:
     
    1315!
    1416! 415 2009-12-15 10:26:23Z raasch
    15 ! Dimension of array stat in cascade change to prevent type problems with
     17! Dimension of array stat in cascade change to prevent type problems with___
    1618! mpi2 libraries
    1719!
     
    6062    IMPLICIT NONE
    6163
    62     PRIVATE
    63     PUBLIC poisfft_hybrid, poisfft_hybrid_ini
    64 
    6564    INTEGER, PARAMETER ::  switch_per_lpar = 2
    6665
     
    8483                     nodes,               & ! number of nodes
    8584                     tasks_per_logical_node = -1    ! default no cluster
    86                      
     85
     86
     87    PRIVATE
     88
     89
     90#if .NOT. defined ( __check )
     91    PUBLIC poisfft_hybrid, poisfft_hybrid_ini
     92
    8793
    8894!
     
    117123       MODULE PROCEDURE cascade
    118124    END INTERFACE cascade
     125#else
     126    PUBLIC poisfft_hybrid_ini
     127
     128!
     129!-- Public interfaces
     130    INTERFACE poisfft_hybrid_ini
     131       MODULE PROCEDURE poisfft_hybrid_ini
     132    END INTERFACE poisfft_hybrid_ini
     133#endif
    119134
    120135 CONTAINS
    121136 
    122  
     137
    123138    SUBROUTINE poisfft_hybrid_ini
    124139
     
    153168       nwords = ( nxr_p-nxl_p+1 ) * nz * ( nyn_p-nys_p+1 )
    154169
    155 #if defined( __KKMP )
     170#if defined( __KKMP ) .AND. .NOT. defined ( __check )
    156171       CALL LOCAL_GETENV( 'OMP_NUM_THREADS', 15, cdummy, idummy )
    157172       READ ( cdummy, '(I8)' )  n_omp_threads
     
    209224       IF ( tasks_per_logical_node >= 2 )  THEN
    210225
    211 #if defined( __parallel )
     226#if defined( __parallel ) .AND. .NOT. defined ( __check )
    212227          nodes   = ( numprocs + tasks_per_logical_node - 1 ) / &
    213228                    tasks_per_logical_node
     
    231246!          write(0,*) 'who am i',myid,me,me_node,me_task,nodes,&
    232247!                     tasks_per_logical_node
    233 #else
     248#elif .NOT. defined( __parallel )
    234249          message_string = 'parallel environment (MPI) required'
    235250          CALL message( 'poisfft_hybrid_ini', 'PA0282', 1, 2, 0, 6, 0 )
     
    239254    END SUBROUTINE poisfft_hybrid_ini
    240255
    241 
     256#if .NOT. defined ( __check )
    242257    SUBROUTINE poisfft_hybrid( ar )
    243258
     
    10631078
    10641079    END SUBROUTINE cascade
    1065 
     1080#endif
    10661081 END MODULE poisfft_hybrid_mod
  • palm/trunk/UTIL

    • Property svn:ignore set to
      check_namelist_files.tar
  • palm/trunk/UTIL/mrungui/mainwindow.ui

    r793 r807  
    925925     </property>
    926926     <property name="text">
    927       <string>-A  archiving when using file-attribute fl</string>
     927      <string>-A  (archiving when using file-attribute fl)</string>
    928928     </property>
    929929    </widget>
Note: See TracChangeset for help on using the changeset viewer.