Changeset 3229


Ignore:
Timestamp:
Sep 4, 2018 3:05:36 PM (3 years ago)
Author:
sward
Message:

Bugfix: maximum time per log point now includes PE0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/cpulog_mod.f90

    r3049 r3229  
    2525! -----------------
    2626! $Id$
     27! Bugfix in maximum time spent per log point: PE 0 was beeing ignored.
     28!
     29! 3049 2018-05-29 13:52:36Z Giersch
    2730! Error messages revised
    2831!
     
    326329       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  pe_min        !<
    327330       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  pe_rms        !<
     331       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  pe_tmp        !<
    328332       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  sum           !<
    329333       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pe_log_points !<
     
    348352!--       Allocate and initialize temporary arrays needed for statistics
    349353          ALLOCATE( pe_max( SIZE( log_point ) ), pe_min( SIZE( log_point ) ),  &
    350                     pe_rms( SIZE( log_point ) ),                               &
     354                    pe_rms( SIZE( log_point ) ), pe_tmp( SIZE( log_point ) ),  &
    351355                    pe_log_points( SIZE( log_point ), 0:numprocs-1 ) )
    352356          pe_min = log_point%sum
    353357          pe_max = log_point%sum    ! need to be set in case of 1 PE
    354358          pe_rms = 0.0_wp
     359          pe_tmp = 0.0_wp
    355360
    356361#if defined( __parallel )
     
    358363!--       Receive data from all PEs
    359364          DO  i = 1, numprocs-1
    360              CALL MPI_RECV( pe_max(1), SIZE( log_point ), MPI_REAL,            &
     365             CALL MPI_RECV( pe_tmp(1), SIZE( log_point ), MPI_REAL,            &
    361366                            i, i, comm2d, status, ierr )
    362367             sender = status(MPI_SOURCE)
    363              pe_log_points(:,sender) = pe_max
     368             pe_log_points(:,sender) = pe_tmp
    364369          ENDDO
    365370          pe_log_points(:,0) = log_point%sum   ! Results from PE0
     
    482487!--       Receive data from all PEs
    483488          DO  i = 1, numprocs-1
    484              CALL MPI_RECV( pe_max(1), SIZE( log_point ), MPI_REAL, &
     489             CALL MPI_RECV( pe_tmp(1), SIZE( log_point ), MPI_REAL, &
    485490                            MPI_ANY_SOURCE, MPI_ANY_TAG, comm2d, status, ierr )
    486491             sender = status(MPI_SOURCE)
    487              pe_log_points(:,sender) = pe_max
     492             pe_log_points(:,sender) = pe_tmp
    488493          ENDDO
    489494          pe_log_points(:,0) = log_point_s%sum   ! Results from PE0
Note: See TracChangeset for help on using the changeset viewer.