Index: palm/trunk/SCRIPTS/.mrun.config.csc_sisu
===================================================================
--- palm/trunk/SCRIPTS/.mrun.config.csc_sisu	(revision 1199)
+++ palm/trunk/SCRIPTS/.mrun.config.csc_sisu	(revision 1199)
@@ -0,0 +1,166 @@
+#$Id: .mrun.config.lcxe6 1044 2012-11-07 10:30:58Z maronga $
+#column 1          column 2                                   column 3
+#name of variable  value of variable (~ must not be used)     scope
+#----------------------------------------------------------------------------
+#%executable        $HOME/palm/current_version/MAKE_DEPOSITORY_parallel/palm
+%mainprog          palm.f90
+%base_directory    $HOME/palm/current_version
+%base_data         ~/palm/current_version/JOBS
+%source_path       $base_directory/trunk/SOURCE
+%add_source_path   $base_directory/USER_CODE/$fname
+%depository_path   $base_directory/MAKE_DEPOSITORY
+%use_makefile      true
+#
+# Enter your own host below by adding another line containing in the second
+# column your hostname (as provided by the unix command "hostname") and in the
+# third column the host identifier. Depending on your operating system, the
+# first characters of the host identifier should be "lc" (Linux cluster), "ibm"
+# (IBM-AIX), or "nec" (NEC-SX), respectively.
+#
+# The next line is just an example. Add your own line below or replace this line.
+%host_identifier   sisu-login*  lccrayf
+%host_identifier   clogin*      lccrayf
+#
+#
+# The next block contains all informations for compiling the PALM code
+# and for generating and running the PALM executable using MPI. Replace all
+# required paths (given in <>) by the respective paths valid on your host.
+# Also replace <hi> by your host identifier (see above) in each line!
+# Compilernames, cpp-options and compiler-options are assuming
+# an Intel-Compiler and mpich2 on this host! Please change
+# appropriately, if you are using a different compiler / MPI-Version.
+#
+%tmp_user_catalog    /wrk/raasch                               lccrayf parallel
+%tmp_data_catalog    /wrk/raasch/restart_data                  lccrayf parallel
+%compiler_name       crayftn                                   lccrayf parallel
+%compiler_name_ser   crayftn                                   lccrayf parallel
+%cpp_options         -e:Z:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf:-D__intel_openmp_bug lccrayf parallel
+%netcdf_inc          -I:/opt/cray/netcdf/4.2.1.1/cray/81/include  lccrayf parallel
+%netcdf_lib          -L/opt/cray/netcdf/4.2.1.1/cray/81/lib:-lnetcdff:-lnetcdf  lccrayf parallel
+%mopts               -j:4                                      lccrayf parallel
+%fopts               -em:-s:real64:-O2                         lccrayf parallel
+%lopts               -em:-s:real64:-O2                         lccrayf parallel
+%remote_username     raasch                                    lccrayf parallel
+%memory              1500                                      lccrayf parallel
+%login_init_cmd      .:/opt/modules/default/init/ksh\;:.:/etc/bash.bashrc.local\;:module:list  lccrayf parallel
+%modules             cray-netcdf                               lccrayf parallel
+%create_executable_for_batch  true                             lccrayf parallel
+#             
+%write_binary        true                             restart
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+#IC:
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+EC:pwd; ls -al
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+# Combine 1D- and 3D-profile output (these files are not usable for plotting)
+OC:[[ -f LIST_PROFIL_1D     ]]  &&  cat  LIST_PROFIL_1D  >>  LIST_PROFILE
+OC:[[ -f LIST_PROFIL        ]]  &&  cat  LIST_PROFIL     >>  LIST_PROFILE
+#
+# Combine all particle information files
+OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
+#
+#----------------------------------------------------------------------------
+# List of input-files
+#----------------------------------------------------------------------------
+PARIN                    in:job        d3#      $base_data/$fname/INPUT    _p3d
+PARIN                    in:job        d3f      $base_data/$fname/INPUT    _p3df
+TOPOGRAPHY_DATA          in:locopt     d3#:d3f  $base_data/$fname/INPUT    _topo
+BININ                    in:loc:flpe   d3f      $base_data/$fname/RESTART  _d3d
+PARTICLE_RESTART_DATA_IN in:loc:flpe   prtf     $base_data/$fname/RESTART  _rprt
+DATA_1D_PR_NETCDF        in:locopt     prf      $base_data/$fname/OUTPUT   _pr     nc
+DATA_1D_SP_NETCDF        in:locopt     spf      $base_data/$fname/OUTPUT   _sp     nc
+DATA_1D_TS_NETCDF        in:locopt     tsf      $base_data/$fname/OUTPUT   _ts     nc
+DATA_1D_PTS_NETCDF       in:locopt     ptsf     $base_data/$fname/OUTPUT   _pts    nc
+DATA_2D_XY_NETCDF        in:locopt     xyf      $base_data/$fname/OUTPUT   _xy     nc
+DATA_2D_XY_AV_NETCDF     in:locopt     xyf      $base_data/$fname/OUTPUT   _xy_av  nc
+DATA_2D_XZ_NETCDF        in:locopt     xzf      $base_data/$fname/OUTPUT   _xz     nc
+DATA_2D_YZ_NETCDF        in:locopt     yzf      $base_data/$fname/OUTPUT   _yz     nc
+DATA_3D_NETCDF           in:locopt     3df      $base_data/$fname/OUTPUT   _3d     nc
+DATA_PRT_NETCDF          in:locopt:pe  prtf     $base_data/$fname/OUTPUT   _prt
+#
+#----------------------------------------------------------------------------
+# List of output-files
+#----------------------------------------------------------------------------
+BINOUT                    out:loc:flpe restart   $base_data/$fname/RESTART  _d3d
+PARTICLE_RESTART_DATA_OUT out:loc:flpe prt#:prtf $base_data/$fname/RESTART  _rprt
+#
+RUN_CONTROL       out:loc:tr   d3#     $base_data/$fname/MONITORING  _rc
+RUN_CONTROL       out:loc:tra  d3f     $base_data/$fname/MONITORING  _rc
+HEADER            out:loc:tr   d3#     $base_data/$fname/MONITORING  _header
+HEADER            out:loc:tra  d3f     $base_data/$fname/MONITORING  _header
+CPU_MEASURES      out:loc:tr   d3#     $base_data/$fname/MONITORING  _cpu
+CPU_MEASURES      out:loc:tra  d3f     $base_data/$fname/MONITORING  _cpu
+#
+DATA_1D_PR_NETCDF    out:loc:tr   pr#:prf   $base_data/$fname/OUTPUT  _pr     nc
+DATA_1D_SP_NETCDF    out:loc:tr   sp#:spf   $base_data/$fname/OUTPUT  _sp     nc
+DATA_1D_TS_NETCDF    out:loc:tr   ts#:tsf   $base_data/$fname/OUTPUT  _ts     nc
+DATA_1D_PTS_NETCDF   out:loc:tr   pts#:ptsf $base_data/$fname/OUTPUT  _pts    nc
+DATA_2D_XY_NETCDF    out:loc:tr   xy#:xyf   $base_data/$fname/OUTPUT  _xy     nc
+DATA_2D_XY_AV_NETCDF out:loc:tr   xy#:xyf   $base_data/$fname/OUTPUT  _xy_av  nc
+DATA_2D_XZ_NETCDF    out:loc:tr   xz#:xzf   $base_data/$fname/OUTPUT  _xz     nc
+DATA_2D_XZ_AV_NETCDF out:loc:tr   xz#:xzf   $base_data/$fname/OUTPUT  _xz_av  nc
+DATA_2D_YZ_NETCDF    out:loc:tr   yz#:yzf   $base_data/$fname/OUTPUT  _yz     nc
+DATA_2D_YZ_AV_NETCDF out:loc:tr   yz#:yzf   $base_data/$fname/OUTPUT  _yz_av  nc
+DATA_3D_NETCDF       out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d     nc
+DATA_3D_AV_NETCDF    out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d_av  nc
+DATA_MASK_01_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01     nc
+DATA_MASK_01_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01_av  nc
+DATA_MASK_02_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02     nc
+DATA_MASK_02_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02_av  nc
+DATA_MASK_03_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03     nc
+DATA_MASK_03_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03_av  nc
+DATA_MASK_04_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04     nc
+DATA_MASK_04_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04_av  nc
+DATA_MASK_05_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05     nc
+DATA_MASK_05_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05_av  nc
+DATA_MASK_06_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06     nc
+DATA_MASK_06_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06_av  nc
+DATA_MASK_07_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07     nc
+DATA_MASK_07_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07_av  nc
+DATA_MASK_08_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08     nc
+DATA_MASK_08_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08_av  nc
+DATA_MASK_09_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09     nc
+DATA_MASK_09_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09_av  nc
+DATA_MASK_10_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10     nc
+DATA_MASK_10_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10_av  nc
+DATA_MASK_11_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11     nc
+DATA_MASK_11_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11_av  nc
+DATA_MASK_12_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12     nc
+DATA_MASK_12_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12_av  nc
+DATA_MASK_13_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13     nc
+DATA_MASK_13_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13_av  nc
+DATA_MASK_14_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14     nc
+DATA_MASK_14_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14_av  nc
+DATA_MASK_15_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15     nc
+DATA_MASK_15_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15_av  nc
+DATA_MASK_16_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16     nc
+DATA_MASK_16_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16_av  nc
+DATA_MASK_17_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17     nc
+DATA_MASK_17_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17_av  nc
+DATA_MASK_18_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18     nc
+DATA_MASK_18_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18_av  nc
+DATA_MASK_19_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19     nc
+DATA_MASK_19_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19_av  nc
+DATA_MASK_20_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20     nc
+DATA_MASK_20_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20_av  nc
+DATA_PRT_NETCDF      out:loc:pe   prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
+DATA_PRT_NETCDF      out:loc:trpe prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
+DATA_DVR             out:loc:trpe dvr       $base_data/$fname/OUTPUT  _dvr 
+#
+DVRP_LOG          out:loc:tr   dv#       $base_data/$fname/MONITORING  _dvrp_log
+DVRP_LOG          out:loc:tra  dvf       $base_data/$fname/MONITORING  _dvrp_log
+PARTICLE_INFO     out:loc:tr   pt#       $base_data/$fname/MONITORING  _prt_info
+PARTICLE_INFO     out:loc:tra  ptf       $base_data/$fname/MONITORING  _prt_info
+PARTICLE_DATA     out:loc:flpe prt#:prtf $base_data/$fname/OUTPUT      _prt_dat
+# A BLANK LINE MUST FOLLOW
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 1198)
+++ palm/trunk/SCRIPTS/mrun	(revision 1199)
@@ -22,5 +22,8 @@
 # Current revisions:
 # ------------------
-# adjustments for CSC Helsinki (lccrayf)
+# adjustments for CSC Helsinki (lccrayf),
+# executables for batch jobs can be created in advance, in order to avoid calling
+# the compiler within the batch job (only works if batch jobs are submitted on
+# local host)
 #
 # Former revisions:
@@ -122,4 +125,5 @@
  cpumax=0
  cpurest=0
+ create_executable_for_batch=false
  delete_temporary_catalog=true
  do_batch=false
@@ -1747,5 +1751,5 @@
     # FALLS PROGRAMMTEILE UEBERSETZT WERDEN SOLLEN, FOLGEN JETZT EINIGE
     # UEBERPRUEFUNGEN UND DAS SETZEN DER PRAEPROZESSOR-DIREKTIVEN
- if [[ $do_compile = true ]]
+ if [[ $do_compile = true  ||  $create_executable_for_batch = true ]]
  then
 
@@ -1898,5 +1902,5 @@
     # EVENTUELL BEI LOKALEN RECHNUNGEN $-ZEICHEN IN ENVIRONMENT-VARIABLEN
     # ERSETZEN
- if [[ $do_remote = false  &&  $do_compile = true ]]
+ if [[ $do_remote = false  &&  $do_compile = true  ||  $create_executable_for_batch = true ]]
  then
     eval  fopts=\"$fopts\"
@@ -2649,4 +2653,63 @@
 
 
+    # DETERMINE PATH FOR MAKE DEPOSITORY
+ if [[ $do_batch = false  ||  $create_executable_for_batch = true ]]
+ then
+
+    line=""
+    grep "%depository_path" $config_file  >  tmp_mrun
+    while read line
+    do
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+          if [[ "$(echo $line | cut -d" " -s -f3)" = "" ]]
+          then
+             global_depository_path=`echo $line | cut -d" " -s -f2`
+          fi
+       fi
+    done < tmp_mrun
+
+    line=""
+    grep  " $localhost" $config_file | grep "%depository_path"  >  tmp_mrun
+    while read line
+    do
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+          if [[ "$(echo $line | cut -d" " -s -f4)" = "$cond1"  &&  "$(echo $line | cut -d" " -s -f5)" = "$cond2" ]]
+          then
+             local_depository_path=`echo $line | cut -d" " -s -f2`
+          fi
+       fi
+    done < tmp_mrun
+
+    if [[ "$local_depository_path" = "" ]]
+    then
+       if [[ "$global_depository_path" != "" ]]
+       then
+          local_depository_path=$global_depository_path
+       else
+          printf "\n\n  +++ no depository path found in configuration file"
+          printf "\n      for local host \"$localhost\" "
+          printf "\n      please set \"\%depository_path\" in configuration file\n"
+          locat=config_file; exit
+       fi
+    fi
+    eval local_depository_path=$local_depository_path
+    [[ "$cond1" != "" ]]  &&  local_depository_path=${local_depository_path}_$cond1
+    [[ "$cond2" != "" ]]  &&  local_depository_path=${local_depository_path}_$cond2
+
+
+    basename=`echo $mainprog | cut -f1 -d"."`
+    eval make_depository=${local_depository_path}/${basename}_current_version.tar
+    if [[ ! -f $make_depository ]]
+    then
+       printf "\n"
+       printf "\n  *** WARNING: make depository \"$make_depository\" not found"
+       printf "\n               \"make\" will fail, if the Makefile or other source files are missing\n"
+    fi
+
+ fi
+
+
     # FALLS AUF DIESER MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE-
     # CHENDE AKTIONEN DURCHGEFUEHRT
@@ -2659,11 +2722,4 @@
     chmod  go+rx  $TEMPDIR
     tmpcreate=true
-
-       # set striping on lustre file system
-#    if [[ $localhost = lcsgih ]]
-#    then
-#       lfs setstripe -s 8192k -c 16  $TEMPDIR
-#       lfs getstripe $TEMPDIR
-#    fi
 
 
@@ -2692,62 +2748,8 @@
        fi
 
-
-          # PFADNAMEN FUER DAS MAKE-DEPOSITORY ERMITTELN
-       line=""
-       grep "%depository_path" $config_file  >  tmp_mrun
-       while read line
-       do
-          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-          then
-             if [[ "$(echo $line | cut -d" " -s -f3)" = "" ]]
-             then
-                global_depository_path=`echo $line | cut -d" " -s -f2`
-             fi
-          fi
-       done < tmp_mrun
-
-       line=""
-       grep  " $localhost" $config_file | grep "%depository_path"  >  tmp_mrun
-       while read line
-       do
-          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
-          then
-             if [[ "$(echo $line | cut -d" " -s -f4)" = "$cond1"  &&  "$(echo $line | cut -d" " -s -f5)" = "$cond2" ]]
-             then
-                local_depository_path=`echo $line | cut -d" " -s -f2`
-             fi
-          fi
-       done < tmp_mrun
-
-       if [[ "$local_depository_path" = "" ]]
-       then
-          if [[ "$global_depository_path" != "" ]]
-          then
-             local_depository_path=$global_depository_path
-          else
-             printf "\n\n  +++ no depository path found in configuration file"
-             printf "\n      for local host \"$localhost\" "
-             printf "\n      please set \"\%depository_path\" in configuration file\n"
-             locat=config_file; exit
-          fi
-       fi
-       eval local_depository_path=$local_depository_path
-       [[ "$cond1" != "" ]]  &&  local_depository_path=${local_depository_path}_$cond1
-       [[ "$cond2" != "" ]]  &&  local_depository_path=${local_depository_path}_$cond2
-
-
-       basename=`echo $mainprog | cut -f1 -d"."`
-       eval make_depository=${local_depository_path}/${basename}_current_version.tar
-       if [[ ! -f $make_depository ]]
-       then
-          printf "\n"
-          printf "\n  *** WARNING: make depository \"$make_depository\" not found"
-          printf "\n               \"make\" will fail, if the Makefile or other source files are missing\n"
-       else
-          cp  $make_depository  $TEMPDIR_COMPILE
-          cd  $TEMPDIR_COMPILE
-          tar -xf  $make_depository  >  /dev/null  2>&1
-          cd -  > /dev/null
-       fi
+       cp  $make_depository  $TEMPDIR_COMPILE
+       cd  $TEMPDIR_COMPILE
+       tar -xf  $make_depository  >  /dev/null  2>&1
+       cd -  > /dev/null
 
        cp  SOURCES_FOR_RUN_$fname/*  $TEMPDIR_COMPILE
@@ -2782,90 +2784,87 @@
 
 
-       # EVTL. UEBERSETZUNGSAKTIONEN STARTEN
+       # IF REQUIRED, START WITH COMPILING ACTIONS
     if [[ $do_compile = true ]]
     then
 
 
-          # COMPILING WITH MAKE (ON NEC COMPILER IS CALLED ON HOST CROSS)
-       printf "\n\n\n  *** compilation starts \n$striche\n"
-       printf "  *** compilation with make using following options:\n"
-       printf "      make depository:          $make_depository"
-       if [[ "$mopts" != "" ]]
-       then
-          printf "      make options:             $mopts\n"
-       fi
-       printf "      compilername:             $compiler_name\n"
-       printf "      compiler options:         $fopts\n"
-       printf "      preprocessor directives:  $cpp_options \n"
-       printf "      linker options:           $lopts \n"
-       if [[ "$modules" != "" ]]
-       then
-          printf "      modules to be load:       $modules \n"
-       fi
-       printf "      source code files:        $source_list \n"
-
-       if [[ $localhost = nech ]]
-       then
-#         init_cmds was ". /SX/opt/etc/initsx.sh;" 
-          ssh  $SSH_PORTOPT  136.172.44.192 -l $usern "$init_cmds $module_calls cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
-          cp  $TEMPDIR_COMPILE/a.out  .
-          [[ $? != 0 ]]  &&  compile_error=true
-          rm -rf  $TEMPDIR_COMPILE
-       elif [[ $localhost = ibmh ]]
-       then
-          printf "      compiler is called via ssh on \"plogin1\" \n"
-          ssh  $SSH_PORTOPT  plogin1  -l $usern  "$init_cmds export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
-          [[ ! -f a.out ]]  &&  compile_error=true
-          continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-#       elif [[ $localhost = lccrayf ]]
-#       then
-#          printf "      compiler is called via ssh on \"sisu-login1\" \n"
-#          ssh  $SSH_PORTOPT  sisu-login1  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
-#          [[ ! -f a.out ]]  &&  compile_error=true
-#          continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-       elif [[ $localhost = lcsgib ]]
-       then
-          printf "      compiler is called via ssh on \"bicegate0\" \n"
-          ssh  $SSH_PORTOPT  bicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
-          [[ ! -f a.out ]]  &&  compile_error=true
-          continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-       elif [[ $localhost = lcsgih ]]
-       then
-          printf "      compiler is called via ssh on \"hicegate0\" \n"
-          ssh  $SSH_PORTOPT  hicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
-          [[ ! -f a.out ]]  &&  compile_error=true
-          continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-       elif [[ $localhost = lcflow ]]
-       then 
-          printf "      compiler is called via ssh on \"flow\" \n"
-          ssh  $SSH_PORTOPT  flow02.hpc.uni-oldenburg.de -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "
-          [[ ! -f a.out ]]  &&  compile_error=true
-          continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-       elif [[ $localhost = lccrayf ]]
-       then
-          module list
-          make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
+       if [[ -f a.out ]]
+       then
+
+             # EXECUTABLE WAS CREATED DURING INTERACTIVE CALL OF MRUN
+          printf "\n\n\n  *** executable a.out found"
+          printf "\n      no compilation required \n"
+
        else
-          [[ "$init_cmds" != "" ]]  &&  eval $init_cmds
-          [[ "$module_calls" != "" ]]  &&  eval $module_calls
-          make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
-
-       fi
-
-       if [[ $? != 0  ||  "$compile_error" = true  ||  "$module_compile_error" = true ]]
-       then
-          printf "\n  +++ error occured while compiling or linking"
-          locat=compile
-
-  # WORKAROUND: REMOVE IF CONSTRUCT LATER, BUT KEEP THE EXIT!
-#          if [[ $localhost != lcsgib  &&  $localhost != lcsgih ]]
-#          then
+
+             # COMPILING WITH MAKE (ON NEC COMPILER IS CALLED ON HOST CROSS)
+          printf "\n\n\n  *** compilation starts \n$striche\n"
+          printf "  *** compilation with make using following options:\n"
+          printf "      make depository:          $make_depository"
+          if [[ "$mopts" != "" ]]
+          then
+             printf "      make options:             $mopts\n"
+          fi
+          printf "      compilername:             $compiler_name\n"
+          printf "      compiler options:         $fopts\n"
+          printf "      preprocessor directives:  $cpp_options \n"
+          printf "      linker options:           $lopts \n"
+          if [[ "$modules" != "" ]]
+          then
+             printf "      modules to be load:       $modules \n"
+          fi
+          printf "      source code files:        $source_list \n"
+
+          if [[ $localhost = nech ]]
+          then
+             ssh  $SSH_PORTOPT  136.172.44.192 -l $usern "$init_cmds $module_calls cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
+             cp  $TEMPDIR_COMPILE/a.out  .
+             [[ $? != 0 ]]  &&  compile_error=true
+             rm -rf  $TEMPDIR_COMPILE
+          elif [[ $localhost = ibmh ]]
+          then
+             printf "      compiler is called via ssh on \"plogin1\" \n"
+             ssh  $SSH_PORTOPT  plogin1  -l $usern  "$init_cmds export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
+             [[ ! -f a.out ]]  &&  compile_error=true
+             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
+          elif [[ $localhost = lcsgib ]]
+          then
+             printf "      compiler is called via ssh on \"bicegate0\" \n"
+             ssh  $SSH_PORTOPT  bicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
+             [[ ! -f a.out ]]  &&  compile_error=true
+             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
+          elif [[ $localhost = lcsgih ]]
+          then
+             printf "      compiler is called via ssh on \"hicegate0\" \n"
+             ssh  $SSH_PORTOPT  hicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
+             [[ ! -f a.out ]]  &&  compile_error=true
+             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
+          elif [[ $localhost = lcflow ]]
+          then 
+             printf "      compiler is called via ssh on \"flow\" \n"
+             ssh  $SSH_PORTOPT  flow02.hpc.uni-oldenburg.de -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "
+             [[ ! -f a.out ]]  &&  compile_error=true
+             continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
+          elif [[ $localhost = lccrayf ]]
+          then
+             make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
+          else
+             [[ "$init_cmds" != "" ]]  &&  eval $init_cmds
+             [[ "$module_calls" != "" ]]  &&  eval $module_calls
+             make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
+          fi
+
+          if [[ $? != 0  ||  "$compile_error" = true  ||  "$module_compile_error" = true ]]
+          then
+             printf "\n  +++ error occured while compiling or linking"
+             locat=compile
+
              exit
-#          else
-#             locat=normal
-#          fi
-       else
-          printf "$striche\n  *** compilation finished \n"
-       fi
+          else
+             printf "$striche\n  *** compilation finished \n"
+          fi
+
+       fi
+
     fi
 
@@ -3682,5 +3681,4 @@
                 elif [[ $host = lccrayf ]]
                 then
-                    echo "aprun  -n $ii  -N $tasks_per_node  -m ${memory}M  a.out  $ROPTS  < runfile_atmos"
                     aprun  -n $ii  -N $tasks_per_node  -m ${memory}M  a.out  $ROPTS  < runfile_atmos
                 elif [[ $host = lcxe6  ||  $host = lcxt5m ]]
@@ -4754,4 +4752,43 @@
 
 
+       # create executable for batch job
+    if [[ $create_executable_for_batch = true  &&  $restart_run != true ]]
+    then
+
+       printf "\n  *** creating the executable for batch job\n"
+
+          # method only works for batch jobs on local hosts
+       if [[ $host != $localhost ]]
+       then
+          printf "\n  +++ creation of executables is only allowed for batch jobs on local hosts."
+          printf "\n      Please set create_executable_for_batch = false in the config-file.\n"
+          locat=create_executable; exit
+       fi
+
+       mkdir  $working_directory/SOURCES_FOR_RUN_${fname}/TMPDIR_FOR_CREATING_EXECUTABLE
+       cd  $working_directory/SOURCES_FOR_RUN_${fname}/TMPDIR_FOR_CREATING_EXECUTABLE
+
+       cp  $make_depository  .
+       tar -xf  $make_depository  >  /dev/null  2>&1
+       cp  ../*  .   >  /dev/null  2>&1
+
+       make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
+
+       if [[ $? != 0  ||  "$compile_error" = true  ||  "$module_compile_error" = true ]]
+       then
+          printf "\n  +++ error occured while compiling or linking"
+          locat=compile
+          exit
+       fi
+
+       mv  a.out  ..
+       cd -  >  /dev/null  2>&1
+       rm -rf  $working_directory/SOURCES_FOR_RUN_${fname}/TMPDIR_FOR_CREATING_EXECUTABLE
+
+       printf "  *** executable created in \"$working_directory/SOURCES_FOR_RUN_${fname}\"\n "
+
+    fi
+
+
        # ZUSAMMENSTELLUNG DES JOBSCRIPTS AUF DATEI jobfile
     jobfile=jobfile.$RANDOM
@@ -4785,5 +4822,5 @@
        # BEREITSTELLUNG VON QUELLTEXTEN, MRUN-SCRIPTS UND KONFIGURATIONS-
        # DATEI FUER DEN JOB
-    if [[ $( echo $host | cut -c1-5 ) = lcsgi  ||  $host = ibmkisti ]]
+    if [[ $( echo $host | cut -c1-5 ) = lcsgi  ||  $host = ibmkisti  ||  $host = lccrayf ]]
     then
 
@@ -4801,5 +4838,9 @@
        if [[ $host = $localhost ]]
        then
-          echo  "cp  -r  $working_directory/SOURCES_FOR_RUN_$fname ."  >>  $jobfile
+
+             # DUE TO UNKNOWN REASONS, COPY WITH cp COMMAND CREATES CORRUPT
+             # FILES ON CRAY XC30 SYSTEMS (CSC HELSINKI), rsync IS USED INSTEAD
+          echo  "rsync -ae -t  $working_directory/SOURCES_FOR_RUN_$fname  ."  >>  $jobfile
+
        else
           if [[ $host != ibmkisti ]]
@@ -4818,4 +4859,5 @@
        echo  "mv  SOURCES_FOR_RUN_$fname/$config_file  . "       >>  $jobfile
        echo  "mv  SOURCES_FOR_RUN_$fname/$mrun_script_name  . "  >>  $jobfile
+       echo  "chmod u+rwx  $mrun_script_name"                    >>  $jobfile
        echo  "execute_mrun=true"                                 >>  $jobfile
        echo  " "                                                 >>  $jobfile
Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 1198)
+++ palm/trunk/SCRIPTS/subjob	(revision 1199)
@@ -1630,5 +1630,5 @@
     else
        cd  $job_catalog
-       if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm ]]
+       if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm  ||  $local_host = lccrayf ]]
        then
           eval  $submcom  $job_on_remhost
