text: SUBROUTINE OUTERR(SRNAME,ERRMSG)
    use MPI
    CHARACTER*(*)      SRNAME
    CHARACTER*(*)      ERRMSG
    !
    INTEGER            STDERR
    PARAMETER          (STDERR = 99)
    !
    IF ((LEN(ERRMSG) .GT. 67) .AND. (LEN(SRNAME) .GT. 6)) THEN
       WRITE (STDERR,9010) SRNAME, ERRMSG
    ELSEIF (LEN(ERRMSG) .GT. 67) THEN
       WRITE (STDERR,9020) SRNAME, ERRMSG
    ELSEIF (LEN(SRNAME) .GT. 6) THEN
       WRITE (STDERR,9030) SRNAME, ERRMSG
    ELSE
       WRITE (STDERR,9040) SRNAME, ERRMSG
    ENDIF
    call stop_MPI
    STOP 'ERROR in lapwso'
    !
    RETURN
    !
  9010 FORMAT (' ''', A6, ''' - ',A67)
  9020 FORMAT (' ''', A,  ''' - ',A67)
  9030 FORMAT (' ''', A6, ''' - ',A)
  9040 FORMAT (' ''', A,  ''' - ',A)
    !
    !     End of 'OUTERR'
    !
  END SUBROUTINE OUTERR
  