Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icectl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icectl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icectl.F90	(revision 10297)
@@ -402,5 +402,5 @@
       IF( lk_mpp ) THEN
          DO ialert_id = 1, inb_altests
-            CALL mpp_sum(inb_alp(ialert_id))
+            CALL mpp_sum('icectl', inb_alp(ialert_id))
          END DO
       ENDIF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedia.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedia.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedia.F90	(revision 10297)
@@ -52,5 +52,5 @@
       ALLOCATE( vol_loc_ini(jpi,jpj), sal_loc_ini(jpi,jpj), tem_loc_ini(jpi,jpj), STAT=ice_dia_alloc )
 
-      IF( lk_mpp             )   CALL mpp_sum ( ice_dia_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'icedia', ice_dia_alloc )
       IF( ice_dia_alloc /= 0 )   CALL ctl_warn( 'ice_dia_alloc: failed to allocate arrays' )
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_pra.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_pra.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_pra.F90	(revision 10297)
@@ -101,5 +101,5 @@
       zcfl  =            MAXVAL( ABS( pu_ice(:,:) ) * rdt_ice * r1_e1u(:,:) )
       zcfl  = MAX( zcfl, MAXVAL( ABS( pv_ice(:,:) ) * rdt_ice * r1_e2v(:,:) ) )
-      IF( lk_mpp )   CALL mpp_max( zcfl )
+      IF( lk_mpp )   CALL mpp_max( 'icedyn_adv_pra', zcfl )
       
       IF( zcfl > 0.5 ) THEN   ;   initad = 2   ;   zusnit = 0.5_wp
@@ -640,5 +640,5 @@
          &      STAT = ierr )
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'icedyn_adv_pra', ierr )
       IF( ierr /= 0 )   CALL ctl_stop('STOP', 'adv_pra_init : unable to allocate ice arrays for Prather advection scheme')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rdgrft.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rdgrft.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rdgrft.F90	(revision 10297)
@@ -92,5 +92,5 @@
          &      ze_i_2d(jpij,nlay_i,jpl), ze_s_2d(jpij,nlay_s,jpl), STAT=ice_dyn_rdgrft_alloc )
 
-      IF( lk_mpp                    )   CALL mpp_sum ( ice_dyn_rdgrft_alloc )
+      IF( lk_mpp                    )   CALL mpp_sum ( 'icedyn_rdgrft', ice_dyn_rdgrft_alloc )
       IF( ice_dyn_rdgrft_alloc /= 0 )   CALL ctl_warn( 'ice_dyn_rdgrft_alloc: failed to allocate arrays' )
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg_evp.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg_evp.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg_evp.F90	(revision 10297)
@@ -653,5 +653,5 @@
             END DO
             zresm = MAXVAL( zresr( 1:jpi, 2:jpjm1 ) )
-            IF( lk_mpp )   CALL mpp_max( zresm )   ! max over the global domain
+            IF( lk_mpp )   CALL mpp_max( 'icedyn_rhg_evp', zresm )   ! max over the global domain
          ENDIF
          !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icestp.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icestp.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icestp.F90	(revision 10297)
@@ -248,5 +248,5 @@
       ierr = ierr + ice1D_alloc      ()      ! thermodynamics
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'icestp', ierr )
       IF( ierr /= 0 )   CALL ctl_stop('STOP', 'ice_init : unable to allocate ice arrays')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/iceupdate.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/iceupdate.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/iceupdate.F90	(revision 10297)
@@ -59,5 +59,5 @@
       ALLOCATE( utau_oce(jpi,jpj), vtau_oce(jpi,jpj), tmod_io(jpi,jpj), STAT=ice_update_alloc )
       !
-      IF( lk_mpp                )   CALL mpp_sum( ice_update_alloc )
+      IF( lk_mpp                )   CALL mpp_sum( 'iceupdate', ice_update_alloc )
       IF( ice_update_alloc /= 0 )   CALL ctl_warn('ice_update_alloc: failed to allocate arrays')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/NST/agrif_user.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/NST/agrif_user.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/NST/agrif_user.F90	(revision 10297)
@@ -280,5 +280,5 @@
          CALL Agrif_Bc_variable(e3t_id,calledweight=1.,procname=interpe3t)
          !
-         IF (lk_mpp) CALL mpp_sum( kindic_agr )
+         IF (lk_mpp) CALL mpp_sum( 'agrif_user', kindic_agr )
          IF( kindic_agr /= 0 ) THEN
             CALL ctl_stop('Child Bathymetry is not correct near boundaries.')
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdy_oce.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdy_oce.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdy_oce.F90	(revision 10297)
@@ -161,5 +161,5 @@
       bdyvmask(:,:) = 1._wp
       ! 
-      IF( lk_mpp             )   CALL mpp_sum ( bdy_oce_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'bdy_oce', bdy_oce_alloc )
       IF( bdy_oce_alloc /= 0 )   CALL ctl_warn('bdy_oce_alloc: failed to allocate arrays.')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdyini.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdyini.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdyini.F90	(revision 10297)
@@ -1280,5 +1280,5 @@
          END DO
          !
-         IF( lk_mpp )   CALL mpp_sum( bdysurftot )      ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', bdysurftot )      ! sum over the global domain
       END IF   
       !
@@ -1520,5 +1520,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF (ztestmask(1)==1) THEN 
@@ -1564,5 +1564,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF (ztestmask(1)==1) THEN
@@ -1608,5 +1608,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF ((ztestmask(1)==1).AND.(icorns(ib,1)==0)) THEN
@@ -1638,5 +1638,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF ((ztestmask(1)==1).AND.(icornn(ib,1)==0)) THEN
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdyvol.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdyvol.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/BDY/bdyvol.F90	(revision 10297)
@@ -85,5 +85,5 @@
 !!gm replace these lines :
       z_cflxemp = SUM ( ( emp(:,:) - rnf(:,:) + fwfisf(:,:) ) * bdytmask(:,:) * e1e2t(:,:) ) / rau0
-      IF( lk_mpp )   CALL mpp_sum( z_cflxemp )     ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'bdyvol', z_cflxemp )     ! sum over the global domain
 !!gm   by :
 !!gm      z_cflxemp = glob_sum(  ( emp(:,:)-rnf(:,:)+fwfisf(:,:) ) * bdytmask(:,:) * e1e2t(:,:)  ) / rau0
@@ -114,5 +114,5 @@
          !
       END DO
-      IF( lk_mpp )   CALL mpp_sum( zubtpecor )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'bdyvol', zubtpecor )   ! sum over the global domain
 
       ! The normal velocity correction
@@ -148,5 +148,5 @@
          !
       END DO
-      IF( lk_mpp )   CALL mpp_sum( ztranst )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'bdyvol', ztranst )   ! sum over the global domain
  
       ! Check the cumulated transport through unstructured OBC once barotropic velocities corrected
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/C1D/dyndmp.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/C1D/dyndmp.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/C1D/dyndmp.F90	(revision 10297)
@@ -57,5 +57,5 @@
       ALLOCATE( utrdmp(jpi,jpj,jpk), vtrdmp(jpi,jpj,jpk), resto_uv(jpi,jpj,jpk), STAT= dyn_dmp_alloc )
       !
-      IF( lk_mpp            )   CALL mpp_sum ( dyn_dmp_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'dyndmp', dyn_dmp_alloc )
       IF( dyn_dmp_alloc > 0 )   CALL ctl_warn('dyn_dmp_alloc: allocation of arrays failed')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diaar5.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diaar5.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diaar5.F90	(revision 10297)
@@ -56,5 +56,5 @@
       ALLOCATE( area(jpi,jpj), thick0(jpi,jpj) , sn0(jpi,jpj,jpk) , STAT=dia_ar5_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( dia_ar5_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'diaar5', dia_ar5_alloc )
       IF( dia_ar5_alloc /= 0 )   CALL ctl_warn('dia_ar5_alloc: failed to allocate arrays')
       !
@@ -95,5 +95,5 @@
          !                                         ! total volume of liquid seawater
          zvolssh = SUM( zarea_ssh(:,:) ) 
-         IF( lk_mpp )   CALL mpp_sum( zvolssh )
+         IF( lk_mpp )   CALL mpp_sum( 'diaar5', zvolssh )
          zvol = vol0 + zvolssh
       
@@ -130,5 +130,5 @@
          !                                         
          zarho = SUM( area(:,:) * zbotpres(:,:) ) 
-         IF( lk_mpp )   CALL mpp_sum( zarho )
+         IF( lk_mpp )   CALL mpp_sum( 'diaar5', zarho )
          zssh_steric = - zarho / area_tot
          CALL iom_put( 'sshthster', zssh_steric )
@@ -156,5 +156,5 @@
          !    
          zarho = SUM( area(:,:) * zbotpres(:,:) ) 
-         IF( lk_mpp )   CALL mpp_sum( zarho )
+         IF( lk_mpp )   CALL mpp_sum( 'diaar5', zarho )
          zssh_steric = - zarho / area_tot
          CALL iom_put( 'sshsteric', zssh_steric )
@@ -194,6 +194,6 @@
          ENDIF
          IF( lk_mpp ) THEN  
-            CALL mpp_sum( ztemp )
-            CALL mpp_sum( zsal  )
+            CALL mpp_sum( 'diaar5', ztemp )
+            CALL mpp_sum( 'diaar5', zsal  )
          END IF
          !
@@ -342,5 +342,5 @@
          area(:,:) = e1e2t(:,:) * tmask_i(:,:)
 
-         area_tot = SUM( area(:,:) )   ;   IF( lk_mpp )   CALL mpp_sum( area_tot )
+         area_tot = SUM( area(:,:) )   ;   IF( lk_mpp )   CALL mpp_sum( 'diaar5', area_tot )
 
          vol0        = 0._wp
@@ -350,5 +350,5 @@
             thick0(:,:) = thick0(:,:) +    tmask_i(:,:) * tmask(:,:,jk) * e3t_0(:,:,jk)
          END DO
-         IF( lk_mpp )   CALL mpp_sum( vol0 )
+         IF( lk_mpp )   CALL mpp_sum( 'diaar5', vol0 )
 
          IF( iom_use( 'sshthster' ) ) THEN
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diadct.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diadct.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diadct.F90	(revision 10297)
@@ -258,5 +258,5 @@
               DO jsec=1,nb_sec ; zsum(jsec,:,:) = secs(jsec)%transport(:,:) ; ENDDO
               zwork(:)= RESHAPE(zsum(:,:,:), ish )
-              CALL mpp_sum(zwork, ish(1))
+              CALL mpp_sum('diadct', zwork, ish(1))
               zsum(:,:,:)= RESHAPE(zwork,ish2)
               DO jsec=1,nb_sec ; secs(jsec)%transport(:,:) = zsum(jsec,:,:) ; ENDDO
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diahth.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diahth.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diahth.F90	(revision 10297)
@@ -54,5 +54,5 @@
       ALLOCATE( hth(jpi,jpj), hd20(jpi,jpj), hd28(jpi,jpj), htc3(jpi,jpj), STAT=dia_hth_alloc )
       !
-      IF( lk_mpp           )   CALL mpp_sum ( dia_hth_alloc )
+      IF( lk_mpp           )   CALL mpp_sum ( 'diahth', dia_hth_alloc )
       IF(dia_hth_alloc /= 0)   CALL ctl_warn('dia_hth_alloc: failed to allocate arrays.')
       !
@@ -123,5 +123,5 @@
                &      zthick(jpi,jpj),  &
                &      zdelr(jpi,jpj), STAT=ji)
-            IF( lk_mpp  )   CALL mpp_sum(ji)
+            IF( lk_mpp  )   CALL mpp_sum('diahth', ji)
             IF( ji /= 0 )   CALL ctl_stop( 'STOP', 'dia_hth : unable to allocate standard ocean arrays' )
          END IF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diaptr.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diaptr.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diaptr.F90	(revision 10297)
@@ -549,5 +549,5 @@
          !
       dia_ptr_alloc = MAXVAL( ierr )
-      IF(lk_mpp)   CALL mpp_sum( dia_ptr_alloc )
+      IF(lk_mpp)   CALL mpp_sum( 'diaptr', dia_ptr_alloc )
       !
    END FUNCTION dia_ptr_alloc
@@ -595,5 +595,5 @@
       ENDIF
 #if defined key_mpp_mpi
-      IF(lk_mpp)   CALL mpp_sum( p_fval, ijpj, ncomm_znl)
+      IF(lk_mpp)   CALL mpp_sum( 'diaptr', p_fval, ijpj, ncomm_znl)
 #endif
       !
@@ -638,5 +638,5 @@
       ENDIF
 #if defined key_mpp_mpi
-      CALL mpp_sum( p_fval, ijpj, ncomm_znl )
+      CALL mpp_sum( 'diaptr', p_fval, ijpj, ncomm_znl )
 #endif
       ! 
@@ -696,5 +696,5 @@
       ish(1) = ijpjjpk  ;   ish2(1) = jpj   ;   ish2(2) = jpk
       zwork(1:ijpjjpk) = RESHAPE( p_fval, ish )
-      CALL mpp_sum( zwork, ijpjjpk, ncomm_znl )
+      CALL mpp_sum( 'diaptr', zwork, ijpjjpk, ncomm_znl )
       p_fval(:,:) = RESHAPE( zwork, ish2 )
 #endif
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diawri.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diawri.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DIA/diawri.F90	(revision 10297)
@@ -410,5 +410,5 @@
          !
       dia_wri_alloc = MAXVAL(ierr)
-      IF( lk_mpp )   CALL mpp_sum( dia_wri_alloc )
+      IF( lk_mpp )   CALL mpp_sum( 'diawri', dia_wri_alloc )
       !
    END FUNCTION dia_wri_alloc
@@ -519,5 +519,5 @@
             !! that routine is called from nemogcm, so do it here immediately before its needed
             ALLOCATE( ndex_bT(jpi*jpj*nclasses), STAT=ierror )
-            IF( lk_mpp )   CALL mpp_sum( ierror )
+            IF( lk_mpp )   CALL mpp_sum( 'diawri', ierror )
             IF( ierror /= 0 ) THEN
                CALL ctl_stop('dia_wri: failed to allocate iceberg diagnostic array')
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/closea.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/closea.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/closea.F90	(revision 10297)
@@ -118,5 +118,5 @@
             ! number of closed seas = global maximum value in closea_mask field
             jncs = maxval(closea_mask(:,:))
-            IF( lk_mpp ) CALL mpp_max(jncs)
+            IF( lk_mpp ) CALL mpp_max('closea', jncs)
             IF( jncs > 0 ) THEN
                IF( lwp ) WRITE(numout,*) 'Number of closed seas : ',jncs
@@ -146,5 +146,5 @@
                ! number of closed seas rnf mappings = global maximum in closea_mask_rnf field
                jncsr = maxval(closea_mask_rnf(:,:))
-               IF( lk_mpp ) CALL mpp_max(jncsr)
+               IF( lk_mpp ) CALL mpp_max('closea', jncsr)
                IF( jncsr > 0 ) THEN
                   IF( lwp ) WRITE(numout,*) 'Number of closed seas rnf mappings : ',jncsr
@@ -166,5 +166,5 @@
                ! number of closed seas empmr mappings = global maximum value in closea_mask_empmr field
                jncse = maxval(closea_mask_empmr(:,:))
-               IF( lk_mpp ) CALL mpp_max(jncse)
+               IF( lk_mpp ) CALL mpp_max('closea', jncse)
                IF( jncse > 0 ) THEN 
                   IF( lwp ) WRITE(numout,*) 'Number of closed seas empmr mappings : ',jncse
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/domvvl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/domvvl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/domvvl.F90	(revision 10297)
@@ -79,5 +79,5 @@
             &      dtilde_e3t_a(jpi,jpj,jpk) , un_td  (jpi,jpj,jpk)     , vn_td  (jpi,jpj,jpk)     ,   &
             &      STAT = dom_vvl_alloc        )
-         IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'domvvl', dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
          un_td = 0._wp
@@ -86,5 +86,5 @@
       IF( ln_vvl_ztilde ) THEN
          ALLOCATE( frq_rst_e3t(jpi,jpj) , frq_rst_hdv(jpi,jpj) , hdiv_lf(jpi,jpj,jpk) , STAT= dom_vvl_alloc )
-         IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'domvvl', dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
       ENDIF
@@ -429,7 +429,7 @@
          END DO
          z_tmax = MAXVAL( ze3t(:,:,:) )
-         IF( lk_mpp )   CALL mpp_max( z_tmax )                 ! max over the global domain
+         IF( lk_mpp )   CALL mpp_max( 'domvvl', z_tmax )                 ! max over the global domain
          z_tmin = MINVAL( ze3t(:,:,:) )
-         IF( lk_mpp )   CALL mpp_min( z_tmin )                 ! min over the global domain
+         IF( lk_mpp )   CALL mpp_min( 'domvvl', z_tmin )                 ! min over the global domain
          ! - ML - test: for the moment, stop simulation for too large e3_t variations
          IF( ( z_tmax >  rn_zdef_max ) .OR. ( z_tmin < - rn_zdef_max ) ) THEN
@@ -493,5 +493,5 @@
          IF ( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
             z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( zht(:,:) ) )
-            IF( lk_mpp ) CALL mpp_max( z_tmax )                             ! max over the global domain
+            IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                             ! max over the global domain
             IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(SUM(tilde_e3t_a))) =', z_tmax
          END IF
@@ -502,5 +502,5 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshn(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshn-SUM(e3t_n))) =', z_tmax
          !
@@ -510,5 +510,5 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + ssha(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+ssha-SUM(e3t_a))) =', z_tmax
          !
@@ -518,17 +518,17 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshb(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshb-SUM(e3t_b))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( sshb(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(sshb))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( sshn(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(sshn))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( ssha(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ssha))) =', z_tmax
       END IF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/domwri.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/domwri.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/domwri.F90	(revision 10297)
@@ -277,5 +277,5 @@
       zrxmax = MAXVAL( zx1 )
       !
-      IF( lk_mpp )   CALL mpp_max( zrxmax ) ! max over the global domain
+      IF( lk_mpp )   CALL mpp_max( 'domwri', zrxmax ) ! max over the global domain
       !
       IF(lwp) THEN
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/iscplhsb.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/iscplhsb.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/iscplhsb.F90	(revision 10297)
@@ -206,5 +206,5 @@
 
       ! build array of total problematic point on each cpu (share to each cpu)
-      CALL mpp_max(inpts,jpnij) 
+      CALL mpp_max('iscplhsb', inpts,jpnij) 
 
       ! size of the new variable
@@ -243,12 +243,12 @@
       ! build array of total problematic point on each cpu (share to each cpu)
       ! point coordinates
-      CALL mpp_max(zlat ,npts)
-      CALL mpp_max(zlon ,npts)
-      CALL mpp_max(izpts,npts)
+      CALL mpp_max('iscplhsb', zlat ,npts)
+      CALL mpp_max('iscplhsb', zlon ,npts)
+      CALL mpp_max('iscplhsb', izpts,npts)
 
       ! correction values 
-      CALL mpp_max(zcorr_vol,npts)
-      CALL mpp_max(zcorr_sal,npts)
-      CALL mpp_max(zcorr_tem,npts)
+      CALL mpp_max('iscplhsb', zcorr_vol,npts)
+      CALL mpp_max('iscplhsb', zcorr_sal,npts)
+      CALL mpp_max('iscplhsb', zcorr_tem,npts)
 
       ! put correction term in the closest cell          
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/iscplini.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/iscplini.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DOM/iscplini.F90	(revision 10297)
@@ -48,5 +48,5 @@
       ALLOCATE( htsc_iscpl(jpi,jpj,jpk,jpts) , hdiv_iscpl(jpi,jpj,jpk) , STAT=iscpl_alloc )
          !
-      IF( lk_mpp          )   CALL mpp_sum ( iscpl_alloc )
+      IF( lk_mpp          )   CALL mpp_sum ( 'iscplini', iscpl_alloc )
       IF( iscpl_alloc > 0 )   CALL ctl_warn('iscpl_alloc: allocation of arrays failed')
    END FUNCTION iscpl_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DYN/dynspg_ts.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DYN/dynspg_ts.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DYN/dynspg_ts.F90	(revision 10297)
@@ -112,5 +112,5 @@
       dyn_spg_ts_alloc = MAXVAL( ierr(:) )
       !
-      IF( lk_mpp                )   CALL mpp_sum( dyn_spg_ts_alloc )
+      IF( lk_mpp                )   CALL mpp_sum( 'dynspg_ts', dyn_spg_ts_alloc )
       IF( dyn_spg_ts_alloc /= 0 )   CALL ctl_warn('dyn_spg_ts_alloc: failed to allocate arrays')
       !
@@ -1478,5 +1478,5 @@
       !
       zcmax = MAXVAL( zcu(:,:) )
-      IF( lk_mpp )   CALL mpp_max( zcmax )
+      IF( lk_mpp )   CALL mpp_max( 'dynspg_ts', zcmax )
 
       ! Estimate number of iterations to satisfy a max courant number= rn_bt_cmax
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DYN/wet_dry.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DYN/wet_dry.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/DYN/wet_dry.F90	(revision 10297)
@@ -243,5 +243,5 @@
          CALL lbc_lnk_multi( 'wet_dry', zwdlmtu, 'U', 1., zwdlmtv, 'V', 1. )
          !
-         IF( lk_mpp )   CALL mpp_max(jflag)   !max over the global domain
+         IF( lk_mpp )   CALL mpp_max('wet_dry', jflag)   !max over the global domain
          !
          IF( jflag == 0 )   EXIT
@@ -372,5 +372,5 @@
          CALL lbc_lnk_multi( 'wet_dry', zwdlmtu, 'U', 1., zwdlmtv, 'V', 1. )
          !
-         IF(lk_mpp) CALL mpp_max(jflag)   !max over the global domain
+         IF(lk_mpp) CALL mpp_max('wet_dry', jflag)   !max over the global domain
          !
          IF(jflag == 0)   EXIT
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flo_oce.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flo_oce.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flo_oce.F90	(revision 10297)
@@ -64,5 +64,5 @@
          &      tpifl(jpnfl)    , tpjfl(jpnfl)  , tpkfl(jpnfl)   , STAT=flo_oce_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( flo_oce_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'flo_oce', flo_oce_alloc )
       IF( flo_oce_alloc /= 0 )   CALL ctl_warn('flo_oce_alloc: failed to allocate arrays')
    END FUNCTION flo_oce_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/floblk.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/floblk.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/floblk.F90	(revision 10297)
@@ -330,10 +330,10 @@
       
       ! synchronisation
-      IF( lk_mpp )   CALL mpp_sum( zgifl , jpnfl )   ! sums over the global domain
-      IF( lk_mpp )   CALL mpp_sum( zgjfl , jpnfl )
-      IF( lk_mpp )   CALL mpp_sum( zgkfl , jpnfl )
-      IF( lk_mpp )   CALL mpp_sum( zagefl, jpnfl )
-      IF( lk_mpp )   CALL mpp_sum( iil   , jpnfl )
-      IF( lk_mpp )   CALL mpp_sum( ijl   , jpnfl )
+      IF( lk_mpp )   CALL mpp_sum( 'floblk', zgifl , jpnfl )   ! sums over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'floblk', zgjfl , jpnfl )
+      IF( lk_mpp )   CALL mpp_sum( 'floblk', zgkfl , jpnfl )
+      IF( lk_mpp )   CALL mpp_sum( 'floblk', zagefl, jpnfl )
+      IF( lk_mpp )   CALL mpp_sum( 'floblk', iil   , jpnfl )
+      IF( lk_mpp )   CALL mpp_sum( 'floblk', ijl   , jpnfl )
       
       ! Test to know if a  float hasn't integrated enought time
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flodom.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flodom.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flodom.F90	(revision 10297)
@@ -193,6 +193,6 @@
       !----------------------------------------------
       IF( lk_mpp )   THEN 
-         CALL mpp_sum(ihtest,jpnfl)
-         CALL mpp_sum(ivtest,jpnfl)
+         CALL mpp_sum('flodom', ihtest,jpnfl)
+         CALL mpp_sum('flodom', ivtest,jpnfl)
       ENDIF
       DO jfl = kfl_start,kfl_end
@@ -252,6 +252,6 @@
       ! The sum of all the arrays zgifl, zgjfl, zgkfl give 3 arrays with the positions of all the floats.
       IF( lk_mpp )   THEN 
-         CALL mpp_sum( zgjfl, ifl )   ! sums over the global domain
-         CALL mpp_sum( zgkfl, ifl )
+         CALL mpp_sum( 'flodom', zgjfl, ifl )   ! sums over the global domain
+         CALL mpp_sum( 'flodom', zgkfl, ifl )
       ENDIF
             
@@ -451,5 +451,5 @@
                 zgifl(jpnfl) , zgjfl(jpnfl) , zgkfl(jpnfl)   , STAT=flo_dom_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( flo_dom_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'flodom', flo_dom_alloc )
       IF( flo_dom_alloc /= 0 )   CALL ctl_warn('flo_dom_alloc: failed to allocate arrays')
    END FUNCTION flo_dom_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/florst.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/florst.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/florst.F90	(revision 10297)
@@ -39,5 +39,5 @@
       ALLOCATE( iperproc(jpnij), STAT=flo_rst_alloc )
       !  
-      IF( lk_mpp             )   CALL mpp_sum ( flo_rst_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'florst', flo_rst_alloc )
       IF( flo_rst_alloc /= 0 )   CALL ctl_warn('flo_rst_alloc: failed to allocate arrays.')
    END FUNCTION flo_rst_alloc
@@ -109,5 +109,5 @@
                ENDIF
             END DO
-            CALL mpp_sum( iperproc, jpnij )
+            CALL mpp_sum( 'florst', iperproc, jpnij )
             !
             IF(lwp) THEN
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flowri.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flowri.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/FLO/flowri.F90	(revision 10297)
@@ -51,5 +51,5 @@
                 zlon(jpnfl) , zlat(jpnfl) , zdep(jpnfl) , STAT=flo_wri_alloc)
       !  
-      IF( lk_mpp             )   CALL mpp_sum ( flo_wri_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'flowri', flo_wri_alloc )
       IF( flo_wri_alloc /= 0 )   CALL ctl_warn('flo_wri_alloc: failed to allocate arrays.')
    END FUNCTION flo_wri_alloc
@@ -153,10 +153,10 @@
       !Only proc 0 writes all positions : SUM of positions on all procs
       IF( lk_mpp ) THEN
-         CALL mpp_sum( zlon, jpnfl )   ! sums over the global domain
-         CALL mpp_sum( zlat, jpnfl )   ! sums over the global domain
-         CALL mpp_sum( zdep, jpnfl )   ! sums over the global domain
-         CALL mpp_sum( ztem, jpnfl )   ! sums over the global domain
-         CALL mpp_sum( zsal, jpnfl )   ! sums over the global domain
-         CALL mpp_sum( zrho, jpnfl )   ! sums over the global domain
+         CALL mpp_sum( 'flowri', zlon, jpnfl )   ! sums over the global domain
+         CALL mpp_sum( 'flowri', zlat, jpnfl )   ! sums over the global domain
+         CALL mpp_sum( 'flowri', zdep, jpnfl )   ! sums over the global domain
+         CALL mpp_sum( 'flowri', ztem, jpnfl )   ! sums over the global domain
+         CALL mpp_sum( 'flowri', zsal, jpnfl )   ! sums over the global domain
+         CALL mpp_sum( 'flowri', zrho, jpnfl )   ! sums over the global domain
       ENDIF
 
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icb_oce.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icb_oce.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icb_oce.F90	(revision 10297)
@@ -190,5 +190,5 @@
       icb_alloc = icb_alloc + ill
 
-      IF( lk_mpp        )   CALL mpp_sum ( icb_alloc )
+      IF( lk_mpp        )   CALL mpp_sum ( 'icb_oce', icb_alloc )
       IF( icb_alloc > 0 )   CALL ctl_warn('icb_alloc: allocation of arrays failed')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbdia.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbdia.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbdia.F90	(revision 10297)
@@ -161,5 +161,5 @@
          rsumbuf(2) = bergs_mass_start
          rsumbuf(3) = bits_mass_start
-         CALL mpp_sum( rsumbuf(1:3), 3 )
+         CALL mpp_sum( 'icbdia', rsumbuf(1:3), 3 )
          floating_mass_start = rsumbuf(1)
          bergs_mass_start = rsumbuf(2)
@@ -236,5 +236,5 @@
             rsumbuf(23) = zgrdd_bits_mass
             !
-            CALL mpp_sum( rsumbuf(1:23), 23)
+            CALL mpp_sum( 'icbdia', rsumbuf(1:23), 23)
             !
             stored_end                = rsumbuf( 1)
@@ -269,5 +269,5 @@
                nsumbuf(4+ik) = nbergs_calved_by_class(ik)
             END DO
-            CALL mpp_sum( nsumbuf(1:nclasses+4), nclasses+4 )
+            CALL mpp_sum( 'icbdia', nsumbuf(1:nclasses+4), nclasses+4 )
             !
             nbergs_end        = nsumbuf(1)
@@ -436,9 +436,9 @@
       IF( kt == nit000 ) THEN
          stored_start = SUM( berg_grid%stored_ice(:,:,:) )
-         IF( lk_mpp ) CALL mpp_sum( stored_start )
+         IF( lk_mpp ) CALL mpp_sum( 'icbdia', stored_start )
          WRITE(numicb,'(a,es13.6,a)')   'icb_dia_income: initial stored mass=',stored_start,' kg'
          !
          stored_heat_start = SUM( berg_grid%stored_heat(:,:) )
-         IF( lk_mpp ) CALL mpp_sum( stored_heat_start )
+         IF( lk_mpp ) CALL mpp_sum( 'icbdia', stored_heat_start )
          WRITE(numicb,'(a,es13.6,a)')    'icb_dia_income: initial stored heat=',stored_heat_start,' J'
       ENDIF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbini.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbini.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbini.F90	(revision 10297)
@@ -335,5 +335,5 @@
       !
       ibergs = icb_utl_count()
-      IF( lk_mpp ) CALL mpp_sum(ibergs)
+      IF( lk_mpp ) CALL mpp_sum('icbini', ibergs)
       WRITE(numicb,'(a,i6,a)') 'diamonds, icb_ini_gen: ',ibergs,' were generated'
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icblbc.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icblbc.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icblbc.F90	(revision 10297)
@@ -551,5 +551,5 @@
             this => this%next
          ENDDO ! WHILE
-         CALL mpp_sum(i)
+         CALL mpp_sum('icblbc', i)
          IF( i .GT. 0 ) THEN
             WRITE( numicb,'(a,i4)') 'send_bergs_to_other_pes: # of bergs outside computational domain = ',i
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbrst.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbrst.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbrst.F90	(revision 10297)
@@ -141,6 +141,6 @@
       IF( lk_mpp ) THEN
          ! Only mpp_sum ibergs_in_file if we are reading from multiple restart files. 
-         IF( INDEX(iom_file(ncid)%name,'icebergs.nc' ) .EQ. 0 ) CALL mpp_sum(ibergs_in_file)
-         CALL mpp_sum(jn)
+         IF( INDEX(iom_file(ncid)%name,'icebergs.nc' ) .EQ. 0 ) CALL mpp_sum('icbrst', ibergs_in_file)
+         CALL mpp_sum('icbrst', jn)
       ENDIF
       IF( lwp )   WRITE(numout,'(a,i5,a,i5,a)') 'icebergs, icb_rst_read: there were',ibergs_in_file,   &
@@ -164,5 +164,5 @@
       ENDIF
       IF( lk_mpp ) THEN
-         CALL mpp_sum(ibase_err)
+         CALL mpp_sum('icbrst', ibase_err)
       ENDIF
       IF( ibase_err > 0 ) THEN
@@ -171,5 +171,5 @@
          ! all future icebergs numbers will be greater than the current global maximum
          IF( lk_mpp ) THEN
-            CALL mpp_max(imax_icb)
+            CALL mpp_max('icbrst', imax_icb)
          ENDIF
          num_bergs(1) = imax_icb - jpnij + narea
@@ -404,5 +404,5 @@
             WRITE(numout,'(2(a,i5))') 'icebergs, icb_rst_write: # bergs =',jn,' on PE',narea-1
          IF( lk_mpp ) THEN
-            CALL mpp_sum(jn)
+            CALL mpp_sum('icbrst', jn)
          ENDIF
          IF(lwp)   WRITE(numout,'(a,i5,a,i5,a)') 'icebergs, icb_rst_write: ', jn,   &
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbutl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbutl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ICB/icbutl.F90	(revision 10297)
@@ -652,5 +652,5 @@
       ibergs = icb_utl_count()
       inbergs = ibergs
-      IF( lk_mpp )   CALL mpp_sum(inbergs)
+      IF( lk_mpp )   CALL mpp_sum('icbutl', inbergs)
       IF( ibergs > 0 )   WRITE(numicb,'(a," there are",i5," bergs out of",i6," on PE ",i4)')   &
          &                                  cd_label, ibergs, inbergs, narea
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/lib_mpp.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/lib_mpp.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/lib_mpp.F90	(revision 10297)
@@ -158,10 +158,14 @@
 
    ! Communications summary report
-   CHARACTER(len=128), DIMENSION(:), ALLOCATABLE ::   crname                       !: names of calling routines
+   CHARACTER(len=128), DIMENSION(:), ALLOCATABLE ::   crname_lbc                   !: names of lbc_lnk calling routines
+   CHARACTER(len=128), DIMENSION(:), ALLOCATABLE ::   crname_glb                   !: names of global comm  calling routines
    INTEGER, PUBLIC                               ::   ncom_stp = 0                 !: copy of time step # istp
+   INTEGER, PUBLIC                               ::   ncom_fsbc = 1                !: copy of sbc time step # nn_fsbc
+   INTEGER, PUBLIC                               ::   ncom_dttrc = 1               !: copy of top time step # nn_dttrc
    INTEGER, PUBLIC , DIMENSION(:,:), ALLOCATABLE ::   ncomm_sequence               !: size of communicated arrays (halos)
-   INTEGER, PUBLIC                               ::   n_sequence = 0               !: # of communicated arrays
-   LOGICAL                                       ::   l_comm_report_done = .false. !: print report only once
-   
+   INTEGER, PUBLIC                               ::   n_sequence_lbc = 0           !: # of communicated arraysvia lbc
+   INTEGER, PUBLIC                               ::   n_sequence_glb = 0           !: # of global communications
+   INTEGER, PUBLIC                               ::   numcom = -1                  !: logical unit for communicaton report
+
    ! timing summary report
    REAL(wp), PUBLIC ::  waiting_time = 0._wp, compute_time = 0._wp, elapsed_time = 0._wp
@@ -577,61 +581,4 @@
    END SUBROUTINE mppscatter
 
-   !!----------------------------------------------------------------------
-   !!    ***  mppmax_a_int, mppmax_int, mppmax_a_real, mppmax_real  ***
-   !!   
-   !!----------------------------------------------------------------------
-   !!
-   SUBROUTINE mppmax_a_int( ktab, kdim, kcom )
-      !!----------------------------------------------------------------------
-      INTEGER , INTENT(in   )                  ::   kdim   ! size of array
-      INTEGER , INTENT(inout), DIMENSION(kdim) ::   ktab   ! input array
-      INTEGER , INTENT(in   ), OPTIONAL        ::   kcom   !
-      INTEGER :: ierror, ilocalcomm   ! temporary integer
-      INTEGER, DIMENSION(kdim) ::   iwork
-      !!----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ktab, iwork, kdim, mpi_integer, mpi_max, ilocalcomm, ierror )
-      ktab(:) = iwork(:)
-   END SUBROUTINE mppmax_a_int
-   !!
-   SUBROUTINE mppmax_int( ktab, kcom )
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT(inout)           ::   ktab   ! ???
-      INTEGER, INTENT(in   ), OPTIONAL ::   kcom   ! ???
-      INTEGER ::   ierror, iwork, ilocalcomm   ! temporary integer
-      !!----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ktab, iwork, 1, mpi_integer, mpi_max, ilocalcomm, ierror )
-      ktab = iwork
-   END SUBROUTINE mppmax_int
-   !!
-   SUBROUTINE mppmax_a_real( ptab, kdim, kcom )
-      !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(kdim), INTENT(inout) ::   ptab
-      INTEGER                  , INTENT(in   ) ::   kdim
-      INTEGER , OPTIONAL       , INTENT(in   ) ::   kcom
-      INTEGER :: ierror, ilocalcomm
-      REAL(wp), DIMENSION(kdim) ::  zwork
-      !!----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ptab, zwork, kdim, mpi_double_precision, mpi_max, ilocalcomm, ierror )
-      ptab(:) = zwork(:)
-   END SUBROUTINE mppmax_a_real
-   !!
-   SUBROUTINE mppmax_real( ptab, kcom )
-      !!----------------------------------------------------------------------
-      REAL(wp), INTENT(inout)           ::   ptab   ! ???
-      INTEGER , INTENT(in   ), OPTIONAL ::   kcom   ! ???
-      INTEGER  ::   ierror, ilocalcomm
-      REAL(wp) ::   zwork
-      !!----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom!
-      CALL mpi_allreduce( ptab, zwork, 1, mpi_double_precision, mpi_max, ilocalcomm, ierror )
-      ptab = zwork
-   END SUBROUTINE mppmax_real
    !!
    SUBROUTINE mpp_ilor( ld_switch, ldlast, kcom )
@@ -656,6 +603,37 @@
 
    END SUBROUTINE mpp_ilor
-
-
+   
+   !!----------------------------------------------------------------------
+   !!    ***  mppmax_a_int, mppmax_int, mppmax_a_real, mppmax_real  ***
+   !!   
+   !!----------------------------------------------------------------------
+   !!
+#  define OPERATION_MAX
+#  define INTEGER_TYPE
+#  define DIM_0d
+#     define ROUTINE_ALLREDUCE           mppmax_int
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_0d
+#  define DIM_1d
+#     define ROUTINE_ALLREDUCE           mppmax_a_int
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_1d
+#  undef INTEGER_TYPE
+!
+#  define REAL_TYPE
+#  define DIM_0d
+#     define ROUTINE_ALLREDUCE           mppmax_real
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_0d
+#  define DIM_1d
+#     define ROUTINE_ALLREDUCE           mppmax_a_real
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_1d
+#  undef REAL_TYPE
+#  undef OPERATION_MAX
    !!----------------------------------------------------------------------
    !!    ***  mppmin_a_int, mppmin_int, mppmin_a_real, mppmin_real  ***
@@ -663,59 +641,31 @@
    !!----------------------------------------------------------------------
    !!
-   SUBROUTINE mppmin_a_int( ktab, kdim, kcom )
-      !!----------------------------------------------------------------------
-      INTEGER , INTENT( in  )                  ::   kdim   ! size of array
-      INTEGER , INTENT(inout), DIMENSION(kdim) ::   ktab   ! input array
-      INTEGER , INTENT( in  ), OPTIONAL        ::   kcom   ! input array
-      !!
-      INTEGER ::   ierror, ilocalcomm   ! temporary integer
-      INTEGER, DIMENSION(kdim) ::   iwork
-      !!----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ktab, iwork, kdim, mpi_integer, mpi_min, ilocalcomm, ierror )
-      ktab(:) = iwork(:)
-   END SUBROUTINE mppmin_a_int
-   !!
-   SUBROUTINE mppmin_int( ktab, kcom )
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT(inout) ::   ktab      ! ???
-      INTEGER , INTENT( in  ), OPTIONAL        ::   kcom        ! input array
-      !!
-      INTEGER ::  ierror, iwork, ilocalcomm
-      !!----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ktab, iwork, 1, mpi_integer, mpi_min, ilocalcomm, ierror )
-      ktab = iwork
-   END SUBROUTINE mppmin_int
-   !!
-   SUBROUTINE mppmin_a_real( ptab, kdim, kcom )
-      !!----------------------------------------------------------------------
-      INTEGER , INTENT(in   )                  ::   kdim
-      REAL(wp), INTENT(inout), DIMENSION(kdim) ::   ptab
-      INTEGER , INTENT(in   ), OPTIONAL        ::   kcom
-      INTEGER :: ierror, ilocalcomm
-      REAL(wp), DIMENSION(kdim) ::   zwork
-      !!-----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ptab, zwork, kdim, mpi_double_precision, mpi_min, ilocalcomm, ierror )
-      ptab(:) = zwork(:)
-   END SUBROUTINE mppmin_a_real
-   !!
-   SUBROUTINE mppmin_real( ptab, kcom )
-      !!-----------------------------------------------------------------------
-      REAL(wp), INTENT(inout)           ::   ptab        !
-      INTEGER , INTENT(in   ), OPTIONAL :: kcom
-      INTEGER  ::   ierror, ilocalcomm
-      REAL(wp) ::   zwork
-      !!-----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ptab, zwork, 1, mpi_double_precision, mpi_min, ilocalcomm, ierror )
-      ptab = zwork
-   END SUBROUTINE mppmin_real
-
+#  define OPERATION_MIN
+#  define INTEGER_TYPE
+#  define DIM_0d
+#     define ROUTINE_ALLREDUCE           mppmin_int
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_0d
+#  define DIM_1d
+#     define ROUTINE_ALLREDUCE           mppmin_a_int
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_1d
+#  undef INTEGER_TYPE
+!
+#  define REAL_TYPE
+#  define DIM_0d
+#     define ROUTINE_ALLREDUCE           mppmin_real
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_0d
+#  define DIM_1d
+#     define ROUTINE_ALLREDUCE           mppmin_a_real
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_1d
+#  undef REAL_TYPE
+#  undef OPERATION_MIN
 
    !!----------------------------------------------------------------------
@@ -725,78 +675,46 @@
    !!----------------------------------------------------------------------
    !!
-   SUBROUTINE mppsum_a_int( ktab, kdim )
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT(in   )                   ::   kdim   ! ???
-      INTEGER, INTENT(inout), DIMENSION (kdim) ::   ktab   ! ???
-      INTEGER :: ierror
-      INTEGER, DIMENSION (kdim) ::  iwork
-      !!----------------------------------------------------------------------
-      CALL mpi_allreduce( ktab, iwork, kdim, mpi_integer, mpi_sum, mpi_comm_oce, ierror )
-      ktab(:) = iwork(:)
-   END SUBROUTINE mppsum_a_int
-   !!
-   SUBROUTINE mppsum_int( ktab )
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT(inout) ::   ktab
-      INTEGER :: ierror, iwork
-      !!----------------------------------------------------------------------
-      CALL mpi_allreduce( ktab, iwork, 1, mpi_integer, mpi_sum, mpi_comm_oce, ierror )
-      ktab = iwork
-   END SUBROUTINE mppsum_int
-   !!
-   SUBROUTINE mppsum_a_real( ptab, kdim, kcom )
-      !!-----------------------------------------------------------------------
-      INTEGER                  , INTENT(in   ) ::   kdim   ! size of ptab
-      REAL(wp), DIMENSION(kdim), INTENT(inout) ::   ptab   ! input array
-      INTEGER , OPTIONAL       , INTENT(in   ) ::   kcom   ! specific communicator
-      INTEGER  ::   ierror, ilocalcomm    ! local integer
-      REAL(wp) ::   zwork(kdim)           ! local workspace
-      !!-----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ptab, zwork, kdim, mpi_double_precision, mpi_sum, ilocalcomm, ierror )
-      ptab(:) = zwork(:)
-   END SUBROUTINE mppsum_a_real
-   !!
-   SUBROUTINE mppsum_real( ptab, kcom )
-      !!-----------------------------------------------------------------------
-      REAL(wp)          , INTENT(inout)           ::   ptab   ! input scalar
-      INTEGER , OPTIONAL, INTENT(in   ) ::   kcom
-      INTEGER  ::   ierror, ilocalcomm
-      REAL(wp) ::   zwork
-      !!-----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL mpi_allreduce( ptab, zwork, 1, mpi_double_precision, mpi_sum, ilocalcomm, ierror )
-      ptab = zwork
-   END SUBROUTINE mppsum_real
-   !!
-   SUBROUTINE mppsum_realdd( ytab, kcom )
-      !!-----------------------------------------------------------------------
-      COMPLEX(wp)          , INTENT(inout) ::   ytab    ! input scalar
-      INTEGER    , OPTIONAL, INTENT(in   ) ::   kcom
-      INTEGER     ::   ierror, ilocalcomm
-      COMPLEX(wp) ::   zwork
-      !!-----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL MPI_ALLREDUCE( ytab, zwork, 1, MPI_DOUBLE_COMPLEX, MPI_SUMDD, ilocalcomm, ierror )
-      ytab = zwork
-   END SUBROUTINE mppsum_realdd
-   !!
-   SUBROUTINE mppsum_a_realdd( ytab, kdim, kcom )
-      !!----------------------------------------------------------------------
-      INTEGER                     , INTENT(in   ) ::   kdim   ! size of ytab
-      COMPLEX(wp), DIMENSION(kdim), INTENT(inout) ::   ytab   ! input array
-      INTEGER    , OPTIONAL       , INTENT(in   ) ::   kcom
-      INTEGER:: ierror, ilocalcomm    ! local integer
-      COMPLEX(wp), DIMENSION(kdim) :: zwork     ! temporary workspace
-      !!-----------------------------------------------------------------------
-      ilocalcomm = mpi_comm_oce
-      IF( PRESENT(kcom) )   ilocalcomm = kcom
-      CALL MPI_ALLREDUCE( ytab, zwork, kdim, MPI_DOUBLE_COMPLEX, MPI_SUMDD, ilocalcomm, ierror )
-      ytab(:) = zwork(:)
-   END SUBROUTINE mppsum_a_realdd
-   
+#  define OPERATION_SUM
+#  define INTEGER_TYPE
+#  define DIM_0d
+#     define ROUTINE_ALLREDUCE           mppsum_int
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_0d
+#  define DIM_1d
+#     define ROUTINE_ALLREDUCE           mppsum_a_int
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_1d
+#  undef INTEGER_TYPE
+!
+#  define REAL_TYPE
+#  define DIM_0d
+#     define ROUTINE_ALLREDUCE           mppsum_real
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_0d
+#  define DIM_1d
+#     define ROUTINE_ALLREDUCE           mppsum_a_real
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_1d
+#  undef REAL_TYPE
+#  undef OPERATION_SUM
+
+#  define OPERATION_SUM_DD
+#  define COMPLEX_TYPE
+#  define DIM_0d
+#     define ROUTINE_ALLREDUCE           mppsum_realdd
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_0d
+#  define DIM_1d
+#     define ROUTINE_ALLREDUCE           mppsum_a_realdd
+#     include "mpp_allreduce_generic.h90"
+#     undef ROUTINE_ALLREDUCE
+#  undef DIM_1d
+#  undef COMPLEX_TYPE
+#  undef OPERATION_SUM_DD
 
    SUBROUTINE mppmax_real_multiple( pt1d, kdim, kcom  )
@@ -1117,5 +1035,5 @@
          l_znl_root = .FALSE.
          kwork (1) = nimpp
-         CALL mpp_min ( kwork(1), kcom = ncomm_znl)
+         CALL mpp_min ( 'lib_mpp', kwork(1), kcom = ncomm_znl)
          IF ( nimpp == kwork(1)) l_znl_root = .TRUE.
       END IF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mpp_lnk_generic.h90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mpp_lnk_generic.h90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mpp_lnk_generic.h90	(revision 10297)
@@ -63,4 +63,5 @@
       INTEGER  ::   ml_req1, ml_req2, ml_err     ! for key_mpi_isend
       INTEGER  ::   ierr
+      INTEGER  ::   icom_freq
       REAL(wp) ::   zland
       INTEGER , DIMENSION(MPI_STATUS_SIZE)      ::   ml_stat        ! for key_mpi_isend
@@ -153,26 +154,32 @@
       !
       IF( narea == 1 ) THEN
-         IF ( ncom_stp == nit000 ) THEN
+
+         ! find the smallest common frequency: default = frequency product, if multiple, choose the larger of the 2 frequency
+         icom_freq = ncom_fsbc * ncom_dttrc
+         IF( MOD( MAX(ncom_fsbc,ncom_dttrc), MIN(ncom_fsbc,ncom_dttrc) ) == 0 ) icom_freq = MAX(ncom_fsbc,ncom_dttrc)
+         
+         IF ( ncom_stp == nit000+icom_freq ) THEN   ! avoid to count extra communications in potential initializations at nit000
             IF( .NOT. ALLOCATED( ncomm_sequence) ) THEN
                ALLOCATE( ncomm_sequence(2000,2), STAT=ierr )
                IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'lnk_generic, cannot allocate ncomm_sequence' )
-               ALLOCATE( crname(2000), STAT=ierr )
+               ALLOCATE( crname_lbc(2000), STAT=ierr )
                IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'lnk_generic, cannot allocate crname' )
             ENDIF
-            n_sequence = n_sequence + 1
-            IF( n_sequence > 2000 ) CALL ctl_stop( 'STOP', 'lnk_generic, increase ncomm_sequence first dimension' )
-            ncomm_sequence(n_sequence,1) = ipk*ipl   ! size of 3rd and 4th dimensions
-            ncomm_sequence(n_sequence,2) = ipf       ! number of arrays to be treated (multi)
-            crname(n_sequence) = cdname              ! keep the name of the calling routine
-         ELSE IF ( ncom_stp == (nit000+1) ) THEN
-            IF ( .NOT. l_comm_report_done ) THEN
-               WRITE(numout,*) ' '
-               WRITE(numout,*) ' -----------------------------------------------'
-               WRITE(numout,*) ' Communication pattern report (first time step):'
-               WRITE(numout,*) ' -----------------------------------------------'
-               WRITE(numout,*) ' '
-               WRITE(numout,'(A,I4)') ' Exchanged halos : ', n_sequence
+            n_sequence_lbc = n_sequence_lbc + 1
+            IF( n_sequence_lbc > 2000 ) CALL ctl_stop( 'STOP', 'lnk_generic, increase ncomm_sequence first dimension' )
+            ncomm_sequence(n_sequence_lbc,1) = ipk*ipl   ! size of 3rd and 4th dimensions
+            ncomm_sequence(n_sequence_lbc,2) = ipf       ! number of arrays to be treated (multi)
+            crname_lbc    (n_sequence_lbc)   = cdname    ! keep the name of the calling routine
+         ELSE IF ( ncom_stp == (nit000+2*icom_freq) ) THEN
+            IF ( numcom == -1 ) THEN
+               CALL ctl_opn( numcom, 'communication_report.txt', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea )
+               WRITE(numcom,*) ' '
+               WRITE(numcom,*) ' ------------------------------------------------------------'
+               WRITE(numcom,*) ' Communication pattern report (second oce+sbc+top time step):'
+               WRITE(numcom,*) ' ------------------------------------------------------------'
+               WRITE(numcom,*) ' '
+               WRITE(numcom,'(A,I4)') ' Exchanged halos : ', n_sequence_lbc
                jj = 0; jk = 0; jf = 0; jh = 0
-               DO ji = 1, n_sequence
+               DO ji = 1, n_sequence_lbc
                   IF ( ncomm_sequence(ji,1) .GT. 1 ) jk = jk + 1
                   IF ( ncomm_sequence(ji,2) .GT. 1 ) jf = jf + 1
@@ -180,25 +187,40 @@
                   jh = MAX (jh, ncomm_sequence(ji,1)*ncomm_sequence(ji,2))
                END DO
-               WRITE(numout,'(A,I3)') ' 3D Exchanged halos : ', jk
-               WRITE(numout,'(A,I3)') ' Multi arrays exchanged halos : ', jf
-               WRITE(numout,'(A,I3)') '   from which 3D : ', jj
-               WRITE(numout,'(A,I10)') ' Array max size : ', jh*jpi*jpj
-               WRITE(numout,*) ' '
-               WRITE(numout,*) ' lbc_lnk called'
+               WRITE(numcom,'(A,I3)') ' 3D Exchanged halos : ', jk
+               WRITE(numcom,'(A,I3)') ' Multi arrays exchanged halos : ', jf
+               WRITE(numcom,'(A,I3)') '   from which 3D : ', jj
+               WRITE(numcom,'(A,I10)') ' Array max size : ', jh*jpi*jpj
+               WRITE(numcom,*) ' '
+               WRITE(numcom,*) ' lbc_lnk called'
                jj = 1
-               DO ji = 2, n_sequence
-                  IF( crname(ji-1) /= crname(ji) ) THEN
-                    WRITE(numout,'(A, I4, A, A)') ' - ', jj,' times by subroutine ', TRIM(crname(ji-1))
+               DO ji = 2, n_sequence_lbc
+                  IF( crname_lbc(ji-1) /= crname_lbc(ji) ) THEN
+                    WRITE(numcom,'(A, I4, A, A)') ' - ', jj,' times by subroutine ', TRIM(crname_lbc(ji-1))
                     jj = 0
                   END IF
                   jj = jj + 1 
                END DO
-               WRITE(numout,'(A, I4, A, A)') ' - ', jj,' times by subroutine ', TRIM(crname(n_sequence))
-               WRITE(numout,*) ' '
-               WRITE(numout,*) ' -----------------------------------------------'
-               WRITE(numout,*) ' '
+               WRITE(numcom,'(A, I4, A, A)') ' - ', jj,' times by subroutine ', TRIM(crname_lbc(n_sequence_lbc))
+               WRITE(numcom,*) ' '
+               IF ( n_sequence_glb > 0 ) THEN
+                  WRITE(numcom,'(A,I4)') ' Global communications : ', n_sequence_glb
+                  jj = 1
+                  DO ji = 2, n_sequence_glb
+                     IF( crname_glb(ji-1) /= crname_glb(ji) ) THEN
+                       WRITE(numcom,'(A, I4, A, A)') ' - ', jj,' times by subroutine ', TRIM(crname_glb(ji-1))
+                       jj = 0
+                     END IF
+                     jj = jj + 1 
+                  END DO
+                  WRITE(numcom,'(A, I4, A, A)') ' - ', jj,' times by subroutine ', TRIM(crname_glb(n_sequence_glb))
+                  DEALLOCATE(crname_glb)
+               ELSE
+                  WRITE(numcom,*) ' No MPI global communication '
+               ENDIF
+               WRITE(numcom,*) ' '
+               WRITE(numcom,*) ' -----------------------------------------------'
+               WRITE(numcom,*) ' '
                DEALLOCATE(ncomm_sequence)
-               DEALLOCATE(crname)
-               l_comm_report_done = .TRUE.
+               DEALLOCATE(crname_lbc)
             ENDIF
          ENDIF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mppini.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mppini.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mppini.F90	(revision 10297)
@@ -173,5 +173,5 @@
          &       ilej(jpni,jpnj), ildj(jpni,jpnj), ioso(jpni,jpnj), iowe(jpni,jpnj),   &
          &       STAT=ierr )
-      CALL mpp_sum( ierr )
+      CALL mpp_sum( 'mppini', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'mpp_init: unable to allocate standard ocean arrays' )
       
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_averg_h2d.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_averg_h2d.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_averg_h2d.F90	(revision 10297)
@@ -616,6 +616,6 @@
          
          IF(lk_mpp) THEN
-            CALL mpp_min( ze1min )
-            CALL mpp_min( ze2min )
+            CALL mpp_min( 'obs_averg_h2d', ze1min )
+            CALL mpp_min( 'obs_averg_h2d', ze2min )
          ENDIF
 
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_readmdt.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_readmdt.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_readmdt.F90	(revision 10297)
@@ -220,7 +220,7 @@
       END DO
 
-      IF( lk_mpp)   CALL mpp_sum( zeta1 )
-      IF( lk_mpp)   CALL mpp_sum( zeta2 )
-      IF( lk_mpp)   CALL mpp_sum( zarea )
+      IF( lk_mpp)   CALL mpp_sum( 'obs_readmdt', zeta1 )
+      IF( lk_mpp)   CALL mpp_sum( 'obs_readmdt', zeta2 )
+      IF( lk_mpp)   CALL mpp_sum( 'obs_readmdt', zarea )
       
       zcorr_mdt    = zeta1 / zarea
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_write.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_write.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/OBS/obs_write.F90	(revision 10297)
@@ -592,6 +592,6 @@
 
          CALL obs_mpp_sum_integer( inumgoodobs, inumgoodobsmpp )
-         CALL mpp_sum(zsumx)
-         CALL mpp_sum(zsumx2)
+         CALL mpp_sum('obs_write', zsumx)
+         CALL mpp_sum('obs_write', zsumx2)
 
          IF (lwp) THEN
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/geo2ocean.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/geo2ocean.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/geo2ocean.F90	(revision 10297)
@@ -156,5 +156,5 @@
          &      gsinv(jpi,jpj), gcosv(jpi,jpj),   &  
          &      gsinf(jpi,jpj), gcosf(jpi,jpj), STAT=ierr )
-      IF(lk_mpp)   CALL mpp_sum( ierr )
+      IF(lk_mpp)   CALL mpp_sum( 'geo2ocean', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'angle: unable to allocate arrays' )
       !
@@ -308,5 +308,5 @@
          ALLOCATE( gsinlon(jpi,jpj,4) , gcoslon(jpi,jpj,4) ,   &
             &      gsinlat(jpi,jpj,4) , gcoslat(jpi,jpj,4) , STAT=ierr )
-         IF( lk_mpp    )   CALL mpp_sum( ierr )
+         IF( lk_mpp    )   CALL mpp_sum( 'geo2ocean', ierr )
          IF( ierr /= 0 )   CALL ctl_stop('geo2oce: unable to allocate arrays' )
       ENDIF
@@ -385,5 +385,5 @@
          ALLOCATE( gsinlon(jpi,jpj,4) , gcoslon(jpi,jpj,4) ,   &
             &      gsinlat(jpi,jpj,4) , gcoslat(jpi,jpj,4) , STAT=ierr )
-         IF( lk_mpp    )   CALL mpp_sum( ierr )
+         IF( lk_mpp    )   CALL mpp_sum( 'geo2ocean', ierr )
          IF( ierr /= 0 )   CALL ctl_stop('oce2geo: unable to allocate arrays' )
       ENDIF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbc_ice.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbc_ice.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbc_ice.F90	(revision 10297)
@@ -150,5 +150,5 @@
 
       sbc_ice_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_ice_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'sbc_ice', sbc_ice_alloc )
       IF( sbc_ice_alloc > 0 )   CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed')
    END FUNCTION sbc_ice_alloc
@@ -197,5 +197,5 @@
       ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), snwice_fmass(jpi,jpj) , STAT=ierr(1) )
       sbc_ice_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_ice_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'sbc_ice', sbc_ice_alloc )
       IF( sbc_ice_alloc > 0 )   CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed')
    END FUNCTION sbc_ice_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbc_oce.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbc_oce.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbc_oce.F90	(revision 10297)
@@ -186,5 +186,5 @@
          !
       sbc_oce_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_oce_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'sbc_oce', sbc_oce_alloc )
       IF( sbc_oce_alloc > 0 )   CALL ctl_warn('sbc_oce_alloc: allocation of arrays failed')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcblk.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcblk.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcblk.F90	(revision 10297)
@@ -147,5 +147,5 @@
          &      cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), STAT=sbc_blk_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( sbc_blk_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'sbcblk', sbc_blk_alloc )
       IF( sbc_blk_alloc /= 0 )   CALL ctl_warn('sbc_blk_alloc: failed to allocate arrays')
    END FUNCTION sbc_blk_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbccpl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbccpl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbccpl.F90	(revision 10297)
@@ -224,5 +224,5 @@
 
       sbc_cpl_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_cpl_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'sbccpl', sbc_cpl_alloc )
       IF( sbc_cpl_alloc > 0 )   CALL ctl_warn('sbc_cpl_alloc: allocation of arrays failed')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcdcy.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcdcy.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcdcy.F90	(revision 10297)
@@ -44,5 +44,5 @@
             &      rtmd(jpi,jpj) , rdawn(jpi,jpj) , rdusk(jpi,jpj) , rscal(jpi,jpj) , STAT=sbc_dcy_alloc )
             !
-         IF( lk_mpp             )   CALL mpp_sum ( sbc_dcy_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'sbcdcy', sbc_dcy_alloc )
          IF( sbc_dcy_alloc /= 0 )   CALL ctl_warn('sbc_dcy_alloc: failed to allocate arrays')
       END FUNCTION sbc_dcy_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcice_cice.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcice_cice.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcice_cice.F90	(revision 10297)
@@ -100,5 +100,5 @@
       !!----------------------------------------------------------------------
       ALLOCATE( png(jpi,jpj,jpnij), STAT=sbc_ice_cice_alloc )
-      IF( lk_mpp                 )   CALL mpp_sum ( sbc_ice_cice_alloc )
+      IF( lk_mpp                 )   CALL mpp_sum ( 'sbcice_cice', sbc_ice_cice_alloc )
       IF( sbc_ice_cice_alloc > 0 )   CALL ctl_warn('sbc_ice_cice_alloc: allocation of arrays failed.')
    END FUNCTION sbc_ice_cice_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcisf.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcisf.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcisf.F90	(revision 10297)
@@ -244,5 +244,5 @@
                &    STAT= sbc_isf_alloc )
          !
-         IF( lk_mpp             )   CALL mpp_sum ( sbc_isf_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'sbcisf', sbc_isf_alloc )
          IF( sbc_isf_alloc /= 0 )   CALL ctl_warn('sbc_isf_alloc: failed to allocate arrays.')
          !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcmod.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcmod.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcmod.F90	(revision 10297)
@@ -115,4 +115,7 @@
       IF(lwm) WRITE( numond, namsbc )
       !
+#if defined key_mpp_mpi
+      ncom_fsbc = nn_fsbc    ! make nn_fsbc available for lib_mpp
+#endif
       !                             !* overwrite namelist parameter using CPP key information
 #if defined key_agrif
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcrnf.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcrnf.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/SBC/sbcrnf.F90	(revision 10297)
@@ -83,5 +83,5 @@
          &      rnf_tsc_b(jpi,jpj,jpts) , rnf_tsc (jpi,jpj,jpts) , STAT=sbc_rnf_alloc )
          !
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_rnf_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'sbcrnf', sbc_rnf_alloc )
       IF( sbc_rnf_alloc > 0 )   CALL ctl_warn('sbc_rnf_alloc: allocation of arrays failed')
    END FUNCTION sbc_rnf_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/trabbl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/trabbl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/trabbl.F90	(revision 10297)
@@ -84,5 +84,5 @@
          &      e3u_bbl_0(jpi,jpj) , e3v_bbl_0(jpi,jpj) ,                                    STAT=tra_bbl_alloc )
          !
-      IF( lk_mpp            )   CALL mpp_sum ( tra_bbl_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'trabbl', tra_bbl_alloc )
       IF( tra_bbl_alloc > 0 )   CALL ctl_warn('tra_bbl_alloc: allocation of arrays failed.')
    END FUNCTION tra_bbl_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/tradmp.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/tradmp.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/tradmp.F90	(revision 10297)
@@ -66,5 +66,5 @@
       ALLOCATE( resto(jpi,jpj,jpk), STAT= tra_dmp_alloc )
       !
-      IF( lk_mpp            )   CALL mpp_sum ( tra_dmp_alloc )
+      IF( lk_mpp            )   CALL mpp_sum ( 'tradmp', tra_dmp_alloc )
       IF( tra_dmp_alloc > 0 )   CALL ctl_warn('tra_dmp_alloc: allocation of arrays failed')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/traldf_triad.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/traldf_triad.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRA/traldf_triad.F90	(revision 10297)
@@ -98,5 +98,5 @@
       IF( .NOT.ALLOCATED(zdkt3d) )  THEN
          ALLOCATE( zdkt3d(jpi,jpj,0:1) , STAT=ierr )
-         IF( lk_mpp   )   CALL mpp_sum ( ierr )
+         IF( lk_mpp   )   CALL mpp_sum ( 'traldf_triad', ierr )
          IF( ierr > 0 )   CALL ctl_stop('STOP', 'tra_ldf_triad: unable to allocate arrays')
       ENDIF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdglo.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdglo.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdglo.F90	(revision 10297)
@@ -249,8 +249,8 @@
          ! ---------------------------------
          IF( lk_mpp ) THEN
-            CALL mpp_sum( peke )
-            CALL mpp_sum( umo , jptot_dyn )
-            CALL mpp_sum( vmo , jptot_dyn )
-            CALL mpp_sum( hke , jptot_dyn )
+            CALL mpp_sum( 'trdglo', peke )
+            CALL mpp_sum( 'trdglo', umo , jptot_dyn )
+            CALL mpp_sum( 'trdglo', vmo , jptot_dyn )
+            CALL mpp_sum( 'trdglo', hke , jptot_dyn )
          ENDIF
 
@@ -392,8 +392,8 @@
          ! -------------------------------
          IF( lk_mpp ) THEN
-            CALL mpp_sum( tmo, jptot_tra )   
-            CALL mpp_sum( smo, jptot_tra )
-            CALL mpp_sum( t2 , jptot_tra )
-            CALL mpp_sum( s2 , jptot_tra )
+            CALL mpp_sum( 'trdglo', tmo, jptot_tra )   
+            CALL mpp_sum( 'trdglo', smo, jptot_tra )
+            CALL mpp_sum( 'trdglo', t2 , jptot_tra )
+            CALL mpp_sum( 'trdglo', s2 , jptot_tra )
          ENDIF
 
@@ -526,5 +526,5 @@
          tvolt = tvolt + SUM( e1e2t(:,:) * e3t_n(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) )
       END DO
-      IF( lk_mpp )   CALL mpp_sum( tvolt )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'trdglo', tvolt )   ! sum over the global domain
 
       IF(lwp) WRITE(numout,*) '                total ocean volume at T-point   tvolt = ',tvolt
@@ -546,6 +546,6 @@
          END DO
       END DO
-      IF( lk_mpp )   CALL mpp_sum( tvolu )   ! sums over the global domain
-      IF( lk_mpp )   CALL mpp_sum( tvolv )
+      IF( lk_mpp )   CALL mpp_sum( 'trdglo', tvolu )   ! sums over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'trdglo', tvolv )
 
       IF(lwp) THEN
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdken.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdken.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdken.F90	(revision 10297)
@@ -54,5 +54,5 @@
       ALLOCATE( bu(jpi,jpj,jpk) , bv(jpi,jpj,jpk) , r1_bt(jpi,jpj,jpk) , STAT= trd_ken_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( trd_ken_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'trdken', trd_ken_alloc )
       IF( trd_ken_alloc /= 0 )   CALL ctl_warn('trd_ken_alloc: failed to allocate arrays')
    END FUNCTION trd_ken_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdmxl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdmxl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdmxl.F90	(revision 10297)
@@ -81,5 +81,5 @@
       ALLOCATE( ndextrd1(jpi*jpj) , STAT=trd_mxl_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( trd_mxl_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'trdmxl', trd_mxl_alloc )
       IF( trd_mxl_alloc /= 0 )   CALL ctl_warn('trd_mxl_alloc: failed to allocate array ndextrd1')
    END FUNCTION trd_mxl_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdmxl_oce.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdmxl_oce.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdmxl_oce.F90	(revision 10297)
@@ -127,5 +127,5 @@
       !
       trdmxl_oce_alloc = MAXVAL( ierr )
-      IF( lk_mpp                )   CALL mpp_sum ( trdmxl_oce_alloc )
+      IF( lk_mpp                )   CALL mpp_sum ( 'trdmxl_oce', trdmxl_oce_alloc )
       IF( trdmxl_oce_alloc /= 0 )   CALL ctl_warn('trdmxl_oce_alloc: failed to allocate arrays')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdpen.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdpen.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdpen.F90	(revision 10297)
@@ -50,5 +50,5 @@
       ALLOCATE( rab_pe(jpi,jpj,jpk,jpts) , STAT= trd_pen_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( trd_pen_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'trdpen', trd_pen_alloc )
       IF( trd_pen_alloc /= 0 )   CALL ctl_warn( 'trd_pen_alloc: failed to allocate arrays' )
    END FUNCTION trd_pen_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdtra.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdtra.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdtra.F90	(revision 10297)
@@ -55,5 +55,5 @@
       ALLOCATE( trdtx(jpi,jpj,jpk) , trdty(jpi,jpj,jpk) , trdt(jpi,jpj,jpk) , avt_evd(jpi,jpj,jpk), STAT= trd_tra_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( trd_tra_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'trdtra', trd_tra_alloc )
       IF( trd_tra_alloc /= 0 )   CALL ctl_warn('trd_tra_alloc: failed to allocate arrays')
    END FUNCTION trd_tra_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdvor.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdvor.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/TRD/trdvor.F90	(revision 10297)
@@ -73,5 +73,5 @@
          &      ndexvor1  (jpi*jpj)                                ,   STAT= trd_vor_alloc )
          !
-      IF( lk_mpp             )   CALL mpp_sum ( trd_vor_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'trdvor', trd_vor_alloc )
       IF( trd_vor_alloc /= 0 )   CALL ctl_warn('trd_vor_alloc: failed to allocate arrays')
    END FUNCTION trd_vor_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfgls.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfgls.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfgls.F90	(revision 10297)
@@ -119,5 +119,5 @@
          &      zwall (jpi,jpj,jpk) , ustar2_top (jpi,jpj) , ustar2_bot(jpi,jpj) , STAT= zdf_gls_alloc )
          !
-      IF( lk_mpp             )   CALL mpp_sum ( zdf_gls_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'zdfgls', zdf_gls_alloc )
       IF( zdf_gls_alloc /= 0 )   CALL ctl_warn('zdf_gls_alloc: failed to allocate arrays')
    END FUNCTION zdf_gls_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfiwm.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfiwm.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfiwm.F90	(revision 10297)
@@ -64,5 +64,5 @@
       &         hbot_iwm(jpi,jpj),  hcri_iwm(jpi,jpj)                     , STAT=zdf_iwm_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( zdf_iwm_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'zdfiwm', zdf_iwm_alloc )
       IF( zdf_iwm_alloc /= 0 )   CALL ctl_warn('zdf_iwm_alloc: failed to allocate arrays')
    END FUNCTION zdf_iwm_alloc
@@ -305,5 +305,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( zztmp )
+         IF( lk_mpp )   CALL mpp_sum( 'zdfiwm', zztmp )
          zztmp = rau0 * zztmp ! Global integral of rauo * Kz * N^2 = power contributing to mixing 
          !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfmxl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfmxl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfmxl.F90	(revision 10297)
@@ -50,5 +50,5 @@
          ALLOCATE( nmln(jpi,jpj), hmld(jpi,jpj), hmlp(jpi,jpj), hmlpt(jpi,jpj), STAT= zdf_mxl_alloc )
          !
-         IF( lk_mpp             )   CALL mpp_sum ( zdf_mxl_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'zdfmxl', zdf_mxl_alloc )
          IF( zdf_mxl_alloc /= 0 )   CALL ctl_warn('zdf_mxl_alloc: failed to allocate arrays.')
          !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfosm.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfosm.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdfosm.F90	(revision 10297)
@@ -118,5 +118,5 @@
           &   etmean(jpi,jpj,jpk),  STAT= zdf_osm_alloc )
      IF( zdf_osm_alloc /= 0 )   CALL ctl_warn('zdf_osm_alloc: failed to allocate zdf_osm arrays')
-     IF( lk_mpp             )   CALL mpp_sum ( zdf_osm_alloc )
+     IF( lk_mpp             )   CALL mpp_sum ( 'zdfosm', zdf_osm_alloc )
    END FUNCTION zdf_osm_alloc
 
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdftke.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdftke.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/ZDF/zdftke.F90	(revision 10297)
@@ -103,5 +103,5 @@
       ALLOCATE( htau(jpi,jpj) , dissl(jpi,jpj,jpk) , apdlr(jpi,jpj,jpk) ,   STAT= zdf_tke_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( zdf_tke_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'zdftke', zdf_tke_alloc )
       IF( zdf_tke_alloc /= 0 )   CALL ctl_warn('zdf_tke_alloc: failed to allocate arrays')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/lib_fortran.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/lib_fortran.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/lib_fortran.F90	(revision 10297)
@@ -84,5 +84,5 @@
          CALL DDPDD( CMPLX( ztmp, 0.e0, wp ), ctmp )
          END DO
-      IF( lk_mpp )   CALL mpp_sum( ctmp )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'lib_fortran', ctmp )   ! sum over the global domain
       glob_sum_1d = REAL(ctmp,wp)
       !
@@ -111,5 +111,5 @@
          END DO
       END DO
-      IF( lk_mpp )   CALL mpp_sum( ctmp )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'lib_fortran', ctmp )   ! sum over the global domain
       glob_sum_2d = REAL(ctmp,wp)
       !
@@ -144,5 +144,5 @@
          END DO
       END DO
-      IF( lk_mpp )   CALL mpp_sum( ctmp )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'lib_fortran', ctmp )   ! sum over the global domain
       glob_sum_3d = REAL(ctmp,wp)
       !
@@ -174,5 +174,5 @@
          END DO
       END DO
-      IF( lk_mpp )   CALL mpp_sum( ctmp )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'lib_fortran', ctmp )   ! sum over the global domain
       glob_sum_2d_a = REAL(ctmp,wp)
       !
@@ -209,5 +209,5 @@
          END DO    
       END DO
-      IF( lk_mpp )   CALL mpp_sum( ctmp )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'lib_fortran', ctmp )   ! sum over the global domain
       glob_sum_3d_a = REAL(ctmp,wp)
       !
@@ -236,5 +236,5 @@
          END DO
       END DO
-      IF( lk_mpp )   CALL mpp_sum( ctmp )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'lib_fortran', ctmp )   ! sum over the global domain
       glob_sum_full_2d = REAL(ctmp,wp)
       !
@@ -268,5 +268,5 @@
          END DO
       END DO
-      IF( lk_mpp )   CALL mpp_sum( ctmp )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( 'lib_fortran', ctmp )   ! sum over the global domain
       glob_sum_full_3d = REAL(ctmp,wp)
       !
@@ -285,5 +285,5 @@
       !
       glob_min_2d = MINVAL( ptab(:,:)*tmask_i(:,:) )
-      IF( lk_mpp )   CALL mpp_min( glob_min_2d )
+      IF( lk_mpp )   CALL mpp_min( 'lib_fortran', glob_min_2d )
       !
    END FUNCTION glob_min_2d
@@ -308,5 +308,5 @@
          glob_min_3d = MIN( glob_min_3d, MINVAL( ptab(:,:,jk)*tmask_i(:,:) ) )
       END DO
-      IF( lk_mpp )   CALL mpp_min( glob_min_3d )
+      IF( lk_mpp )   CALL mpp_min( 'lib_fortran', glob_min_3d )
       !
    END FUNCTION glob_min_3d
@@ -325,5 +325,5 @@
       glob_min_2d_a(1) = MINVAL( ptab1(:,:)*tmask_i(:,:) )
       glob_min_2d_a(2) = MINVAL( ptab2(:,:)*tmask_i(:,:) )
-      IF( lk_mpp )   CALL mpp_min( glob_min_2d_a, 2 )
+      IF( lk_mpp )   CALL mpp_min( 'lib_fortran', glob_min_2d_a, 2 )
       !
    END FUNCTION glob_min_2d_a
@@ -351,5 +351,5 @@
          glob_min_3d_a(2) = MIN( glob_min_3d_a(2), MINVAL( ptab2(:,:,jk)*tmask_i(:,:) ) )
       END DO
-      IF( lk_mpp )   CALL mpp_min( glob_min_3d_a, 2 )
+      IF( lk_mpp )   CALL mpp_min( 'lib_fortran', glob_min_3d_a, 2 )
       !
    END FUNCTION glob_min_3d_a
@@ -367,5 +367,5 @@
       !
       glob_max_2d = MAXVAL( ptab(:,:)*tmask_i(:,:) )
-      IF( lk_mpp )   CALL mpp_max( glob_max_2d )
+      IF( lk_mpp )   CALL mpp_max( 'lib_fortran', glob_max_2d )
       !
    END FUNCTION glob_max_2d
@@ -390,5 +390,5 @@
          glob_max_3d = MAX( glob_max_3d, MAXVAL( ptab(:,:,jk)*tmask_i(:,:) ) )
       END DO
-      IF( lk_mpp )   CALL mpp_max( glob_max_3d )
+      IF( lk_mpp )   CALL mpp_max( 'lib_fortran', glob_max_3d )
       !
    END FUNCTION glob_max_3d
@@ -407,5 +407,5 @@
       glob_max_2d_a(1) = MAXVAL( ptab1(:,:)*tmask_i(:,:) )
       glob_max_2d_a(2) = MAXVAL( ptab2(:,:)*tmask_i(:,:) )
-      IF( lk_mpp )   CALL mpp_max( glob_max_2d_a, 2 )
+      IF( lk_mpp )   CALL mpp_max( 'lib_fortran', glob_max_2d_a, 2 )
       !
    END FUNCTION glob_max_2d_a
@@ -433,5 +433,5 @@
          glob_max_3d_a(2) = MAX( glob_max_3d_a(2), MAXVAL( ptab2(:,:,jk)*tmask_i(:,:) ) )
       END DO
-      IF( lk_mpp )   CALL mpp_max( glob_max_3d_a, 2 )
+      IF( lk_mpp )   CALL mpp_max( 'lib_fortran', glob_max_3d_a, 2 )
       !
    END FUNCTION glob_max_3d_a
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/module_example
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/module_example	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/module_example	(revision 10297)
@@ -63,5 +63,5 @@
       ALLOCATE( array(jpi,jpj,jpk) , STAT= exa_mpl_alloc )   ! Module array                                                                
       !
-      IF( lk_mpp             )   CALL mpp_sum ( exa_mpl_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'module_example', exa_mpl_alloc )
       IF( exa_mpl_alloc /= 0 )   CALL ctl_warn('exa_mpl_alloc: failed to allocate arrays')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/nemogcm.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/nemogcm.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/nemogcm.F90	(revision 10297)
@@ -148,5 +148,5 @@
       ! check that all process are still there... If some process have an error,
       ! they will never enter in step and other processes will wait until the end of the cpu time!
-      IF( lk_mpp )   CALL mpp_max( nstop )
+      IF( lk_mpp )   CALL mpp_max( 'nemogcm', nstop )
 
       IF(lwp) WRITE(numout,cform_aaa)   ! Flag AAAAAAA
@@ -621,5 +621,5 @@
 #endif 
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'nemogcm', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'nemo_alloc: unable to allocate standard ocean arrays' )
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/timing.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/timing.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/timing.F90	(revision 10297)
@@ -320,5 +320,5 @@
       END DO
       idum = nsize
-      IF(lk_mpp) CALL mpp_sum(idum)
+      IF(lk_mpp) CALL mpp_sum('timing', idum)
       IF( idum/jpnij /= nsize ) THEN
          IF( lwriter ) WRITE(numtime,*) '        ===> W A R N I N G: '
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OFF/dtadyn.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OFF/dtadyn.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OFF/dtadyn.F90	(revision 10297)
@@ -407,6 +407,6 @@
       hrnf_max = MAXVAL( h_rnf(:,:) )
       IF( lk_mpp )  THEN
-         CALL mpp_max( nkrnf_max )                 ! max over the  global domain
-         CALL mpp_max( hrnf_max )                 ! max over the  global domain
+         CALL mpp_max( 'dtadyn', nkrnf_max )                 ! max over the  global domain
+         CALL mpp_max( 'dtadyn', hrnf_max )                 ! max over the  global domain
       ENDIF
       IF(lwp) WRITE(numout,*) ' '
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OFF/nemogcm.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OFF/nemogcm.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OFF/nemogcm.F90	(revision 10297)
@@ -95,5 +95,5 @@
       ! check that all process are still there... If some process have an error,
       ! they will never enter in step and other processes will wait until the end of the cpu time!
-      IF( lk_mpp )   CALL mpp_max( nstop )
+      IF( lk_mpp )   CALL mpp_max( 'nemogcm', nstop )
 
       !                            !-----------------------!
@@ -434,5 +434,5 @@
       ierr = ierr + trc_oce_alloc()          ! shared TRC / TRA arrays
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'nemogcm', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'nemo_alloc: unable to allocate standard ocean arrays' )
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAO/nemogcm.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAO/nemogcm.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAO/nemogcm.F90	(revision 10297)
@@ -372,5 +372,5 @@
       ierr = ierr + dom_oce_alloc   ()          ! ocean domain
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'nemogcm', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'nemo_alloc : unable to allocate standard ocean arrays' )
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS/diawri.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS/diawri.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS/diawri.F90	(revision 10297)
@@ -109,5 +109,5 @@
       !
       ALLOCATE( ndex_hT(jpi*jpj), ndex_hU(jpi*jpj), ndex_hV(jpi*jpj), STAT=dia_wri_alloc )
-      IF( lk_mpp )   CALL mpp_sum( dia_wri_alloc )
+      IF( lk_mpp )   CALL mpp_sum( 'diawri', dia_wri_alloc )
       !
    END FUNCTION dia_wri_alloc
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS/nemogcm.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS/nemogcm.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS/nemogcm.F90	(revision 10297)
@@ -94,5 +94,5 @@
       ! check that all process are still there... If some process have an error,
       ! they will never enter in step and other processes will wait until the end of the cpu time!
-      IF( lk_mpp )   CALL mpp_max( nstop )
+      IF( lk_mpp )   CALL mpp_max( 'nemogcm', nstop )
 
       IF(lwp) WRITE(numout,cform_aaa)   ! Flag AAAAAAA
@@ -486,5 +486,5 @@
       ierr = ierr + bdy_oce_alloc()          ! bdy masks (incl. initialization)
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'nemogcm', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'nemo_alloc: unable to allocate standard ocean arrays' )
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zsink.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zsink.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/P4Z/p4zsink.F90	(revision 10297)
@@ -124,6 +124,6 @@
         END DO
         IF( lk_mpp ) THEN
-           CALL mpp_max( iiter1 )
-           CALL mpp_max( iiter2 )
+           CALL mpp_max( 'p4zsink', iiter1 )
+           CALL mpp_max( 'p4zsink', iiter2 )
         ENDIF
         iiter1 = MIN( iiter1, niter1max )
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/trcini_pisces.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/trcini_pisces.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/PISCES/trcini_pisces.F90	(revision 10297)
@@ -117,5 +117,5 @@
       ENDIF
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'trcini_pisces', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' )
       !
@@ -299,5 +299,5 @@
       ierr = ierr + p2z_exp_alloc()
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'trcini_pisces', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'p2z_ini: unable to allocate LOBSTER arrays' )
 
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/TRP/trdmxl_trc.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/TRP/trdmxl_trc.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/TRP/trdmxl_trc.F90	(revision 10297)
@@ -64,5 +64,5 @@
          &      ndextrd1(jpi*jpj), nidtrd(jptra), nh_t(jptra),  STAT=trd_mxl_trc_alloc)
          !
-      IF( lk_mpp                )   CALL mpp_sum ( trd_mxl_trc_alloc )
+      IF( lk_mpp                )   CALL mpp_sum ( 'trdmxl_trc', trd_mxl_trc_alloc )
       IF( trd_mxl_trc_alloc /=0 )   CALL ctl_warn('trd_mxl_trc_alloc: failed to allocate arrays')
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcini.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcini.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcini.F90	(revision 10297)
@@ -289,5 +289,5 @@
 #endif
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'trcini', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'top_alloc : unable to allocate standard ocean arrays' )
       !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcnam.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcnam.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcnam.F90	(revision 10297)
@@ -23,4 +23,5 @@
    USE trdtrc_oce  !
    USE iom         ! I/O manager
+   USE lib_mpp, ONLY: ncom_dttrc
 
    IMPLICIT NONE
@@ -76,5 +77,5 @@
       ENDIF
       !
-      rdttrc = rdt * FLOAT( nn_dttrc )          ! passive tracer time-step
+      rdttrc = rdt * FLOAT( nn_dttrc )          ! passive tracer time-step      
       ! 
       IF(lwp) THEN                              ! control print
@@ -128,5 +129,9 @@
       ENDIF
       !
-    END SUBROUTINE trc_nam_run
+#if defined key_mpp_mpi
+      ncom_dttrc = nn_dttrc    ! make nn_fsbc available for lib_mpp
+#endif
+      !
+   END SUBROUTINE trc_nam_run
 
 
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcrst.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcrst.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcrst.F90	(revision 10297)
@@ -320,6 +320,6 @@
          zmax  = MAXVAL( trn(:,:,:,jn), mask= ((tmask*SPREAD(tmask_i,DIM=3,NCOPIES=jpk).NE.0.)) )
          IF( lk_mpp ) THEN
-            CALL mpp_min( zmin )      ! min over the global domain
-            CALL mpp_max( zmax )      ! max over the global domain
+            CALL mpp_min( 'trcrst', zmin )      ! min over the global domain
+            CALL mpp_max( 'trcrst', zmax )      ! max over the global domain
          END IF
          zmean  = ztraf / areatot
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcsub.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcsub.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/TOP/trcsub.F90	(revision 10297)
@@ -308,5 +308,5 @@
 
       ierr =  trc_sub_alloc    ()
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      IF( lk_mpp    )   CALL mpp_sum( 'trcsub', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'top_sub_alloc : unable to allocate standard ocean arrays' )
 
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/BENCH/MY_SRC/zdfiwm.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/BENCH/MY_SRC/zdfiwm.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/BENCH/MY_SRC/zdfiwm.F90	(revision 10297)
@@ -64,5 +64,5 @@
       &         hbot_iwm(jpi,jpj),  hcri_iwm(jpi,jpj)                     , STAT=zdf_iwm_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( zdf_iwm_alloc )
+      IF( lk_mpp             )   CALL mpp_sum ( 'zdfiwm', zdf_iwm_alloc )
       IF( zdf_iwm_alloc /= 0 )   CALL ctl_warn('zdf_iwm_alloc: failed to allocate arrays')
    END FUNCTION zdf_iwm_alloc
@@ -305,5 +305,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( zztmp )
+         IF( lk_mpp )   CALL mpp_sum( 'zdfiwm', zztmp )
          zztmp = rau0 * zztmp ! Global integral of rauo * Kz * N^2 = power contributing to mixing 
          !
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/BENCH/cpp_BENCH.fcm
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/BENCH/cpp_BENCH.fcm	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/BENCH/cpp_BENCH.fcm	(revision 10297)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys  key_mpp_mpi  key_si3
+ bld::tool::fppkeys  key_mpp_mpi  key_si3 key_top
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/diawri.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/diawri.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/diawri.F90	(revision 10297)
@@ -516,5 +516,5 @@
          !
       dia_wri_alloc = MAXVAL(ierr)
-      IF( lk_mpp )   CALL mpp_sum( dia_wri_alloc )
+      IF( lk_mpp )   CALL mpp_sum( 'diawri', dia_wri_alloc )
       !
    END FUNCTION dia_wri_alloc
@@ -625,5 +625,5 @@
             !! that routine is called from nemogcm, so do it here immediately before its needed
             ALLOCATE( ndex_bT(jpi*jpj*nclasses), STAT=ierror )
-            IF( lk_mpp )   CALL mpp_sum( ierror )
+            IF( lk_mpp )   CALL mpp_sum( 'diawri', ierror )
             IF( ierror /= 0 ) THEN
                CALL ctl_stop('dia_wri: failed to allocate iceberg diagnostic array')
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/domvvl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/domvvl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/domvvl.F90	(revision 10297)
@@ -79,5 +79,5 @@
             &      dtilde_e3t_a(jpi,jpj,jpk) , un_td  (jpi,jpj,jpk)     , vn_td  (jpi,jpj,jpk)     ,   &
             &      STAT = dom_vvl_alloc        )
-         IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'domvvl', dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
          un_td = 0._wp
@@ -86,5 +86,5 @@
       IF( ln_vvl_ztilde ) THEN
          ALLOCATE( frq_rst_e3t(jpi,jpj) , frq_rst_hdv(jpi,jpj) , hdiv_lf(jpi,jpj,jpk) , STAT= dom_vvl_alloc )
-         IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'domvvl', dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
       ENDIF
@@ -406,7 +406,7 @@
          END DO
          z_tmax = MAXVAL( ze3t(:,:,:) )
-         IF( lk_mpp )   CALL mpp_max( z_tmax )                 ! max over the global domain
+         IF( lk_mpp )   CALL mpp_max( 'domvvl', z_tmax )                 ! max over the global domain
          z_tmin = MINVAL( ze3t(:,:,:) )
-         IF( lk_mpp )   CALL mpp_min( z_tmin )                 ! min over the global domain
+         IF( lk_mpp )   CALL mpp_min( 'domvvl', z_tmin )                 ! min over the global domain
          ! - ML - test: for the moment, stop simulation for too large e3_t variations
          IF( ( z_tmax >  rn_zdef_max ) .OR. ( z_tmin < - rn_zdef_max ) ) THEN
@@ -470,5 +470,5 @@
          IF ( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
             z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( zht(:,:) ) )
-            IF( lk_mpp ) CALL mpp_max( z_tmax )                             ! max over the global domain
+            IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                             ! max over the global domain
             IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(SUM(tilde_e3t_a))) =', z_tmax
          END IF
@@ -479,5 +479,5 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshn(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshn-SUM(e3t_n))) =', z_tmax
          !
@@ -487,5 +487,5 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + ssha(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+ssha-SUM(e3t_a))) =', z_tmax
          !
@@ -495,17 +495,17 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshb(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshb-SUM(e3t_b))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( sshb(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(sshb))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( sshn(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(sshn))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( ssha(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ssha))) =', z_tmax
       END IF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/usrdef_zgr.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/CANAL/MY_SRC/usrdef_zgr.F90	(revision 10297)
@@ -198,5 +198,5 @@
       CASE(1)
          zmaxlam = MAXVAL(glamt)
-         IF( lk_mpp )   CALL mpp_max( zmaxlam )                 ! max over the global domain
+         IF( lk_mpp )   CALL mpp_max( 'usrdef_zgr', zmaxlam )                 ! max over the global domain
          zscl = rpi / zmaxlam
          z2d(:,:) = 0.5 * ( 1. - COS( glamt(:,:) * zscl ) )
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/VORTEX/MY_SRC/domvvl.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/VORTEX/MY_SRC/domvvl.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/VORTEX/MY_SRC/domvvl.F90	(revision 10297)
@@ -79,5 +79,5 @@
             &      dtilde_e3t_a(jpi,jpj,jpk) , un_td  (jpi,jpj,jpk)     , vn_td  (jpi,jpj,jpk)     ,   &
             &      STAT = dom_vvl_alloc        )
-         IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'domvvl', dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
          un_td = 0._wp
@@ -86,5 +86,5 @@
       IF( ln_vvl_ztilde ) THEN
          ALLOCATE( frq_rst_e3t(jpi,jpj) , frq_rst_hdv(jpi,jpj) , hdiv_lf(jpi,jpj,jpk) , STAT= dom_vvl_alloc )
-         IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
+         IF( lk_mpp             )   CALL mpp_sum ( 'domvvl', dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
       ENDIF
@@ -429,7 +429,7 @@
          END DO
          z_tmax = MAXVAL( ze3t(:,:,:) )
-         IF( lk_mpp )   CALL mpp_max( z_tmax )                 ! max over the global domain
+         IF( lk_mpp )   CALL mpp_max( 'domvvl', z_tmax )                 ! max over the global domain
          z_tmin = MINVAL( ze3t(:,:,:) )
-         IF( lk_mpp )   CALL mpp_min( z_tmin )                 ! min over the global domain
+         IF( lk_mpp )   CALL mpp_min( 'domvvl', z_tmin )                 ! min over the global domain
          ! - ML - test: for the moment, stop simulation for too large e3_t variations
          IF( ( z_tmax >  rn_zdef_max ) .OR. ( z_tmin < - rn_zdef_max ) ) THEN
@@ -493,5 +493,5 @@
          IF ( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
             z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( zht(:,:) ) )
-            IF( lk_mpp ) CALL mpp_max( z_tmax )                             ! max over the global domain
+            IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                             ! max over the global domain
             IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(SUM(tilde_e3t_a))) =', z_tmax
          END IF
@@ -502,5 +502,5 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshn(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshn-SUM(e3t_n))) =', z_tmax
          !
@@ -510,5 +510,5 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + ssha(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+ssha-SUM(e3t_a))) =', z_tmax
          !
@@ -518,17 +518,17 @@
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshb(:,:) - zht(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshb-SUM(e3t_b))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( sshb(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(sshb))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( sshn(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(sshn))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( ssha(:,:) ) )
-         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lk_mpp ) CALL mpp_max( 'domvvl', z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ssha))) =', z_tmax
       END IF
Index: /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/WAD/MY_SRC/bdyini.F90
===================================================================
--- /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/WAD/MY_SRC/bdyini.F90	(revision 10296)
+++ /NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/tests/WAD/MY_SRC/bdyini.F90	(revision 10297)
@@ -1280,5 +1280,5 @@
          END DO
          !
-         IF( lk_mpp )   CALL mpp_sum( bdysurftot )      ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', bdysurftot )      ! sum over the global domain
       END IF   
       !
@@ -1520,5 +1520,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF (ztestmask(1)==1) THEN 
@@ -1564,5 +1564,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF (ztestmask(1)==1) THEN
@@ -1608,5 +1608,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF ((ztestmask(1)==1).AND.(icorns(ib,1)==0)) THEN
@@ -1638,5 +1638,5 @@
             END DO
          END DO
-         IF( lk_mpp )   CALL mpp_sum( ztestmask, 2 )   ! sum over the global domain
+         IF( lk_mpp )   CALL mpp_sum( 'bdyini', ztestmask, 2 )   ! sum over the global domain
 
          IF ((ztestmask(1)==1).AND.(icornn(ib,1)==0)) THEN
