      SUBROUTINE LENTST (LREQ,LDIM,DIMENS,MODULE)
      INTEGER LREQ, LDIM
      CHARACTER*(*) DIMENS, MODULE
      IF (LREQ.GT.LDIM) THEN
         WRITE(6,100) MODULE
         WRITE(6,110) DIMENS, LDIM, LREQ
         WRITE(6,120)
         STOP
      ENDIF
 100  FORMAT(1X,'*** Insufficient space allocation in --',A6,'--')
 110  FORMAT(1X,'   ',A6,'=',I7,'  It should be at least ',I7)
 120  FORMAT(1X,'    Cannot continue ... Bye!')
      END
