
      SUBROUTINE CheckMem(error)
      INTEGER error
      IF (error .NE. 0)
     +  STOP 'Not enough storage for data; aborting...'
      END !SUBROUTINE

      SUBROUTINE CheckDealloc(error)
      INTEGER error
      IF (error .NE. 0) THEN
        PRINT *,'Unsuccessful Deallocation... Runtime error = ',error
        STOP  'Program Terminated'
      END IF
      END !SUBROUTINE

