SUBROUTINE GSTATS_BARRIER(KNUM)

USE PARKIND1  ,ONLY : JPIM     ,JPRB

USE YOMGSTATS, ONLY : LBARRIER_STATS
USE MPL_MODULE  , ONLY : MPL_BARRIER

IMPLICIT NONE

INTEGER(KIND=JPIM) :: KNUM

IF(LBARRIER_STATS)THEN
  CALL GSTATS(KNUM,0)
  CALL MPL_BARRIER()
  CALL GSTATS(KNUM,1)
ENDIF

END SUBROUTINE GSTATS_BARRIER

