Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 2265)
+++ palm/trunk/SCRIPTS/subjob	(revision 2266)
@@ -28,4 +28,7 @@
 # -----------------
 # $Id$
+# nech related parts removed
+# 
+# 2257 2017-06-07 14:07:05Z witha
 # adjustments for lceddy, removed lcflow-specific code
 # 
@@ -231,5 +234,4 @@
      (climate*)              local_address=165.132.26.68;  local_host=lcyon;;
      (clogin*)               local_address=86.50.166.21;   local_host=lccrayf;;
-     (cs*)                   local_address=136.172.44.131; local_host=nech;;
      (elephanta)             local_address=130.75.105.6;   local_host=lcmuk;;
      (hpcl*)		     local_address=eddy.hpc.uni-oldenburg.de; local_host=lceddy;;
@@ -334,5 +336,5 @@
     printf "\n        -h    execution host, available hosts:    $remote_host"
     printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, lc...,"
-    printf "\n              lckiaps, lctit, nech"
+    printf "\n              lckiaps, lctit"
     printf "\n        -m    memory demand per process in MByte  ---"
     printf "\n        -n    jobname                             <jobdatei>"
@@ -420,5 +422,4 @@
         (lcxt5m)  remote_address=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;;
         (lcyon)   remote_address=165.132.26.68; submcom=/usr/torque/bin/qsub;;
-        (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_address=136.172.44.147; submcom="/usr/local/bin/qsub";;
         (*)       printf "\n  +++ hostname \"$remote_host\" not allowed";
                   locat=parameter; exit;;
@@ -536,14 +537,4 @@
     fi
  done
- if [[ $remote_host = nech ]]
- then
-    if (( tasks_per_node != 0 ))
-    then
-       (( cputime = cputime * tasks_per_node ))
-    elif [[ $numprocs != 0 ]]
-    then
-       (( cputime = cputime * numprocs ))
-    fi
- fi
  (( stunden  = cputime / 3600 ))
  (( resttime = cputime - stunden * 3600 ))
@@ -569,16 +560,5 @@
  done
 
- if [[ $remote_host = nech ]]
- then
-    if (( tasks_per_node != 0 ))
-    then
-       (( Memory = memory * tasks_per_node / 1000 ))
-    elif [[ $numprocs != 0 ]]
-    then
-       (( Memory = memory * numprocs / 1000 ))
-    else
-       (( Memory = memory / 1000 ))
-    fi
- elif [[ $remote_host = lctit ]]
+ if [[ $remote_host = lctit ]]
  then
     (( Memory = memory * tasks_per_node / 1000 ))
@@ -1204,44 +1184,4 @@
 %%END%%
 
- elif [[ $remote_host = nech ]]
- then
-
-    if (( nodes > 1 ))
-    then
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
-#PBS -l ${qsubmem}=${Memory}gb
-#PBS -b $nodes
-#PBS -o $remote_dayfile
-#PBS -N palm
-#PBS -j o
-#PBS -T mpisx
-
-%%END%%
-
-    elif [[ $numprocs != 0 ]]
-    then
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
-#PBS -l ${qsubmem}=${Memory}gb
-#PBS -o $remote_dayfile
-#PBS -N palm
-#PBS -j o
-
-%%END%%
-
-    else
-       cat > $job_to_send << %%END%%
-#!/bin/ksh
-#PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime
-#PBS -o $remote_dayfile
-#PBS -j o
-
-%%END%%
-
-    fi
-
  elif [[ $remote_host = lctit ]]
  then
@@ -1352,18 +1292,4 @@
           fi
           echo "echo \"exit\" >> scpjob.$identifier"                     >>  $job_to_send
-
-       elif [[ $remote_host = nech ]]
-       then
-          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
-          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
-          echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100"  >>  $job_to_send
-          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
-          echo "#PBS -j o"                         >>  $job_to_send
-          echo " "                                 >>  $job_to_send
-          echo "set -x"                            >>  $job_to_send
-          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
-          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  $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 = lcbullhh ]]
@@ -1533,8 +1459,4 @@
           echo "rm  scpjob.$identifier"            >>  $job_to_send
        fi
-       if [[ $remote_host = nech ]]
-       then
-          echo "cd -"                           >>  $job_to_send
-       fi
     else
 #       echo "ftpcopy  -d  $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
@@ -1575,16 +1497,6 @@
           job_catalog_save=$job_catalog
           job_catalog=job_queue
-       elif [[ $remote_host = nech ]]
-       then
-          job_catalog_save=$job_catalog
-          job_catalog=/hpf/b/${remote_user}/job_queue
        fi
-       if [[ $remote_host = nech ]]
-       then
-             # FILES CAN ONLY BE TRANSFERED VIA DKRZ'S ARCHIVE-SERVER
-          scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
-       else
-          scp  $ssh_key  $PORTOPT  $job_to_send  ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost
-       fi
+       scp  $ssh_key  $PORTOPT  $job_to_send  ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost
        if [[ $? = 1 ]]
        then
@@ -1625,12 +1537,4 @@
           chmod  u+x  $job_on_remhost
           eval  $submcom  $job_on_remhost
-       elif [[ $local_host = nech ]]
-       then
-          if [[ $queue = default ]]
-          then
-             eval  $submcom  $job_on_remhost
-          else
-             eval  $submcom  -q $queue  $job_on_remhost
-          fi
        elif [[ $local_host = lcbullhh ]]
        then
Index: palm/trunk/SOURCE/cpulog_mod.f90
===================================================================
--- palm/trunk/SOURCE/cpulog_mod.f90	(revision 2265)
+++ palm/trunk/SOURCE/cpulog_mod.f90	(revision 2266)
@@ -25,4 +25,9 @@
 ! -----------------
 ! $Id$
+! bugfix: cpu-time per grid point is now calculated using ngp_3d in order to
+! avoid integer overflow,
+! some re-formatting
+! 
+! 2119 2017-01-17 16:51:50Z raasch
 !
 ! 2118 2017-01-17 16:38:49Z raasch
@@ -126,5 +131,5 @@
                
     USE indices,                                                               &
-        ONLY: nx, ny, nz
+        ONLY: ngp_3d, nx, ny, nz
         
     USE kinds
@@ -256,6 +261,6 @@
                first )  THEN
              WRITE( message_string, * ) 'negative time interval occured',      &
-                         ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" new=', &
-                         mtime,' last=',log_event%mtime,' isum=',log_event%isum
+                       ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" new=', &
+                       mtime,' last=',log_event%mtime,' isum=',log_event%isum
              CALL message( 'cpu_log', 'PA0177', 0, 1, -1, 6, 0 )
              first = .FALSE.
@@ -266,6 +271,6 @@
           IF ( log_event%sum < 0.0  .AND.  first )  THEN
              WRITE( message_string, * ) 'negative time interval occured',      &
-                         ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" sum=', &
-                                         log_event%sum,' mtime=',log_event%mtime
+                       ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" sum=', &
+                       log_event%sum,' mtime=',log_event%mtime
              CALL message( 'cpu_log', 'PA0178', 0, 1, -1, 6, 0 )
              first = .FALSE.
@@ -276,5 +281,6 @@
           log_event%ivect    = 0.0_wp
        ELSE
-          message_string = 'unknown modus of time measurement: ' // TRIM( modus )
+          message_string = 'unknown modus of time measurement: ' //            &
+                           TRIM( modus )
           CALL message( 'cpu_log', 'PA0179', 0, 1, -1, 6, 0 )
        ENDIF
@@ -368,6 +374,6 @@
           ALLOCATE( pe_max( SIZE( log_point ) ) )
           pe_max = log_point%sum
-          CALL MPI_SEND( pe_max(1), SIZE( log_point ), MPI_REAL, 0, myid, comm2d, &
-                         ierr )
+          CALL MPI_SEND( pe_max(1), SIZE( log_point ), MPI_REAL, 0, myid,      &
+                         comm2d, ierr )
 #endif
 
@@ -387,8 +393,10 @@
 
 !
-!--       Get total time in order to calculate CPU-time per gridpoint and timestep
+!--       Get total time in order to calculate CPU-time per gridpoint and
+!--       timestep
           IF ( nr_timesteps_this_run /= 0 )  THEN
-             average_cputime = log_point(1)%sum / REAL( (nx+1) * (ny+1) * nz, KIND=wp ) / &
-                               REAL( nr_timesteps_this_run, KIND=wp ) * 1E6_wp  ! in micro-sec
+             average_cputime = log_point(1)%sum / REAL( ngp_3d(0), KIND=wp ) / &
+                               REAL( nr_timesteps_this_run, KIND=wp ) * 1E6_wp
+                               ! in micro-sec
           ELSE
              average_cputime = -1.0_wp
@@ -399,15 +407,15 @@
           CALL check_open( 18 )
 #if defined( __parallel )
-          WRITE ( 18, 100 )  TRIM( run_description_header ),                          &
-                             numprocs * threads_per_task, pdims(1), pdims(2),         &
-                             threads_per_task, nx+1, ny+1, nz, nr_timesteps_this_run, &
-                             average_cputime
+          WRITE ( 18, 100 )  TRIM( run_description_header ),                   &
+                             numprocs * threads_per_task, pdims(1), pdims(2),  &
+                             threads_per_task, nx+1, ny+1, nz,                 &
+                             nr_timesteps_this_run, average_cputime
 
           WRITE ( 18, 110 )
 #else
-          WRITE ( 18, 100 )  TRIM( run_description_header ),                          &
-                             numprocs * threads_per_task, 1, 1,                       &
-                             threads_per_task, nx+1, ny+1, nz, nr_timesteps_this_run, &
-                             average_cputime
+          WRITE ( 18, 100 )  TRIM( run_description_header ),                   &
+                             numprocs * threads_per_task, 1, 1,                &
+                             threads_per_task, nx+1, ny+1, nz,                 &
+                             nr_timesteps_this_run, average_cputime
 
           WRITE ( 18, 110 )
@@ -470,5 +478,6 @@
           DO  iii = 1, SIZE( log_point )
              DO  i = 1, numprocs-1
-                log_point_s(iii)%sum = log_point_s(iii)%sum + pe_log_points(iii,i)
+                log_point_s(iii)%sum = log_point_s(iii)%sum +                  &
+                                       pe_log_points(iii,i)
                 pe_min(iii) = MIN( pe_min(iii), pe_log_points(iii,i) )
                 pe_max(iii) = MAX( pe_max(iii), pe_log_points(iii,i) )
@@ -479,5 +488,5 @@
              DO  i = 0, numprocs-1
                 pe_rms(iii) = pe_rms(iii) + (                                  &
-                                    pe_log_points(iii,i) - log_point_s(iii)%sum &
+                                   pe_log_points(iii,i) - log_point_s(iii)%sum &
                                             )**2
              ENDDO
