      subroutine ecribl(mat,long,ifil)
      parameter(ngru3=2048)
      common/dim/iadri ; integer(8) iadri
      dimension mat(long)
      ifin=0
      do k=1,long,ngru3
c         if(ifil.eq.76)write(6,*)'ecribl long',long,ifil
         ideb=ifin+1
         ifin=ideb+ngru3-1
c         print*,'long,ideb,ifin,k',long,ideb,ifin,k
         call ecri(mat(ideb),ngru3,ifil)
      enddo
      return
      end
