Index: palm/trunk/SCRIPTS/mbuild
===================================================================
--- palm/trunk/SCRIPTS/mbuild	(revision 597)
+++ palm/trunk/SCRIPTS/mbuild	(revision 622)
@@ -112,4 +112,7 @@
      #                    for lcxt4
      # 07/09/10 - Siggi - bugfix for wrong netcdf/3.6.3 module on lcsgi
+     # 08/12/10 - Siggi - initialization of the module command changed for
+     #                    SGI-ICE/lcsgi
+     #                    adjustments for Kyushu Univ. (lcrte, ibmku)
 
 
@@ -464,4 +467,5 @@
     case  $remote_host  in
         (lcmuk)          remote_addres=130.75.105.2;;
+        (lcrte)          remote_addres=133.5.185.60;;
         (lcsgib)         remote_addres=130.73.232.102;;
         (lcsgih)         remote_addres=130.75.4.102;;
@@ -472,4 +476,5 @@
         (decalpha)       remote_addres=165.132.26.56;;
         (ibmh)           remote_addres=136.172.40.15;;
+        (ibmku)          remote_addres=133.5.4.129;;
         (ibms)           remote_addres=150.183.5.101;;
         (ibmy)           remote_addres=165.132.26.58;;
@@ -1063,5 +1068,6 @@
           then
 
-             print ". /usr/share/modules/init/bash; $module_calls  cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
+#             print ". /usr/share/modules/init/bash; $module_calls  cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
+             print "eval \`/sw/swdist/bin/modulesinit\`; $module_calls  cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
 
           elif [[ $remote_host = lctit ]]
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 597)
+++ palm/trunk/SCRIPTS/mrun	(revision 622)
@@ -210,4 +210,7 @@
      # 17/08/10 - BjornM - adjustments for interactive runs on lcxt4
      # 07/09/10 - Siggi  - bugfix for wrong netcdf/3.6.3 module on lcsgi
+     # 08/12/10 - Siggi  - new handling of openmp/hybrid runs, option -O
+     #                     has now argument threads_per_task
+     #                     adjustments for Kyushu Univ. (lcrte, ibmku)
 
 
@@ -290,9 +293,10 @@
  read_from_config=""
  restart_run=false
- return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
- if [[ $return_addres = 130.75.105.158 ]]
- then
-    return_addres=172.20.25.41
-    echo "+++ WARNING: return_addres changed to $return_addres !!!!!"
+ if [[ `hostname` = rte10 ]]
+ then
+   return_addres=133.5.185.60
+   echo "+++ WARNING: return_addres changed to $return_addres !!!!!"
+ else
+    return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
  fi
  return_password=""
@@ -450,5 +454,5 @@
     # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES
     # FUER FOLGEJOBS BENOETIGT WIRD
- while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX:yY: option
+ while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vxX:yY: option
  do
    case  $option  in
@@ -474,5 +478,5 @@
        (n)   node_usage=$OPTARG; mc="$mc -n$OPTARG";; 
        (o)   output_list=$OPTARG; mc="$mc -o'$OPTARG'";;
-       (O)   use_openmp=true; mc="$mc -O";;
+       (O)   use_openmp=true; threads_per_task=$OPTARG; mc="$mc -O$OPTARG";;
        (p)   package_list=$OPTARG; mc="$mc -p'$OPTARG'";;
        (P)   return_password=$OPTARG; mc="$mc -P$OPTARG";;
@@ -658,5 +662,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmb|ibmh|ibms|ibmy|nech|necriam|lckyoto|lcsgib|lcsgih|lctit|unics|lcxt4|lcxt5m|lck)  true;;
+        (ibm|ibmh|ibmku|ibms|ibmy|nech|necriam|lckyoto|lcsgib|lcsgih|lctit|unics|lcxt4|lcxt5m|lck)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -835,5 +839,5 @@
                    do_remote=true
                    case  $host  in
-                       (ibm|ibms|ibmy|lckyoto|lcsgib|lcsgih|lctit|nech|necriam|unics|lcxt4|lcxt5m|lck)  true;;
+                       (ibm|ibmh|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|lctit|nech|necriam|unics|lcxt4|lcxt5m|lck)  true;;
                        (*)  printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
                             printf "\n      is not available"
@@ -1117,5 +1121,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmb|ibmh|ibms|ibmy|lckyoto|lcsgib|lcsgih|lctit|nech|necriam|unics|lcxt4|lcxt5m|lck)  true;;
+        (ibm|ibmh|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|lctit|nech|necriam|unics|lcxt4|lcxt5m|lck)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -1146,5 +1150,5 @@
        # DEFAULT-WERT SETZEN) UND OB SIE EIN GANZZAHLIGER TEILER DER
        # GESAMTPROZESSORANZAHL IST
-    if [[ $host = nech  ||  $host = necriam  ||  $host = ibmh  ||  $host = ibmb  ||  $host = ibms ]]
+    if [[ $host = nech  ||  $host = necriam  ||  $host = ibmh  ||  $host = ibms ]]
     then
        [[ "$tasks_per_node" = "" ]]  &&  tasks_per_node=6
@@ -1181,18 +1185,12 @@
        # FALLS OPENMP PARALLELISIERUNG VERWENDET WERDEN SOLL, ANZAHL VON THREADS
        # SETZEN UND ZAHL DER TASKS PRO KNOTEN AUF 1 SETZEN
-    if [[ $use_openmp = true ]]
-    then
-       threads_per_task=$tasks_per_node
-       tasks_per_node=1
-    fi
+#    if [[ $use_openmp = true ]]
+#    then
+#       threads_per_task=$tasks_per_node
+#       tasks_per_node=1
+#    fi
 
        # SETTINGS FOR SUBJOB-COMMAND
-    if [[ $(echo $host | cut -c1-5) = lcsgi ]]
-    then
-       (( tp1 = tasks_per_node * threads_per_task ))
-       TOPT="-T $tp1"
-    else
-       TOPT="-T $tasks_per_node"
-    fi
+    TOPT="-T $tasks_per_node"
     OOPT="-O $threads_per_task"
 
@@ -1267,10 +1265,4 @@
  then
     case  $host  in
-        (ibmb)       if [[ $node_usage = shared ]]
-                     then
-                        queue=cshare
-                     else
-                        queue=csolo
-                     fi;;
         (ibmh)       queue=no_class;;
         (ibmy)       queue=parallel;;
@@ -2020,8 +2012,5 @@
  if [[ "$tmp_data_catalog" = "" ]]
  then
-    if [[ $localhost = ibmb ]]
-    then
-       tmp_data_catalog=$WORK/mrun_restart_data
-    elif [[ $localhost = nech ]]
+    if [[ $localhost = nech ]]
     then
        tmp_data_catalog=$WRKSHR/mrun_restart_data
@@ -2178,5 +2167,5 @@
     printf "| $spalte1$spalte2 | \n"
  fi
- if [[ $threads_per_task != 1 ]]
+ if [[ $use_openmp = true ]]
  then
     spalte1="threads per task:"; spalte2="$threads_per_task"
@@ -3005,5 +2994,5 @@
        then
           dxladebug  a.out
-       elif [[ $localhost = ibmb  ||  $localhost = ibmh ]]
+       elif [[ $localhost = ibmh ]]
        then
 
@@ -3087,5 +3076,9 @@
           exit
        fi
+
+       # end debug mode
     else
+
+          # normal execution
        if [[ -n $numprocs ]]
        then
@@ -3135,8 +3128,8 @@
                 fi
              else
-                if [[ $localhost = ibmb  ||  $localhost = ibmh  ||  $localhost = ibms ]]
+                if [[ $localhost = ibmh  ||  $localhost = ibms ]]
                 then
                    poe  a.out  -procs $numprocs  -nodes 1  -rmpool 0  $ROPTS
-                elif [[ $localhost = ibmy ]]
+                elif [[ $localhost = ibmku  ||  $localhost = ibmy ]]
                 then
                    if [[ -f $hostfile ]]
@@ -3168,5 +3161,10 @@
                       echo "coupled_run $iia $iio"  >  runfile_atmos
                    fi
-                   ./a.out  -procs $tasks_per_node  $ROPTS  <  runfile_atmos
+                   if [[ $localhost = ibmy ]]
+                   then
+                      ./a.out  -procs $tasks_per_node  $ROPTS  <  runfile_atmos
+                   else
+                      poe  ./a.out  -procs $numprocs $ROPTS  <  runfile_atmos 
+                   fi
 
                 else
@@ -3292,4 +3290,6 @@
                             export MPI_DSM_CPULIST="0,1,4,5,2,3,6,7:allhosts"
                          fi
+                      else
+                         unset MPI_DSM_CPULIST
                       fi
                           # MPI_IB_RAILS: use both IB rails on ICE2
@@ -3304,5 +3304,6 @@
 
                           # next is test for openmp usage
-                      # mpiexec -n $ii -pernode  ./a.out  $ROPTS  < runfile_atmos
+                  #     echo "mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  < runfile_atmos"
+                  #     mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  < runfile_atmos
                    elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
                    then
@@ -3317,8 +3318,9 @@
                #          export MV2_CPU_MAPPING=0,1,4,5,2,3,6,7
                #       fi
+                      [[ $use_openmp = true ]]  &&  unset MV2_CPU_MAPPING
                       echo "*** MV2_CPU_MAPPING=$MV2_CPU_MAPPING"
-                      if [[ $threads_per_task != 1 ]]
+                      if [[ $use_openmp = true ]]
                       then
-                         mpiexec -npernode 1  ./a.out  $ROPTS  <  runfile_atmos
+                         mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  <  runfile_atmos
                       else
                          mpiexec -np $ii  ./a.out  $ROPTS  < runfile_atmos
@@ -3636,5 +3638,5 @@
                    cst="/"
                 fi
-                if [[ $localhost = ibmb  ||  $localhost = nech ]]
+                if [[ $localhost = nech ]]
                 then
 
@@ -3717,5 +3719,5 @@
              if [[ $localhost != $fromhost ]]
              then
-                if [[ $localhost = ibmh  ||  $localhost = ibmb  ||  $localhost = nech ]]
+                if [[ $localhost = ibmh  ||  $localhost = nech ]]
                 then
 
@@ -4231,5 +4233,5 @@
           then
 
-             if [[ $localhost = lcsgih  ||  $localhost = lcsgib  ||  $localhost = nech  ||  $localhost = ibmb  ||  $localhost = ibmh  ||  $localhost = ibms  ||  $localhost = lctit ]]
+             if [[ $localhost = lcsgih  ||  $localhost = lcsgib  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lctit ]]
              then
                 echo "*** ssh will be used to initiate restart-runs!"
@@ -4348,9 +4350,7 @@
     if [[ $use_openmp = true ]]
     then
-       mrun_com=${mrun_com}" -O"
-       [[ "$tasks_per_node" != "" ]] &&  mrun_com=${mrun_com}" -T $threads_per_task"
-    else
-       [[ "$tasks_per_node" != "" ]] &&  mrun_com=${mrun_com}" -T $tasks_per_node"
-    fi
+       mrun_com=${mrun_com}" -O $threads_per_task"
+    fi
+    [[ "$tasks_per_node" != "" ]] &&  mrun_com=${mrun_com}" -T $tasks_per_node"
     [[ $store_on_archive_system = true ]]  &&  mrun_com=${mrun_com}" -A"
     [[ $package_list != "" ]]     &&  mrun_com=${mrun_com}" -p \"$package_list\""
Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 597)
+++ palm/trunk/SCRIPTS/subjob	(revision 622)
@@ -121,4 +121,7 @@
      # 25/08/10 - Siggi - new variable project_account in pbs-statements for
      #                    lcxt4
+     # 08/12/10 - Siggi - initialization of the module command changed for
+     #                    SGI-ICE/lcsgi
+     #                    adjustments for Kyushu Univ. (lcrte, ibmku)
 
 
@@ -144,5 +147,5 @@
 
  typeset  -i   cputime=0  memory=0  Memory=0  minuten  resttime  sekunden  stunden
- typeset  -i   inumprocs  nodes=0  tasks_per_node=0  threads_per_task=1
+ typeset  -i   inumprocs  nodes=0  processes_per_node=0 tasks_per_node=0  threads_per_task=1
  typeset  -L20 spalte1
  typeset  -R40 spalte2
@@ -194,5 +197,4 @@
      (b01*|bicegate1)        local_addres=130.73.232.102; local_host=lcsgib;;
      (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
-     (breg*-en0|berni*-en0)  local_addres=130.73.230.10;  local_host=ibmb;;
      (breva)                 local_addres=130.75.105.98;  local_host=lcmuk;;
      (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
@@ -228,4 +230,5 @@
      (paesano)               local_addres=130.75.105.46;  local_host=lcmuk;;
      (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
+     (rte*)                  local_addres=133.5.185.60;   local_host=lcrte;;
      (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
      (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
@@ -235,4 +238,5 @@
      (tgg*)                  local_addres=172.17.75.161;  local_host=lctit;;
      (vorias)                local_addres=172.20.25.43;   local_host=lcmuk;;
+     (*.cc.kyushu-u.ac.jp)   local_addres=133.5.4.129;    local_host=ibmku;;
      (*)                     printf "\n  +++ \"$local_host\" unknown";
                              printf "\n      please inform S. Raasch!";
@@ -289,5 +293,5 @@
     printf "\n        -D    only the job-file will be created   ---"
     printf "\n        -h    execution host, available hosts:    $remote_host"
-    printf "\n              ibm, ibmb, ibmh, ibms, ibmy, lcmuk,"
+    printf "\n              ibm, ibmh, ibmku, ibms, ibmy, lc...,"
     printf "\n              lctit, nech, necriam, unics"
     printf "\n        -m    memory demand per process in MByte  ---"
@@ -354,6 +358,6 @@
     case  $remote_host  in
         (ibm)     queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibmb)    queue=cpar; remote_addres=130.73.230.10; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
         (ibmh)    queue=no_class; remote_addres=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibmku)   queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
         (ibms)    queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
         (ibmy)    queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
@@ -386,10 +390,10 @@
                      (*)                                     error=true;;
                  esac;;
-        (ibmb)   case  $ndq  in
-                     (cdata|cdev|cexp|c1|cshare|csolo|cspec) error=false;;
+        (ibmh)   case  $ndq  in
+                     (no_class)  error=false;;
                      (*)                                     error=true;;
                  esac;;
-        (ibmh)   case  $ndq  in
-                     (no_class)  error=false;;
+        (ibmku)  case  $ndq  in
+                     (sdbg1|sdbg2|sdbg4|s4|s16|s32|s32-s)    error=false;;
                      (*)                                     error=true;;
                  esac;;
@@ -450,12 +454,4 @@
 
 
-    # KNOTENNUTZUNG IN ENTWICKLERQUEUE MUSS SHARED SEIN
- if [[ $node_usage != shared  &&  $queue = cdev ]]
- then
-    node_usage=shared
- fi
-
-
-
     # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN
     # AUFTEILEN
@@ -530,12 +526,9 @@
  if (( tasks_per_node != 0 ))
  then
-    if [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
-    then
-       (( nodes = numprocs / tasks_per_node ))
-    else
-       (( nodes = numprocs / ( tasks_per_node * threads_per_task ) ))
-    fi
- fi
-
+    (( nodes = numprocs / ( tasks_per_node * threads_per_task ) ))
+ fi
+
+    # Calculate number of processes per node
+ (( processes_per_node = tasks_per_node * threads_per_task ))
 
 
@@ -597,14 +590,18 @@
 
 
-    # QSUB- ODER LL-KOMMANDOS BZW. SKRIPTE  GENERIEREN
+    # Generate the batch job scripts (qsub/msub/LoadLeveler)
  if [[ $(echo $remote_host | cut -c1-3) = ibm  &&  $numprocs != 0 ]]
  then
 
-    if [[ $remote_host = ibmy ]]
-    then
-       consumable_memory=""
-    else
-       consumable_memory="ConsumableMemory($memory mb)"
-    fi
+       # General LoadLeveler settings
+    execute_in_shell="#!/bin/ksh"
+    use_shell="# @ shell = /bin/ksh"
+    consumable_memory="ConsumableMemory($memory mb)"
+    class="# @ class = $queue"
+    environment="# @ environment = OMP_NUM_THREADS=$threads_per_task; MP_SHARED_MEMORY=yes"
+    network_to_use="# @ network.mpi = sn_all,shared,us"
+    data_limit="# @ data_limit = 1.76gb"
+    image_size="# @ image_size = 50"
+
 
     if [[ $remote_host = ibmh ]]
@@ -614,28 +611,25 @@
        class=""
        environment=""
-    else
-       class="# @ class = $queue"
-       environment="# @ environment = OMP_NUM_THREADS=$threads_per_task; MP_SHARED_MEMORY=yes"
-       if [[ $queue = cdev ]]
-       then
-          data_limit="# @ data_limit = 1.76gb"
-          network_to_use="# @ network.mpi = sn_all,shared,ip"
-       else
-          if [[ $remote_host = ibms ]]
-          then
-             network_to_use="# @ network.mpi = csss,shared,us"
-          elif [[ $remote_host = ibmy ]]
-          then
-             network_to_use=""
-          else
-             network_to_use="# @ network.mpi = sn_all,shared,us"
-             data_limit="# @ data_limit = 1.76gb"
-          fi
-       fi
+    elif [[ $remote_host = ibmku ]]
+    then
+       execute_in_shell="#!/usr/bin/ksh"
+       use_shell="# @ shell = /usr/bin/ksh"
+       consumable_memory=""
+       environment=""
+       network_to_use="# @ network.mpi = sn_all,shared,us"
+       data_limit=""
+       image_size=""
+    elif [[ $remote_host = ibms ]]
+    then
+       network_to_use="# @ network.mpi = csss,shared,us"
+    elif [[ $remote_host = ibmy ]]
+    then
+       consumable_memory=""
+       network_to_use=""
     fi
 
     cat > $job_to_send << %%END%%
-#!/bin/ksh
-# @ shell = /bin/ksh
+$execute_in_shell
+$use_shell
 
 # @ job_type = parallel
@@ -645,5 +639,5 @@
 # @ output = $remote_dayfile
 # @ error = $remote_dayfile
-# @ image_size = 50
+$image_size
 $class
 $environment
@@ -659,5 +653,5 @@
        cat >> $job_to_send << %%END%%
 # @ node = $nodes
-# @ tasks_per_node = $tasks_per_node
+# @ tasks_per_node = $processes_per_node
 # @ node_usage = $node_usage
 # @ queue
@@ -721,5 +715,5 @@
 #PBS -A $project_account
 #PBS -l walltime=$timestring
-#PBS -l nodes=${nodes}:ppn=$tasks_per_node
+#PBS -l nodes=${nodes}:ppn=$processes_per_node
 #PBS -l pmem=${memory}mb
 #PBS -m abe
@@ -813,5 +807,5 @@
 #PBS -N $job_name
 #PBS -l walltime=$timestring
-#PBS -l nodes=$nodes:ppn=${tasks_per_node}
+#PBS -l nodes=$nodes:ppn=${processes_per_node}
 #PBS -l naccesspolicy=$node_usage
 #PBS -o $remote_dayfile
@@ -821,5 +815,6 @@
 $email_directive
 
-. /usr/share/modules/init/bash
+eval \`/sw/swdist/bin/modulesinit\`
+#. /usr/share/modules/init/bash
 $module_calls
 
@@ -839,5 +834,6 @@
 $email_directive
 
-. /usr/share/modules/init/bash
+eval \`/sw/swdist/bin/modulesinit\`
+#. /usr/share/modules/init/bash
 $module_calls
 
@@ -859,5 +855,5 @@
 #PBS -l walltime=$timestring
 #PBS -l mppwidth=${numprocs}
-#PBS -l mppnppn=${tasks_per_node}
+#PBS -l mppnppn=${processes_per_node}
 #PBS -m abe
 #PBS -o $remote_dayfile
@@ -927,5 +923,5 @@
 #PBS -l walltime=$timestring
 #PBS -l mppwidth=${numprocs}
-#PBS -l mppnppn=${tasks_per_node}
+#PBS -l mppnppn=${processes_per_node}
 #PBS -m abe
 #PBS -o $remote_dayfile
@@ -962,5 +958,5 @@
        cat > $job_to_send << %%END%%
 #!/bin/ksh
-#PBS -l cpunum_prc=$tasks_per_node,cputim_job=$cputime
+#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
 #PBS -l ${qsubmem}=${Memory}gb
 #PBS -b $nodes
@@ -976,5 +972,5 @@
        cat > $job_to_send << %%END%%
 #!/bin/ksh
-#PBS -l cpunum_prc=$tasks_per_node,cputim_job=$cputime
+#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
 #PBS -l ${qsubmem}=${Memory}gb
 #PBS -o $remote_dayfile
@@ -1072,7 +1068,10 @@
     if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lctit ]]
     then
-       if [[ $remote_host = ibmb  ||  $remote_host = ibmh ]]
+       if [[ $remote_host = ibmh ]]
        then
           return_queue=c1
+       elif [[ $remote_host = ibmku ]]
+       then
+          return_queue=sdbg2
        elif [[ $remote_host = ibms ]]
        then
@@ -1097,5 +1096,11 @@
        then
 
-          echo "echo \"#!/bin/ksh\" >> scpjob.$kennung"               >>  $job_to_send
+          if [[ $remote_host = ibmku ]]
+          then
+             echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung"            >>  $job_to_send
+             echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung"  >>  $job_to_send
+          else
+             echo "echo \"#!/bin/ksh\" >> scpjob.$kennung"                >>  $job_to_send
+          fi
           echo "echo \"# @ job_type = serial\" >> scpjob.$kennung"    >>  $job_to_send
           echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung"  >>  $job_to_send
@@ -1116,4 +1121,8 @@
           echo "echo \"set -x\" >> scpjob.$kennung"                   >>  $job_to_send
           echo "echo \"batch_scp  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$kennung"  >>  $job_to_send
+          if [[ $remote_host = ibmku ]]
+          then
+             echo "echo \"rm  scpjob.$kennung\" >> scpjob.$kennung"   >>  $job_to_send
+          fi
           echo "echo \"exit\" >> scpjob.$kennung"                     >>  $job_to_send
 
@@ -1219,5 +1228,8 @@
           echo "qsub  scpjob.$kennung"          >>  $job_to_send
        fi
-       echo "rm  scpjob.$kennung"               >>  $job_to_send
+       if [[ $remote_host != ibmku ]]
+       then
+          echo "rm  scpjob.$kennung"            >>  $job_to_send
+       fi
        if [[ $remote_host = nech ]]
        then
@@ -1243,5 +1255,5 @@
     echo "exit"      >>  $job_to_send
  fi
- if [[ $remote_host = lctit ]]
+ if [[ $remote_host = lctit  ||  $remote_host = ibmku ]]
  then
     echo " "                               >>  $job_to_send
@@ -1316,9 +1328,12 @@
              printf "\n >>> submit with HLRN qos-feature hiprio...\n"
              ssh  $remote_addres  -l $remote_user  "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"
+          elif [[ $remote_host = ibmku ]]
+          then
+             ssh  $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
           else
              ssh  $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
           fi
        else
-             # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
+             # TIT ERLAUBT NUR DIE AUSFUEHRUNG GANZ BESTIMMTER KOMMANDOS
              # MIT SSH, DESHALB AUFRUF PER PIPE
              # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR
@@ -1365,6 +1380,11 @@
           qsub  $job_on_remhost
        fi
-          # JOBFILE DARF AUF LCTIT NICHT GELOESCHT WERDEN!! GESCHIEHT ERST AM JOBENDE
-       [[ $local_host != lctit ]]  &&  rm  $job_on_remhost
+
+          # Jobfile must not be deleted on lctit/ibmku!! This will be done
+          # only at the end of the job.
+       if [[ $local_host != lctit  &&  $local_host != ibmku ]]
+       then
+          rm  $job_on_remhost
+       fi
        cd  -  > /dev/null
     fi
