anchor.diff:        INTEGER,         intent(in   ) :: NRHS              ! The number of right hand sides, i.e., the number of columns of the matrix B.  NRHS >= 0.
         INTEGER,         intent(in   ) :: LDA               ! The leading dimension of the array A.  LDA >= max(1,N).
         INTEGER,         intent(in   ) :: LDB               ! The leading dimension of the array B.  LDB >= max(1,N).
  -                                                
  -      !     .. Array Arguments ..
  -      INTEGER,         intent(in   ) :: IPIV( * )         ! The pivot indices from DGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i).                
  -      REAL(R8Ki)      ,intent(in   ) :: A( LDA, * )       ! The factors L and U from the factorization A = P*L*U as computed by DGETRF. 
  +
  +      !     .. Array Arguments ..
  +      INTEGER,         intent(in   ) :: IPIV( * )         ! The pivot indices from DGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i).
  +      REAL(R8Ki)      ,intent(in   ) :: A( LDA, * )       ! The factors L and U from the factorization A = P*L*U as computed by DGETRF.
         REAL(R8Ki)      ,intent(inout) :: B( *      )       ! On entry, the right hand side matrix B. On exit, the solution matrix X.
  -      
  -      INTEGER(IntKi),  intent(  out) :: ErrStat           ! Error level 
  -      CHARACTER(*),    intent(  out) :: ErrMsg            ! Message describing error
  -      
  -         ! local variables      
  -      INTEGER                        :: INFO              ! = 0:  successful exit; < 0:  if INFO = -i, the i-th argument had an illegal value; 
  -      
  -      
  -      ErrStat = ErrID_None
  -      ErrMsg  = ""
  -      
  +
  +      INTEGER(IntKi),  intent(  out) :: ErrStat           ! Error level
  +      CHARACTER(*),    intent(  out) :: ErrMsg            ! Message describing error
  +
  +         ! local variables
  +      INTEGER                        :: INFO              ! = 0:  successful exit; < 0:  if INFO = -i, the i-th argument had an illegal value;
  +
  +
  +      ErrStat = ErrID_None
  +      ErrMsg  = ""
  +
         CALL DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
  -                
  -      IF (INFO /= 0) THEN
  -         ErrStat = ErrID_FATAL
  -         WRITE( ErrMsg, * ) INFO
  -         IF (INFO < 0) THEN
  -            ErrMsg  = "LAPACK_DGETRS1: illegal value in argument "//TRIM(ErrMsg)//"."         
  +
  +      IF (INFO /= 0) THEN
  +         ErrStat = ErrID_FATAL
  +         WRITE( ErrMsg, * ) INFO
  +         IF (INFO < 0) THEN
  +            ErrMsg  = "LAPACK_DGETRS1: illegal value in argument "//TRIM(ErrMsg)//"."
            ELSE
               ErrMsg = 'LAPACK_DGETRS1: unknown error '//TRIM(ErrMsg)//'.'
            END IF
  -      END IF      
  - 
  -      
  +      END IF
  +
  +
      RETURN
      END SUBROUTINE LAPACK_DGETRS1
   !=======================================================================
      SUBROUTINE LAPACK_SGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, ErrStat, ErrMsg )
  -                                
  -      ! passed parameters
  - 
  +
  +      ! passed parameters
  +
         CHARACTER(1),   intent(in   ) :: TRANS             ! Specifies the form of the system of equations: = 'N':  A * X = B  (No transpose)
                                                            !                                                = 'T':  A**T* X = B  (Transpose)
                                                            !                                                = 'C':  A**T* X = B  (Conjugate transpose = Transpose)
  
positive.code:          ! lapack library (preferable a binary, but available in source form from http://www.netlib.org/, too)
           ! This wrapper file:
           !     NWTC_LAPACK.f90
           
     !INTEGER, PARAMETER  :: Lib_ReKi = SiKi   !
     !INTEGER, PARAMETER  :: Lib_DbKi = R8Ki   ! DbKi
     !
  
negative.code:       INTEGER,         intent(in   ) :: NRHS              ! The number of right hand sides, i.e., the number of columns of the matrix B.  NRHS >= 0.
        INTEGER,         intent(in   ) :: LDA               ! The leading dimension of the array A.  LDA >= max(1,N).
        INTEGER,         intent(in   ) :: LDB               ! The leading dimension of the array B.  LDB >= max(1,N).
  
        !     .. Array Arguments ..
        INTEGER,         intent(in   ) :: IPIV( * )         ! The pivot indices from DGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i).
        REAL(R8Ki)      ,intent(in   ) :: A( LDA, * )       ! The factors L and U from the factorization A = P*L*U as computed by DGETRF.
        REAL(R8Ki)      ,intent(inout) :: B( LDB, * )       ! On entry, the right hand side matrix B. On exit, the solution matrix X.
  
        INTEGER(IntKi),  intent(  out) :: ErrStat           ! Error level
        CHARACTER(*),    intent(  out) :: ErrMsg            ! Message describing error
  
           ! local variables
        INTEGER                        :: INFO              ! = 0:  successful exit; < 0:  if INFO = -i, the i-th argument had an illegal value;
  
  
        ErrStat = ErrID_None
        ErrMsg  = ""
  
        CALL DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
  
        IF (INFO /= 0) THEN
           ErrStat = ErrID_FATAL
           WRITE( ErrMsg, * ) INFO
           IF (INFO < 0) THEN
              ErrMsg  = "LAPACK_DGETRS: illegal value in argument "//TRIM(ErrMsg)//"."
           ELSE
              ErrMsg = 'LAPACK_DGETRS: unknown error '//TRIM(ErrMsg)//'.'
           END IF
        END IF
  
  
     RETURN
     END SUBROUTINE LAPACK_DGETRS
  !=======================================================================
     SUBROUTINE LAPACK_DGETRS1( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, ErrStat, ErrMsg )
  
        ! passed parameters
  
        CHARACTER(1),    intent(in   ) :: TRANS             ! Specifies the form of the system of equations: = 'N':  A * X = B  (No transpose)
                                                            !                                                = 'T':  A**T* X = B  (Transpose)
                                                            !                                                = 'C':  A**T* X = B  (Conjugate transpose = Transpose)
  