Changeset 892 for palm/trunk/SCRIPTS/mrun
- Timestamp:
- May 2, 2012 1:51:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r858 r892 254 254 # 12/03/12 - Siggi - tasks_per_node divisor check not for lcflow 255 255 # 21/03/12 - Matthias - default compiler on ibmh changed 256 # 02/05/12 - Bjoern - lcxt4 is now lcxe6, adjustments for lcxe6, 257 # bugfixes for the parameter file check, initial 258 # commands on ssh calls sourced out to .mrun.config 256 259 257 260 … … 333 336 package_list="" 334 337 punkte="..........................................................." 335 p3d_suffix=""336 338 queue=none 337 339 read_from_config="" … … 706 708 do_remote=true 707 709 case $host in 708 (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|nech|necriam|lckyoto|lcsgib|lcsgih|unics|lcx t4|lcxt5m|lck|lckordi) true;;710 (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|nech|necriam|lckyoto|lcsgib|lcsgih|unics|lcxe6|lcxt5m|lck|lckordi) true;; 709 711 (*) printf "\n" 710 712 printf "\n +++ sorry: execution of batch jobs on remote host \"$host\"" … … 870 872 do_remote=true 871 873 case $host in 872 (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcx t4|lcxt5m|lck|lckordi) true;;874 (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckordi) true;; 873 875 (*) printf "\n +++ sorry: execution of batch jobs on remote host \"$host\"" 874 876 printf "\n is not available" … … 1154 1156 do_remote=true 1155 1157 case $host in 1156 (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcx t4|lcxt5m|lck|lckordi) true;;1158 (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckordi) true;; 1157 1159 (*) printf "\n" 1158 1160 printf "\n +++ sorry: execution of batch jobs on remote host \"$host\"" … … 1335 1337 eval filename=${pathin[$i]}/${afname}${endin[$i]} 1336 1338 fi 1339 eval pathname=${pathin[$i]} 1340 1337 1341 1338 1342 # PRUEFEN AUF VORHANDENSEIN … … 2036 2040 lopts="$lopts $netcdf_lib $dvr_lib" 2037 2041 ROPTS="$ropts" 2038 if [[ ( $(echo $host | cut -c1-3) = nec || $(echo $host | cut -c1-3) = ibm || $host = lckyoto || $host = lcsgih || $host = lcsgib || $host = lctit || $host = lcfimm || $host = lcx t4|| $host = lcxt5m || $host = lck || $host = lckordi) && -n $numprocs ]]2042 if [[ ( $(echo $host | cut -c1-3) = nec || $(echo $host | cut -c1-3) = ibm || $host = lckyoto || $host = lcsgih || $host = lcsgib || $host = lctit || $host = lcfimm || $host = lcxe6 || $host = lcxt5m || $host = lck || $host = lckordi) && -n $numprocs ]] 2039 2043 then 2040 2044 XOPT="-X $numprocs" … … 2100 2104 done 2101 2105 mc="$mc -u$remote_username" 2106 fi 2107 2108 # CHECK FOR INITIAL COMMANDS AFTER LOGIN 2109 if [[ "$login_init_cmd" != "" ]] 2110 then 2111 export init_cmds="${login_init_cmd};" 2102 2112 fi 2103 2113 … … 2378 2388 if [[ ! -f $check_depository/check_namelist_files.tar || ! -f $PALM_BIN/check_namelist_files.x ]] 2379 2389 then 2380 skip_check=true 2381 2390 skip_check=true 2391 reason="parameter file check has not been compiled." 2392 fi 2393 2394 #CHECK FOR PARALLEL RUN; OTHERWISE SKIP CHECK 2395 if [[ "$cond1" != "parallel" && "$cond2" != "parallel" ]] 2396 then 2397 skip_check=true 2398 reason="serial run." 2382 2399 fi 2383 2400 2384 2401 #ONLY PERFORM CHECK IF -z OPTION IS NOT SET, NO RESTART RUN IS CARRIED OUT AND IF THE EXECUTION HOST IS THE LOCAL HOST 2385 if [[ $check_namelist_files == false || $fromhost != $localhost || $run_coupled_model == true || $restart_run == true ]] 2402 if [[ $check_namelist_files == false ]] 2403 then 2404 skip_check=true 2405 reason="-z option set." 2406 fi 2407 2408 if [[ $fromhost != $localhost ]] 2409 then 2410 skip_check=true 2411 reason="submitting host is local host." 2412 fi 2413 2414 if [[ $run_coupled_model == true ]] 2386 2415 then 2387 2416 skip_check=true 2388 fi 2417 reason="coupled run." 2418 fi 2419 2420 if [[ $restart_run == true ]] 2421 then 2422 skip_check=true 2423 reason="restart run." 2424 2425 fi 2426 2427 #SKIP CHECK IN CASE OF RESTART RUN: CHECK WHETHER THE LAST CHAR IS "f" IN PARIN 2428 ((last_char = `echo $filename | wc -c` - 1)) 2429 last_char=`echo $filename |cut -c$last_char` 2430 if [[ "$last_char" == "f" ]] 2431 then 2432 skip_check=true 2433 reason="restart run.)" 2434 fi 2435 2389 2436 if [[ $skip_check == false ]] 2390 2437 then 2391 if [[ $ocean_file_appendix == true ]]2392 then2393 d3par_string="d3o#"2394 d3fpar_string="d3of"2395 else2396 d3par_string="d3#"2397 d3fpar_string="d3f"2398 fi2399 2438 2400 2439 tmp_check=${working_directory}/tmp_check 2401 2440 2402 # GET PARAMETER FILE SUFFIX (USUALLY "_P3D") 2441 # GET TOPOGRAPHY PARAMETER FILE SUFFIX (USUALLY "_P3DF"). THIS FILE MIGHT IS 2442 # NOT NECESSARILY REQUIRED 2403 2443 line="" 2404 2444 found=false 2405 grep " $d3par_string" $config_file | grep "PARIN"> $tmp_check2445 grep "TOPOGRAPHY_DATA" $config_file > $tmp_check 2406 2446 while read line1 2407 2447 do … … 2409 2449 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 2410 2450 then 2411 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN2412 p3d_suffix=`echo $line | tr -s " " | cut -d" " -s -f5`2413 found=true2414 fi2415 done < $tmp_check2416 2417 if [[ $found = false ]]2418 then2419 printf "\n +++ no PARIN list entry found for $d3par_string in the configuration file."2420 2421 locat=check_namelist; exit2422 fi2423 2424 # GET RESTART PARAMETER FILE SUFFIX (USUALLY "_P3DF"). THIS FILE MIGHT IS2425 # NOT NECESSARILY REQUIRED2426 line=""2427 found=false2428 grep "d3f" $config_file | grep "PARIN" > $tmp_check2429 while read line12430 do2431 line="$line1"2432 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]]2433 then2434 p3df_suffix=`echo $line | tr -s " " | cut -d" " -s -f5`2435 found=true2436 fi2437 done < $tmp_check2438 2439 if [[ $found = false ]]2440 then2441 printf "\n +++ no PARIN list entry found for d3f in the configuration file."2442 fi2443 2444 # GET TOPOGRAPHY PARAMETER FILE SUFFIX (USUALLY "_P3DF"). THIS FILE MIGHT IS2445 # NOT NECESSARILY REQUIRED2446 line=""2447 found=false2448 grep "d3f" $config_file | grep "TOPOGRAPHY_DATA" > $tmp_check2449 while read line12450 do2451 line="$line1"2452 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]]2453 then2454 2451 topo_suffix=`echo $line | tr -s " " | cut -d" " -s -f5` 2455 2452 found=true … … 2467 2464 for item in $input_list 2468 2465 do 2469 if [[ "$item" == "restart" || "$item" == d3f || "$item" == d3of]]2466 if [[ "$item" == "restart" ]] 2470 2467 then 2471 2468 check_restart=1 … … 2476 2473 2477 2474 # 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."2475 if [[ ! -f $filename ]] 2476 then 2477 printf "\n\n +++ ERROR: parameter file ($filename) not found." 2481 2478 locat=check_namelist; exit 2482 2479 fi … … 2485 2482 if [[ $check_restart == 1 ]] 2486 2483 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." 2484 2485 2486 2487 filenamef="${filename}f" 2488 if [[ ! -f $filenamef ]] 2489 then 2490 printf "\n\n +++ WARNING: restart parameter file ($filenamef) is missing." 2490 2491 check_restart=0 2491 2492 answer=dummy … … 2514 2515 cd $check_sources 2515 2516 2517 2516 2518 # CHECK FOR USER CODE, OTHERWISE USE THE PRECOMPILED CHECK_NAMELIST_FILES.X 2517 if [[ -d $ working_directory/USER_CODE/$fname]]2519 if [[ -d $add_source_path ]] 2518 2520 then 2519 2521 printf "\n\n *** copying files from $check_depository" … … 2524 2526 2525 2527 printf "\n\n *** adding user code." 2526 cp $ working_directory/USER_CODE/$fname/* ./2528 cp $add_source_path/* ./ 2527 2529 touch check_namelist_files.f90 2528 2530 … … 2561 2563 fi 2562 2564 2563 cp $ working_directory/JOBS/$fname/INPUT/${fname}${p3d_suffix}./PARIN2565 cp $filename ./PARIN 2564 2566 if [[ $check_restart == 1 ]] 2565 2567 then 2566 cp $ working_directory/JOBS/$fname/INPUT/${fname}${p3df_suffix}./PARINF2567 fi 2568 2569 2570 if [[ -f $ working_directory/JOBS/$fname/INPUT/${fname}${topo_suffix} && $skip_check == false ]]2568 cp $filenamef ./PARINF 2569 fi 2570 2571 cat ${pathname}/${fname}${topo_suffix} 2572 if [[ -f ${pathname}/${fname}${topo_suffix} && $skip_check == false ]] 2571 2573 then 2572 2574 printf "\n *** adding topography data" 2573 cp $ working_directory/JOBS/$fname/INPUT/${fname}${topo_suffix} ./TOPOGRAPHY_DATA2575 cp ${pathname}/${fname}${topo_suffix} ./TOPOGRAPHY_DATA 2574 2576 2575 2577 # IN CASE OF TOPOGRAPHY AND HIGH GRID POINT NUMBERS, THE STACK SIZE … … 2620 2622 2621 2623 # CHECKING THE P3D FILE 2622 printf "\n\n (1) checking $f name$p3d_suffix"2624 printf "\n\n (1) checking $filename" 2623 2625 echo "$numprocs 0" > VARIN 2624 2626 errors=`./check_namelist_files.x < VARIN 2>&1` … … 2637 2639 if [[ $check_restart == 1 && $check_error == false ]] 2638 2640 then 2639 printf "\n\n (2) checking $f name$p3df_suffix"2641 printf "\n\n (2) checking $filenamef" 2640 2642 2641 2643 # FIRST CHECK IF INITIALIZING_ACTIONS="READ_RESTART_DATA" IS SET IN &INIPAR LIST … … 2711 2713 fi 2712 2714 else 2713 printf "\n\n +++ skipping parameter file check \n"2715 printf "\n\n +++ skipping parameter file check due to following reason: $reason" 2714 2716 fi 2715 2717 … … 2717 2719 rm -rf $check_sources 2718 2720 cd $working_directory 2721 2719 2722 2720 2723 # FALLS AUF DIESER MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE- … … 2876 2879 if [[ $localhost = nech ]] 2877 2880 then 2878 ssh 136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; $module_calls cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2881 # init_cmds was ". /SX/opt/etc/initsx.sh;" 2882 ssh 136.172.44.192 -l $usern "$init_cmds $module_calls cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2879 2883 cp $TEMPDIR_COMPILE/a.out . 2880 2884 [[ $? != 0 ]] && compile_error=true … … 2883 2887 then 2884 2888 printf " compiler is called via ssh on \"plogin1\" \n" 2885 ssh plogin1 -l $usern " export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2889 ssh plogin1 -l $usern "$init_cmds export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2886 2890 [[ ! -f a.out ]] && compile_error=true 2887 2891 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN … … 2889 2893 then 2890 2894 printf " compiler is called via ssh on \"bicegate0\" \n" 2891 ssh bicegate0 -l $usern " . /usr/share/modules/init/bash;$module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2895 ssh bicegate0 -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2892 2896 [[ ! -f a.out ]] && compile_error=true 2893 2897 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN … … 2895 2899 then 2896 2900 printf " compiler is called via ssh on \"hicegate0\" \n" 2897 ssh hicegate0 -l $usern ". /usr/share/modules/init/bash;$module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" 2>&1 "2901 ssh hicegate0 -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" 2>&1 " 2898 2902 [[ ! -f a.out ]] && compile_error=true 2899 2903 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN … … 2901 2905 then 2902 2906 printf " compiler is called via ssh on \"flow\" \n" 2903 ssh flow02.hpc.uni-oldenburg.de -l $usern " . /cm/local/apps/environment-modules/3.2.6/Modules/3.2.6/init/bash; echo $MODULEPATH; echo $MODULESHOME; MODULEPATH=/cm/shared/modulefiles/; module load netcdf/intel/64/4.1.3 intel/ics/64/2011.0.013 intel/impi/64/4.0.1.007 hdf5/intel/64/1.8.7;cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2907 ssh flow02.hpc.uni-oldenburg.de -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2904 2908 [[ ! -f a.out ]] && compile_error=true 2905 2909 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN 2906 2910 else 2907 [[ $localhost = lcx t4 ]] && . /opt/modules/default/init/ksh2911 [[ $localhost = lcxe6 ]] && eval $init_cmds 2908 2912 [[ "$module_calls" != "" ]] && eval $module_calls 2909 2913 make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT="$cpp_options" F90FLAGS="$fopts" LDFLAGS="$lopts" … … 3741 3745 mpirun -np $tasks_per_node inspxe-cl -r result -collect mi3 -- ./a.out < runfile_atmos 3742 3746 fi 3743 elif [[ $host = lcx t4|| $host = lcxt5m ]]3747 elif [[ $host = lcxe6 || $host = lcxt5m ]] 3744 3748 then 3745 3749 aprun -n $ii -N $tasks_per_node a.out $ROPTS < runfile_atmos … … 3780 3784 fi 3781 3785 3782 elif [[ $host = lcx t4|| $host = lcxt5m ]]3786 elif [[ $host = lcxe6 || $host = lcxt5m ]] 3783 3787 then 3784 3788 … … 3813 3817 fi 3814 3818 3815 elif [[ $host = lcx t4|| $host = lcxt5m ]]3819 elif [[ $host = lcxe6 || $host = lcxt5m ]] 3816 3820 then 3817 3821
Note: See TracChangeset
for help on using the changeset viewer.