Changeset 2298 for palm/trunk/SCRIPTS


Ignore:
Timestamp:
Jun 29, 2017 9:28:18 AM (7 years ago)
Author:
raasch
Message:

write_binary is of type LOGICAL now, MPI2-related code removed, obsolete variables removed, sendrecv_in_background related parts removed, missing variable descriptions added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mrun

    r2297 r2298  
    2727# -----------------
    2828# $Id$
     29# write_binary in ENVPAR has type LOGICAL now,
     30# MPI2 coupling removed
     31#
     32# 2297 2017-06-28 14:35:57Z scharf
    2933# adjustments for using lcgeohu (cirrus @ HUB)
    3034# cpp_opts removed
     
    281285 config_file=.mrun.config
    282286 coupled_dist=""
    283  coupled_mode="mpi1"
    284287 cpp_options=""
    285288 cpumax=0
     
    686689
    687690
    688       # EVALUATE MODEL COUPLING FEATURES (OPTION -Y) AND DETERMINE coupled_mode
     691      # EVALUATE MODEL COUPLING FEATURES (OPTION -Y)
    689692 if [[ $run_coupled_model = true ]]
    690693 then
     
    703706
    704707    fi
    705 
    706 
    707        # GET coupled_mode FROM THE CONFIG FILE
    708     line=""
    709     grep  "%cpp_options.*-D__mpi2.*$host" $config_file  >  tmp_mrun
    710     while read line
    711     do
    712        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        then
    715           coupled_mode="mpi2"
    716        fi
    717     done < tmp_mrun
    718708
    719709 fi
     
    26672657    cat  >  ENVPAR  <<  EOF
    26682658 &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,
    26702660          maximum_parallel_io_streams = $maximum_parallel_io_streams,
    26712661          maximum_cpu_time_allowed = ${cpumax}.,
     
    28112801                         (( iio = $numprocs_ocean / $threads_per_task ))
    28122802                         printf "\n      coupled run ($iia atmosphere, $iio ocean)"
    2813                          printf "\n      using $coupled_mode coupling"
    28142803                         printf "\n\n"
    28152804                         echo "coupled_run $iia $iio"  >  runfile_atmos
     
    28472836                         (( iio = $numprocs_ocean / $threads_per_task ))
    28482837                         printf "\n      coupled run ($iia atmosphere, $iio ocean)"
    2849                          printf "\n      using $coupled_mode coupling"
    28502838                         printf "\n\n"
    28512839                         echo "coupled_run $iia $iio"  >  runfile_atmos
     
    29692957                else
    29702958
    2971                        # CURRENTLY THERE IS NO FULL MPI-2 SUPPORT ON ICE AND XT4
     2959                       # COUPLED RUN
    29722960                   (( iia = $numprocs_atmos / $threads_per_task ))
    29732961                   (( iio = $numprocs_ocean / $threads_per_task ))
    29742962                   printf "\n      coupled run ($iia atmosphere, $iio ocean)"
    2975                    printf "\n      using $coupled_mode coupling"
    29762963                   printf "\n\n"
    29772964
    2978                    if [[ $coupled_mode = "mpi2" ]]
     2965                   echo "coupled_run $iia $iio"  >  runfile_atmos
     2966
     2967                   if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
    29792968                   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
    30242987                   fi
     2988                   wait
    30252989
    30262990                fi
Note: See TracChangeset for help on using the changeset viewer.