anchor.diff:         call MPI_BARRIER( ADM_COMM_world, ierr )
          call DEBUG_rapend  ('Node imbalance adjustment')
       endif
  +
  +    !$acc wait
   
       call DEBUG_rapstart('COMM data_transfer')
   
  
positive.code:     return
      !
    end subroutine output_info
    !-----------------------------------------------------------------------------
    subroutine output_time
      use mod_adm, only :    &
           !--- public parameters
           ADM_log_fid,    &
           !--- public variables
           ADM_prc_all,    &
           ADM_COMM_world
      !
      implicit none
      !
      real(8)::           &
           ave_time_total,   &
           ave_time_pre ,    &
           ave_time_bar1,    &
           ave_time_bar2,    &
           ave_time_sbuf,    &
           ave_time_recv,    &
           ave_time_send,    &
           ave_time_copy,    &
           ave_time_wait,    &
           ave_time_rbuf,    &
           ave_time_copy_sgp
      real(8)::           &
           min_time_total,   &
           min_time_pre ,    &
           min_time_bar1,    &
           min_time_bar2,    &
           min_time_sbuf,    &
           min_time_recv,    &
           min_time_send,    &
           min_time_copy,    &
           min_time_wait,    &
           min_time_rbuf,    &
           min_time_copy_sgp
      real(8)::           &
           max_time_total,   &
           max_time_pre ,    &
           max_time_bar1,    &
           max_time_bar2,    &
           max_time_sbuf,    &
           max_time_recv,    &
           max_time_send,    &
           max_time_copy,    &
           max_time_wait,    &
           max_time_rbuf,    &
           max_time_copy_sgp
      real(8)::           &
           ave_size_total,   &
           min_size_total,   &
           max_size_total
      real(8)::           &
           ave_comm_count,   &
           min_comm_count,   &
           max_comm_count
      integer::ierr
      !
      write(ADM_log_fid,*)
      write(ADM_log_fid,*) &
           'msg : sub[output_time]/mod[comm]'
      write(ADM_log_fid,*) &
           'version : comm.f90.test5.2.1_wtime'
      write(ADM_log_fid,*) &
           '---------------------------------------&
           &       commnication time               &
           &---------------------------------------'
      !
      call MPI_reduce(time_total,ave_time_total,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_pre ,ave_time_pre ,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_bar1,ave_time_bar1,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_bar2,ave_time_bar2,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_sbuf,ave_time_sbuf,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_recv ,ave_time_recv ,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_send ,ave_time_send ,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_copy,ave_time_copy,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_wait,ave_time_wait,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_rbuf,ave_time_rbuf,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_copy_sgp,ave_time_copy_sgp,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_total ,min_time_total ,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_pre ,min_time_pre ,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_bar1,min_time_bar1,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_bar2,min_time_bar2,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_sbuf,min_time_sbuf,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_recv,min_time_recv ,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_send,min_time_send ,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_copy,min_time_copy,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_wait,min_time_wait,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_rbuf,min_time_rbuf,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_copy_sgp,min_time_copy_sgp,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_total ,max_time_total ,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_pre ,max_time_pre ,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_bar1,max_time_bar1,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_bar2,max_time_bar2,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_sbuf,max_time_sbuf,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_recv,max_time_recv ,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_send,max_time_send ,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_copy,max_time_copy,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_wait,max_time_wait,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_rbuf,max_time_rbuf,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(time_copy_sgp,max_time_copy_sgp,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      !-----
      call MPI_reduce(size_total,ave_size_total,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(size_total,min_size_total,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(size_total,max_size_total,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      call MPI_reduce(comm_count,ave_comm_count,1,MPI_double_precision,MPI_sum,0,ADM_COMM_world,ierr)
      call MPI_reduce(comm_count,min_comm_count,1,MPI_double_precision,MPI_min,0,ADM_COMM_world,ierr)
      call MPI_reduce(comm_count,max_comm_count,1,MPI_double_precision,MPI_max,0,ADM_COMM_world,ierr)
      write(ADM_log_fid,*) "------- Using unit in the following tables is msec & KB -------"
      !-----
      write(ADM_log_fid,*) "---------  average by comm_call_count[",comm_call_count,"] --------"
      write(ADM_log_fid,'(a,1e11.4)') "time_pre      =",1000*time_pre /comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_bar1     =",1000*time_bar1/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_recv     =",1000*time_recv/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_sbuf     =",1000*time_sbuf/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_send     =",1000*time_send/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_copy     =",1000*time_copy/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_wait     =",1000*time_wait/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_rbuf     =",1000*time_rbuf/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_copy_sgp =",1000*time_copy_sgp/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_bar2     =",1000*time_bar2/comm_call_count
      write(ADM_log_fid,'(a,1e11.4)') "time_total    =",1000*time_total/comm_call_count
      write(ADM_log_fid,'(a,1f11.4)') "size_total    =",size_total*8/1024/comm_call_count
      write(ADM_log_fid,'(a,1f11.4)') "comm_count    =",comm_count/comm_call_count
      !-----
      if (rank_me==0) then
         write(ADM_log_fid,*) "---------  average  by ADM_prc_all & comm_call_count --------"
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_pre      =",1000*ave_time_pre /ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_bar1     =",1000*ave_time_bar1/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_recv     =",1000*ave_time_recv/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_sbuf     =",1000*ave_time_sbuf/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_send     =",1000*ave_time_send/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_copy     =",1000*ave_time_copy/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_wait     =",1000*ave_time_wait/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_rbuf     =",1000*ave_time_rbuf/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_copy_sgp =",1000*ave_time_copy_sgp/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_bar2     =",1000*ave_time_bar2/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "ave_time_total    =",1000*ave_time_total/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1f11.4)') "ave_size_total    =",ave_size_total*8/1024/ADM_prc_all/comm_call_count
         write(ADM_log_fid,'(a,1f11.4)') "ave_comm_count    =",ave_comm_count/ADM_prc_all/comm_call_count
         write(ADM_log_fid,*) "---------  minimum  --------"
         write(ADM_log_fid,'(a,1e11.4)') "min_time_pre      =",1000*min_time_pre/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_bar1     =",1000*min_time_bar1/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_recv     =",1000*min_time_recv/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_sbuf     =",1000*min_time_sbuf/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_send     =",1000*min_time_send/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_copy     =",1000*min_time_copy/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_wait     =",1000*min_time_wait/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_rbuf     =",1000*min_time_rbuf/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_copy_sgp =",1000*min_time_copy_sgp/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_bar2     =",1000*min_time_bar2/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "min_time_total    =",1000*min_time_total/comm_call_count
         write(ADM_log_fid,'(a,1f11.4)') "min_size_total    =",min_size_total*8/1024/comm_call_count
         write(ADM_log_fid,'(a,1f11.4)') "min_comm_count    =",min_comm_count/comm_call_count
         write(ADM_log_fid,*) "---------  maximum  --------"
         write(ADM_log_fid,'(a,1e11.4)') "max_time_pre      =",1000*max_time_pre/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_bar1     =",1000*max_time_bar1/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_recv     =",1000*max_time_recv/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_sbuf     =",1000*max_time_sbuf/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_send     =",1000*max_time_send/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_copy     =",1000*max_time_copy/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_wait     =",1000*max_time_wait/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_rbuf     =",1000*max_time_rbuf/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_copy_sgp =",1000*max_time_copy_sgp/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_bar2     =",1000*max_time_bar2/comm_call_count
         write(ADM_log_fid,'(a,1e11.4)') "max_time_total    =",1000*max_time_total/comm_call_count
         write(ADM_log_fid,'(a,1f11.4)') "max_size_total    =",max_size_total*8/1024/comm_call_count
         write(ADM_log_fid,'(a,1f11.4)') "max_comm_count    =",max_comm_count/comm_call_count
         write(ADM_log_fid,*) "----------------------------"
      endif
      !
      !call ADM_proc_stop
      return
      !
    end subroutine output_time
    !-----------------------------------------------------------------------------
    subroutine COMM_data_transfer(&
         var,    &
         var_pl  )
      use mod_adm, only: &
         ADM_COMM_world, &
         ADM_proc_stop,  &
  
negative.code: 
    !-----------------------------------------------------------------------------
    subroutine COMM_var( &
         var,    &
         var_pl, &
         knum,   &
         nnum    )
      use mod_adm, only: &
         ADM_COMM_WORLD,     &
         ADM_prc_tab,        &
         ADM_rgn2prc,        &
         ADM_prc_me,         &
         ADM_NPL,            &
         ADM_SPL,            &
         ADM_prc_npl,        &
         ADM_prc_spl,        &
         ADM_rgnid_npl_mng,  &
         ADM_rgnid_spl_mng,  &
         ADM_gall,           &
         ADM_gall_pl,        &
         ADM_lall,           &
         ADM_lall_pl,        &
         ADM_gall_1d,        &
         ADM_gmin,           &
         ADM_gmax,           &
         ADM_GSLF_PL
      implicit none
  
      integer, intent(in)    :: knum
      integer, intent(in)    :: nnum
      real(8), intent(inout) :: var   (ADM_gall,   knum,ADM_lall,   nnum)
      real(8), intent(inout) :: var_pl(ADM_gall_pl,knum,ADM_lall_pl,nnum)
  
      real(8) :: v_npl_send(knum,nnum)
      real(8) :: v_spl_send(knum,nnum)
      real(8) :: v_npl_recv(knum,nnum)
      real(8) :: v_spl_recv(knum,nnum)
  
      integer :: ireq(4)
      integer :: istat(MPI_STATUS_SIZE)
  
      integer :: ierr
      integer :: k, l, n, rgnid
  
      integer :: i,j,suf
      suf(i,j) = ADM_gall_1d * ((j)-1) + (i)
      !---------------------------------------------------------------------------
  