      SUBROUTINE FLA_LU_NOPIVOT_LAZY_F( A, NB_ALG, IERROR )

      IMPLICIT NONE 

      INCLUDE "FLAMEf.h"

      INTEGER A( FLA_OBJ_SIZE ), NB_ALG, IERROR

      INTEGER 
     $  ATL(FLA_OBJ_SIZE), ATR(FLA_OBJ_SIZE), 
     $  ABL(FLA_OBJ_SIZE), ABR(FLA_OBJ_SIZE), 
     $  A00(FLA_OBJ_SIZE), A01(FLA_OBJ_SIZE), A02(FLA_OBJ_SIZE), 
     $  A10(FLA_OBJ_SIZE), A11(FLA_OBJ_SIZE), A12(FLA_OBJ_SIZE), 
     $  A20(FLA_OBJ_SIZE), A21(FLA_OBJ_SIZE), A22(FLA_OBJ_SIZE) 

      INTEGER B

      CALL FLA_PART_2X2_F( A,  ATL, ATR,
     $                         ABL, ABR, 
     $                     0, 0, FLA_TL, IERROR )
                          
      DO WHILE ( MIN( FLA_OBJ_LENGTH_F( ABR ), 
     $                FLA_OBJ_WIDTH_F ( ABR ) ) .NE. 0 )
         B = MIN( FLA_OBJ_LENGTH_F( ABR ), FLA_OBJ_WIDTH_F( ABR ) ) 
         B = MIN( B, NB_ALG )

         CALL FLA_REPART_2X2_TO_3X3_F( ATL, ATR,   A00, A01, A02,
     $                                             A10, A11, A12,
     $                                 ABL, ABR,   A20, A21, A22, 
     $                                 B, B, FLA_BR, IERROR )

C       **************************************************************** 

        CALL FLA_TRSM_F( FLA_RIGHT, FLA_UPPER_TRIANGULAR, 
     $       FLA_NO_TRANSPOSE, FLA_NONUNIT_DIAG, 
     $       ONE, A00, A10, IERROR )

        CALL FLA_TRSM_F( FLA_LEFT,  FLA_LOWER_TRIANGULAR, 
     $       FLA_NO_TRANSPOSE, FLA_UNIT_DIAG,    
     $       ONE, A00, A01, IERROR )

        CALL FLA_GEMM_F( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, 
     $       MINUS_ONE, A10, A01, ONE, A11, IERROR )

        CALL FLA_LU_NOPIVOT_LEVEL2_F( A11, IERROR )

C       **************************************************************** 
        
        CALL FLA_CONT_WITH_3X3_TO_2x2_F( ATL, ATR,  A00, A01, A02,
     $                                              A10, A11, A12,
     $                                   ABL, ABR,  A20, A21, A22, 
     $                                   FLA_TL, IERROR )

      ENDDO

      IERROR = FLA_SUCCESS

      RETURN
      END
