Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 1576)
+++ palm/trunk/SCRIPTS/subjob	(revision 1620)
@@ -23,5 +23,5 @@
 # Current revisions:
 # ------------------
-# 
+# adjustments for Mistral at DKRZ Hamburg (lcbullhh)
 # 
 # Former revisions:
@@ -174,10 +174,6 @@
 
 
-
-
     # DETERMINE NAME OF LOCAL HOST
  local_host=$(hostname)
-
-
 
     # SET HOST-SPECIFIC VARIABLES VEREINBAREN (CHECK, IF LOCAL HOST
@@ -223,4 +219,5 @@
      (meller)                local_address=134.106.74.155; local_host=lcfor;;
      (meteo-login*)          local_address=193.166.211.144;local_host=lcxt5m;;
+     (mlogin1*|m1*)          local_address=136.172.50.13;  local_host=lcbullhh;;
      (hexagon*)		     local_address=129.177.20.113; local_host=lcxe6;;
      (nobel*)                local_address=150.183.5.101;  local_host=ibms;;
@@ -367,4 +364,5 @@
         (ibmku)   queue=s4; remote_address=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
         (ibms)    queue=p_normal; remote_address=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (lcbullhh)    queue=compute; remote_address=136.172.50.13; submcom=/usr/bin/sbatch;;
         (lccrayb) queue=mpp1testq; remote_address=130.73.233.1; submcom=/opt/moab/default/bin/msub;;
         (lccrayh) queue=mpp1testq; remote_address=130.75.4.1; submcom=/opt/moab/default/bin/msub;;
@@ -413,4 +411,8 @@
         (ibms)   case  $ndq  in
                      (express|normal|p_express|p_normal|p_normal_1.3|p_normal_1.7|grand)     error=false;;
+                     (*)                                     error=true;;
+                 esac;;
+        (lcbullhh) case  $ndq  in
+                     (compute|shared)  error=false;;
                      (*)                                     error=true;;
                  esac;;
@@ -617,6 +619,4 @@
  fi
 
-
-
     # GENERATE RANDOM IDENTIFIER, AND DETERMINE THE JOBNAME ON THE TARGET HOST
  identifier=$RANDOM
@@ -630,5 +630,4 @@
     remote_dayfile=/dev/null
  fi
-
 
 
@@ -780,4 +779,43 @@
 %%END%%
 
+ elif [[ $remote_host = lcbullhh ]]
+ then
+    if [[ $numprocs != 0 ]]
+    then
+       cat > $job_to_send << %%END%%
+#!/bin/bash -l
+#SBATCH -J $job_name
+#SBATCH -t $timestring
+#SBATCH -N $nodes
+#SBATCH --ntasks-per-node=$processes_per_node
+#SBATCH -p $queue
+#SBATCH -o $remote_dayfile
+#SBATCH -e $remote_dayfile
+#SBATCH -A $project_account
+
+$init_cmds
+$module_calls
+
+%%END%%
+
+    else
+       cat > $job_to_send << %%END%%
+#!/bin/bash -l
+#SBATCH -J $job_name
+#SBATCH -t $timestring
+#SBATCH -l ncpus=1
+#SBATCH -l pmem=${memory}mb
+#SBATCH -m abe
+#SBATCH -o $remote_dayfile
+#SBATCH -e $remote_dayfile
+#SBATCH -A $project_account
+
+$init_cmds
+$module_calls
+
+%%END%%
+
+    fi
+
  elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
  then
@@ -1196,5 +1234,5 @@
     echo "trap '"                               >>  $job_to_send
     echo "set +vx"                              >>  $job_to_send
-    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* || $remote_host = lcxe6 ]]
+    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lcbullhh  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* || $remote_host = lcxe6 ]]
     then
        if [[ $remote_host = ibmh ]]
@@ -1210,4 +1248,7 @@
        then
           return_queue=p_normal
+       elif [[ $remote_host = lcbullhh ]]
+       then
+          return_queue=shared
        elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
        then
@@ -1276,4 +1317,23 @@
           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
           echo "%%END%%"                           >>  $job_to_send
+
+       elif [[ $remote_host = lcbullhh ]]
+       then
+          echo "cat > scpjob.$identifier << %%END%%"        >>  $job_to_send
+          echo "#!/bin/bash"                             >>  $job_to_send
+          echo "#SBATCH --job-name=job_protocol_transfer" >>  $job_to_send
+          echo "#SBATCH -t 00:20:00"                     >>  $job_to_send
+          echo "#SBATCH -N 1"                            >>  $job_to_send
+          echo "#SBATCH -n 1"                            >>  $job_to_send
+          echo "#SBATCH -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
+          echo "#SBATCH -o $remote_dayfile"              >>  $job_to_send
+          echo "#SBATCH -e $remote_dayfile"              >>  $job_to_send
+          echo "#SBATCH -A $project_account"             >>  $job_to_send
+          echo "#SBATCH -p $return_queue"                >>  $job_to_send
+          echo " "                                       >>  $job_to_send
+          echo "set -x"                                  >>  $job_to_send
+          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
+          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
+          echo "%%END%%"                                 >>  $job_to_send
 
        elif [[ $remote_host = lckyuh ]]
@@ -1387,4 +1447,5 @@
           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
           echo "%%END%%"                           >>  $job_to_send
+
        fi
 
@@ -1392,4 +1453,7 @@
        then
           echo "llsubmit  scpjob.$identifier"      >>  $job_to_send
+       elif [[ $remote_host = lcbullhh ]]
+       then
+          echo "sbatch  scpjob.$identifier"               >>  $job_to_send
        elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
        then
@@ -1436,5 +1500,4 @@
 
 
-
     # APPEND THE JOB-FILE (CREATE BY mrun) TO THE JOB-DIRECTIVES GENERATED ABOVE
  cat  $file_to_send  >>  $job_to_send
@@ -1525,4 +1588,10 @@
              eval  $submcom  -q $queue  $job_on_remhost
           fi
+       elif [[ $local_host = lcbullhh ]]
+       then
+          if [[ $queue = default ]]
+          then
+             eval  $submcom  $job_on_remhost
+          fi
        else
           qsub  $job_on_remhost
@@ -1539,6 +1608,4 @@
  fi
 
-
-
     # FINAL ACTIONS
  if [[ $no_submit = false ]]
