Can anyone help me ?

When I use this routine , I cann't get the right inverse of a matrix. If matrix is a uptriangular matrix ,the answer is right ,but when matrix is general, the answer is not correct.

How to use it ? How to set the ipiv .

Can anyone help me? Thank you!

Can anyone give me an example on how to use this routine?

Thankyou!