Changeset 2266 for palm/trunk/SOURCE
- Timestamp:
- Jun 9, 2017 9:27:21 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/cpulog_mod.f90
r2119 r2266 25 25 ! ----------------- 26 26 ! $Id$ 27 ! bugfix: cpu-time per grid point is now calculated using ngp_3d in order to 28 ! avoid integer overflow, 29 ! some re-formatting 30 ! 31 ! 2119 2017-01-17 16:51:50Z raasch 27 32 ! 28 33 ! 2118 2017-01-17 16:38:49Z raasch … … 126 131 127 132 USE indices, & 128 ONLY: n x, ny, nz133 ONLY: ngp_3d, nx, ny, nz 129 134 130 135 USE kinds … … 256 261 first ) THEN 257 262 WRITE( message_string, * ) 'negative time interval occured', & 258 259 263 ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" new=', & 264 mtime,' last=',log_event%mtime,' isum=',log_event%isum 260 265 CALL message( 'cpu_log', 'PA0177', 0, 1, -1, 6, 0 ) 261 266 first = .FALSE. … … 266 271 IF ( log_event%sum < 0.0 .AND. first ) THEN 267 272 WRITE( message_string, * ) 'negative time interval occured', & 268 269 273 ' &PE',myid,' L=STOP "',TRIM(log_event%place),'" sum=', & 274 log_event%sum,' mtime=',log_event%mtime 270 275 CALL message( 'cpu_log', 'PA0178', 0, 1, -1, 6, 0 ) 271 276 first = .FALSE. … … 276 281 log_event%ivect = 0.0_wp 277 282 ELSE 278 message_string = 'unknown modus of time measurement: ' // TRIM( modus ) 283 message_string = 'unknown modus of time measurement: ' // & 284 TRIM( modus ) 279 285 CALL message( 'cpu_log', 'PA0179', 0, 1, -1, 6, 0 ) 280 286 ENDIF … … 368 374 ALLOCATE( pe_max( SIZE( log_point ) ) ) 369 375 pe_max = log_point%sum 370 CALL MPI_SEND( pe_max(1), SIZE( log_point ), MPI_REAL, 0, myid, comm2d,&371 ierr )376 CALL MPI_SEND( pe_max(1), SIZE( log_point ), MPI_REAL, 0, myid, & 377 comm2d, ierr ) 372 378 #endif 373 379 … … 387 393 388 394 ! 389 !-- Get total time in order to calculate CPU-time per gridpoint and timestep 395 !-- Get total time in order to calculate CPU-time per gridpoint and 396 !-- timestep 390 397 IF ( nr_timesteps_this_run /= 0 ) THEN 391 average_cputime = log_point(1)%sum / REAL( (nx+1) * (ny+1) * nz, KIND=wp ) / & 392 REAL( nr_timesteps_this_run, KIND=wp ) * 1E6_wp ! in micro-sec 398 average_cputime = log_point(1)%sum / REAL( ngp_3d(0), KIND=wp ) / & 399 REAL( nr_timesteps_this_run, KIND=wp ) * 1E6_wp 400 ! in micro-sec 393 401 ELSE 394 402 average_cputime = -1.0_wp … … 399 407 CALL check_open( 18 ) 400 408 #if defined( __parallel ) 401 WRITE ( 18, 100 ) TRIM( run_description_header ), 402 numprocs * threads_per_task, pdims(1), pdims(2), 403 threads_per_task, nx+1, ny+1, nz, nr_timesteps_this_run,&404 average_cputime409 WRITE ( 18, 100 ) TRIM( run_description_header ), & 410 numprocs * threads_per_task, pdims(1), pdims(2), & 411 threads_per_task, nx+1, ny+1, nz, & 412 nr_timesteps_this_run, average_cputime 405 413 406 414 WRITE ( 18, 110 ) 407 415 #else 408 WRITE ( 18, 100 ) TRIM( run_description_header ), 409 numprocs * threads_per_task, 1, 1, 410 threads_per_task, nx+1, ny+1, nz, nr_timesteps_this_run,&411 average_cputime416 WRITE ( 18, 100 ) TRIM( run_description_header ), & 417 numprocs * threads_per_task, 1, 1, & 418 threads_per_task, nx+1, ny+1, nz, & 419 nr_timesteps_this_run, average_cputime 412 420 413 421 WRITE ( 18, 110 ) … … 470 478 DO iii = 1, SIZE( log_point ) 471 479 DO i = 1, numprocs-1 472 log_point_s(iii)%sum = log_point_s(iii)%sum + pe_log_points(iii,i) 480 log_point_s(iii)%sum = log_point_s(iii)%sum + & 481 pe_log_points(iii,i) 473 482 pe_min(iii) = MIN( pe_min(iii), pe_log_points(iii,i) ) 474 483 pe_max(iii) = MAX( pe_max(iii), pe_log_points(iii,i) ) … … 479 488 DO i = 0, numprocs-1 480 489 pe_rms(iii) = pe_rms(iii) + ( & 481 490 pe_log_points(iii,i) - log_point_s(iii)%sum & 482 491 )**2 483 492 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.