      PROGRAM CHOLESKI
      PARAMETER (N=1024)
      REAL A(N,N), B(N)

      DO I=1,N
         DO J=1,N
            IF (J .GE. I)  THEN 
               A(I,J)=I
            ELSE
               A(I,J)=J
            ENDIF
         ENDDO
      ENDDO

      CALL AdlibClockStart()

      A(1,1)=SQRT(A(1,1))

      DO K=1, N-1
         DO S=K+1, N
            A(S,K)=A(S,K)/A(K,K)
         ENDDO

         DO J=K+1, N
            DO I=J, N
               A(I,J)=A(I,J)-A(I,K)*A(J,K)
            ENDDO
         ENDDO
         
         A(K+1, K+1)=SQRT(A(K+1,K+1))
         
      ENDDO

      CALL AdlibClockStop()

!      PRINT 111, ((A(I,J),I=1,N), J=1,N)
111   FORMAT(1x,f17.2)

      END
