Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 2297)
+++ palm/trunk/SCRIPTS/mrun	(revision 2298)
@@ -27,4 +27,8 @@
 # -----------------
 # $Id$
+# write_binary in ENVPAR has type LOGICAL now,
+# MPI2 coupling removed
+# 
+# 2297 2017-06-28 14:35:57Z scharf
 # adjustments for using lcgeohu (cirrus @ HUB)
 # cpp_opts removed
@@ -281,5 +285,4 @@
  config_file=.mrun.config
  coupled_dist=""
- coupled_mode="mpi1"
  cpp_options=""
  cpumax=0
@@ -686,5 +689,5 @@
 
 
-      # EVALUATE MODEL COUPLING FEATURES (OPTION -Y) AND DETERMINE coupled_mode
+      # EVALUATE MODEL COUPLING FEATURES (OPTION -Y)
  if [[ $run_coupled_model = true ]] 
  then
@@ -703,17 +706,4 @@
 
     fi
-
-
-       # GET coupled_mode FROM THE CONFIG FILE
-    line=""
-    grep  "%cpp_options.*-D__mpi2.*$host" $config_file  >  tmp_mrun
-    while read line
-    do
-       echo line=\"$line\"
-       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" &&  $(echo $line | cut -d" " -s -f4) = $cond1 && $(echo $line | cut -d" " -s -f5)  = $cond2 ]]
-       then
-          coupled_mode="mpi2"
-       fi
-    done < tmp_mrun
 
  fi
@@ -2667,5 +2657,5 @@
     cat  >  ENVPAR  <<  EOF
  &envpar  run_identifier = '$fname', host = '$localhost',
-          write_binary = '$write_binary', tasks_per_node = $tasks_per_node,
+          write_binary = .${write_binary}., tasks_per_node = $tasks_per_node,
           maximum_parallel_io_streams = $maximum_parallel_io_streams,
           maximum_cpu_time_allowed = ${cpumax}.,
@@ -2811,5 +2801,4 @@
                          (( iio = $numprocs_ocean / $threads_per_task ))
                          printf "\n      coupled run ($iia atmosphere, $iio ocean)"
-                         printf "\n      using $coupled_mode coupling"
                          printf "\n\n"
                          echo "coupled_run $iia $iio"  >  runfile_atmos
@@ -2847,5 +2836,4 @@
                          (( iio = $numprocs_ocean / $threads_per_task ))
                          printf "\n      coupled run ($iia atmosphere, $iio ocean)"
-                         printf "\n      using $coupled_mode coupling"
                          printf "\n\n"
                          echo "coupled_run $iia $iio"  >  runfile_atmos
@@ -2969,58 +2957,34 @@
                 else
 
-                       # CURRENTLY THERE IS NO FULL MPI-2 SUPPORT ON ICE AND XT4
+                       # COUPLED RUN
                    (( iia = $numprocs_atmos / $threads_per_task ))
                    (( iio = $numprocs_ocean / $threads_per_task ))
                    printf "\n      coupled run ($iia atmosphere, $iio ocean)"
-                   printf "\n      using $coupled_mode coupling"
                    printf "\n\n"
 
-                   if [[ $coupled_mode = "mpi2" ]]
+                   echo "coupled_run $iia $iio"  >  runfile_atmos
+
+                   if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
                    then
-                      echo "atmosphere_to_ocean $iia $iio"  >  runfile_atmos
-                      echo "ocean_to_atmosphere $iia $iio"  >  runfile_ocean
-
-                      if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
-                      then
-
-                         aprun  -n $iia  -N $tasks_per_node  a.out < runfile_atmos  &
-                         aprun  -n $iio  -N $tasks_per_node  a.out < runfile_ocean  &
-
-                      else
-                             # WORKAROUND BECAUSE mpiexec WITH -env option IS NOT AVAILABLE ON SOME SYSTEMS
-                          mpiexec  -machinefile hostfile  -n $iia  a.out  <  runfile_atmos &
-                          mpiexec  -machinefile hostfile  -n $iio  a.out  <  runfile_ocean &
-#                          mpiexec  -machinefile hostfile  -n $iia  -env coupling_mode atmosphere_to_ocean  a.out  &
-#                          mpiexec  -machinefile hostfile  -n $iio  -env coupling_mode ocean_to_atmosphere  a.out  &
-                      fi
-                      wait
-
-                   else
-
-                      echo "coupled_run $iia $iio"  >  runfile_atmos
-
-                      if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
-                      then
-
-                         aprun  -n $ii  -N $tasks_per_node  a.out < runfile_atmos
-
-                      elif [[ $host = lck || $host = lckordi ]]
-                      then
-
-                         mpiexec -n $ii  ./a.out  <  runfile_atmos  &
-
-                      elif [[ $host = lckyu* ]]
-                      then
-
-                         mpiexec -n $ii --stdin runfile_atmos  ./a.out
-
-                      elif [[ $host = lcmuk ]] 
-                      then
-
-                         mpiexec  -machinefile hostfile  -n $ii  a.out  <  runfile_atmos
-
-                      fi
-                      wait
+
+                      aprun  -n $ii  -N $tasks_per_node  a.out < runfile_atmos
+
+                   elif [[ $host = lck || $host = lckordi ]]
+                   then
+
+                      mpiexec -n $ii  ./a.out  <  runfile_atmos  &
+
+                   elif [[ $host = lckyu* ]]
+                   then
+
+                      mpiexec -n $ii --stdin runfile_atmos  ./a.out
+
+                   elif [[ $host = lcmuk ]] 
+                   then
+
+                      mpiexec  -machinefile hostfile  -n $ii  a.out  <  runfile_atmos
+
                    fi
+                   wait
 
                 fi
