Changeset 4833 for palm/trunk/SOURCE


Ignore:
Timestamp:
Jan 7, 2021 8:57:54 AM (4 years ago)
Author:
raasch
Message:

openmp bugfix for time measurements of non advective processes

File:
1 edited

Legend:

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

    r4828 r4833  
    2626! -----------------
    2727! $Id$
     28! openmp bugfix for time measurements of non advective processes
     29!
     30! 4828 2021-01-05 11:21:41Z Giersch
    2831! reading of namelist file and actions in case of namelist errors revised so that statement labels
    2932! and goto statements are not required any more
     
    29002903      ENDIF
    29012904
    2902 
    2903 
    29042905    END SUBROUTINE chem_non_advective_processes
    29052906
     
    29132914
    29142915
    2915    INTEGER(iwp), INTENT(IN) ::  i  !< grid index in x-direction
    2916    INTEGER(iwp), INTENT(IN) ::  j  !< grid index in y-direction
     2916    INTEGER(iwp), INTENT(IN) ::  i  !< grid index in x-direction
     2917    INTEGER(iwp), INTENT(IN) ::  j  !< grid index in y-direction
    29172918
    29182919!
    29192920!-- Calculation of chemical reactions and deposition.
    2920    IF ( intermediate_timestep_count == 1  .OR.  call_chem_at_all_substeps )  THEN
    2921 
    2922       IF ( chem_gasphase_on )  THEN
    2923          CALL cpu_log( log_point_s(19), 'chem.reactions', 'start' )
    2924          CALL chem_integrate( i, j )
    2925          CALL cpu_log( log_point_s(19), 'chem.reactions', 'stop' )
    2926       ENDIF
    2927 
    2928       IF ( deposition_dry )  THEN
    2929          CALL cpu_log( log_point_s(24), 'chem.deposition', 'start' )
    2930          CALL chem_depo( i, j )
    2931          CALL cpu_log( log_point_s(24), 'chem.deposition', 'stop' )
    2932       ENDIF
    2933 
    2934    ENDIF
    2935 
    2936 
     2921!-- !> TODO
     2922!-- WARNING: time measurements within i,j loops degrade performance because cpu-log routine is
     2923!--          called extremely often. Furthermore, because of that, the counter for this measurement
     2924!--          will get an extremely huge value, too.
     2925!--          Should be removed, because in other _ij routines no measurements are done because of
     2926!--          the reasons given above.
     2927    IF ( intermediate_timestep_count == 1  .OR.  call_chem_at_all_substeps )  THEN
     2928
     2929       IF ( chem_gasphase_on )  THEN
     2930          !$OMP MASTER
     2931          CALL cpu_log( log_point_s(19), 'chem.reactions', 'start' )
     2932          !$OMP END MASTER
     2933          CALL chem_integrate( i, j )
     2934          !$OMP MASTER
     2935          CALL cpu_log( log_point_s(19), 'chem.reactions', 'stop' )
     2936          !$OMP END MASTER
     2937       ENDIF
     2938
     2939       IF ( deposition_dry )  THEN
     2940          !$OMP MASTER
     2941          CALL cpu_log( log_point_s(24), 'chem.deposition', 'start' )
     2942          !$OMP END MASTER
     2943          CALL chem_depo( i, j )
     2944          !$OMP MASTER
     2945          CALL cpu_log( log_point_s(24), 'chem.deposition', 'stop' )
     2946          !$OMP END MASTER
     2947       ENDIF
     2948
     2949    ENDIF
    29372950
    29382951 END SUBROUTINE chem_non_advective_processes_ij
     2952
    29392953
    29402954!--------------------------------------------------------------------------------------------------!
Note: See TracChangeset for help on using the changeset viewer.