Index: /palm/trunk/SCRIPTS/mrun
===================================================================
--- /palm/trunk/SCRIPTS/mrun	(revision 178)
+++ /palm/trunk/SCRIPTS/mrun	(revision 179)
@@ -147,4 +147,5 @@
      #                     adjustments for lcxt4 (Bergen Center for Computational
      #                     Science)
+     # 14/07/08 - Siggi  - adjustments for lcsgih
  
     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
@@ -1825,5 +1826,5 @@
  lopts="$lopts $netcdf_lib $dvrp_lib"
  ROPTS="$ropts"
- if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lctit  ||  $host = lcfimm  ||  $host = lcxt4 )  &&  -n $numprocs ]]
+ if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lcsgih  ||  $host = lcsgib  ||  $host = lctit  ||  $host = lcfimm  ||  $host = lcxt4 )  &&  -n $numprocs ]]
  then
     XOPT="-X $numprocs"
@@ -2754,19 +2755,24 @@
                 # COPY HOSTFILE FROM SOURCE DIRECTORY OR CREATE IT, IF IT
                 # DOES NOT EXIST
-             if [[ -f $hostfile ]]
-             then
-                cp  $hostfile  hostfile
-             else
-                (( ii = 1 ))
-                while (( ii <= $numprocs / $threads_per_task ))
-                do
-                   echo  $localhost_realname  >>  hostfile
-                   (( ii = ii + 1 ))
-                done
-             fi
+             if [[ $host != lcsgih  &&  $host != lcsgib ]]
+             then
+                if [[ -f $hostfile ]]
+                then
+                   cp  $hostfile  hostfile
+                else
+                   (( ii = 1 ))
+                   while (( ii <= $numprocs / $threads_per_task ))
+                   do
+                      echo  $localhost_realname  >>  hostfile
+                      (( ii = ii + 1 ))
+                   done
+                fi
+                eval zeile=\"`head -n $ii  hostfile`\"
+                printf "\n  *** running on: $zeile"
+             fi
+
              (( ii = $numprocs / $threads_per_task ))
-             eval zeile=\"`head -n $ii  hostfile`\"
-             printf "\n  *** running on: $zeile"
              export OMP_NUM_THREADS=$threads_per_task
+             echo "OMP_NUM_THREADS=$OMP_NUM_THREADS"
              if [[ $threads_per_task != 1 ]]
              then
@@ -2776,5 +2782,11 @@
              then
                 printf "\n\n"
-                if [[ $host = lcxt4 ]]
+                if [[ $host = lcsgih  ||  $host = lcsgib ]]
+                then
+                   echo "  --- Content of \$PBS_NODEFILE:"
+                   cat $PBS_NODEFILE
+                   echo "  --- end content"
+                   mpirun -machinefile $PBS_NODEFILE -np $ii  a.out  $ROPTS
+                elif [[ $host = lcxt4 ]]
                 then
                    aprun  -n $ii  -N $tasks_per_node  a.out  $ROPTS
Index: /palm/trunk/SCRIPTS/subjob
===================================================================
--- /palm/trunk/SCRIPTS/subjob	(revision 178)
+++ /palm/trunk/SCRIPTS/subjob	(revision 179)
@@ -92,4 +92,5 @@
      # 15/05/08 - Siggi - adjustments for lcxt4 (Bergen Center for Computational
      #                    Science)
+     # 14/07/08 - Siggi - adjustments for lcsgih
 
 
@@ -171,4 +172,5 @@
      (hexagon.bccs.uib.no)   local_addres=129.177.20.113; local_host=lcxt4;;
      (hreg*-en0|hanni*-en0)  local_addres=130.75.4.10;    local_host=ibmh;;
+     (h01*)                  local_addres=10.152.0.7;     local_host=lcsgih;;
      (irifi)                 local_addres=130.75.105.104; local_host=lcmuk;;
      (levanto)               local_addres=130.75.105.45;  local_host=lcmuk;;
@@ -180,5 +182,7 @@
      (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
      (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
+     (service100)            local_addres=10.152.0.7;     local_host=lcsgih;;
      (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
+     (r1*)                   local_addres=10.152.0.7;     local_host=lcsgih;;
      (tgg*)                  local_addres=172.17.75.161;  local_host=lctit;;
      (vorias)                local_addres=172.20.25.43;   local_host=lcmuk;;
@@ -306,4 +310,5 @@
         (ibmy)   queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
 	(lcfimm) remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
+        (lcsgih) remote_addres=10.152.0.7; submcom=/opt/moab/bin/msub;;
         (lctit)  queue=lctit; remote_addres=172.17.75.161; submcom=/n1ge/TITECH_GRID/tools/bin/n1ge;;
         (lcxt4)	 remote_addres=129.177.20.113; submcom=/opt/torque/2.3.0/bin/qsub;;
@@ -661,4 +666,40 @@
     fi
 
+ elif [[ $remote_host = lcsgih ]]
+ then
+
+    if [[ $numprocs != 0 ]]
+    then
+       cat > $job_to_send << %%END%%
+#PBS -S /bin/bash
+#PBS -N $job_name
+#PBS -l walltime=$timestring
+#PBS -l nodes=$nodes:ppn=${tasks_per_node}:xe
+#PBS -l naccesspolicy=singlejob
+#PBS -o $remote_dayfile
+#PBS -j oe
+
+. /usr/share/modules/init/bash
+module load mvapich/mvapich-0.9.9-intel
+module load netcdf
+export LD_LIBRARY_PATH=/sw/intel/fce/10.1.015/lib:/sw/dataformats/netcdf/3.6.2/lib:$LD_LIBRARY_PATH
+
+echo ld_library_path=$LD_LIBRARY_PATH
+
+%%END%%
+
+    else
+       cat > $job_to_send << %%END%%
+#PBS -S /bin/bash
+#PBS -N $job_name
+#PBS -l walltime=$timestring
+#PBS -l ncpus=1
+#PBS -o $remote_dayfile
+#PBS -e $remote_dayfile
+
+%%END%%
+
+    fi
+
  elif [[ $remote_host = lcxt4 ]]
  then
Index: /palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 178)
+++ /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 179)
@@ -106,4 +106,5 @@
 Bugfix: a stop command was missing in some cases of the parallel branch (local_stop)
 Bugfix in volume flow control for non-cyclic boundary conditions (pres)
+Bugfix: misplaced #endif directives (combine_plot_fields)
 
 
Index: /palm/trunk/UTIL/combine_plot_fields.f90
===================================================================
--- /palm/trunk/UTIL/combine_plot_fields.f90	(revision 178)
+++ /palm/trunk/UTIL/combine_plot_fields.f90	(revision 179)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Bugfix: three misplaced #endif directives
 !
 ! Former revisions:
@@ -298,6 +298,6 @@
              ENDDO   ! av = 0, 1
 
-          ENDIF
-#endif
+#endif
+          ENDIF
 
 !
@@ -420,6 +420,6 @@
                 ENDIF
 
-             ENDIF
-#endif
+#endif
+             ENDIF
 
           ENDDO
@@ -608,6 +608,6 @@
           ENDDO    ! av=0,1
 
+#endif
        ENDIF
-#endif
 
 !
@@ -736,8 +736,10 @@
        INTEGER, INTENT(IN) ::  errno
 
+#if defined( __netcdf )
        IF ( nc_stat /= NF90_NOERR )  THEN
           PRINT*, '+++ combine_plot_fields  netcdf: ', av, errno, &
                   TRIM( nf90_strerror( nc_stat ) )
        ENDIF
+#endif
 
     END SUBROUTINE handle_netcdf_error
