        PROGRAM TEST
	INTEGER J,IPIV(N),L,TEMP(N)
        INTEGER A ( LDA,N),B(LDB),N,LDA,LDB	
        REAL denom
        do j = 1, n
	   L = IPIV( J )
           temp(j) = b(j)
	   b(j) = b(L)
	   b(L) = temp(j)
        enddo 
        do j = 2,n
         temp(1:j-1) = a(j,1:j-1) * b(1:j-1)
        enddo
        denom = 1.0/a(n,n)
           b(n) = b(n)*denom

           do j = n-1, 1, -1

             denom = 1.0 / a(j,j)
C             temp(j+1:n) = a(j,j+1:n) * b(j+1:n)
              temp(j:n)= a(j,j:n) * b(j:n)
           enddo
        END

