Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 101)
+++ palm/trunk/SCRIPTS/mrun	(revision 102)
@@ -120,4 +120,8 @@
      #                     removed (incl. option -f)
      # 19/06/07 - Siggi  - time limit for cdata jobs increased
+     # 25/07/07 - Siggi  - two sets of executables can be started on lcmuk,
+     #                     if new option -Y (coupling) is given,
+     #                     output of executables to aout_output removed,
+     #                     messages are immediately written to stdout instead
 
 
@@ -207,4 +211,5 @@
  remotecall=false
  remote_username=""
+ run_coupled_model=false
  run_mode=""
  scirocco=false
@@ -226,5 +231,5 @@
 
  typeset -i  iec=0 iic=0 iin=0 ioc=0 iout=0 memory=0 stagein_anz=0 stageout_anz=0
- typeset -i  cputime i ii icycle inode ival jobges jobsek maxcycle minuten nodes pes sekunden tp1
+ typeset -i  cputime i ii iii icycle inode ival jobges jobsek maxcycle minuten nodes pes sekunden tp1
 
  typeset  -R30 calltime
@@ -344,5 +349,5 @@
     # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES
     # FUER FOLGEJOBS BENOETIGT WIRD
- while  getopts  :a:AbBc:Cd:D:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX: option
+ while  getopts  :a:AbBc:Cd:D:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX:Y option
  do
    case  $option  in
@@ -382,4 +387,5 @@
        (x)   do_trace=true;set -x; mc="$mc -x";;
        (X)   numprocs=$OPTARG; mc="$mc -X$OPTARG";;
+       (Y)   run_coupled_model=true; mc="$mc -Y";;
        (\?)  printf "\n  +++ unknown option $OPTARG \n"
              printf "\n  --> type \"$0 ?\" for available options \n"
@@ -436,4 +442,5 @@
     printf "\n        -x    tracing of mrun for debug purposes       ---"
     printf "\n        -X    # of processors (on parallel machines)   1"
+    printf "\n        -Y    run coupled model                        ---"
     printf "\n "
     printf "\n      Possible values of positional parameter <modus>:"
@@ -2618,12 +2625,12 @@
                 if [[ "$cond1" = hpmcount  ||  "$cond2" = hpmcount ]]
                 then
-                   /opt/optibm/HPM_2_4_1/bin/hpmcount  a.out  $ROPTS  >  aout_output  2>&1
+                   /opt/optibm/HPM_2_4_1/bin/hpmcount  a.out  $ROPTS
                 else
-                   poe ./a.out  $ROPTS  >  aout_output  2>&1
+                   poe ./a.out  $ROPTS
                 fi
              else
                 if [[ $localhost = ibmb  ||  $localhost = ibmh  ||  $localhost = ibms ]]
                 then
-                   poe  a.out  -procs $numprocs  -nodes 1  -rmpool 0  $ROPTS  >  aout_output  2>&1
+                   poe  a.out  -procs $numprocs  -nodes 1  -rmpool 0  $ROPTS
                 elif [[ $localhost = ibmy ]]
                 then
@@ -2640,5 +2647,5 @@
                    fi
                    export MP_HOSTFILE=hostfile
-                   ./a.out  -procs $tasks_per_node  $ROPTS  >  aout_output  2>&1
+                   ./a.out  -procs $tasks_per_node  $ROPTS
                 else
                    if [[ "$host_file" = "" ]]
@@ -2651,5 +2658,5 @@
                    fi
                    export MP_HOSTFILE=$host_file
-                   poe  a.out  -procs $numprocs  -tasks_per_node $numprocs  $ROPTS  >  aout_output  2>&1
+                   poe  a.out  -procs $numprocs  -tasks_per_node $numprocs  $ROPTS
                 fi
              fi
@@ -2663,5 +2670,5 @@
                 #  export F_TRACE=YES|FMT1|FMT2  # output of ftrace informations to job protocol
                 echo "*** execution on single node with mpirun"
-                mpirun  -np $numprocs  ./a.out  $ROPTS  >  aout_output  2>&1
+                mpirun  -np $numprocs  ./a.out  $ROPTS
              else
                 (( i = 0 ))
@@ -2699,5 +2706,5 @@
                 echo "export use_seperate_pe_for_dvrp_output"  >>  mpi_exec_shell
                 echo " "                                 >>  mpi_exec_shell
-                echo "exec  ./a.out > aout_output  2>&1" >>  mpi_exec_shell
+                echo "exec  ./a.out"                     >>  mpi_exec_shell
 
                 chmod u+x  mpi_exec_shell
@@ -2731,14 +2738,27 @@
                 printf "\n      threads per task: $threads_per_task"
              fi
-             printf "\n\n"
-             if [[ $scirocco = true ]]
-             then
-                mpiexec  -machinefile hostfile  -n $ii  a.out  $ROPTS   >  aout_output  2>&1
+             if [[ $run_coupled_model = false ]]
+             then
+                printf "\n\n"
+                mpiexec  -machinefile hostfile  -n $ii  a.out  $ROPTS
              else
-                mpirun  -machinefile hostfile  -np $ii  a.out  $ROPTS   >  aout_output  2>&1
-             fi
+                ((  iii = ii / 2 ))
+                printf "\n      coupled run ($iii atmosphere, $iii ocean)"
+                printf "\n\n"
+                mpiexec  -machinefile hostfile  -n $iii  -env coupling_mode atmosphere_to_ocean  a.out  $ROPTS  &
+                mpiexec  -machinefile hostfile  -n $iii  -env coupling_mode ocean_to_atmosphere  a.out  $ROPTS  &
+                wait
+             fi
+
+#             if [[ $scirocco = true ]]
+#             then
+#                mpiexec  -machinefile hostfile  -n $ii  a.out  $ROPTS
+#             else
+#                mpirun  -machinefile hostfile  -np $ii  a.out  $ROPTS
+#             fi
+
           elif [[ $host = decalpha ]]
           then
-             dmpirun  -np $numprocs  a.out  $ROPTS  >  aout_output  2>&1
+             dmpirun  -np $numprocs  a.out  $ROPTS
           elif [[ $host = lctit ]]
           then
@@ -2760,12 +2780,12 @@
              if [[ "$QUEUE" = interactive ]]
              then
-                mpirun  -np $numprocs  a.out  $ROPTS  >  aout_output  2>&1
+                mpirun  -np $numprocs  a.out  $ROPTS
              else
-                n1ge  -fore  -g 1S060156  -mpi $numprocs  -mem 4  -N palm  -q $queue  a.out  $ROPTS  >  aout_output  2>&1
+                n1ge  -fore  -g 1S060156  -mpi $numprocs  -mem 4  -N palm  -q $queue  a.out  $ROPTS
              fi
 
              rm  $runfile
           else
-             mpprun  -n $numprocs  a.out  $ROPTS  >  aout_output  2>&1
+             mpprun  -n $numprocs  a.out  $ROPTS
           fi
           [[ $? != 0 ]]  &&  execution_error=true
@@ -2778,5 +2798,5 @@
           fi
        else
-          a.out  $ROPTS  >  aout_output  2>&1
+          a.out  $ROPTS
        fi
     fi
@@ -2785,10 +2805,10 @@
 
           # ABBRUCH BEI LAUFZEITFEHLER
-       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output
+#       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output*
        printf "\n  +++ runtime error occured"
        locat=execution
        exit
     else
-       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output
+#       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output*
        printf "\n$striche\n  *** execution finished \n"
     fi
@@ -3544,4 +3564,5 @@
     [[ $delete_temporary_catalog = false ]]  &&  mrun_com=${mrun_com}" -B"
     [[ $node_usage != default ]]  &&  mrun_com=${mrun_com}" -n $node_usage"
+    [[ $run_coupled_model = true ]]  &&  mrun_com=${mrun_com}" -Y"
     if [[ $do_remote = true ]]
     then
Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 101)
+++ palm/trunk/SCRIPTS/subjob	(revision 102)
@@ -82,4 +82,5 @@
      # 01/03/07 - Siggi - adjustments for RIAM machines gate and NEC-SX8 (n-sx)
      # 12/04/07 - Siggi - option -f (filetransfer protocol) removed, scp only
+     # 27/07/07 - Siggi - autan admitted
 
 
@@ -144,4 +145,5 @@
  case  $local_host  in
      (atmos)                 local_addres=172.20.25.35;   local_host=lcide;;
+     (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
      (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
      (breg*-en0|berni*-en0)  local_addres=130.73.230.10;  local_host=ibmb;;
