Index: palm/trunk/SCRIPTS/mbuild
===================================================================
--- palm/trunk/SCRIPTS/mbuild	(revision 440)
+++ palm/trunk/SCRIPTS/mbuild	(revision 475)
@@ -109,4 +109,7 @@
      # 01/12/09 - BjornM- re-adjustments for lcxt4
      # 01/02/10 - Siggi - adjustments for lcxt5m
+     # 03/02/10 - Siggi - make options (mopts) to be set by configuration file
+     #                    implemented, remoted mode option -r completely
+     #                    removed, t3e related parts removed
 
 
@@ -120,5 +123,4 @@
  locat=normal
  makefile=""
- remote_mode=interactive
  scirocco=false
  silent=false
@@ -156,5 +158,5 @@
 
     # SHELLSCRIPT-OPTIONEN EINLESEN
- while  getopts  :c:h:m:rs:u  option
+ while  getopts  :c:h:m:s:u  option
  do
    case  $option  in
@@ -162,5 +164,4 @@
        (h)   host=$OPTARG;;
        (m)   makefile=$OPTARG;;
-       (r)   remote_mode=batch;;
        (s)   suf=$OPTARG;;
        (u)   compile_utility_programs=true;;
@@ -169,13 +170,4 @@
    esac
  done
-
-
-
-    # BATCH-MODE IST ZUR ZEIT NICHT FUNKTIONSFAEHIG
- if [[ $remote_mode = batch ]]
- then
-    printf "\n  +++ sorry, batch mode does not work! \n"
-    locat=parameter; exit
- fi
 
 
@@ -749,4 +741,27 @@
 
 
+       # get make options
+    line=""
+    found=false
+    grep  "$remote_host_string" $config_file | grep "%mopts"  >  $tmp_mbuild
+    while read line1
+    do
+
+       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
+       then
+          line="$line1"
+       fi
+
+       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
+       then
+             # remove colons from directive string
+          make_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+
+       fi
+
+    done < $tmp_mbuild
+
+
+
        # COMPILEROPTIONEN ERMITTELN
     line=""
@@ -875,4 +890,9 @@
     then
        column1="serial compiler:"; column2=$compiler_name_ser
+       printf "| $column1$column2 | \n"
+    fi
+    if [[ "$make_options" != "" ]]
+    then
+       column1="make options:"; column2=$make_options
        printf "| $column1$column2 | \n"
     fi
@@ -938,405 +958,327 @@
 
 
-    if [[ $remote_mode = batch ]]
-    then
-
-          # BATCH-JOB PARAMETER SETZEN
-       case  $remote_host  in
-           (t3eb)           queue=berte; memory=60; cputime=1000; xoption="-X 0";;
-           (t3eh)           queue=comp_t3e; memory=60; cputime=360;;
-           (t3ej2)          queue=normal; memory=60; cputime=1000; xoption="-X 0";;
-           (t3ej5|ground.yonsei.ac.kr)  printf "\n  --- remote host \"$remote_host\" does not allow batch jobs"; continue;;
-       esac
-
-
-          # BATCH-JOB ZUSAMMENSTELLEN
-       printf "\n  *** creating batch-job for remote host"
-       echo " "  >  mbuild_job
-
-          # AUF CRAY-RECHNERN IN JUELICH WIRD KEIN BENUTZER-PROFILE AUSGEFUEHRT
-          # DIES WIRD HIER GETAN, UM PFADE USW. ZU SETZEN
-       if [[ $remote_host = t3ej2 ]]
-       then
-          echo "set +vx"                       >>  mbuild_job
-          echo ". .profile"                    >>  mbuild_job
-          echo "set -x"                        >>  mbuild_job
-       fi
-
-          # AUF CRAY-RECHNERN GELADENE MODULE AUFLISTEN
-       if [[ $host = t3eb  || $host = t3eh  ||  $host = t3ej2 ]]
-       then
-          echo "module list"                   >>  mbuild_job
-       fi
-
-
-          # WECHSEL IN TEMPORAERES VERZEICHNIS
-       echo "cd ${remote_md}"  >>  mbuild_job
-
-
-          # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
-       echo  "scp  ${local_username}@${local_addres}:~/modell/code_3dp/palm_current_version/${mainprog}_sources.tar  ${mainprog}_sources.tar"  >>  mbuild_job
-#       echo  "[[ \$? != 0 ]]  &&  (echo "+++ scp failed"; exit)"  >>  mbuild_job
-
-
-          # FALLS VORHANDEN, LETZTE VERSION AUF DEM REMOTE-RECHNER AUSPACKEN
-       echo  "[[ -f ${mainprog}_current_version.tar ]]  &&  tar -xvf  ${mainprog}_current_version.tar"  >>  mbuild_job
-
-
-          # AKTUELLE QUELLTEXTVERSION AUF REMOTE-RECHNER AUSPACKEN
-       echo  "tar -xvf  ${mainprog}_sources.tar"              >>  mbuild_job
-
-
-          # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
-       echo  "make  PROG=$mainprog  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "  >>  mbuild_job
-       echo  "chmod  u+w  *"                                  >>  mbuild_job
-
-          # NEUE VERSION AUF REMOTE-RECHNER ZUSAMMENPACKEN
-       echo  "tar -cvf  ${mainprog}_current_version.tar  *.f90  *.o"  >>  mbuild_job
-
-
-          # AKTUELLES VERSIONSVERZEICHNIS AUF REMOTE-RECHNER BEREINIGEN
-       echo  "make  clean"                                    >>  mbuild_job
-       echo  "rm ${mainprog}_sources.tar"                     >>  mbuild_job
-       echo  "rm *.f90 Makefile"                              >>  mbuild_job
-
-
-
-          # JOB MITTELS SUBJOB STARTEN
-       printf "\n  *** sending batch job to remote host"
-#       subjob  $xoption  -h $remote_host  -q $queue  -m $memory  -t $cputime  -v  mbuild_job
-
-
-          # JOBFILE LOESCHEN
-#       rm  aljob
-
-    else
-
-       if [[ $remote_host != $local_host ]]
-       then
-
-          if [[ $compile_utility_programs = false ]]
-          then
-
-                # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
-                # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
-             echo "  *** copying \"${mainprog}_sources.tar\" to \"${remote_addres}:${remote_md}/\" "
-             if [[ $remote_host != lctit ]]
+       # make on remote host
+    if [[ $remote_host != $local_host ]]
+    then
+
+       if [[ $compile_utility_programs = false ]]
+       then
+
+             # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
+             # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
+          echo "  *** copying \"${mainprog}_sources.tar\" to \"${remote_addres}:${remote_md}/\" "
+          if [[ $remote_host != lctit ]]
+          then
+             ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"
+          else
+                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
+                # MIT SSH, DESHALB AUFRUF PER PIPE
+             print "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"  |  ssh ${remote_username}@${remote_addres}  2>&1
+          fi
+          if [[ $local_host = decalpha ]]
+          then
+                # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTï¿œNDIGEN PFADES
+                # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
+                # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
+             remote_md=`echo $remote_md | sed 's/\$HOME\///'`
+             /bin/scp  ${local_source_path}/${mainprog}_sources.tar  ${remote_username}@${remote_addres}:${remote_md}/${mainprog}_sources.tar
+          else
+             scp  ${local_source_path}/${mainprog}_sources.tar  ${remote_username}@${remote_addres}:${remote_md}/${mainprog}_sources.tar
+          fi
+
+
+
+             # FALLS VORHANDEN, LETZTE VERSION AUF DEM REMOTE-RECHNER AUSPACKEN
+          echo "  *** untar previous update on remote host, if existing"
+          if [[ $remote_host != lctit ]]
+          then
+             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"
+          else
+                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
+                # MIT SSH, DESHALB AUFRUF PER PIPE
+             print  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
+          fi
+
+
+             # AKTUELLE QUELLTEXTVERSION AUF REMOTE-RECHNER AUSPACKEN
+          echo "  *** untar actual sources on remote host"
+          if [[ $remote_host != lctit ]]
+          then
+             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"
+          else
+                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
+                # MIT SSH, DESHALB AUFRUF PER PIPE
+             print  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
+          fi
+
+
+             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
+             # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
+             # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
+             # Z.B. DIE PFADE ZUM COMPILER)
+          echo "  *** execute \"make\" on remote host"
+
+          if [[ $remote_host = nech ]]
+          then
+             make_call_string="sxmake  $make_options  PROG=$mainprog  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
+          else
+             make_call_string="make  $make_options  PROG=$mainprog  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
+          fi
+
+          if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
+          then
+
+             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; echo '$make_call_string' > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
+
+          elif [[ $remote_host = ibmh ]]
+          then
+
+             print "export OBJECT_MODE=64; 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 = lcsgib  ||  $remote_host = lcsgih ]]
+          then
+
+             print ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib; 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 load mvapich2/1.2rc1-intel; 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 load mvapich2; 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 ]]
+          then
+
+             echo  " "  >  ${remote_host}_last_make_protokoll
+             while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
+             do
+                print "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
+             done
+
+          elif [[ $remote_host = lcxt4 ]]
+          then
+
+             print ". /opt/modules/default/init/ksh; module load Base-opts/2.1.56HDA; module load modules/3.1.6; module load pgi/9.0.4; module load PrgEnv-pgi/2.1.56HDA; 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
+
+          else
+
+             print "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
+
+          fi
+
+          if [[ $(grep -c MAKE_ERROR ${remote_host}_last_make_protokoll) != 0 ]]
+          then
+             printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_host\" "
+             if [[ $silent = false ]]
              then
-                ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"
-             else
-                   # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                   # MIT SSH, DESHALB AUFRUF PER PIPE
-                print "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"  |  ssh ${remote_username}@${remote_addres}  2>&1
-             fi
-             if [[ $local_host = decalpha ]]
-             then
-                   # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTï¿œNDIGEN PFADES
-                   # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
-                   # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
-                remote_md=`echo $remote_md | sed 's/\$HOME\///'`
-                /bin/scp  ${local_source_path}/${mainprog}_sources.tar  ${remote_username}@${remote_addres}:${remote_md}/${mainprog}_sources.tar
-             else
-                scp  ${local_source_path}/${mainprog}_sources.tar  ${remote_username}@${remote_addres}:${remote_md}/${mainprog}_sources.tar
-             fi
-
-
-
-                # FALLS VORHANDEN, LETZTE VERSION AUF DEM REMOTE-RECHNER AUSPACKEN
-             echo "  *** untar previous update on remote host, if existing"
-             if [[ $remote_host != lctit ]]
-             then
-                ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"
-             else
-                   # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                   # MIT SSH, DESHALB AUFRUF PER PIPE
-                print  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
-             fi
-
-
-                # AKTUELLE QUELLTEXTVERSION AUF REMOTE-RECHNER AUSPACKEN
-             echo "  *** untar actual sources on remote host"
-             if [[ $remote_host != lctit ]]
-             then
-                ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"
-             else
-                   # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                   # MIT SSH, DESHALB AUFRUF PER PIPE
-                print  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
-             fi
-
-
-                # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
-                # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
-                # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
-                # Z.B. DIE PFADE ZUM COMPILER)
-             echo "  *** execute \"make\" on remote host"
-
-             if [[ $remote_host = nech ]]
-             then
-                make_call_string="sxmake  PROG=$mainprog  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
-             else
-                make_call_string="make  PROG=$mainprog  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
-             fi
-
-             if [[ $remote_host = t3eh ]]
-             then
-       
-                print "xterm\nexit\n cd ${remote_md}; make  PROG=$mainprog  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" " | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
-
-             elif [[ $remote_host = t3ej2  ||  $remote_host = ibms  ||  $remote_host = ibmy ]]
-             then
-
-                ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; echo '$make_call_string' > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
-
-             elif [[ $remote_host = ibmh ]]
-             then
-
-                print "export OBJECT_MODE=64; 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 = lcsgib  ||  $remote_host = lcsgih ]]
-             then
-
-                print ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib; 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 load mvapich2/1.2rc1-intel; 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 load mvapich2; 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 ]]
-             then
-
-                echo  " "  >  ${remote_host}_last_make_protokoll
-                while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
+                answer=dummy
+                printf "\n"
+                while [[ "$answer" != c  &&  "$answer" != k ]]
                 do
-                   print "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
+                   printf "  >>> continue / list errors / kill mbuild (c/l/k) ? "
+                   read  answer
+                   if [[ "$answer" = l ]]
+                   then
+                      more ${remote_host}_last_make_protokoll
+                   fi
                 done
-
-             elif [[ $remote_host = lcxt4 ]]
-             then
-
-                print ". /opt/modules/default/init/ksh; module load Base-opts/2.1.56HDA; module load modules/3.1.6; module load pgi/9.0.4; module load PrgEnv-pgi/2.1.56HDA; 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
-
-             else
-
-                print "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
-
-             fi
-
-             if [[ $(grep -c MAKE_ERROR ${remote_host}_last_make_protokoll) != 0 ]]
-             then
-                printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_host\" "
-                if [[ $silent = false ]]
+                if [[ $answer = k ]]
                 then
-                   answer=dummy
-                   printf "\n"
-                   while [[ "$answer" != c  &&  "$answer" != k ]]
-                   do
-                      printf "  >>> continue / list errors / kill mbuild (c/l/k) ? "
-                      read  answer
-                      if [[ "$answer" = l ]]
-                      then
-                         more ${remote_host}_last_make_protokoll
-                      fi
-                   done
-                   if [[ $answer = k ]]
-                   then
-                      locat=user_abort; exit
-                   fi
+                   locat=user_abort; exit
                 fi
              fi
-
-
-
-                # NEUE VERSION AUF REMOTE-RECHNER ZUSAMMENPACKEN
-             printf "\n  *** tar update on remote host ..."
-             if [[ $remote_host != lctit ]]
+          fi
+
+
+
+             # NEUE VERSION AUF REMOTE-RECHNER ZUSAMMENPACKEN
+          printf "\n  *** tar update on remote host ..."
+          if [[ $remote_host != lctit ]]
+          then
+             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"
+          else
+                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
+                # MIT SSH, DESHALB AUFRUF PER PIPE
+             print  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"  |  ssh  ${remote_username}@${remote_addres}  2>&1
+          fi
+
+
+             # AKTUELLES VERSIONSVERZEICHNIS AUF REMOTE-RECHNER BEREINIGEN
+#          printf "\n  *** \"make clean\" on remote host ..."
+#          ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; make clean; rm ${mainprog}_sources.tar; rm *.f90 Makefile"
+#          printf "\n"
+
+
+
+
+          # GLEICHE AKTIONEN FUER DIE UTILITY-PROGRAMME DURCHFUEHREN
+          # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
+          # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
+       elif [[ $compile_utility_programs = true ]]
+       then
+
+          printf "\n\n"
+          echo "  *** copying scripts and utility programs to \"${remote_addres}:${remote_ud}/\" "
+          cd  ${local_source_path}/../SCRIPTS
+
+          if [[ $remote_host != lctit ]]
+          then
+             ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)"
+          else
+                # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
+                # MIT SSH, DESHALB AUFRUF PER PIPE
+             print "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p  ${remote_ud}/../SCRIPTS)"  |  ssh ${remote_username}@${remote_addres}  2>&1
+          fi
+
+             # KOPIEREN DER SCRIPTE
+          if [[ $local_host = decalpha ]]
+          then
+                # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTï¿œNDIGEN PFADES
+                # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
+                # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
+             remote_ud=`echo $remote_ud | sed 's/\$HOME\///'`
+             /bin/scp  batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob  ${remote_username}@${remote_addres}:${remote_ud}/../SCRIPTS  >  /dev/null
+          else
+             scp  batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob  ${remote_username}@${remote_addres}:${remote_ud}/../SCRIPTS  >  /dev/null
+          fi
+
+          cd  -  > /dev/null
+          cd  ${local_source_path}/../UTIL
+
+
+             # KOPIEREN DER UTILITY-PROGRAMME
+          if [[ $local_host = decalpha ]]
+          then
+                # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTï¿œNDIGEN PFADES
+                # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
+                # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
+             remote_ud=`echo $remote_ud | sed 's/\$HOME\///'`
+             /bin/scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
+          else
+             scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
+          fi
+
+
+
+             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
+             # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
+             # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
+             # Z.B. DIE PFADE ZUM COMPILER)
+          echo "  *** execute \"make\" on remote host"
+
+          if [[ $remote_host = nech ]]
+          then
+             make_call_string="sxmake  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
+          else
+             make_call_string="make  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
+          fi
+
+          if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
+          then
+
+             ssh  ${remote_username}@${remote_addres}  "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"
+
+          elif [[ $remote_host = ibmh ]]
+          then
+
+             print "export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres}
+
+          elif [[ $remote_host = lctit ]]
+          then
+
+             echo  " "  >  ${remote_host}_last_make_protokoll
+             while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
+             do
+                print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
+             done
+
+          elif [[ $remote_host = lcxt4 ]]
+          then
+
+             print ". /opt/modules/default/init/ksh; module load Base-opts/2.1.56HDA; module load modules/3.1.6; module load pgi/9.0.4; module load PrgEnv-pgi/2.1.56HDA; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
+
+          else
+
+             print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
+
+          fi
+
+       fi    # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME
+
+       rm -rf  ${remote_host}_last_make_protokoll
+
+       # make on local host
+    else
+
+       if [[ $compile_utility_programs = false ]]
+       then
+
+             # DEPOSITORY VERZEICHNIS ERZEUGEN, FALLS NOCH NICHT VORHANDEN
+          eval remote_md=$remote_md
+          if [[ ! -d $remote_md ]]
+          then
+             if  mkdir $remote_md
              then
-                ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"
+                printf "\n\n  *** directory for make depository:"
+                printf "\n           $remote_md"
+                printf "\n      was created\n"
              else
-                   # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                   # MIT SSH, DESHALB AUFRUF PER PIPE
-                print  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"  |  ssh  ${remote_username}@${remote_addres}  2>&1
+                printf "\n  +++ directory for make depository:"
+                printf "\n           $remote_md"
+                printf "\n      cannot be created"
+                locat=local_depository_path; exit
              fi
-
-
-                # AKTUELLES VERSIONSVERZEICHNIS AUF REMOTE-RECHNER BEREINIGEN
-#             printf "\n  *** \"make clean\" on remote host ..."
-#             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; make clean; rm ${mainprog}_sources.tar; rm *.f90 Makefile"
-#             printf "\n"
-
-
-
-
-             # GLEICHE AKTIONEN FUER DIE UTILITY-PROGRAMME DURCHFUEHREN
-             # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
-             # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
-          elif [[ $compile_utility_programs = true ]]
-          then
-
-             printf "\n\n"
-             echo "  *** copying scripts and utility programs to \"${remote_addres}:${remote_ud}/\" "
-             cd  ${local_source_path}/../SCRIPTS
-
-             if [[ $remote_host != lctit ]]
+          fi
+
+             # QUELLTEXT-DATEIEN AUS REPOSITORY INS DEPOSITORY KOPIEREN
+          echo " "
+          echo "  *** updating sources in $remote_md"
+          cd  $remote_md
+          cp  $local_source_path/${mainprog}_sources.tar  .
+          tar xf  ${mainprog}_sources.tar
+
+             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF LOKALEM RECHNER AUSFUEHREN
+          echo " "
+          echo "  *** execute \"make\" on local host"
+
+          make  $make_options  PROG=$mainprog  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"  2>&1 | tee ${remote_host}_last_make_protokoll
+
+          if [[ $? != 0 ]]
+          then
+             printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_host\" "
+             if [[ $silent = false ]]
              then
-                ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)"
-             else
-                   # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
-                   # MIT SSH, DESHALB AUFRUF PER PIPE
-                print "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p  ${remote_ud}/../SCRIPTS)"  |  ssh ${remote_username}@${remote_addres}  2>&1
-             fi
-
-                # KOPIEREN DER SCRIPTE
-             if [[ $local_host = decalpha ]]
-             then
-                   # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTï¿œNDIGEN PFADES
-                   # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
-                   # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
-                remote_ud=`echo $remote_ud | sed 's/\$HOME\///'`
-                /bin/scp  batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob  ${remote_username}@${remote_addres}:${remote_ud}/../SCRIPTS  >  /dev/null
-             else
-                scp  batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob  ${remote_username}@${remote_addres}:${remote_ud}/../SCRIPTS  >  /dev/null
-             fi
-
-             cd  -  > /dev/null
-             cd  ${local_source_path}/../UTIL
-
-
-                # KOPIEREN DER UTILITY-PROGRAMME
-             if [[ $local_host = decalpha ]]
-             then
-                   # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTï¿œNDIGEN PFADES
-                   # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
-                   # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
-                remote_ud=`echo $remote_ud | sed 's/\$HOME\///'`
-                /bin/scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
-             else
-                scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
-             fi
-
-
-
-                # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
-                # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
-                # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
-                # Z.B. DIE PFADE ZUM COMPILER)
-             echo "  *** execute \"make\" on remote host"
-
-             if [[ $remote_host = nech ]]
-             then
-                make_call_string="sxmake  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
-             else
-                make_call_string="make  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
-             fi
-
-             if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
-             then
-
-                ssh  ${remote_username}@${remote_addres}  "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"
-
-             elif [[ $remote_host = ibmh ]]
-             then
-
-                print "export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres}
-
-             elif [[ $remote_host = lctit ]]
-             then
-
-                echo  " "  >  ${remote_host}_last_make_protokoll
-                while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
+                answer=dummy
+                printf "\n"
+                while [[ "$answer" != c  &&  "$answer" != k ]]
                 do
-                   print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
+                   printf "  >>> continue / list errors / kill mbuild (c/l/k) ? "
+                   read  answer
+                   if [[ "$answer" = l ]]
+                   then
+                      more ${remote_host}_last_make_protokoll
+                   fi
                 done
-
-             elif [[ $remote_host = lcxt4 ]]
-             then
-
-                print ". /opt/modules/default/init/ksh; module load Base-opts/2.1.56HDA; module load modules/3.1.6; module load pgi/9.0.4; module load PrgEnv-pgi/2.1.56HDA; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
-
-             else
-
-                print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
-
-             fi
-
-          fi    # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME
-
-          rm -rf  ${remote_host}_last_make_protokoll
-
-       else
-
-          if [[ $compile_utility_programs = false ]]
-          then
-
-                # DEPOSITORY VERZEICHNIS ERZEUGEN, FALLS NOCH NICHT VORHANDEN
-             eval remote_md=$remote_md
-             if [[ ! -d $remote_md ]]
-             then
-                if  mkdir $remote_md
+                if [[ $answer = k ]]
                 then
-                   printf "\n\n  *** directory for make depository:"
-                   printf "\n           $remote_md"
-                   printf "\n      was created\n"
-                else
-                   printf "\n  +++ directory for make depository:"
-                   printf "\n           $remote_md"
-                   printf "\n      cannot be created"
-                   locat=local_depository_path; exit
+                   locat=user_abort; exit
                 fi
              fi
-
-                # QUELLTEXT-DATEIEN AUS REPOSITORY INS DEPOSITORY KOPIEREN
-             echo " "
-             echo "  *** updating sources in $remote_md"
-             cd  $remote_md
-             cp  $local_source_path/${mainprog}_sources.tar  .
-             tar xf  ${mainprog}_sources.tar
-
-                # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF LOKALEM RECHNER AUSFUEHREN
-             echo " "
-             echo "  *** execute \"make\" on local host"
-
-             make  PROG=$mainprog  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"  2>&1 | tee ${remote_host}_last_make_protokoll
-
-             if [[ $? != 0 ]]
-             then
-                printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_host\" "
-                if [[ $silent = false ]]
-                then
-                   answer=dummy
-                   printf "\n"
-                   while [[ "$answer" != c  &&  "$answer" != k ]]
-                   do
-                      printf "  >>> continue / list errors / kill mbuild (c/l/k) ? "
-                      read  answer
-                      if [[ "$answer" = l ]]
-                      then
-                         more ${remote_host}_last_make_protokoll
-                      fi
-                   done
-                   if [[ $answer = k ]]
-                   then
-                      locat=user_abort; exit
-                   fi
-                fi
-             fi
-
-
-                # NEUE VERSION AUF LOKALEM RECHNER ZUSAMMENPACKEN
-             printf "\n  *** tar update on local host ..."
-             tar -cf  ${mainprog}_current_version.tar  *.$suf *.o *.mod
-
-
-             # COMPILE THE UTILITY PROGRAMS
-          elif [[ $compile_utility_programs = true ]]
-          then
-             printf "\n\n"
-             echo "  *** compiling the utility programs ..."
-             cd ${local_source_path}/../UTIL
-             make  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"
-             cd  -  > /dev/null
-          fi
-
-       fi
-
-    fi
+          fi
+
+
+             # NEUE VERSION AUF LOKALEM RECHNER ZUSAMMENPACKEN
+          printf "\n  *** tar update on local host ..."
+          tar -cf  ${mainprog}_current_version.tar  *.$suf *.o *.mod
+
+
+          # COMPILE THE UTILITY PROGRAMS
+       elif [[ $compile_utility_programs = true ]]
+       then
+          printf "\n\n"
+          echo "  *** compiling the utility programs ..."
+          cd ${local_source_path}/../UTIL
+          make  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"
+          cd  -  > /dev/null
+       fi
+
+    fi
+
  done
 
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 440)
+++ palm/trunk/SCRIPTS/mrun	(revision 475)
@@ -196,4 +196,6 @@
      # 18/12/09 - Carolin- modification of archiving (permq)
      # 01/02/10 - Siggi  - adapted for lcxt5m and lckyoto (Fujitsu HX600)
+     # 03/02/10 - Siggi  - make options (mopts) to be set by configuration file
+     #                     implemented
 
 
@@ -2121,4 +2123,18 @@
  if [[ $do_compile = true ]]
  then
+    if [[ "$mopts" != "" ]]
+    then
+       spalte1=make-options:; spalte2=$mopts
+       printf "| $spalte1$spalte2 | \n"
+       zeile=$(echo "$mopts" | cut -c41-)
+       while [[ "$zeile" != "" ]]
+       do
+          spalte1=""
+          spalte2=$zeile
+          printf "| $spalte1$spalte2 | \n"
+          zeile=$(echo "$zeile" | cut -c41-)
+       done
+    fi
+
     spalte1=cpp-directives:; spalte2=$cpp_options
     printf "| $spalte1$spalte2 | \n"
@@ -2370,23 +2386,13 @@
        cp  SOURCES_FOR_RUN_$fname/*  $TEMPDIR_COMPILE
 
-          # FALLS USER-INTERFACE VORHANDEN UND AUF DATEI MIT ANDEREM NAMEN
-          # ALS user_interface.f90 LIEGT, DIESEN GEAENDERTEN NAMEN INS
-          # MAKEFILE EINTRAGEN
-#       cd  $TEMPDIR_COMPILE
-#       interface_file=`grep -l "END SUBROUTINE user_parin" $source_list`
-#       if [[ "$interface_file" != "" ]]
-#       then
-#          interface_file=`echo $interface_file | cut -d"." -f1`
-#          mv  Makefile  Makefile_old
-#          sed "s/user_interface/$interface_file/g"  Makefile_old  >  Makefile
-#       fi
-#       cd -  > /dev/null
     else
+
        cp  $executable   ${TEMPDIR}/a.out
+
     fi
 
 
        # WECHSEL IN TEMPORAEREN KATALOG
-    cd $TEMPDIR
+    cd  $TEMPDIR
     printf "\n  *** changed to temporary directory: $TEMPDIR"
 
@@ -2418,6 +2424,10 @@
        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 "      options:                  $fopts\n"
+       printf "      compiler options:         $fopts\n"
        printf "      preprocessor-directives:  $cpp_options \n"
        printf "      linker-options:           $lopts \n"
@@ -2426,5 +2436,5 @@
        if [[ $localhost = nech ]]
        then
-          ssh  136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; cd \$HOME/work/${usern}.$kennung; sxmake -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
+          ssh  136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; 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
@@ -2433,5 +2443,5 @@
        then
           printf "      compiler is called via ssh on \"plogin1\" \n"
-          ssh  plogin1  -l $usern  "export PATH=/sw/ibm/xlf/12.1.0.3/usr/bin:$PATH; cd $TEMPDIR; make -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
+          ssh  plogin1  -l $usern  "export PATH=/sw/ibm/xlf/12.1.0.3/usr/bin:$PATH; 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
@@ -2439,5 +2449,5 @@
        then
           printf "      compiler is called via ssh on \"bicegate\" using module \"$mpilib\" \n"
-          ssh  130.73.232.103  -l $usern  ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib; cd $TEMPDIR; make -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
+          ssh  130.73.232.103  -l $usern  ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib; 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
@@ -2445,10 +2455,10 @@
        then
           printf "      compiler is called via ssh on \"hicegate2\" using module \"$mpilib\" \n"
-          ssh  130.75.4.103  -l $usern  ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib; cd $TEMPDIR; make -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
+          ssh  130.75.4.103    -l $usern  ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib; 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
        else
           [[ $localhost = lctit ]]  &&  export LM_LICENSE_FILE=27050@tggls
-          make -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
+          make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
        fi
 
Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 440)
+++ palm/trunk/SCRIPTS/subjob	(revision 475)
@@ -112,4 +112,5 @@
      # 16/10/09 - Carolin-adding permq
      # 01/02/10 - Siggi - adapted for lcxt5m and lckyoto (Fujitsu HX600)
+     # 03/02/10 - Siggi - bug in serial jobs removed
 
 
@@ -126,5 +127,5 @@
  local_user=$LOGNAME
  node_usage=shared
- numprocs=1
+ numprocs=0
  punkte="..........................................................."
  submcom=qsub
@@ -830,7 +831,11 @@
 #PBS -l ncpus=1
 #PBS -o $remote_dayfile
-#PBS -e $remote_dayfile
+#PBS -j oe
 $queue_directive
 $email_directive
+
+. /usr/share/modules/init/bash
+module load ifort/11.0.069
+module load netcdf
 
 %%END%%
