Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 1610)
+++ palm/trunk/SCRIPTS/mrun	(revision 1620)
@@ -22,5 +22,5 @@
 # Current revisions:
 # ------------------
-# 
+# adjustments for Mistral at DKRZ Hamburg (lcbullhh)
 # 
 # Former revisions:
@@ -324,6 +324,4 @@
  typeset -i  cputime i ii iia iii iio icycle inode ival jobges jobsek last_char_int maxcycle minuten nodes pes remaining_pes sekunden tp1
 
-
-
     # ERROR HANDLING IN CASE OF EXIT
  trap 'rm -rf  $working_directory/tmp_mrun
@@ -610,5 +608,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmh|ibmkisti|ibmku|ibms|nech|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
+        (ibm|ibmh|ibmkisti|ibmku|ibms|nech|lcbullhh|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -669,5 +667,4 @@
  fi
 
-
     # CHECK, IF FILE-ARCHIVING HAS FAILED IN PREVIOUS JOB (OF A JOB-CHAIN)
  if [[ -f ~/job_queue/ARCHIVE_ERROR_$fname ]]
@@ -697,5 +694,4 @@
  if [[ "$read_from_config" = false ]]
  then
-
     [[ $silent = false ]]  &&  printf "\n    Reading the configuration file... "
 
@@ -769,5 +765,5 @@
                    do_remote=true
                    case  $host  in
-                       (ibm|ibmh|ibmkisti|ibmku|ibms|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
+                       (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
                        (*)  printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
                             printf "\n      is not available"
@@ -887,5 +883,4 @@
  else
 
-
        # EVALUATE THE CONFIGURATION-FILE BY FORTRAN-PROGRAM
     [[ $silent = false ]]  &&  printf "..."
@@ -1034,5 +1029,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmh|ibmkisti|ibmku|ibms|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
+        (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -1045,4 +1040,5 @@
 
 
+
     # IN CASE OF PARALLEL EXECUTION, CHECK SOME SPECIFICATIONS CONCERNING PROCESSOR NUMBERS
  if [[ "$cond1" = parallel  ||  "$cond2" = parallel ]]
@@ -1160,4 +1156,5 @@
         (ibmh)       queue=cluster;;
         (ibmkisti)   queue=class.32plus;;
+        (lcbullhh)   queue=compute;;
         (lccrayb)    queue=mpp1q;;
         (lccrayh)    queue=mpp1q;;
@@ -2170,5 +2167,4 @@
  fi
 
-
     # QUERY FOR CONTINUE (ON LOCAL MACHINES ONLY)
  if [[ $remotecall = false  &&  $silent = false  &&  $jobmo != BATCH ]]
@@ -2634,5 +2630,4 @@
  rm -rf  $check_sources
  cd $working_directory
-
 
     # DETERMINE PATH FOR MAKE DEPOSITORY
@@ -2825,5 +2820,5 @@
              [[ "$check_for_file" = "" ]]  &&  compile_error=true
              continue   # STATUS=1, IF a.out EXISTS
-          elif [[ $localhost = lccrayb  ||  $localhost = lccrayf ||  $localhost = lccrayh ]]
+          elif [[ $localhost = lcbullhh  ||  $localhost = lccrayb  ||  $localhost = lccrayf ||  $localhost = lccrayh ]]
           then
              make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
@@ -3497,5 +3492,5 @@
                 # COPY HOSTFILE FROM SOURCE DIRECTORY OR CREATE IT, IF IT
                 # DOES NOT EXIST
-             if [[  $host != lccrayb  &&$host != lccrayf  && $host != lccrayh  &&  $host != lckyuh  &&  $host != lckyut ]]
+             if [[  $host != lccrayb  && $host != lccrayf  && $host != lccrayh  &&  $host != lckyuh  &&  $host != lckyut ]]
              then
                 if [[ -f $hostfile ]]
@@ -3666,8 +3661,22 @@
              echo "mpirun  -np $ii  -hostfile $PBS_NODEFILE ./a.out  $ROPTS"
              mpirun  -np $ii  -hostfile $PBS_NODEFILE ./a.out  $ROPTS
+
+          elif [[ $host = lcbullhh ]]
+          then
+             export OMPI_MCA_pml=cm
+             export OMPI_MCA_mtl=mxm
+             export OMPI_MCA_coll=^ghc
+             export OMPI_MCA_mtl_mxm_np=0
+             export MXM_RDMA_PORTS=mlx5_0:1
+             export MXM_LOG_LEVEL=ERROR 
+             export OMP_NUM_THREADS=$threads_per_task
+             export KMP_AFFINITY=verbose,granularity=core,compact,1
+             export KMP_STACKSIZE=64m
+
+             srun  --nodes=$nodes --ntasks-per-node=$tasks_per_node ./a.out  
           else
              mpprun  -n $numprocs  a.out  $ROPTS
           fi
-       else
+      else
           a.out  $ROPTS
        fi
@@ -3892,4 +3901,7 @@
                    then
                       ssh $usern@hlogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                   elif [[ $localhost = lcbullhh ]]
+                   then
+                      ssh $usern@mlogin101 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
                    elif [[ $localhost = lcxe6 ]]
                    then
@@ -4454,5 +4466,5 @@
           then
 
-             if [[ $localhost = lccrayb  || $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* || $localhost = lcxe6 ]]
+             if [[ $localhost = lcbullhh  ||  $localhost = lccrayb  ||  $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu*  ||  $localhost = lcxe6 ]]
              then
                 echo "*** ssh will be used to initiate restart-runs!"
@@ -4464,4 +4476,7 @@
                    then
                       ssh $SSH_PORTOPT $usern@136.172.40.15 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
+                   elif [[ $localhost = lcbullhh ]]
+                   then
+                      ssh $SSH_PORTOPT $usern@mlogin101 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    elif [[ $localhost = lccrayb ]]
                    then
@@ -4582,5 +4597,4 @@
  else
 
-
        # PREPARING ACTIONS,
        # IF A BATCH-JOB IS TO BE GENERATED AND STARTED ON A REMOTE-MACHINE GERECHNET
@@ -4696,5 +4710,5 @@
        #              THIS MAY CREATE A QUITE LARGE JOB-FILE, WHICH CAN CAUSE PROBLEMS WITH SOME
        #              QUEUEING-SYSTEMS
-    if [[ $host = ibmkisti  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh ]]
+    if [[ $host = ibmkisti  ||  $host = lcbullhh  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh ]]
     then
 
@@ -4711,5 +4725,4 @@
        if [[ $host = $localhost ]]
        then
-
              # DUE TO UNKNOWN REASONS, COPY WITH cp COMMAND CREATES CORRUPT
              # FILES ON CRAY XC30 SYSTEMS (CSC HELSINKI), rsync IS USED INSTEAD
@@ -4727,4 +4740,9 @@
              echo  "localdir=\`pwd\`"                            >>  $jobfile
              echo  "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
+         elif [[ $host = lcbullhh ]]
+          then
+             echo  "localdir=\`pwd\`"                            >>  $jobfile
+             echo  "ssh $SSH_PORTOPT $remote_username@mlogin101 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
+
           elif [[ $host = lccrayb ]]
           then
