      subroutine ecr8bl(amat,long,ifil)
      parameter(ngru3=2048)
      real*8 amat(long)
      ifin=0
c       write(6,*)'ecr8bl long ifil',long,ifil,amat(1),amat(326)
      do k=1,long,ngru3
         ideb=ifin+1
         ifin=min0(ideb+ngru3-1,long)
         ll=ifin-ideb+1
         call ecr8(amat(ideb),ll,ifil)
      enddo
      return
      end
       subroutine lir8bl(amat,long,ifil)
      parameter(ngru3=2048)
      real*8 amat(long)
      ifin=0
c      write(6,*)'lir8bl av long,ifil',long,ifil,amat(1),amat(326)
      do k=1,long,ngru3
         ideb=ifin+1
         ifin=min0(ideb+ngru3-1,long)
         ll=ifin-ideb+1
         call lir8(amat(ideb),ll,ifil)
      enddo
c      write(6,*)'lir8bl ap long,ifil',long,ifil,amat(1),amat(326)
      return
      end
