Changeset 1804 for palm/trunk/SCRIPTS


Ignore:
Timestamp:
Apr 5, 2016 4:30:18 PM (9 years ago)
Author:
maronga
Message:

removed parameter file check. update of mrungui for compilation with qt5

Location:
palm/trunk/SCRIPTS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/document_changes

    r1328 r1804  
    2020# Current revisions:
    2121# -----------------
    22 #
     22# Removed printing of "this is an alpha version"
    2323#
    2424# Former revisions:
     
    7676    fi
    7777    printf "\n  *** Checking files in $input_dir\n"
    78     printf "\n  +++ THIS IS AN ALPHA VERSION. PLEASE CHECK THE MODIFIED FILES BEFORE COMMITTING\n"
    7978
    8079    for filename in $input_dir/*; do
     
    186185       printf "\n  *** $count_files documents checked.\n"
    187186       printf "  *** $count_changes changed documents found.\n"
    188        printf "  *** You can now perform svn commit -m 'last commit documented' trunk\n"
    189        printf "\n  +++ THIS IS AN ALPHA VERSION. PLEASE CHECK THE MODIFIED FILES BEFORE COMMITTING\n"
     187       printf "\n"
     188       printf "  *** All files in $input_dir were checked.\n"     
     189       printf "  *** You can now proceed with checking other directories\n"
     190       printf "      - or you might want to perform svn commit -m 'last commit documented' trunk\n"
     191       printf "\n"     
     192       printf "  *** Please do not forget to commit your changes in the changelog \n under https://palm.muk.uni-hannover.de/trac/wiki/doc/tec/changelog !"     
    190193    else
    191194       printf "\n  *** $count_files documents checked.\n"
  • palm/trunk/SCRIPTS/mbuild

    r1653 r1804  
    2222# Current revisions:
    2323# ------------------
    24 #
     24# Removed parameter file check
    2525#
    2626# Former revisions:
     
    14481448                echo "  +++ no qmake found. The (optional) GUI will not be compiled."
    14491449             fi
    1450 
    1451 #                 # COMPILE CHECK_NAMELIST_FILES (ONLY FOR ONE BRANCH on LOCALHOST NEEDED)
    1452 #              printf "\n\n"
    1453 #              echo "  *** compiling check_namelist_files ..."
    1454 #
    1455 #                 # GET CHECK OPTIONS
    1456 #              line=""
    1457 #              found=false
    1458 #              grep  "$remote_host_string" $config_file | grep "%cpp_options"  >  $tmp_mbuild
    1459 #              while read line1
    1460 #              do
    1461 #
    1462 #                 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
    1463 #                 then
    1464 #                    line="$line1"
    1465 #                 fi
    1466 #
    1467 #                 if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    1468 #                 then
    1469 #                       # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    1470 #                    line="$line "
    1471 #                    copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'`
    1472 #                    found=true
    1473 #                 fi
    1474 #
    1475 #              done < $tmp_mbuild
    1476 #              copts_check="$copts_check -D__check -D__parallel"
    1477 #
    1478 #              check_depository_path=${local_source_path}/../UTIL
    1479 #              cd $check_depository_path
    1480 #              mkdir check_tmp
    1481 #              cp ${local_source_path}/${mainprog}_sources_check.tar ./check_tmp
    1482 #              cd check_tmp
    1483 #              tar -xf  ${mainprog}_sources_check.tar
    1484 #              rm -rf ${mainprog}_sources_check.tar
    1485 #              make  -f Makefile_check $make_options  F90=$compiler_name_ser  COPT="$copts_check"  F90FLAGS="$compiler_options"
    1486 #              tar -cf  check_namelist_files.tar Makefile_check check_namelist_files.x *.f90 *.o *.mod
    1487 #              mv check_namelist_files.tar $check_depository_path
    1488 #              mv check_namelist_files.x $PALM_BIN
    1489 #              cd $check_depository_path
    1490 #              rm -rf check_tmp
    1491 #              util_compiled_localhost=true
    14921450          else
    14931451             cd $check_depository_path
    14941452             printf "\n\n"
    1495              echo "  *** skipped compilation of mrun GUI."       
    1496              printf "\n\n"
    1497              echo "  *** skipped compilation of check_namelist_files (currently not available)."           
     1453             echo "  *** skipped compilation of mrun GUI."           
    14981454          fi
    14991455
  • palm/trunk/SCRIPTS/mrun

    r1779 r1804  
    2626# ROPTS removed from execution commands
    2727# Warnings about missing optional files or user code changed to informative messages
     28# Removed parameter file check
    2829#
    2930# Former revisions:
     
    478479 then
    479480   (printf "\n  *** mrun can be called as follows:\n"
    480     printf "\n      $mrun_script_name  -b -c.. -d.. -D.. -f.. -F -h.. -i.. -I -K.. -m.. -o.. -p.. -r.. -R -s.. -t.. -T.. -v -x -X.. -y -Y.. -z -Z <modus> \n"
     481    printf "\n      $mrun_script_name  -b -c.. -d.. -D.. -f.. -F -h.. -i.. -I -K.. -m.. -o.. -p.. -r.. -R -s.. -t.. -T.. -v -x -X.. -y -Y.. -Z <modus> \n"
    481482    printf "\n      Description of available options:\n"
    482483    printf "\n      Option  Description                              Default-Value"
     
    522523    printf "\n        -Y    run coupled model, \"#1 #2\" with"
    523524    printf "\n              #1 atmosphere and #2 ocean processors    \"#/2 #/2\" depending on -X"
    524     printf "\n        -z    disable a priori parameter file check    ---"
    525525    printf "\n        -Z    skip combine_plot_fields at the end of      "
    526526    printf "\n              the simulation                           ---"
     
    12081208    fi
    12091209    eval pathname=${pathin[$i]}
    1210 
    1211        # SAVE INPUT FILE NAME FOR PARAMETER FILE CHECK
    1212     if [[ ("${transin[$i]}" = job) && (-f $filename) ]]
    1213     then
    1214        filename_input=$filename
    1215     fi
    12161210
    12171211       # CHECK IF FILE EXISTS
     
    22072201 fi
    22082202
    2209 
    2210     # PERFORM PARAMETER FILE CHECK (COUPLED RUNS ARE NOT SUPPORTED YET)
    2211     # DEFINE VARIABLES FOR FREQUENTLY USED DIRECTORIES
    2212  check_depository="${working_directory}/trunk/UTIL"
    2213  check_sources="${working_directory}/tmp_check_namelist_files"
    2214  skip_check=false
    2215 
    2216     # CHECK IF NAMELIST_FILE_CHECK HAS BEEN COMPILED SUCCESSFULLY
    2217  if [[ ! -f $check_depository/check_namelist_files.tar ]]
    2218  then
    2219     skip_check=true
    2220     reason="run on remote host or parameter file check has not been compiled."
    2221  fi
    2222  if [[ ! -f $PALM_BIN/check_namelist_files.x ]]
    2223  then
    2224     skip_check=true
    2225     reason="parameter file check has not been compiled."
    2226  fi
    2227 
    2228     # CHECK FOR PARALLEL RUN; OTHERWISE SKIP CHECK
    2229  if [[ "$cond1" != "parallel"  &&  "$cond2" != "parallel" ]]
    2230  then
    2231     skip_check=true
    2232     reason="serial run."
    2233  fi
    2234 
    2235     # ONLY PERFORM CHECK IF -z OPTION IS NOT SET, NO RESTART RUN IS CARRIED OUT
    2236     # AND IF THE EXECUTION HOST IS THE LOCAL HOST
    2237     # ATTENTION: THIS ROUTINE DOES NOT WORK IF THE COMPILER ON THE LOCAL HOST
    2238     # DIFFERS FROM THE COMPILER ON THE REMOTE HOST
    2239  if [[ $check_namelist_files == false ]]
    2240  then
    2241     skip_check=true
    2242     reason="-z option set."
    2243  fi
    2244 
    2245  if [[ $fromhost != $localhost ]]
    2246  then
    2247     skip_check=true
    2248     reason="submitting host is local host." 
    2249  fi 
    2250 
    2251  if [[ $run_coupled_model == true ]]
    2252  then
    2253     skip_check=true
    2254     reason="coupled run." 
    2255  fi
    2256 
    2257  if [[ $restart_run == true ]]
    2258  then
    2259     skip_check=true
    2260     reason="restart run."     
    2261  fi
    2262 
    2263     # SKIP CHECK IN CASE OF RESTART RUN: CHECK WHETHER THE LAST CHAR IS "f" IN PARIN
    2264  (( last_char_int = `echo $filename_input | wc -c` - 1 ))
    2265  last_char=`echo $filename_input | cut -c $last_char_int`
    2266  if [[ "$last_char" == "f" ]]
    2267  then
    2268     skip_check=true
    2269     reason="restart run."
    2270  fi
    2271 
    2272  if [[ $skip_check == false ]]
    2273  then
    2274     tmp_check=${working_directory}/tmp_check
    2275 
    2276        # GET TOPOGRAPHY PARAMETER FILE SUFFIX (USUALLY "_TOPO"). THIS FILE IS
    2277        # NOT NECESSARILY REQUIRED
    2278     line=""
    2279     found=false
    2280     grep  "TOPOGRAPHY_DATA" $config_file  >  $tmp_check
    2281     while read line1
    2282     do
    2283        line="$line1"
    2284        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    2285        then
    2286           topo_suffix=`echo $line | tr -s " " | cut -d" " -s -f5`
    2287           found=true
    2288        fi
    2289     done < $tmp_check
    2290 
    2291     if [[ $found = false ]]
    2292     then
    2293        printf "\n  +++ no TOPOGRAPHY list entry found in the configuration file."
    2294     fi
    2295 
    2296        # GET NUDGING PARAMETER FILE SUFFIX (USUALLY "_NUDGE"). THIS FILE IS
    2297        # NOT NECESSARILY REQUIRED
    2298     line=""
    2299     found=false
    2300     grep  "NUDGING_DATA" $config_file  >  $tmp_check
    2301     while read line1
    2302     do
    2303        line="$line1"
    2304        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    2305        then
    2306           nudge_suffix=`echo $line | tr -s " " | cut -d" " -s -f5`
    2307           found=true
    2308        fi
    2309     done < $tmp_check
    2310 
    2311     if [[ $found = false ]]
    2312     then
    2313        printf "\n  +++ no NUDGING list entry found in the configuration file."
    2314     fi
    2315 
    2316        # GET LARGE SCALE FORCING PARAMETER FILE SUFFIX (USUALLY "_LSF"). THIS FILE IS
    2317        # NOT NECESSARILY REQUIRED
    2318     line=""
    2319     found=false
    2320     grep  "LSF_DATA" $config_file  >  $tmp_check
    2321     while read line1
    2322     do
    2323        line="$line1"
    2324        if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    2325        then
    2326           lsf_suffix=`echo $line | tr -s " " | cut -d" " -s -f5`
    2327           found=true
    2328        fi
    2329     done < $tmp_check
    2330 
    2331     if [[ $found = false ]]
    2332     then
    2333        printf "\n  +++ no LSF list entry found in the configuration file."
    2334     fi
    2335 
    2336     rm -rf ${working_directory}/tmp_check
    2337 
    2338        # CHECK IF THE P3DF FILE MUST BE CHECKED
    2339     for  item  in  $input_list
    2340     do
    2341        if [[ "$item" == "restart" ]]
    2342        then
    2343           check_restart=1
    2344        else
    2345           check_restart=0
    2346        fi
    2347     done
    2348 
    2349       # ERROR IF NO PARAMETER FILE WAS FOUND, OTHERWISE PROCEED
    2350     if [[ (! -f $filename_input) && ( "$filename_input" != "" ) ]]
    2351     then
    2352        printf "\n\n  +++ ERROR: parameter file ($filename_input) not found."
    2353        locat=check_namelist; exit
    2354     fi
    2355    
    2356        # CHECK IF THE RESTART PARAMETER FILE EXISTS (IF NECESSARY)
    2357     if  [[ $check_restart == 1 ]]
    2358     then
    2359 
    2360        filenamef="${filename_input}f"
    2361        if [[ ! -f $filenamef ]]
    2362        then
    2363           printf "\n\n  +++ WARNING: restart parameter file ($filenamef) is missing." 
    2364           check_restart=0
    2365           answer=dummy
    2366           printf "\n\n"
    2367 
    2368           if [[ $silent == false ]]
    2369           then
    2370              while [[ "$answer" != c  &&  "$answer" != C  && "$answer" != a  &&  "$answer" != A ]]
    2371              do
    2372                 printf " >>> continue anyway (c(ontinue)/a(bort)) ?  "
    2373                 read  answer
    2374              done
    2375              if [[ $answer = a  ||  $answer = A ]]
    2376              then
    2377                 printf "\n  +++ Aborting...."
    2378                 locat=normal; exit
    2379              fi
    2380           fi
    2381        else
    2382           check_restart=1
    2383        fi
    2384     fi
    2385 
    2386        # CREATE TEMPORARY SOURCES_FOR_CHECK PATH
    2387     mkdir $check_sources
    2388     cd $check_sources
    2389 
    2390 
    2391        # CHECK FOR USER CODE, OTHERWISE USE THE PRECOMPILED CHECK_NAMELIST_FILES.X
    2392     if [[ -d $add_source_path ]]
    2393     then
    2394        printf "\n\n  *** copying files from $check_depository"
    2395        cp $check_depository/check_namelist_files.tar ./
    2396 
    2397        printf "\n\n  *** untar of makefile and source files in $check_sources"
    2398        tar -xf check_namelist_files.tar  >  /dev/null  2>&1
    2399 
    2400        printf "\n\n  *** adding user code."
    2401        cp $add_source_path/* ./
    2402        touch check_namelist_files.f90
    2403 
    2404           # GET COMPILER OPTIONS AND PERFORM MAKE
    2405        printf "\n\n  *** compiling code if necessary...\n"
    2406 
    2407           # workaround for batch jobs on local machine (lcxe6)
    2408        if [[ $do_batch == true && $do_remote == false ]]
    2409        then
    2410           eval $init_cmds
    2411        fi
    2412 
    2413           # GET CHECK OPTIONS
    2414        line=""
    2415        found=false
    2416 
    2417        grep  "$localhost" ${base_directory}/${config_file} | grep "%cpp_options"  >  $tmp_check
    2418 
    2419        while read line1
    2420        do
    2421 
    2422           if [[ $(echo $line1 | cut -d" " -s -f3-) = "$localhost" ]]
    2423           then
    2424              line="$line1"
    2425           fi
    2426 
    2427           if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    2428           then
    2429                 # REMOVE COLONS FROM OPTION-STRING, REMOVE ALL -D OPTIONS
    2430              line="$line "
    2431              copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'`
    2432              found=true
    2433           fi
    2434 
    2435        done < $tmp_check
    2436        copts_check="$copts_check -D__check -D__parallel"
    2437 
    2438        make -f Makefile_check F90=$compiler_name_ser  COPT="$copts_check"
    2439 
    2440           # GET MAKE OUTPUT
    2441        if [[ $? != 0 ]]
    2442        then
    2443           printf "\n  +++ error during make."       
    2444           answer=dummy
    2445           printf "\n\n"
    2446           if [[ $silent == false ]]
    2447           then
    2448              while [[ "$answer" != c  &&  "$answer" != C  && "$answer" != a  &&  "$answer" != A ]]
    2449              do
    2450                 printf " >>> continue anyway (c(ontinue)/a(bort)) ?  "
    2451                 read  answer
    2452              done
    2453              if [[ $answer = a  ||  $answer = A ]]
    2454              then
    2455                 printf "\n  +++ Aborting..."
    2456                 rm -rf  $check_sources
    2457                 locat=normal; exit
    2458              else
    2459                 skip_check=true
    2460              fi
    2461           else
    2462              skip_check=true
    2463           fi
    2464        fi
    2465     else
    2466        cp $PALM_BIN/check_namelist_files.x ./
    2467     fi
    2468 
    2469     cp $filename_input ./PARIN
    2470     if [[ $check_restart == 1 ]]
    2471     then
    2472        cp $filenamef ./PARINF   
    2473     fi
    2474 
    2475     if [[ -f ${pathname}/${fname}${topo_suffix} && $skip_check == false ]]
    2476     then
    2477        printf "\n  *** adding topography data"
    2478        cp ${pathname}/${fname}${topo_suffix} ./TOPOGRAPHY_DATA
    2479 
    2480           # IN CASE OF TOPOGRAPHY AND HIGH GRID POINT NUMBERS, THE STACK SIZE
    2481           # MUST BE INCREASED. THIS IS DUE TO THE ARRAY nzb_local AND topo_height,
    2482           # WHICH REQUIRE SUFFICIENT MEMORY
    2483        ulimit -s unlimited         
    2484     fi
    2485 
    2486     if [[ -f ${pathname}/${fname}${nudge_suffix} && $skip_check == false ]]
    2487     then
    2488        printf "\n  *** adding nudging data"
    2489        cp ${pathname}/${fname}${nudge_suffix} ./NUDGING_DATA       
    2490     fi
    2491 
    2492     if [[ -f ${pathname}/${fname}${lsf_suffix} && $skip_check == false ]]
    2493     then
    2494        printf "\n  *** adding large scale forcing data"
    2495        cp ${pathname}/${fname}${lsf_suffix} ./LSF_DATA       
    2496     fi
    2497 
    2498        # CREATE ENVPAR FILE, WHICH IS NEEDED BY CHECK_NAMELIST_FILES.X
    2499     cat  >  ENVPAR  <<  %%END%%
    2500  &envpar  run_identifier = '$fname', host = '$host',
    2501             write_binary = '$write_binary', tasks_per_node = $tasks_per_node,
    2502             maximum_parallel_io_streams = $maximum_parallel_io_streams,
    2503             maximum_cpu_time_allowed = ${cpumax}.,
    2504             revision = '$global_revision',
    2505             local_dvrserver_running = $local_dvrserver_running /
    2506 
    2507 %%END%%
    2508 
    2509        # SAFETY CHECK: ONLY PROCEED IF THE PARAMETER CHECK PROGRAM WAS PROPERLY COMPILED
    2510     if [[ ! -f check_namelist_files.x  &&  $skip_check == false ]]
    2511     then
    2512        printf "\n  +++ WARNING: check_namelist_files.x not found."
    2513        answer=dummy
    2514        printf "\n\n"
    2515 
    2516        if [[ $silent == false ]]
    2517        then
    2518           while [[ "$answer" != c  &&  "$answer" != C  && "$answer" != a  &&  "$answer" != A ]]
    2519           do
    2520              printf " >>> continue anyway (c(ontinue)/a(bort)) ?  "
    2521              read  answer
    2522           done
    2523           if [[ $answer = a  ||  $answer = A ]]
    2524           then
    2525              printf "\n  +++ Aborting..."
    2526              rm -rf  $check_sources
    2527              locat=normal; exit
    2528           else
    2529              printf "\n  *** skipping parameter file check."         
    2530           fi
    2531       fi
    2532        
    2533     elif [[ $skip_check == false ]]
    2534     then
    2535           # STARTING THE PARAMETER FILE CHECK
    2536        printf "\n\n  *** starting parameter file check..."
    2537 
    2538           # CHECKING THE P3D FILE
    2539        printf "\n\n      (1) checking $filename_input" 
    2540        echo "$numprocs 0 0" > VARIN
    2541        errors=`./check_namelist_files.x < VARIN 2>&1`
    2542 
    2543        check_error=false
    2544        if [[ "$errors" == "" ]]
    2545        then
    2546           printf " --> o.k."
    2547        else
    2548           printf " --> failed."
    2549           check_error=true
    2550           printf "\n\n  $errors"
    2551        fi
    2552 
    2553           # CHECKING THE PD3F FILE IF NECESSARY
    2554        if [[ $check_restart == 1 && $check_error == false ]]
    2555        then
    2556           printf "\n\n      (2) checking $filenamef" 
    2557 
    2558              # FIRST CHECK IF INITIALIZING_ACTIONS="READ_RESTART_DATA" IS SET
    2559              # IN &INIPAR LIST
    2560           found=false
    2561           cat PARINF | while read line
    2562           do
    2563              line=$(echo $line|sed 's/ //g')
    2564              if [[ $line == *"&inipar"* ]]
    2565              then
    2566                 start_search=true
    2567              fi
    2568 
    2569              if [[ $start_search == true ]]
    2570              then
    2571                 if [[ $line == *"initializing_actions='read_restart_data'"* ]]
    2572                 then
    2573                    found=true
    2574                    break
    2575                 fi
    2576              fi
    2577 
    2578              if [[ $line == *"/"* ]]
    2579              then
    2580                 start_search=false
    2581              fi
    2582 
    2583           done
    2584 
    2585           if [[ $found = false ]]
    2586           then
    2587              printf "\n\n  +++ ERROR: initializing_actions = 'read_restart_data' not found"
    2588              printf "\n      in &inipar list in $fname$p3df_suffix."
    2589              rm -rf  $check_sources
    2590              locat=check_namelist; exit
    2591           fi
    2592 
    2593              # READ max_user_pr FROM FILES
    2594           if [[ -f parin_for_check ]]
    2595           then
    2596              read max_pr_user < parin_for_check
    2597           else
    2598              max_user_pr=0
    2599           fi
    2600 
    2601           echo "$numprocs 1 $max_pr_user" > VARIN
    2602           errors=`./check_namelist_files.x < VARIN 2>&1`
    2603 
    2604           if [[ "$errors" == "" ]]
    2605           then
    2606              printf " --> o.k."
    2607           else
    2608              printf " --> failed."
    2609              check_error=true
    2610              printf "\n\n  $errors"
    2611           fi
    2612        fi
    2613    
    2614           # REPORT ERRORS AND CONTINUE/EXIT
    2615        if [[ $check_error == true ]]
    2616        then
    2617           printf "\n  +++ errors found in the parameter file!\n"
    2618           answer=dummy
    2619           printf "\n\n"
    2620 
    2621           while [[ "$answer" != c  &&  "$answer" != C  && "$answer" != a  &&  "$answer" != A ]]
    2622           do
    2623              printf " >>> continue anyway (c(ontinue)/a(bort)) ?  "
    2624              read  answer
    2625           done
    2626 
    2627           if [[ $answer = a  ||  $answer = A ]]
    2628           then
    2629              printf "\n  +++ Aborting..."
    2630              rm -rf  $check_sources
    2631              locat=normal; exit
    2632           fi
    2633         else
    2634           printf "\n\n  *** parameter file(s) seem(s) to be o.k.\n"
    2635         fi
    2636         rm -rf $check_sources
    2637     fi
    2638  else
    2639     printf "\n\n  +++ skipping parameter file check due to following reason: $reason \n"
    2640  fi
    2641 
    2642     # DELETE TEMPORARY DIRECTORY AND FINISH NAMELIST FILE CHECK   
    2643  rm -rf  $check_sources
    2644  cd $working_directory
    2645 
     2203 
    26462204    # DETERMINE PATH FOR MAKE DEPOSITORY
    26472205 if [[ $do_batch = false  ||  $create_executable_for_batch = true ]]
Note: See TracChangeset for help on using the changeset viewer.