Index: /palm/trunk/SCRIPTS/mbuild
===================================================================
--- /palm/trunk/SCRIPTS/mbuild	(revision 1039)
+++ /palm/trunk/SCRIPTS/mbuild	(revision 1040)
@@ -138,4 +138,5 @@
      # 27/09/12 - Siggi - compiler options (F90FLAGS) added for namelist check
      # 02/10/12 - Siggi - added lcsb
+     # 02/11/12 - Siggi - added lckiaps
 
 
@@ -542,4 +543,5 @@
         (lcsgih)         remote_addres=130.75.4.101;;
         (lck)            remote_addres=165.132.26.61;;
+        (lckiaps)        remote_addres=118.128.66.223;;
         (lctit)          remote_addres=10.1.6.170;;
         (lcxe6)          remote_addres=129.177.20.113;;
@@ -558,4 +560,5 @@
                             printf "\n  +++ remote host \"$remote_host\" unknown";
                             printf "\n      please inform PALM group support!"
+                            locat=remote_host; exit
                          fi;;
     esac
Index: /palm/trunk/SCRIPTS/mrun
===================================================================
--- /palm/trunk/SCRIPTS/mrun	(revision 1039)
+++ /palm/trunk/SCRIPTS/mrun	(revision 1040)
@@ -271,4 +271,5 @@
      # 31/10/12 - Siggi   - -T option not obligatory for lcxt5m,
      #                      tasks_per_node not checked for this machine
+     # 01/11/12 - Siggi   - adjusted for lckiaps
 
 
@@ -730,5 +731,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|nech|necriam|lckyoto|lcsgib|lcsgih|unics|lcxe6|lcxt5m|lck|lckordi|lcsb)  true;;
+        (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|nech|necriam|lckyoto|lcsgib|lcsgih|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lcsb)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -894,5 +895,5 @@
                    do_remote=true
                    case  $host  in
-                       (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckordi|lcsb)  true;;
+                       (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lcsb)  true;;
                        (*)  printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
                             printf "\n      is not available"
@@ -1178,5 +1179,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckordi|lcsb)  true;;
+        (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lcsb)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -1328,4 +1329,5 @@
         (ibmkisti)   queue=class.32plus;;
         (ibmy)       queue=parallel;;
+        (lckiaps)    queue=normal;;
         (lckyoto)    queue=ph;;
         (lcsgib)     queue=testq;;
@@ -2076,5 +2078,5 @@
  lopts="$lopts $netcdf_lib $dvr_lib"
  ROPTS="$ropts"
- if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lckyoto  ||  $host = lcsgih  ||  $host = lcsgib  ||  $host = lctit  ||  $host = lcfimm  ||  $host = lcxe6 ||  $host = lcxt5m || $host = lck || $host = lckordi || $host = lcsb )  &&  -n $numprocs ]]
+ if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lckyoto  ||  $host = lcsgih  ||  $host = lcsgib  ||  $host = lctit  ||  $host = lcfimm  ||  $host = lcxe6 ||  $host = lcxt5m || $host = lck || $host = lckiaps || $host = lckordi || $host = lcsb )  &&  -n $numprocs ]]
  then
     XOPT="-X $numprocs"
@@ -3802,4 +3804,7 @@
                 then
                    mpirun_rsh -hostfile $PBS_NODEFILE -np `cat $PBS_NODEFILE | wc -l` a.out  < runfile_atmos  $ROPTS
+                elif [[ $host = lckiaps ]]
+                then
+                   mpirun -np $ii  -f $PBS_NODEFILE  a.out  <  runfile_atmos  $ROPTS
                 else
                    mpiexec  -machinefile hostfile  -n $ii  a.out  < runfile_atmos  $ROPTS
@@ -4841,4 +4846,13 @@
     jobfile=jobfile.$RANDOM
 
+       # initialize the environment and load modules
+    if [[ "$init_cmds" != "" ]]
+    then
+       echo  "$init_cmds"        >>  $jobfile
+    fi
+    if [[ "$module_calls" != "" ]]
+    then
+       echo  "$module_calls"     >>  $jobfile
+    fi
 
        # TEMPORAERES VERZEICHNIS GENERIEREN UND NACH DORT WECHSELN
Index: /palm/trunk/SCRIPTS/subjob
===================================================================
--- /palm/trunk/SCRIPTS/subjob	(revision 1039)
+++ /palm/trunk/SCRIPTS/subjob	(revision 1040)
@@ -141,4 +141,5 @@
      #                      commands on ssh calls sourced out to .mrun.config
      # 02/10/12 - Siggi - adjustments for lcsb
+     # 01/11/12 - Siggi - adjustments for lckiaps
 
 
@@ -245,4 +246,5 @@
      (sno)                   local_addres=130.75.105.113; local_host=lcmuk;;
      (levanto)               local_addres=130.75.105.45;  local_host=lcmuk;;
+     (login*)                local_addres=118.128.66.223; local_host=lckiaps;;
      (maestro)               local_addres=130.75.105.2;   local_host=lcmuk;;
      (meteo-login*)          local_addres=193.166.211.144;local_host=lcxt5m;;
@@ -320,5 +322,5 @@
     printf "\n        -h    execution host, available hosts:    $remote_host"
     printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, ibmy, lc...,"
-    printf "\n              lctit, nech, necriam, unics"
+    printf "\n              lckiaps, lctit, nech, necriam, unics"
     printf "\n        -m    memory demand per process in MByte  ---"
     printf "\n        -n    jobname                             <jobdatei>"
@@ -394,4 +396,5 @@
         (lcsgih)  queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;;
         (lck)     remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;;
+        (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
         (lckordi) remote_addres=210.219.61.8; submcom=/usr/torque/bin/qsub;;
         (lcsb)    remote_addres=147.46.30.151; submcom=/usr/torque/bin/qsub;;
@@ -438,4 +441,8 @@
         (ibmy)   case  $ndq  in
                      (parallel)                              error=false;;
+                     (*)                                     error=true;;
+                 esac;;
+        (lckiaps) case  $ndq  in
+                     (express|normal)                        error=false;;
                      (*)                                     error=true;;
                  esac;;
@@ -859,4 +866,36 @@
     fi
 
+ elif [[ $remote_host = lckiaps ]]
+ then
+
+    if [[ $numprocs != 0 ]]
+    then
+       cat > $job_to_send << %%END%%
+#!/bin/ksh
+#PBS -N $job_name
+#PBS -l walltime=$timestring
+#PBS -l select=1:ncpus=$numprocs
+#PBS -l pmem=${memory}mb
+#PBS -q $queue
+#PBS -o $remote_dayfile
+#PBS -j oe
+#PBS -V
+
+%%END%%
+
+    else
+       cat > $job_to_send << %%END%%
+#!/bin/ksh
+#PBS -N $job_name
+#PBS -l walltime=$timestring
+#PBS -l ncpus=1
+#PBS -l pmem=${memory}mb
+#PBS -o $remote_dayfile
+#PBS -j oe
+
+%%END%%
+
+    fi
+
  elif [[ $remote_host = lcyon ]]
  then
@@ -1187,5 +1226,5 @@
     echo "trap '"                               >>  $job_to_send
     echo "set +vx"                              >>  $job_to_send
-    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec ]]
+    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lckiaps ]]
     then
        if [[ $remote_host = ibmh ]]
@@ -1210,4 +1249,7 @@
        then
           return_queue=SP
+       elif [[ $remote_host = lckiaps ]]
+       then
+          return_queue=express
        else
           return_queue=unknown
@@ -1332,5 +1374,5 @@
           echo "qsub -J n  -s /bin/ksh  scpjob.$kennung"     >>  $job_to_send
        else
-          echo "qsub  scpjob.$kennung"          >>  $job_to_send
+          echo "$submcom  scpjob.$kennung"      >>  $job_to_send
        fi
        if [[ $remote_host != ibmku ]]
