!! This file is automatically generated by xmp_coarray_alloc.h.sh
!!
!! RESTRICTIONS in XMP/F
!!  - Quadruple precision real and complex are not supported.
!!  - The number of array dimensions cannot exceed 7.
!!

!-----------------------------------------------------------------------
      interface xmpf_coarray_malloc_generic
!-----------------------------------------------------------------------

      subroutine xmpf_coarray_malloc0d_i2(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer(2), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_i4(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_i8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_l2(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        logical(2), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_l4(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        logical(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_l8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        logical(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_r4(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        real(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_r8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        real(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_z8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        complex(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_z16(descptr, var, count,         &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        complex(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc0d_cn(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        character(element), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_malloc1d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer(2), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        logical(2), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        logical(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        logical(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        real(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        real(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        complex(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        complex(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc1d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        character(element), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer(2), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        logical(2), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        logical(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        logical(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        real(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        real(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        complex(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        complex(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc2d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        character(element), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer(2), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        logical(2), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        logical(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        logical(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        real(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        real(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        complex(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        complex(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc3d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        character(element), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer(2), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        logical(2), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        logical(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        logical(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        real(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        real(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        complex(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        complex(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc4d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        character(element), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer(2), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        logical(2), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        logical(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        logical(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        real(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        real(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        complex(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        complex(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc5d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        character(element), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer(2), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        logical(2), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        logical(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        logical(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        real(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        real(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        complex(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        complex(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc6d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        character(element), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        integer(2), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        integer(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        integer(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        logical(2), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        logical(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        logical(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        real(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        real(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        complex(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        complex(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_malloc7d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        character(element), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      end interface

!-----------------------------------------------------------------------
      interface xmpf_coarray_regmem_generic
!-----------------------------------------------------------------------

      subroutine xmpf_coarray_regmem0d_i2(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer(2), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_i4(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer(4), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_i8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer(8), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_l2(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        logical(2), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_l4(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        logical(4), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_l8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        logical(8), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_r4(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        real(4), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_r8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        real(8), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_z8(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        complex(4), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_z16(descptr, var, count,         &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        complex(8), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem0d_cn(descptr, var, count,          &
     &   element, tag, rank)
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        character(element), intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_regmem1d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer(2), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer(4), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer(8), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        logical(2), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        logical(4), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        logical(8), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        real(4), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        real(8), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        complex(4), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        complex(8), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem1d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        character(element), intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer(2), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer(4), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer(8), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        logical(2), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        logical(4), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        logical(8), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        real(4), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        real(8), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        complex(4), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        complex(8), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem2d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        character(element), intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer(2), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer(4), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer(8), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        logical(2), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        logical(4), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        logical(8), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        real(4), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        real(8), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        complex(4), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        complex(8), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem3d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        character(element), intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer(2), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer(4), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer(8), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        logical(2), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        logical(4), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        logical(8), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        real(4), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        real(8), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        complex(4), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        complex(8), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem4d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        character(element), intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer(2), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer(4), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer(8), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        logical(2), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        logical(4), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        logical(8), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        real(4), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        real(8), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        complex(4), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        complex(8), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem5d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        character(element), intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer(2), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer(4), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer(8), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        logical(2), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        logical(4), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        logical(8), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        real(4), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        real(8), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        complex(4), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        complex(8), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem6d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        character(element), intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_i2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        integer(2), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_i4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        integer(4), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_i8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        integer(8), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_l2(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        logical(2), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_l4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        logical(4), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_l8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        logical(8), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_r4(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        real(4), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_r8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        real(8), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_z8(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        complex(4), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_z16(descptr, var, count,         &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        complex(8), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_regmem7d_cn(descptr, var, count,          &
     &   element, tag, rank                                             &
     &   , lb1, ub1                                                     &
     &   , lb2, ub2                                                     &
     &   , lb3, ub3                                                     &
     &   , lb4, ub4                                                     &
     &   , lb5, ub5                                                     &
     &   , lb6, ub6                                                     &
     &   , lb7, ub7                                                     &
     &   )
        integer(8), intent(in) :: descptr
        integer(8), intent(in) :: tag
        integer, intent(in) :: count, element, rank
        integer, intent(in) :: lb1, ub1
        integer, intent(in) :: lb2, ub2
        integer, intent(in) :: lb3, ub3
        integer, intent(in) :: lb4, ub4
        integer, intent(in) :: lb5, ub5
        integer, intent(in) :: lb6, ub6
        integer, intent(in) :: lb7, ub7
        character(element), intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      end interface

!-----------------------------------------------------------------------
      interface xmpf_coarray_dealloc_generic
!-----------------------------------------------------------------------

      subroutine xmpf_coarray_dealloc0d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc0d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var
      end subroutine

      subroutine xmpf_coarray_dealloc1d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc1d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var(:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc2d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var(:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc3d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var(:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc4d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var(:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc5d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var(:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc6d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var(:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_i2(descptr, var)
        integer(8), intent(in) :: descptr
        integer(2), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_i4(descptr, var)
        integer(8), intent(in) :: descptr
        integer(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_i8(descptr, var)
        integer(8), intent(in) :: descptr
        integer(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_l2(descptr, var)
        integer(8), intent(in) :: descptr
        logical(2), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_l4(descptr, var)
        integer(8), intent(in) :: descptr
        logical(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_l8(descptr, var)
        integer(8), intent(in) :: descptr
        logical(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_r4(descptr, var)
        integer(8), intent(in) :: descptr
        real(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_r8(descptr, var)
        integer(8), intent(in) :: descptr
        real(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_z8(descptr, var)
        integer(8), intent(in) :: descptr
        complex(4), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_z16(descptr, var)
        integer(8), intent(in) :: descptr
        complex(8), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      subroutine xmpf_coarray_dealloc7d_cn(descptr, var)
        integer(8), intent(in) :: descptr
        character(*), pointer, intent(inout) :: var(:,:,:,:,:,:,:)
      end subroutine

      end interface

