Changeset 2365 for palm/trunk/SCRIPTS/mrun
- Timestamp:
- Aug 21, 2017 2:59:59 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r2303 r2365 27 27 # ----------------- 28 28 # $Id$ 29 # Added lckea & lckeam. KIT/IMK-IFU Garmisch cluster. LRZ (SadiqHuq) 30 # Vertical grid nesting: set vnested_mode. -N Procs for fine and coarse grid. 31 # 32 # 2303 2017-07-04 12:26:18Z raasch 29 33 # bugfix: setting default value for write_binary 30 34 # … … 334 338 module_calls="" 335 339 mrun_script_name=$mc 340 vnested_dist="" 341 vnested_mode="vnested_twi" 336 342 netcdf_inc="" 337 343 netcdf_lib="" … … 341 347 numprocs_atmos=0 342 348 numprocs_ocean=0 349 numprocs_crse=0 350 numprocs_fine=0 343 351 OOPT="" 344 352 openmp=false … … 373 381 run_coupled_model=false 374 382 run_mode="" 383 run_vnested_model=false 375 384 dashes=" ----------------------------------------------------------------------------" 376 385 silent=false … … 475 484 # READ SHELLSCRIPT-OPTIONS AND REBUILD THE MRUN-COMMAND STRING (MC), 476 485 # WHICH WILL BE USED TO START RESTART-JOBS 477 while getopts :a:bBc:Cd:Fg:G:h:H:i:kK:m:M:n: o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:zZ option486 while getopts :a:bBc:Cd:Fg:G:h:H:i:kK:m:M:n:N:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:zZ option 478 487 do 479 488 case $option in … … 495 504 (M) makefile=$OPTARG; mc="$mc -M$OPTARG";; 496 505 (n) node_usage=$OPTARG; mc="$mc -n$OPTARG";; 506 (N) run_vnested_model=true; vnested_dist=$OPTARG; mc="$mc -N'$OPTARG'";; 497 507 (o) output_list=$OPTARG; mc="$mc -o'$OPTARG'";; 498 508 (O) use_openmp=true; threads_per_task=$OPTARG; mc="$mc -O$OPTARG";; … … 550 560 printf "\n -M Makefile name Makefile" 551 561 printf "\n -n node usage (shared/not_shared) depending on -h" 562 printf "\n -N Vertical grid nesting. Number of" 563 printf "\n PE for Coarse and Fine grid" 552 564 printf "\n -o OUTPUT control list \"\" " 553 565 printf "\n -O threads per openMP task ---" … … 713 725 fi 714 726 727 # NESTING (-N) selected and vnesting_mode specified 728 if [[ $run_vnested_model = true ]] 729 then 730 731 if [[ -n $vnested_dist ]] 732 then 733 734 numprocs_crse=`echo $vnested_dist | cut -d" " -s -f1` 735 numprocs_fine=`echo $vnested_dist | cut -d" " -s -f2` 736 737 if (( $numprocs_crse + $numprocs_fine != $numprocs )) 738 then 739 740 printf "\n +++ number of processors does not fit to specification by \"-N\"." 741 printf "\n PEs (total) : $numprocs" 742 printf "\n PEs (Coarse) : $numprocs_crse" 743 printf "\n PEs (Fine) : $numprocs_fine" 744 locat=vnesting; exit 745 746 fi 747 748 else 749 750 printf "\n +++ "Specify PE for fine and coarse grid: -N "nCGPE nFGPE \"-N\"." 751 locat=vnesting; exit 752 753 fi 754 vnested_dist=`echo "$numprocs_crse $numprocs_fine"` 755 fi 756 715 757 # SAVE VALUES OF MRUN-OPTIONS SICHERN IN ORDER TO OVERWRITE 716 758 # THOSE VALUES GIVEN IN THE CONFIGURATION-FILE … … 1195 1237 (ibmh) queue=cluster;; 1196 1238 (ibmkisti) queue=class.32plus;; 1239 (ibmmuc*) queue=test;; 1240 (lcbwuni) queue=develop;; 1197 1241 (lcbullhh) queue=compute;; 1198 1242 (lccrayb) queue=mpp1q;; … … 1203 1247 (lckyuh) queue=fx-single;; 1204 1248 (lckyut) queue=cx-single;; 1249 (lclrz) queue=mpp2;; 1205 1250 (lctit) queue=S;; 1206 1251 (unics) queue=unics;; … … 1764 1809 1765 1810 # SET PREPROCESSOR-DIRECTIVES TO SELECT OPERATING SYSTEM SPECIFIC CODE 1766 if [[ $(echo $localhost | cut -c1-3) = ibm ]]1811 if [[ $(echo $localhost | cut -c1-3) = ibm && $localhost != ibmmuc* ]] 1767 1812 then 1768 1813 cpp_options="${cpp_options},-D__ibm=__ibm" … … 1778 1823 1779 1824 # SET DIRECTIVES GIVEN BY OPTION -K (E.G. parallel) 1780 if [[ $(echo $localhost | cut -c1-3) = ibm ]]1825 if [[ $(echo $localhost | cut -c1-3) = ibm && $localhost != ibmmuc ]] 1781 1826 then 1782 1827 [[ -n $cond1 ]] && cpp_options="${cpp_options},-D__$cond1=__$cond1" … … 1893 1938 fi 1894 1939 fi 1895 TEMPDIR=$tmp_user_catalog/${usern}.$kennung 1896 1940 1941 if [[ $localhost = ibmmuc* ]] 1942 then 1943 TEMPDIR=$tmp_user_catalog/${USER}.$kennung 1944 else 1945 TEMPDIR=$tmp_user_catalog/${usern}.$kennung 1946 fi 1897 1947 1898 1948 # DETERMINE THE NAME OF THE DIRECTORY WHICH IS USED TO TEMPORARILY STORE DATA FOR RESTART RUNS … … 2792 2842 then 2793 2843 /opt/optibm/HPM_2_4_1/bin/hpmcount a.out 2844 elif [[ $localhost = ibmmuc* ]] 2845 then 2846 ulimit -c unlimited # only for debgingg 2847 echo $MP_NODES > ~/job_queue/hostfile.$kennung 2848 echo $MP_PROCS >> ~/job_queue/hostfile.$kennung 2849 cat $LOADL_HOSTFILE >> ~/job_queue/hostfile.$kennung 2850 export MP_NODES=$nodes 2851 export MP_PROCS=$numprocs 2852 # export MPI_SINGLE_THREAD=no # LRZ NetCDF 2853 # export MP_TASKS_PER_NODE=$tasks_per_node 2854 echo "Resource Info: " 2855 echo "numprocs: " $numprocs " MP_PROCS " $MP_PROCS 2856 echo "nodes: " $nodes " MP_NODES " $MP_NODES 2857 echo "tasks_per_node: " $tasks_per_node 2858 echo "threads_per_task: " $threads_per_task 2859 export OMP_NUM_THREADS=1 2860 source /lrz/sys/share/modules/init/bash 2861 module li 2862 echo "runfile_atmos" 2863 2864 if [[ $run_vnested_model = true ]] 2865 then 2866 2867 printf "\n Nested run ($numprocs_crse Coarse, $numprocs_fine Fine)" 2868 printf "\n using $nested_mode nesting" 2869 printf "\n\n" 2870 2871 echo "$vnested_mode $numprocs_crse $numprocs_fine" > runfile_atmos 2872 2873 poe ./a.out < runfile_atmos 2874 # mpiexec -n $numprocs ./a.out < runfile_atmos 2875 else 2876 echo "precursor_atmos" > runfile_atmos 2877 poe ./a.out -proc $numprocs -nodes $nodes < runfile_atmos 2878 # mpiexec -n $numprocs ./a.out < runfile_atmos 2879 2880 fi 2794 2881 else 2795 2882 if [[ $run_coupled_model = false ]] … … 2899 2986 printf "\n threads per task: $threads_per_task stacksize: unlimited" 2900 2987 fi 2901 if [[ $run_coupled_model = false ]]2988 if [[ $run_coupled_model = false && $run_vnested_model = false ]] 2902 2989 then 2903 2990 if [[ "$ocean_file_appendix" = true ]] … … 2948 3035 then 2949 3036 mpirun_rsh -hostfile $PBS_NODEFILE -np `cat $PBS_NODEFILE | wc -l` a.out < runfile_atmos 2950 3037 elif [[ $host = lclrz || $host = lcbwuni ]] 3038 then 3039 mpiexec -n $ii a.out < runfile_atmos $ROPTeS 3040 elif [[ $host = lckea* ]] 3041 then 3042 srun -n $ii a.out < runfile_atmos $ROPTeS 2951 3043 elif [[ $host = lckiaps ]] 2952 3044 then … … 2959 3051 fi 2960 3052 2961 el se2962 3053 elif [[ $run_coupled_model = true ]] 3054 then 2963 3055 # COUPLED RUN 2964 3056 (( iia = $numprocs_atmos / $threads_per_task )) … … 2992 3084 wait 2993 3085 3086 3087 elif [[ $run_vnested_model = true ]] 3088 then 3089 printf "\n Vertical Nested run ($numprocs_crse Coarse, $numprocs_fine Fine)" 3090 printf "\n using $vnested_mode vnesting" 3091 printf "\n\n" 3092 3093 echo "$vnested_mode $numprocs_crse $numprocs_fine" > runfile_atmos 3094 3095 if [[ $host = lcbwuni || $host = lclrz* ]] 3096 then 3097 mpiexec -n $ii a.out < runfile_atmos $ROPTeS 3098 elif [[ $host = lckea* ]] 3099 then 3100 srun -n $ii a.out < runfile_atmos $ROPTeS 3101 else 3102 mpirun -np $numprocs ./a.out $ROPTS < runfile_atmos 3103 fi 3104 wait 2994 3105 fi 2995 3106 … … 3657 3768 [[ "$ocean_file_appendix" = true ]] && mrun_com=${mrun_com}" -y" 3658 3769 [[ $run_coupled_model = true ]] && mrun_com=${mrun_com}" -Y \"$coupled_dist\"" 3770 [[ $run_vnested_model = true ]] && mrun_com=${mrun_com}" -N \"$vnested_dist\"" 3659 3771 [[ "$check_namelist_files" = false ]] && mrun_com=${mrun_com}" -z" 3660 3772 [[ "$combine_plot_fields" = false ]] && mrun_com=${mrun_com}" -Z"
Note: See TracChangeset
for help on using the changeset viewer.