Changeset 2298 for palm/trunk/SCRIPTS/mrun
- Timestamp:
- Jun 29, 2017 9:28:18 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r2297 r2298 27 27 # ----------------- 28 28 # $Id$ 29 # write_binary in ENVPAR has type LOGICAL now, 30 # MPI2 coupling removed 31 # 32 # 2297 2017-06-28 14:35:57Z scharf 29 33 # adjustments for using lcgeohu (cirrus @ HUB) 30 34 # cpp_opts removed … … 281 285 config_file=.mrun.config 282 286 coupled_dist="" 283 coupled_mode="mpi1"284 287 cpp_options="" 285 288 cpumax=0 … … 686 689 687 690 688 # EVALUATE MODEL COUPLING FEATURES (OPTION -Y) AND DETERMINE coupled_mode691 # EVALUATE MODEL COUPLING FEATURES (OPTION -Y) 689 692 if [[ $run_coupled_model = true ]] 690 693 then … … 703 706 704 707 fi 705 706 707 # GET coupled_mode FROM THE CONFIG FILE708 line=""709 grep "%cpp_options.*-D__mpi2.*$host" $config_file > tmp_mrun710 while read line711 do712 echo line=\"$line\"713 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" && $(echo $line | cut -d" " -s -f4) = $cond1 && $(echo $line | cut -d" " -s -f5) = $cond2 ]]714 then715 coupled_mode="mpi2"716 fi717 done < tmp_mrun718 708 719 709 fi … … 2667 2657 cat > ENVPAR << EOF 2668 2658 &envpar run_identifier = '$fname', host = '$localhost', 2669 write_binary = '$write_binary', tasks_per_node = $tasks_per_node,2659 write_binary = .${write_binary}., tasks_per_node = $tasks_per_node, 2670 2660 maximum_parallel_io_streams = $maximum_parallel_io_streams, 2671 2661 maximum_cpu_time_allowed = ${cpumax}., … … 2811 2801 (( iio = $numprocs_ocean / $threads_per_task )) 2812 2802 printf "\n coupled run ($iia atmosphere, $iio ocean)" 2813 printf "\n using $coupled_mode coupling"2814 2803 printf "\n\n" 2815 2804 echo "coupled_run $iia $iio" > runfile_atmos … … 2847 2836 (( iio = $numprocs_ocean / $threads_per_task )) 2848 2837 printf "\n coupled run ($iia atmosphere, $iio ocean)" 2849 printf "\n using $coupled_mode coupling"2850 2838 printf "\n\n" 2851 2839 echo "coupled_run $iia $iio" > runfile_atmos … … 2969 2957 else 2970 2958 2971 # C URRENTLY THERE IS NO FULL MPI-2 SUPPORT ON ICE AND XT42959 # COUPLED RUN 2972 2960 (( iia = $numprocs_atmos / $threads_per_task )) 2973 2961 (( iio = $numprocs_ocean / $threads_per_task )) 2974 2962 printf "\n coupled run ($iia atmosphere, $iio ocean)" 2975 printf "\n using $coupled_mode coupling"2976 2963 printf "\n\n" 2977 2964 2978 if [[ $coupled_mode = "mpi2" ]] 2965 echo "coupled_run $iia $iio" > runfile_atmos 2966 2967 if [[ $host = lccrayf || $host = lcxe6 || $host = lcxt5m ]] 2979 2968 then 2980 echo "atmosphere_to_ocean $iia $iio" > runfile_atmos 2981 echo "ocean_to_atmosphere $iia $iio" > runfile_ocean 2982 2983 if [[ $host = lccrayf || $host = lcxe6 || $host = lcxt5m ]] 2984 then 2985 2986 aprun -n $iia -N $tasks_per_node a.out < runfile_atmos & 2987 aprun -n $iio -N $tasks_per_node a.out < runfile_ocean & 2988 2989 else 2990 # WORKAROUND BECAUSE mpiexec WITH -env option IS NOT AVAILABLE ON SOME SYSTEMS 2991 mpiexec -machinefile hostfile -n $iia a.out < runfile_atmos & 2992 mpiexec -machinefile hostfile -n $iio a.out < runfile_ocean & 2993 # mpiexec -machinefile hostfile -n $iia -env coupling_mode atmosphere_to_ocean a.out & 2994 # mpiexec -machinefile hostfile -n $iio -env coupling_mode ocean_to_atmosphere a.out & 2995 fi 2996 wait 2997 2998 else 2999 3000 echo "coupled_run $iia $iio" > runfile_atmos 3001 3002 if [[ $host = lccrayf || $host = lcxe6 || $host = lcxt5m ]] 3003 then 3004 3005 aprun -n $ii -N $tasks_per_node a.out < runfile_atmos 3006 3007 elif [[ $host = lck || $host = lckordi ]] 3008 then 3009 3010 mpiexec -n $ii ./a.out < runfile_atmos & 3011 3012 elif [[ $host = lckyu* ]] 3013 then 3014 3015 mpiexec -n $ii --stdin runfile_atmos ./a.out 3016 3017 elif [[ $host = lcmuk ]] 3018 then 3019 3020 mpiexec -machinefile hostfile -n $ii a.out < runfile_atmos 3021 3022 fi 3023 wait 2969 2970 aprun -n $ii -N $tasks_per_node a.out < runfile_atmos 2971 2972 elif [[ $host = lck || $host = lckordi ]] 2973 then 2974 2975 mpiexec -n $ii ./a.out < runfile_atmos & 2976 2977 elif [[ $host = lckyu* ]] 2978 then 2979 2980 mpiexec -n $ii --stdin runfile_atmos ./a.out 2981 2982 elif [[ $host = lcmuk ]] 2983 then 2984 2985 mpiexec -machinefile hostfile -n $ii a.out < runfile_atmos 2986 3024 2987 fi 2988 wait 3025 2989 3026 2990 fi
Note: See TracChangeset
for help on using the changeset viewer.